1 #include "nueCCFGD2Selection.hxx" 3 #include "baseSelection.hxx" 4 #include "CutUtils.hxx" 5 #include "EventBoxUtils.hxx" 6 #include "VersioningUtils.hxx" 7 #include "SystematicUtils.hxx" 8 #include "trackerSelectionUtils.hxx" 10 #include "nueCCUtils.hxx" 11 #include "nueCutUtils.hxx" 14 nueCCFGD2Selection::nueCCFGD2Selection(
bool forceBreak):
SelectionBase(forceBreak,
EventBoxId::kEventBoxTracker) {
26 SetDetectorFV(SubDetId::kFGD2);
27 _nueCCSelection.SetDetectorFV(SubDetId::kFGD2);
40 AddStep(StepBase::kAction,
"Fill vertex info",
new FillVertex());
52 AddStep(StepBase::kCut,
"EoP",
new EOverPCut());
60 AddStep(StepBase::kAction,
"find best e+e- pair",
new FindPairsAction());
61 AddStep(StepBase::kCut,
"Pair Veto",
new PairCut());
67 AddStep(StepBase::kCut,
"ECal Veto",
new ECalVetoCut());
70 AddStep(StepBase::kCut,
"ToF",
new ToFCut());
75 SetBranchAlias(0,
"trunk");
80 SetPreSelectionAccumLevel(3);
84 bool nueCCFGD2Selection::FillEventSummary(
AnaEventC& event, Int_t allCutsPassed[]){
88 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD2NuECC;
90 return (static_cast<AnaEventSummaryB*>(event.
Summary)->EventSample != SampleId::kUnassigned);
103 for(Int_t i = 0; i < 4; ++i)
115 return _nueCCSelection.IsRelevantRecObjectForSystematic(eventC, recObj, systId, branch);
123 return _nueCCSelection.IsRelevantTrueObjectForSystematic(eventC, trueObj, systId, branch);
130 return _nueCCSelection.IsRelevantRecObjectForSystematicInToy(eventC, boxB, recObj, systId, branch);
137 return _nueCCSelection.IsRelevantTrueObjectForSystematicInToy(eventC, boxB, trueObj, systId, branch);
144 return _nueCCSelection.IsRelevantSystematic(eventC, boxB, systId, branch);
151 return _nueCCSelection.CheckRedoSelection(eventC, PreviousToyBoxB, redoFromStep);
158 _nueCCSelection.InitializeEvent(eventC);
171 if(!track)
return false;
173 return nueCutUtils::EOverPNuE(track, _eoverp_threshold, _eoverp_minmom);
200 if(!track)
return false;
203 if(!vetoTrack)
return true;
205 return (nueCutUtils::TPCVeto(*track, vetoTrack, _delta_z_min));
AnaTrueVertexB * TrueVertex
Pointer to the AnaTrueVertexB of the interaction that created this AnaTrueParticleB.
Float_t PositionStart[4]
The reconstructed start position of the particle.
void DefineDetectorFV()
Define the detector Fiducial Volume in which this selection is applied.
bool Apply(AnaEventC &event, ToyBoxB &box) const
AnaTrackB * MainTrack
For storing the Main Track (The lepton candidate in geranal: HMN or HMP track)
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...
Int_t P0DVetoP0DEcalTracks
Number of P0DEcal tracks. Used in the P0D veto cut.
void DefineSteps()
Define all steps in the selection.
bool IsRelevantRecObjectForSystematicInToy(const AnaEventC &, const ToyBoxB &, AnaRecObjectC *, SystId_h systId, Int_t branch=0) const
Is this track relevant for a given systematic (after selection, called for each toy) ...
bool IsRelevantRecObjectForSystematic(const AnaEventC &event, AnaRecObjectC *track, 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, ToyBoxB &boxB) const
Int_t P0DVetoFGD1Tracks
The number of tracks that start in FGD1. Used in the P0D veto cut.
bool IsRelevantSystematic(const AnaEventC &event, const ToyBoxB &box, SystId_h systId, Int_t branch) const
Is this systematic relevant for this selection.
AnaTrackB * VetoTrack
The TPC veto track.
bool IsRelevantTrueObjectForSystematicInToy(const AnaEventC &, const ToyBoxB &, AnaTrueObjectC *, SystId_h systId, Int_t branch=0) const
Is this true track relevant for a given systematic (after selection, called for each toy) ...
Representation of a global track.
Int_t NOOFVTracks
OOFV tracks.
void InitializeEvent(AnaEventC &event)
Fill the EventBox with the objects needed by this selection.
AnaEventSummaryC * Summary
A summary of the event with high level quantities.
bool Apply(AnaEventC &event, ToyBoxB &box) const
AnaTrueParticleB * GetTrueParticle() const
Return a casted version of the AnaTrueObject associated.
Int_t P0DVetoP0DTracks
The number of tracks that start in the P0D. Used in the P0D veto cut.
bool CheckRedoSelection(const AnaEventC &eventC, const ToyBoxB &PreviousToyBox, Int_t &redoFromStep)
bool Apply(AnaEventC &event, ToyBoxB &boxB) const
A cut on event quality. Requires good beam and ND280 data quality flags.
AnaTrackB * OOFVtrack
For storing the oofv fgd tracks.
void Initialize()
Initialize this selection: defines the steps and the detectorFV.
bool Apply(AnaEventC &event, ToyBoxB &boxB) const