R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandMultiplicityCalorimetricTrain.h
Go to the documentation of this file.
1#pragma once
2
3#include "FairTask.h"
4#include "R3BMCTrack.h"
5#include "R3BNeulandCluster.h"
7#include "TCutG.h"
8#include <R3BIOConnector.h>
9
10class TH2D;
11
13{
14 public:
15 explicit R3BNeulandMultiplicityCalorimetricTrain(std::string_view clusters = "NeulandClusters",
16 std::string_view tracks = "NeulandPrimaryTracks",
17 std::string_view phits = "NeulandPrimaryHits");
18
24
25 void SetEdepOpt(double init, double step, double low, double high) { fEdepOpt = { init, step, low, high }; }
26 void SetEdepOffOpt(double init, double step, double low, double high) { fEdepOffOpt = { init, step, low, high }; }
27 void SetNclusterOpt(double init, double step, double low, double high) { fNclusterOpt = { init, step, low, high }; }
28 void SetNclusterOffOpt(double init, double step, double low, double high)
29 {
30 fNclusterOffOpt = { init, step, low, high };
31 }
32 void SetWeight(double weight) { fWeight = weight; }
33 void SetUseHits(bool is_hit_used) { fUseHits = is_hit_used; }
34
35 private:
36 auto GetCut(unsigned int nNeutrons, double edep, double edepoff, double ncluster, double nclusteroff) -> TCutG*;
37 auto WastedEfficiency(const double* cut) -> double;
38 void Optimize();
39
40 auto GetOrBuildHist(unsigned int index) -> TH2D*;
41
45
47
48 bool fUseHits;
49
50 std::array<double, 4> fEdepOpt;
51 std::array<double, 4> fEdepOffOpt;
52 std::array<double, 4> fNclusterOpt;
53 std::array<double, 4> fNclusterOffOpt;
54 double fWeight;
55
56 std::map<unsigned int, TH2D*> fHists;
57
58 // TODO: use unique_ptr
59 std::map<unsigned int, TCutG*> fCuts;
60
61 void Exec(Option_t* /*option*/) override;
62 void FinishTask() override;
63 void Print(Option_t* /*option*/ = "") const override;
64 auto Init() -> InitStatus override;
66};
NeuLAND number of clusters / energy - neutron multiplicity parameter storage.
void SetEdepOffOpt(double init, double step, double low, double high)
void SetEdepOpt(double init, double step, double low, double high)
auto operator=(const R3BNeulandMultiplicityCalorimetricTrain &) -> R3BNeulandMultiplicityCalorimetricTrain &=delete
R3BNeulandMultiplicityCalorimetricTrain(std::string_view clusters="NeulandClusters", std::string_view tracks="NeulandPrimaryTracks", std::string_view phits="NeulandPrimaryHits")
void SetNclusterOffOpt(double init, double step, double low, double high)
R3BNeulandMultiplicityCalorimetricTrain(R3BNeulandMultiplicityCalorimetricTrain &&)=delete
R3BNeulandMultiplicityCalorimetricTrain(const R3BNeulandMultiplicityCalorimetricTrain &)=delete
void SetNclusterOpt(double init, double step, double low, double high)
auto operator=(R3BNeulandMultiplicityCalorimetricTrain &&) -> R3BNeulandMultiplicityCalorimetricTrain &=delete
InputConnector< std::vector< ElementType > > InputVectorConnector