1 #include "numuBkgInAntiNuModeCCMultiPiFGD2Selection.hxx" 2 #include "antiNumuCCMultiPiFGD2Selection.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 numuBkgInAntiNuModeCCMultiPiFGD2Selection::numuBkgInAntiNuModeCCMultiPiFGD2Selection(
bool forceBreak):
SelectionBase(forceBreak,
EventBoxId::kEventBoxTracker){
19 _numuBkgInAntiNuModeCCFGD2Selection.Initialize();
20 _numuBkgInAntiNuModeCCMultiPiSelection.Initialize();
28 CopySteps(_numuBkgInAntiNuModeCCFGD2Selection);
38 AddStep(0, StepBase::kCut,
"CC-0pi",
new NoPionCut());
41 AddStep(1, StepBase::kCut,
"CC-1pi",
new OnePionCut());
44 AddStep(2, StepBase::kCut,
"CC-Other",
new OthersCut());
47 SetBranchAlias(0,
"CC-0pi",0);
48 SetBranchAlias(1,
"CC-1pi",1);
49 SetBranchAlias(2,
"CC-Other",2);
52 SetPreSelectionAccumLevel(2);
60 SetDetectorFV(SubDetId::kFGD2);
62 _numuCCMultiPiFGD2Selection.SetDetectorFV(SubDetId::kFGD2);
63 _numuBkgInAntiNuModeCCFGD2Selection.SetDetectorFV(SubDetId::kFGD2);
64 _numuBkgInAntiNuModeCCMultiPiSelection.SetDetectorFV(SubDetId::kFGD2);
68 bool numuBkgInAntiNuModeCCMultiPiFGD2Selection::FillEventSummary(
AnaEventC& event, Int_t allCutsPassed[]){
73 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD2NuMuBkgInAntiNuModeCC0Pi;
76 else if (allCutsPassed[1]){
77 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD2NuMuBkgInAntiNuModeCC1Pi;
80 else if (allCutsPassed[2]){
81 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD2NuMuBkgInAntiNuModeCCOther;
85 return (static_cast<AnaEventSummaryB*>(event.
Summary)->EventSample != SampleId::kUnassigned);
98 static_cast<AnaEventSummaryB*
>(
event.Summary)->LeptonCandidate[SampleId::kFGD2NuMuBkgInAntiNuModeCC0Pi] = box.
HMNtrack;
99 static_cast<AnaEventSummaryB*>(event.
Summary)->LeptonCandidate[SampleId::kFGD2NuMuBkgInAntiNuModeCC1Pi] = box.
HMNtrack;
100 static_cast<AnaEventSummaryB*
>(
event.Summary)->LeptonCandidate[SampleId::kFGD2NuMuBkgInAntiNuModeCCOther] = box.
HMNtrack;
102 for(
int i = 0; i < 4; ++i){
104 static_cast<AnaEventSummaryB*>(event.
Summary)->VertexPosition[SampleId::kFGD2NuMuBkgInAntiNuModeCC1Pi][i] = box.
HMNtrack->
PositionStart[i];
119 return _numuCCMultiPiFGD2Selection.IsRelevantRecObjectForSystematic(event,track,systId,branch);
126 return _numuCCMultiPiFGD2Selection.IsRelevantTrueObjectForSystematic(event,trueTrack,systId,branch);
133 return _numuBkgInAntiNuModeCCMultiPiSelection.IsRelevantSystematic(event,box,systId,branch);
140 _numuCCMultiPiFGD2Selection.InitializeEvent(event);
147 return _numuCCMultiPiFGD2Selection.CheckRedoSelection(event, PreviousToyBox, redoFromStep);
AnaTrueVertexB * TrueVertex
Pointer to the AnaTrueVertexB of the interaction that created this AnaTrueParticleB.
bool CheckRedoSelection(const AnaEventC &event, const ToyBoxB &PreviousToyBox, Int_t &redoFromStep)
Float_t PositionStart[4]
The reconstructed start position of the particle.
bool Apply(AnaEventC &event, ToyBoxB &box) const
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.
void DefineDetectorFV()
Define the detector Fiducial Volume in which this selection is applied.
bool IsRelevantSystematic(const AnaEventC &event, const ToyBoxB &box, SystId_h systId, Int_t branch) const
Is this systematic relevant for this selection.
AnaTrackB * HMNtrack
For storing the highest momentum negative track.
void InitializeEvent(AnaEventC &event)
Fill the EventBox with the objects needed by this selection.
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...
AnaEventSummaryC * Summary
A summary of the event with high level quantities.
AnaTrueParticleB * GetTrueParticle() const
Return a casted version of the AnaTrueObject associated.
void Initialize()
Initialize this selection: defines the steps and the detectorFV.