1 #include "numuBkgInAntiNuModeCCMultiPiSelection.hxx" 2 #include "numuBkgInAntiNuModeCCSelection.hxx" 3 #include "antiNumuCCMultiPiSelection.hxx" 4 #include "baseSelection.hxx" 5 #include "CutUtils.hxx" 6 #include "Parameters.hxx" 7 #include "SubDetId.hxx" 8 #include "EventBoxId.hxx" 12 numuBkgInAntiNuModeCCMultiPiSelection::numuBkgInAntiNuModeCCMultiPiSelection(
bool forceBreak):
SelectionBase(forceBreak,
EventBoxId::kEventBoxTracker) {
24 CopySteps(_numuBkgInAntiNuModeCCSelection);
34 AddStep(0, StepBase::kCut,
"CC-0pi",
new NoPionCut());
37 AddStep(1, StepBase::kCut,
"CC-1pi",
new OnePionCut());
40 AddStep(2, StepBase::kCut,
"CC-Other",
new OthersCut());
43 SetBranchAlias(0,
"CC-0pi",0);
44 SetBranchAlias(1,
"CC-1pi",1);
45 SetBranchAlias(2,
"CC-Other",2);
48 SetPreSelectionAccumLevel(2);
56 SetDetectorFV(SubDetId::kFGD1);
59 _numuCCMultiPiSelection.SetDetectorFV(SubDetId::kFGD1);
60 _numuBkgInAntiNuModeCCSelection.SetDetectorFV(SubDetId::kFGD1);
64 bool numuBkgInAntiNuModeCCMultiPiSelection::FillEventSummary(
AnaEventC& event, Int_t allCutsPassed[]){
69 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD1NuMuBkgInAntiNuModeCC0Pi;
72 else if (allCutsPassed[1]){
73 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD1NuMuBkgInAntiNuModeCC1Pi;
76 else if (allCutsPassed[2]){
77 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD1NuMuBkgInAntiNuModeCCOther;
81 return (static_cast<AnaEventSummaryB*>(event.
Summary)->EventSample != SampleId::kUnassigned);
93 static_cast<AnaEventSummaryB*
>(
event.Summary)->LeptonCandidate[SampleId::kFGD1NuMuBkgInAntiNuModeCC0Pi] = box.
HMNtrack;
94 static_cast<AnaEventSummaryB*>(event.
Summary)->LeptonCandidate[SampleId::kFGD1NuMuBkgInAntiNuModeCC1Pi] = box.
HMNtrack;
95 static_cast<AnaEventSummaryB*
>(
event.Summary)->LeptonCandidate[SampleId::kFGD1NuMuBkgInAntiNuModeCCOther] = box.
HMNtrack;
97 for(
int i = 0; i < 4; ++i){
99 static_cast<AnaEventSummaryB*>(event.
Summary)->VertexPosition[SampleId::kFGD1NuMuBkgInAntiNuModeCC1Pi][i] = box.
HMNtrack->
PositionStart[i];
115 return _numuCCMultiPiSelection.IsRelevantRecObjectForSystematic(event,track,systId,branch);
122 return _numuCCMultiPiSelection.IsRelevantTrueObjectForSystematic(event,trueTrack,systId,branch);
135 if (systId==SystId::kFgdTrackEff)
148 _numuCCMultiPiSelection.InitializeEvent(event);
156 if( _numuBkgInAntiNuModeCCSelection.CheckRedoSelection(event,PreviousToyBox,redoFromStep))
return true;
void InitializeEvent(AnaEventC &event)
Fill the EventBox with the objects needed by this selection.
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 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 DefineSteps()
Define all steps in the selection.
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...
AnaTrackB * HMNtrack
For storing the highest momentum negative track.
void DefineDetectorFV()
Define the detector Fiducial Volume in which this selection is applied.
bool Apply(AnaEventC &event, ToyBoxB &box) const
AnaEventSummaryC * Summary
A summary of the event with high level quantities.
bool CheckRedoSelection(const AnaEventC &event, const ToyBoxB &PreviousToyBox, Int_t &redoFromStep)
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.
void Initialize()
Initialize this selection: defines the steps and the detectorFV.