59 auto EvntHeader = std::make_unique<R3BEventHeader>();
60 auto read_branch_names = std::vector<std::string>{};
61 auto write_branch_names = std::vector<std::string>{};
62 run->SetEventHeader(EvntHeader.release());
65 run->SetEventHeader(std::make_unique<R3BEventHeader>().release());
67 if (
const auto& option = task_option.digi; option.enable)
70 run->AddTask(task.release());
73 if (
const auto& option = task_option.sim_cal_to_cal; option.enable)
76 auto task = std::make_unique<R3B::Neuland::SimCal2Cal>(read_branch_names.at(0), write_branch_names.at(0));
77 task->SetName(option.name.c_str());
78 run->AddTask(task.release());
81 if (
const auto& option = task_option.hit_monitor; option.enable)
84 auto task = std::make_unique<R3BNeulandHitMon>(read_branch_names.at(0));
85 task->SetName(option.name.c_str());
86 run->AddTask(task.release());
89 if (
const auto& option = task_option.prim_inter_finder; option.enable)
92 auto task = std::make_unique<R3BNeulandPrimaryInteractionFinder>(read_branch_names.at(0),
93 read_branch_names.at(1),
94 write_branch_names.at(0),
95 write_branch_names.at(1),
96 write_branch_names.at(2));
97 task->SetName(option.name.c_str());
98 run->AddTask(task.release());
101 if (
const auto& option = task_option.cluster_finder; option.enable)
104 auto task = std::make_unique<R3BNeulandClusterFinder>(read_branch_names.at(0), write_branch_names.at(0));
105 task->SetName(option.name.c_str());
106 run->AddTask(task.release());
109 if (
const auto& option = task_option.prim_cluster_finder; option.enable)
112 auto task = std::make_unique<R3BNeulandPrimaryClusterFinder>(
113 read_branch_names.at(0), read_branch_names.at(1), write_branch_names.at(0), write_branch_names.at(1));
114 task->SetName(option.name.c_str());
115 run->AddTask(task.release());
118 if (
const auto& option = task_option.multi_calorimeter_train; option.enable)
121 auto task = std::make_unique<R3BNeulandMultiplicityCalorimetricTrain>(
122 read_branch_names.at(0), read_branch_names.at(1), read_branch_names.at(2));
123 task->SetName(option.name.c_str());
124 task->SetUseHits(option.use_hit);
125 task->SetWeight(option.weight);
126 task->SetEdepOpt(option.edep_opt.init, option.edep_opt.step, option.edep_opt.lower, option.edep_opt.upper);
127 task->SetEdepOffOpt(option.edep_off_opt.init,
128 option.edep_off_opt.step,
129 option.edep_off_opt.lower,
130 option.edep_off_opt.upper);
131 task->SetNclusterOffOpt(option.n_cluster_opt.init,
132 option.n_cluster_opt.step,
133 option.n_cluster_opt.lower,
134 option.n_cluster_opt.upper);
135 task->SetNclusterOffOpt(option.n_cluster_off_opt.init,
136 option.n_cluster_off_opt.step,
137 option.n_cluster_off_opt.lower,
138 option.n_cluster_off_opt.upper);
139 run->AddTask(task.release());
142 if (
const auto& option = task_option.multi_bayes_train; option.enable)
146 std::make_unique<R3BNeulandMultiplicityBayesTrain>(read_branch_names.at(0), read_branch_names.at(1));
147 task->SetName(option.name.c_str());
148 run->AddTask(task.release());
151 if (
const auto& option = task_option.multi_bayes; option.enable)
155 std::make_unique<R3BNeulandMultiplicityBayes>(read_branch_names.at(0), write_branch_names.at(0));
156 task->SetName(option.name.c_str());
157 run->AddTask(task.release());
160 if (
const auto& option = task_option.neutron_r_value; option.enable)
163 auto task = std::make_unique<R3BNeulandNeutronsRValue>(
164 option.neutron_energy_mev, read_branch_names.at(0), read_branch_names.at(1), write_branch_names.at(0));
165 task->SetName(option.name.c_str());
166 run->AddTask(task.release());
169 if (
const auto& option = task_option.cal_to_hit_par_task; option.enable)
172 auto task = std::make_unique<R3B::Neuland::Cal2HitParTask>(
173 option.method, read_branch_names.at(0), read_branch_names.at(1), write_branch_names.at(0));
174 task->SetMinStat(option.min_stat);
175 run->AddTask(task.release());