1 #include "antiNumuCCMultiPiFGD2Selection.hxx" 2 #include "antiNumuCCMultiPiSelection.hxx" 3 #include "numuCCFGD2Selection.hxx" 4 #include "baseSelection.hxx" 5 #include "CutUtils.hxx" 6 #include "EventBoxUtils.hxx" 7 #include "Parameters.hxx" 8 #include "SubDetId.hxx" 10 #include "VersioningUtils.hxx" 11 #include "SystematicUtils.hxx" 15 antiNumuCCMultiPiFGD2Selection::antiNumuCCMultiPiFGD2Selection(
bool forceBreak):
SelectionBase(forceBreak,
EventBoxId::kEventBoxTracker){
19 _antiNumuCCMultiPiSelection.Initialize();
27 CopySteps(_antiNumuCCFGD2Selection);
48 SetBranchAlias(0,
"CC-0pi",0);
49 SetBranchAlias(1,
"CC-1pi",1);
50 SetBranchAlias(2,
"CC-Other",2);
53 SetPreSelectionAccumLevel(2);
62 SetDetectorFV(SubDetId::kFGD2);
64 _antiNumuCCMultiPiSelection.SetDetectorFV(SubDetId::kFGD2);
65 _antiNumuCCFGD2Selection.SetDetectorFV(SubDetId::kFGD2);
70 bool antiNumuCCMultiPiFGD2Selection::FillEventSummary(
AnaEventC& event, Int_t allCutsPassed[]){
75 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD2AntiNuMuCC0Pi;
78 else if (allCutsPassed[1]){
79 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD2AntiNuMuCC1Pi;
82 else if (allCutsPassed[2]){
83 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD2AntiNuMuCCOther;
87 return (static_cast<AnaEventSummaryB*>(event.
Summary)->EventSample != SampleId::kUnassigned);
101 static_cast<AnaEventSummaryB*>(event.
Summary)->LeptonCandidate[SampleId::kFGD2AntiNuMuCC1Pi] = box.
HMPtrack;
104 for(
int i = 0; i < 4; ++i){
121 return _antiNumuCCFGD2Selection.IsRelevantRecObjectForSystematic(event,track,systId,branch);
128 return _antiNumuCCFGD2Selection.IsRelevantTrueObjectForSystematic(event,trueTrack,systId,branch);
135 return _antiNumuCCMultiPiSelection.IsRelevantSystematic(event,box,systId,branch);
144 _antiNumuCCFGD2Selection.InitializeEvent(event);
145 boxUtils::FillTracksWithECal(event);
153 return _antiNumuCCMultiPiSelection.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 IsRelevantSystematic(const AnaEventC &event, const ToyBoxB &box, SystId_h systId, Int_t branch) const
Is this systematic relevant for this selection.
void DefineSteps()
Define all steps in the selection.
void InitializeEvent(AnaEventC &event)
Fill the EventBox with the objects needed by this selection.
AnaTrackB * HMPtrack
For storing the highest momentum positive track.
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...
bool CheckRedoSelection(const AnaEventC &event, const ToyBoxB &PreviousToyBox, Int_t &redoFromStep)
AnaEventSummaryC * Summary
A summary of the event with high level quantities.
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 Apply(AnaEventC &event, ToyBoxB &box) const
AnaTrueParticleB * GetTrueParticle() const
Return a casted version of the AnaTrueObject associated.
void Initialize()
Initialize this selection: defines the steps and the detectorFV.