1 #include "numuBkgInAntiNuModeCCMultiTrackSelection.hxx" 2 #include "numuBkgInAntiNuModeCCSelection.hxx" 3 #include "antiNumuCCMultiTrackSelection.hxx" 4 #include "baseSelection.hxx" 5 #include "CutUtils.hxx" 6 #include "Parameters.hxx" 7 #include "SubDetId.hxx" 8 #include "EventBoxId.hxx" 12 numuBkgInAntiNuModeCCMultiTrackSelection::numuBkgInAntiNuModeCCMultiTrackSelection(
bool forceBreak):
SelectionBase(forceBreak,
EventBoxId::kEventBoxTracker) {
24 CopySteps(_numuBkgInAntiNuModeCCSelection);
39 SetBranchAlias(0,
"CC1Track",0);
40 SetBranchAlias(1,
"CCNTracks",1);
43 SetPreSelectionAccumLevel(2);
51 SetDetectorFV(SubDetId::kFGD1);
54 _numuCCMultiPiSelection.SetDetectorFV(SubDetId::kFGD1);
55 _numuBkgInAntiNuModeCCSelection.SetDetectorFV(SubDetId::kFGD1);
59 bool numuBkgInAntiNuModeCCMultiTrackSelection::FillEventSummary(
AnaEventC& event, Int_t allCutsPassed[]){
64 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD1NuMuBkgInAntiNuModeCC1Track;
67 else if (allCutsPassed[1]){
68 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD1NuMuBkgInAntiNuModeCCNTracks;
72 return (static_cast<AnaEventSummaryB*>(event.
Summary)->EventSample != SampleId::kUnassigned);
84 static_cast<AnaEventSummaryB*
>(
event.Summary)->LeptonCandidate[SampleId::kFGD1NuMuBkgInAntiNuModeCC1Track] = box.
HMNtrack;
85 static_cast<AnaEventSummaryB*>(event.
Summary)->LeptonCandidate[SampleId::kFGD1NuMuBkgInAntiNuModeCCNTracks] = box.
HMNtrack;
87 for(
int i = 0; i < 4; ++i){
89 static_cast<AnaEventSummaryB*>(event.
Summary)->VertexPosition[SampleId::kFGD1NuMuBkgInAntiNuModeCCNTracks][i] = box.
HMNtrack->
PositionStart[i];
103 return _numuCCMultiPiSelection.IsRelevantRecObjectForSystematic(event,track,systId,branch);
110 return _numuCCMultiPiSelection.IsRelevantTrueObjectForSystematic(event,trueTrack,systId,branch);
123 if (systId==SystId::kFgdTrackEff)
125 else if (systId==SystId::kFgdHybridTrackEff)
127 else if (systId==SystId::kMichelEleEff)
136 _numuCCMultiPiSelection.InitializeEvent(event);
144 if( _numuBkgInAntiNuModeCCSelection.CheckRedoSelection(event,PreviousToyBox,redoFromStep))
return true;
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.
AnaTrackB * HMNtrack
For storing the highest momentum negative track.
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.
AnaEventSummaryC * Summary
A summary of the event with high level quantities.
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)
AnaTrueParticleB * GetTrueParticle() const
Return a casted version of the AnaTrueObject associated.
void InitializeEvent(AnaEventC &event)
Fill the EventBox with the objects needed by this selection.
bool Apply(AnaEventC &event, ToyBoxB &box) const
void Initialize()
Initialize this selection: defines the steps and the detectorFV.
void DefineSteps()
Define all steps in the selection.