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"
4#include <R3BNeulandCommon.h>
5
6class FairRunSim;
7class TRandom3;
8
9namespace R3B::Neuland
10{
11 constexpr auto DEFAULT_NEULAND_Z_POS = 1650.; // cm
12 constexpr auto DEFAULT_NEULAND_ENERGY = 0.6; // GeV
13
15 {
16 public:
17 struct Options
18 {
21 {
23 bool store_trajectory = true;
24 std::string material_filename = "media_r3b.geo";
25 std::string engine = "TGeant4";
26 struct Generator
27 {
28 int random_seed = 0;
29 std::string type = "box";
30 int multiplicity = 1;
32 } generator;
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";
49 } neuland;
51 };
52 explicit SimulationApplication();
53
54 private:
55 Options options_;
56 std::unique_ptr<TRandom3> random_gen_;
57
58 // virtual private member functions:
59 void pre_init(FairRun* run) override;
60 void post_init(FairRun* run) override;
61 void print_json_options() override;
62 void dump_json_options(const std::string& filename) override;
63 void run_action(FairRun* run, int num_of_events) override;
64 void ParseApplicationOption(const std::vector<std::string>& filename) override
65 {
66 ParseApplicationOptionImp(filename, options_);
67 }
68
69 // non-virtual private member functions:
70 void setup_engine(FairRunSim* run);
71 void setup_generator(FairRunSim* run);
72 void setup_detectors(FairRunSim* run) const;
73 };
74
75} // namespace R3B::Neuland
Application(std::string_view name, std::unique_ptr< FairRun > run, std::reference_wrapper< Options > option)
void ParseApplicationOptionImp(const std::vector< std::string > &filename, OptionType &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
Simulation of NeuLAND Bar/Paddle.
constexpr auto DEFAULT_NEULAND_ENERGY
constexpr auto DEFAULT_NEULAND_Z_POS
constexpr auto MaxNumberOfPlanes
AnalysisApplication::Options Options
struct R3B::Neuland::SimulationApplication::Options::Simulation simulation
struct R3B::Neuland::SimulationApplication::Options::Detector detectors