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"
6#include "R3BNeulandHit.h"
8#include "TCutG.h"
9#include <R3BIOConnector.h>
10#include <Rtypes.h>
11#include <RtypesCore.h>
12#include <array>
13#include <map>
14#include <string_view>
15
16class TH2D;
17
19{
20 public:
21 explicit R3BNeulandMultiplicityCalorimetricTrain(std::string_view clusters = "NeulandClusters",
22 std::string_view tracks = "NeulandPrimaryTracks",
23 std::string_view phits = "NeulandPrimaryHits");
24
30
31 void SetEdepOpt(double init, double step, double low, double high) { fEdepOpt = { init, step, low, high }; }
32 void SetEdepOffOpt(double init, double step, double low, double high) { fEdepOffOpt = { init, step, low, high }; }
33 void SetNclusterOpt(double init, double step, double low, double high) { fNclusterOpt = { init, step, low, high }; }
34 void SetNclusterOffOpt(double init, double step, double low, double high)
35 {
36 fNclusterOffOpt = { init, step, low, high };
37 }
38 void SetWeight(double weight) { fWeight = weight; }
39 void SetUseHits(bool is_hit_used) { fUseHits = is_hit_used; }
40
41 private:
42 auto GetCut(unsigned int nNeutrons, double edep, double edepoff, double ncluster, double nclusteroff) -> TCutG*;
43 auto WastedEfficiency(const double* cut) -> double;
44 void Optimize();
45
46 auto GetOrBuildHist(unsigned int index) -> TH2D*;
47
51
53
55
56 std::array<double, 4> fEdepOpt;
57 std::array<double, 4> fEdepOffOpt;
58 std::array<double, 4> fNclusterOpt;
59 std::array<double, 4> fNclusterOffOpt;
60 double fWeight;
61
62 std::map<unsigned int, TH2D*> fHists;
63
64 // TODO: use unique_ptr
65 std::map<unsigned int, TCutG*> fCuts;
66
67 void Exec(Option_t* /*option*/) override;
68 void FinishTask() override;
69 void Print(Option_t* /*option*/ = "") const override;
70 auto Init() -> InitStatus override;
72};
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")
auto GetCut(unsigned int nNeutrons, double edep, double edepoff, double ncluster, double nclusteroff) -> TCutG *
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)
R3B::InputVectorConnector< R3BNeulandCluster > fClusters
auto operator=(R3BNeulandMultiplicityCalorimetricTrain &&) -> R3BNeulandMultiplicityCalorimetricTrain &=delete
InputConnector< std::vector< ElementType > > InputVectorConnector