HighLAND
gammaSelection.hxx
1 #ifndef gammaSelection_h
2 #define gammaSelection_h
3 
4 #include "SelectionBase.hxx"
5 #include "Parameters.hxx"
6 #include "ToyBoxTracker.hxx"
7 #include "SystId.hxx"
8 #include "SubDetId.hxx"
9 
10 #include "nueCCSelection.hxx"
11 
13 public:
14  gammaSelection(bool forceBreak=true);
15  virtual ~gammaSelection(){}
16 
17  //---- These are mandatory functions
18  void DefineSteps();
19  void DefineDetectorFV();
20  ToyBoxB* MakeToyBox(){return new ToyBoxNueCC();}
21 
22  void InitializeEvent(AnaEventC& event);
23  bool FillEventSummary(AnaEventC& event, Int_t allCutsPassed[]);
24  SampleId::SampleEnum GetSampleEnum(){return SampleId::kFGD1Gamma;}
25 
26  bool CheckRedoSelection(const AnaEventC& eventC, const ToyBoxB& PreviousToyBox, Int_t& redoFromStep);
27  bool IsRelevantRecObjectForSystematic(const AnaEventC& event, AnaRecObjectC* trackRecC, SystId_h systId, Int_t branch) const;
28  bool IsRelevantTrueObjectForSystematic(const AnaEventC& event, AnaTrueObjectC* trueTrack, SystId_h systId, Int_t branch) const;
29  bool IsRelevantRecObjectForSystematicInToy(const AnaEventC& event, const ToyBoxB& boxB, AnaRecObjectC* recObj, SystId_h systId, Int_t branch) const;
30  bool IsRelevantTrueObjectForSystematicInToy(const AnaEventC& event, const ToyBoxB& boxB, AnaTrueObjectC* trueObj, SystId_h systId, Int_t branch) const;
31  bool IsRelevantSystematic(const AnaEventC& event, const ToyBoxB& box, SystId_h systId, Int_t branch) const;
32 
33 
34 protected:
35  nueCCSelection _nueCCSelection;
36 
37  Int_t _FindLeadingTracksStepIndex;
38  Int_t _TotalMultiplicityCutIndex;
39  Int_t _ElecPIDCutIndex;
40  Int_t _ElecPIDStepIndex;
41 
42  //Float_t _elepullpri_min;
43  //Float_t _elepullpri_max;
44 };
45 
47 public:
48  using StepBase::Apply;
49  bool Apply(AnaEventC& eventC, ToyBoxB& boxB) const;
51 };
52 
54 public:
55  using StepBase::Apply;
56  bool Apply(AnaEventC& eventC, ToyBoxB& boxB) const;
58 };
59 
61 public:
62  using StepBase::Apply;
63  bool Apply(AnaEventC& eventC, ToyBoxB& boxB) const;
65 };
66 
68 public:
70  _num_tpc_nodes = ND::params().GetParameterI("psycheSelections.gammaAnalysis.Cuts.Quality.MinTPCNodesPrimary");
71  }
72  using StepBase::Apply;
73  bool Apply(AnaEventC& eventC, ToyBoxB& boxB) const;
75 protected:
76  Int_t _num_tpc_nodes;
77 };
78 
79 class MinvCut_gamma: public StepBase{
80 public:
81  MinvCut_gamma(){
82  _inv_mass_min = (Float_t)ND::params().GetParameterD("psycheSelections.gammaAnalysis.Cuts.PairFinder.InvMassMin");
83  }
84  using StepBase::Apply;
85  bool Apply(AnaEventC& eventC, ToyBoxB& boxB) const;
86  StepBase* MakeClone(){return new MinvCut_gamma();}
87 protected:
88  Float_t _inv_mass_min;
89 };
90 
91 class PIDCut_gamma: public StepBase{
92 public:
93  PIDCut_gamma(){
94  _elepullpri_min = (Float_t)ND::params().GetParameterD("psycheSelections.gammaAnalysis.Cuts.PID.PullElecMin");
95  _elepullpri_max = (Float_t)ND::params().GetParameterD("psycheSelections.gammaAnalysis.Cuts.PID.PullElecMax");
96  }
97  using StepBase::Apply;
98  bool Apply(AnaEventC& eventC, ToyBoxB& boxB) const;
99  StepBase* MakeClone(){return new PIDCut_gamma();}
100 protected:
101  Float_t _elepullpri_min;
102  Float_t _elepullpri_max;
103 };
104 
105 #endif
void DefineDetectorFV()
Define the detector Fiducial Volume in which this selection is applied.
int GetParameterI(std::string)
Get parameter. Value is returned as integer.
Definition: Parameters.cxx:217
bool IsRelevantRecObjectForSystematicInToy(const AnaEventC &event, const ToyBoxB &boxB, AnaRecObjectC *recObj, SystId_h systId, Int_t branch) const
Is this track relevant for a given systematic (after selection, called for each toy) ...
StepBase * MakeClone()
MANDATORY FUNCTIONS !!!
bool IsRelevantSystematic(const AnaEventC &event, const ToyBoxB &box, SystId_h systId, Int_t branch) const
Is this systematic relevant for this selection.
void DefineSteps()
Define all steps in the selection.
StepBase * MakeClone()
MANDATORY FUNCTIONS !!!
bool CheckRedoSelection(const AnaEventC &eventC, const ToyBoxB &PreviousToyBox, Int_t &redoFromStep)
StepBase * MakeClone()
MANDATORY FUNCTIONS !!!
virtual bool Apply(AnaEventC &event, ToyBoxB &box) const
Definition: StepBase.hxx:46
bool IsRelevantRecObjectForSystematic(const AnaEventC &event, AnaRecObjectC *trackRecC, SystId_h systId, Int_t branch) const
Is this track relevant for a given systematic (prior to selection, call when initializing the event...
bool Apply(AnaEventC &event, bool &redo)
Apply all steps in the selection.
double GetParameterD(std::string)
Get parameter. Value is returned as double.
Definition: Parameters.cxx:229
void InitializeEvent(AnaEventC &event)
Fill the EventBox with the objects needed by this selection.
ToyBoxB * MakeToyBox()
Create the appropriate type of box.
bool IsRelevantTrueObjectForSystematicInToy(const AnaEventC &event, const ToyBoxB &boxB, AnaTrueObjectC *trueObj, SystId_h systId, Int_t branch) const
Is this true track relevant for a given systematic (after selection, called for each toy) ...
StepBase * MakeClone()
MANDATORY FUNCTIONS !!!
StepBase * MakeClone()
MANDATORY FUNCTIONS !!!
StepBase * MakeClone()
MANDATORY FUNCTIONS !!!
ToyBoxB ** PreviousToyBox
Array of pointers to the PreviousToyBox (for each event)
bool IsRelevantTrueObjectForSystematic(const AnaEventC &event, AnaTrueObjectC *trueTrack, SystId_h systId, Int_t branch) const
Is this true track relevant for a given systematic (prior to selection, call when initializing the ev...