1 #include "numuCCMultiPiFGD2Selection.hxx" 2 #include "numuCCFGD2Selection.hxx" 3 #include "baseSelection.hxx" 4 #include "CutUtils.hxx" 5 #include "EventBoxUtils.hxx" 6 #include "Parameters.hxx" 7 #include "SubDetId.hxx" 9 #include "VersioningUtils.hxx" 10 #include "SystematicUtils.hxx" 14 numuCCMultiPiFGD2Selection::numuCCMultiPiFGD2Selection(
bool forceBreak):
SelectionBase(forceBreak,
EventBoxId::kEventBoxTracker){
24 CopySteps(_numuCCFGD2Selection);
35 AddStep(0, StepBase::kCut,
"CC-0pi",
new NoPionCut());
39 AddStep(1, StepBase::kCut,
"CC-1pi",
new OnePionCut());
43 AddStep(2, StepBase::kCut,
"CC-Other",
new OthersCut());
46 SetBranchAlias(0,
"CC-0pi", 0);
47 SetBranchAlias(1,
"CC-1pi", 1);
48 SetBranchAlias(2,
"CC-Other", 2);
51 SetPreSelectionAccumLevel(2);
60 SetDetectorFV(SubDetId::kFGD2);
62 _numuCCMultiPiSelection.SetDetectorFV(SubDetId::kFGD2);
63 _numuCCFGD2Selection.SetDetectorFV(SubDetId::kFGD2);
68 bool numuCCMultiPiFGD2Selection::FillEventSummary(
AnaEventC& event, Int_t allCutsPassed[]){
73 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD2NuMuCC0Pi;
76 else if (allCutsPassed[1]){
77 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD2NuMuCC1Pi;
80 else if (allCutsPassed[2]){
81 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD2NuMuCCOther;
85 return (static_cast<AnaEventSummaryB*>(event.
Summary)->EventSample != SampleId::kUnassigned);
99 static_cast<AnaEventSummaryB*>(event.
Summary)->LeptonCandidate[SampleId::kFGD2NuMuCC1Pi] = box.
HMNtrack;
102 for(
int i = 0; i < 4; ++i){
119 return _numuCCFGD2Selection.IsRelevantRecObjectForSystematic(event,track,systId,branch);
126 return _numuCCFGD2Selection.IsRelevantTrueObjectForSystematic(event,trueTrack,systId,branch);
133 return _numuCCMultiPiSelection.IsRelevantSystematic(event,box,systId,branch);
142 _numuCCFGD2Selection.InitializeEvent(event);
143 boxUtils::FillTracksWithECal(event);
151 return _numuCCMultiPiSelection.CheckRedoSelection(event, PreviousToyBox, redoFromStep);
AnaTrueVertexB * TrueVertex
Pointer to the AnaTrueVertexB of the interaction that created this AnaTrueParticleB.
Float_t PositionStart[4]
The reconstructed start position of the particle.
bool Apply(AnaEventC &event, ToyBoxB &box) const
bool IsRelevantRecObjectForSystematic(const AnaEventC &event, AnaRecObjectC *recObj, SystId_h systId, Int_t branch) const
Is this track relevant for a given systematic (prior to selection, call when initializing the event...
void DefineDetectorFV()
Define the detector Fiducial Volume in which this selection is applied.
bool IsRelevantTrueObjectForSystematic(const AnaEventC &event, AnaTrueObjectC *trueObj, SystId_h systId, Int_t branch) const
Is this true track relevant for a given systematic (prior to selection, call when initializing the ev...
void DefineSteps()
Define all steps in the selection.
AnaTrackB * HMNtrack
For storing the highest momentum negative track.
AnaEventSummaryC * Summary
A summary of the event with high level quantities.
bool CheckRedoSelection(const AnaEventC &event, const ToyBoxB &PreviousToyBox, Int_t &redoFromStep)
void InitializeEvent(AnaEventC &event)
Fill the EventBox with the objects needed by this selection.
AnaTrueParticleB * GetTrueParticle() const
Return a casted version of the AnaTrueObject associated.
bool IsRelevantSystematic(const AnaEventC &event, const ToyBoxB &box, SystId_h systId, Int_t branch) const
Is this systematic relevant for this selection.