R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandAnalysisApp.h
Go to the documentation of this file.
1#pragma once
2
4#include "R3BFTCalEngine.h"
5#include "R3BNeulandApp.h"
9#include <string>
10#include <string_view>
11#include <vector>
12
13namespace R3B::Neuland
14{
15 namespace Digitizing = R3B::Digitizing;
17 constexpr auto RVAUE_DEFAULT_NEUTRON_ENERGY = 600.;
18
20 {
21 double init{};
22 double step{};
23 double lower{};
24 double upper{};
25 };
26
27 constexpr auto DEFAULT_EDEP_OPT = MinimizerLimVar{ 200., 25., 50., 1500. };
28 constexpr auto DEFAULT_EDEP_OFF_OPT = MinimizerLimVar{ 5., 1., 0., 250. };
29 constexpr auto DEFAULT_N_CLUSTER_OPT = MinimizerLimVar{ 10., 5., 5., 50. };
30 constexpr auto DEFAULT_N_CLUSTER_OFF_OPT = MinimizerLimVar{ 2., 1., 0., 10. };
31 constexpr auto DEFAULT_MIN_STAT = 10;
32
34 {
35 public:
36 using TamexChannel = Tamex::Channel;
37
38 struct Options
39 {
41 struct Tasks
42 {
45 {
46 bool enable = false;
47 std::string name = "NeulandSimCal2Cal";
48 std::string read = "NeulandSimCal";
49 std::string write = "NeulandCalData";
51 struct HitMon
52 {
53 bool enable = false;
54 std::string name = "NeulandHitMon";
55 std::string read = "NeulandHits";
56 std::string write;
59 {
60 bool enable = false;
61 std::string name = "NeulandPrimaryInteractionFinder";
62 std::string read = "NeulandPoints;NeulandHits";
63 std::string write = "NeulandPrimaryPoints;NeulandPrimaryHits;NeulandPrimaryTracks";
66 {
67 std::string read = "NeulandHits";
68 std::string write = "NeulandClusters";
69 bool enable = false;
70 std::string name = "NeulandClusterFinder";
73 {
74 bool enable = false;
75 std::string name = "NeulandPrimaryClusterFinder";
76 std::string read = "NeulandPrimaryHits;NeulandClusters";
77 std::string write = "NeulandPrimaryClusters;NeulandSecondaryClusters";
80 {
81 bool enable = false;
82 bool use_hit = false;
83 double weight = 0.;
88 std::string name = "NeulandMultiplicityCalorimetricTrain";
89 std::string read = "NeulandClusters;NeulandPrimaryTracks;NeulandPrimaryHits";
90 std::string write;
93 {
94 bool enable = false;
95 std::string name = "NeulandMultiplicityBayesTrain";
96 std::string read = "NeulandClusters;NeulandPrimaryTracks";
97 std::string write;
100 {
101 bool enable = false;
102 std::string name = "NeulandMultiplicityBayes";
103 std::string read = "NeulandClusters";
104 std::string write = "NeulandMultiplicity";
107 {
108 bool enable = false;
110 std::string name = "NeulandNeutronsRValue";
111 std::string read = "NeulandMultiplicity;NeulandClusters";
112 std::string write = "NeulandNeutrons";
115 {
116 bool enable = false;
117 std::string name = "MapDataConverterTask";
118 std::string read = "NeulandMappedData;NeulandTrigMappedData";
119 std::string write = "NeulandMapData;NeulandTrigMapData";
122 {
123 bool enable = false;
124 bool has_trig_enabled = true;
126 std::string name = "NeulandMap2CalParTask";
127 std::string read = "NeulandMapData;NeulandTrigMapData";
128 std::string write = "LandTCalPar;LandTrigTCalPar";
131 {
132 bool enable = false;
133 bool enable_pulse_mode = false;
135 int min_stat = 1;
136 std::string name = "NeulandMap2CalTask";
137 std::string read = "NeulandMapData;NeulandTrigMapData;LandTCalPar;LandTrigTCalPar";
138 std::string write = "NeulandCalData";
141 {
142 bool enable = false;
146 std::string name = "NeulandCal2HitParTask";
147 std::string read = "NeulandCalData;NeulandCalibrationBasePar";
148 std::string write = "NeulandHitPar";
151 {
152 bool enable = false;
155 std::string name = "NeulandCal2HitTask";
156 std::string read = "NeulandCalData;NeulandHitPar";
157 std::string write = "NeulandHit";
160 {
161 bool enable = false;
162 std::string name = "LosMap2CalParTask";
163 std::string read = "LosMapped;LosTriggerMapped";
164 std::string write = "LosTCalPar";
167 {
168 bool enable = false;
169 std::string name = "LosMap2CalTask";
170 std::string read = "LosMapped;LosTriggerMapped;LosTCalPar";
171 std::string write = "LosCal;LosTriggerCal";
174 {
175 bool enable = false;
176 std::string name = "LosProvideTStart";
177 std::string read = "LosCal;LosTriggerCal";
178 std::string write;
181 };
182
183 explicit AnalysisApplication();
184
185 void set_channel(std::string_view channel) { options_.tasks.digi.channel = channel; }
186 void set_paddle(std::string_view paddle) { options_.tasks.digi.paddle = paddle; }
187
188 private:
190
191 // virtual private member functions:
192 void pre_init(FairRun* run) override;
193 void print_json_options() override;
194 void dump_json_options(const std::string& filename) override;
195 void setup_application_options(CLI::App& program_options) override;
196 void ParseApplicationOption(const std::vector<std::string>& filename) override;
197
198 // non-virtual private member functions:
199 void set_parameters();
200 auto create_neuland_digi_engine_map(const R3B::Neuland::DigiTaskOptions& option, std::string_view hit_par_name);
201 };
202} // namespace R3B::Neuland
auto create_neuland_digi_engine_map(const R3B::Neuland::DigiTaskOptions &option, std::string_view hit_par_name)
void ParseApplicationOption(const std::vector< std::string > &filename) override
void setup_application_options(CLI::App &program_options) override
void dump_json_options(const std::string &filename) override
void set_channel(std::string_view channel)
void set_paddle(std::string_view paddle)
void run() override
Run the CLI program.
CLIApplication(std::string_view name, std::unique_ptr< FairRun > run, std::reference_wrapper< Options > option)
NeuLAND digitizing finder task.
Simulation of NeuLAND Bar/Paddle.
constexpr auto DEFAULT_EDEP_OPT
constexpr auto DEFAULT_EDEP_OFF_OPT
constexpr auto DEFAULT_MIN_STAT
constexpr auto DEFAULT_N_CLUSTER_OPT
constexpr auto RVAUE_DEFAULT_NEUTRON_ENERGY
constexpr auto DEFAULT_N_CLUSTER_OFF_OPT
struct R3B::Neuland::AnalysisApplication::Options::Tasks::Cal2HitTask cal_to_hit_task
struct R3B::Neuland::AnalysisApplication::Options::Tasks::LosProvideTStart los_provide_t_start
struct R3B::Neuland::AnalysisApplication::Options::Tasks::LosMap2CalParTask los_map_to_cal_par_task
struct R3B::Neuland::AnalysisApplication::Options::Tasks::HitMon hit_monitor
struct R3B::Neuland::AnalysisApplication::Options::Tasks::LosMap2CalTask los_map_to_cal_task
struct R3B::Neuland::AnalysisApplication::Options::Tasks::SimCal2Cal sim_cal_to_cal
struct R3B::Neuland::AnalysisApplication::Options::Tasks::Map2CalTask map_to_cal_task
struct R3B::Neuland::AnalysisApplication::Options::Tasks::PrimInteractionFinder prim_inter_finder
struct R3B::Neuland::AnalysisApplication::Options::Tasks::NeutronRValue neutron_r_value
struct R3B::Neuland::AnalysisApplication::Options::Tasks::Map2CalParTask map_to_cal_par_task
struct R3B::Neuland::AnalysisApplication::Options::Tasks::MapDataConverterTask map_data_converter_task
struct R3B::Neuland::AnalysisApplication::Options::Tasks::ClusterFinder cluster_finder
struct R3B::Neuland::AnalysisApplication::Options::Tasks::PrimClusterFinder prim_cluster_finder
struct R3B::Neuland::AnalysisApplication::Options::Tasks::MultiBayes multi_bayes
struct R3B::Neuland::AnalysisApplication::Options::Tasks::MultiBayesTrain multi_bayes_train
struct R3B::Neuland::AnalysisApplication::Options::Tasks::Cal2HitParTask cal_to_hit_par_task
struct R3B::Neuland::AnalysisApplication::Options::Tasks::MultiTrain multi_calorimeter_train
struct R3B::Neuland::AnalysisApplication::Options::Tasks tasks
Configuration struct for R3B::Neuland::Digitizer used in R3B::Neuland::AnalysisApplication.