HighLAND
baseSelection.cxx
1 #include "baseSelection.hxx"
2 #include "ND280AnalysisUtils.hxx"
3 #include "BasicUtils.hxx"
4 #include "CutUtils.hxx"
5 
6 //********************************************************************
7 baseSelection::baseSelection(): SelectionBase() {
8 //********************************************************************
9 }
10 
11 //********************************************************************
13 //********************************************************************
14 
15  AddStep(StepBase::kCut, "event quality", new EventQualityCut(), true);
16 }
17 
18 //**************************************************
19 bool EventQualityCut::Apply(AnaEventC& eventBB, ToyBoxB& box) const{
20 //**************************************************
21 
22  (void)box;
23 
24  AnaEventB& event = *static_cast<AnaEventB*>(&eventBB);
25 
26  if(event.GetIsMC()) return true; // This is MC, ignore DQ.
27 
28  if (enableDQCut) {
29  if(!event.DataQuality->GoodDaq ) return false; // Bad ND280 DQ
30  }
31 
32  if (enableBeamQualityCut) {
33  if(!event.Beam->GoodSpill ) return false; // Bad Spill
34  }
35 
36  return true;
37 }
38 
39 //********************************************************************
40 bool baseSelection::FillEventSummary(AnaEventC& event, Int_t allCutsPassed[]){
41 //********************************************************************
42 
43  (void)event;
44  (void)allCutsPassed;
45 
46  return 0;
47 }
bool Apply(AnaEventC &event, ToyBoxB &box) const
void DefineSteps()
Define all steps in the selection.
A cut on event quality. Requires good beam and ND280 data quality flags.