HighLAND
baseSelection.hxx
1 #ifndef baseSelection_h
2 #define baseSelection_h
3 
4 #include "SelectionBase.hxx"
5 #include "Parameters.hxx"
6 #include "ToyBoxTracker.hxx"
7 
8 /// This file defines steps that are common to all analyses.
9 /// Currently the only cut is one on event quality.
10 
11 
13  public:
14  baseSelection();
15  virtual ~baseSelection(){}
16 
17  //---- These are mandatory functions
18  void DefineSteps();
19  ToyBoxB* MakeToyBox(){return new ToyBoxTracker();}
20  EventBoxB* MakeEventBox(){return new EventBoxB();}
21  AnaEventSummaryB* MakeEventSummary(){return new AnaEventSummaryB();}
22  bool FillEventSummary(AnaEventC& event, Int_t allCutsPassed[]);
23 
24 };
25 
26 
27 /// A cut on event quality. Requires good beam and ND280 data quality flags.
28 class EventQualityCut: public StepBase {
29  public:
30  using StepBase::Apply;
31 
33  enableDQCut = (bool) ND::params().GetParameterI("psycheSelections.EnableDataQualityCut");
34  enableBeamQualityCut = (bool) ND::params().GetParameterI("psycheSelections.EnableBeamQualityCut");
35  }
36 
37  bool enableDQCut;
38  bool enableBeamQualityCut;
39 
40  /// Apply the event quality cut. See EventQualityCut class documentation
41  /// for details.
42  bool Apply(AnaEventC& event, ToyBoxB& box) const;
44 };
45 
46 #endif
int GetParameterI(std::string)
Get parameter. Value is returned as integer.
Definition: Parameters.cxx:217
ToyBoxB * MakeToyBox()
Create the appropriate type of box.
StepBase * MakeClone()
MANDATORY FUNCTIONS !!!
virtual bool Apply(AnaEventC &event, ToyBoxB &box) const
Definition: StepBase.hxx:46
bool Apply(AnaEventC &event, bool &redo)
Apply all steps in the selection.
void DefineSteps()
Define all steps in the selection.
A cut on event quality. Requires good beam and ND280 data quality flags.