R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandSimApp.h
Go to the documentation of this file.
1#pragma once
2
3#include "R3BNeulandApp.h"
5#include <Math/Vector3Dfwd.h>
6#include <R3BNeulandCommon.h>
7#include <memory>
8#include <string>
9#include <vector>
10
11class FairRunSim;
12class TRandom3;
13
14namespace R3B::Neuland
15{
16 constexpr auto DEFAULT_NEULAND_Z_POS = 1650.; // cm
17 constexpr auto DEFAULT_NEULAND_ENERGY = 0.6; // GeV
18
20 {
21 public:
22 struct Options
23 {
26 {
28 int random_seed = 0;
29 bool store_trajectory = true;
30 std::string material_filename = "media_r3b.geo";
31 std::string engine = "TGeant4";
34 struct Detector
35 {
36 struct Cave
37 {
38 bool enable = true;
39 std::string name = "CAVE";
40 std::string geo_file = "r3b_cave.geo";
41 } cave;
42 struct Neuland
43 {
44 bool enable = true;
45 std::string name = "Neuland";
47 ROOT::Math::XYZVectorD location{ 0, 0, DEFAULT_NEULAND_Z_POS };
49 } neuland;
51 };
52 explicit SimulationApplication();
53
54 private:
57 std::unique_ptr<TRandom3> random_gen_;
58
59 // virtual private member functions:
60 void pre_init(FairRun* run) override;
61 void post_init(FairRun* run) override;
62 void print_json_options() override;
63 void dump_json_options(const std::string& filename) override;
64 void run_action(FairRun* run, int num_of_events) override;
65 void ParseApplicationOption(const std::vector<std::string>& filename) override;
66
67 // non-virtual private member functions:
68 void setup_engine(FairRunSim* run);
69 void setup_generator(FairRunSim* run);
70 void setup_detectors(FairRunSim* run) const;
71 };
72
73} // namespace R3B::Neuland
void run() override
Run the CLI program.
CLIApplication(std::string_view name, std::unique_ptr< FairRun > run, std::reference_wrapper< Options > option)
void dump_json_options(const std::string &filename) override
void run_action(FairRun *run, int num_of_events) override
void ParseApplicationOption(const std::vector< std::string > &filename) override
void post_init(FairRun *run) override
void pre_init(FairRun *run) override
void setup_detectors(FairRunSim *run) const
std::unique_ptr< TRandom3 > random_gen_
Simulation of NeuLAND Bar/Paddle.
constexpr auto DEFAULT_NEULAND_ENERGY
constexpr auto DEFAULT_NEULAND_Z_POS
constexpr auto MaxNumberOfPlanes
struct R3B::Neuland::SimulationApplication::Options::Simulation simulation
struct R3B::Neuland::SimulationApplication::Options::Detector detectors