1 #include "numuCCFGD2Selection.hxx" 2 #include "baseSelection.hxx" 3 #include "CutUtils.hxx" 4 #include "EventBoxUtils.hxx" 5 #include "SubDetId.hxx" 7 #include "VersioningUtils.hxx" 8 #include "SystematicUtils.hxx" 11 numuCCFGD2Selection::numuCCFGD2Selection(
bool forceBreak):
SelectionBase(forceBreak,
EventBoxId::kEventBoxTracker) {
34 AddStep(StepBase::kCut,
"muon PID",
new MuonPIDCut());
36 SetBranchAlias(0,
"trunk");
39 SetPreSelectionAccumLevel(2);
47 SetDetectorFV(SubDetId::kFGD2);
50 _numuCCSelection.SetDetectorFV(SubDetId::kFGD2);
54 bool numuCCFGD2Selection::FillEventSummary(
AnaEventC& event, Int_t allCutsPassed[]){
58 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD2NuMuCC;
60 return (static_cast<AnaEventSummaryB*>(event.
Summary)->EventSample != SampleId::kUnassigned);
75 EventBoxB* EventBox =
event.EventBoxes[EventBoxId::kEventBoxTracker];
76 AnaRecObjectC** selTracks = EventBox->RecObjectsInGroup[EventBoxTracker::kTracksWithTPC];
80 for (Int_t i=0;i<nTPC; ++i){
83 if (thistrack->
Momentum < 0 )
continue;
119 for(
int i = 0; i < 4; ++i){
131 return _numuCCSelection.IsRelevantRecObjectForSystematic(event,recObj,systId,branch);
138 return _numuCCSelection.IsRelevantTrueObjectForSystematic(event,trueObj,systId,branch);
145 return _numuCCSelection.IsRelevantRecObjectForSystematicInToy(event, box, recObj, systId, branch);
152 return _numuCCSelection.IsRelevantTrueObjectForSystematicInToy(event, box, trueObj, systId, branch);
159 return _numuCCSelection.IsRelevantSystematic(event, box, systId, branch);
166 _numuCCSelection.InitializeEvent(event);
173 return _numuCCSelection.CheckRedoSelection(event, PreviousToyBox, redoFromStep);
bool CheckRedoSelection(const AnaEventC &event, const ToyBoxB &PreviousToyBox, Int_t &redoFromStep)
void DefineSteps()
Define all steps in the selection.
AnaTrueVertexB * TrueVertex
Pointer to the AnaTrueVertexB of the interaction that created this AnaTrueParticleB.
bool Apply(AnaEventC &event, ToyBoxB &box) const
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...
AnaTrackB * MainTrack
For storing the Main Track (The lepton candidate in geranal: HMN or HMP track)
Int_t nRecObjectsInGroup[NMAXRECOBJECTGROUPS]
----—— RecObjects and TrueRecObjects used in the selection and systematics ------------—— ...
void InitializeEvent(AnaEventC &event)
Fill the EventBox with the objects needed by this selection.
Float_t Momentum
The reconstructed momentum of the particle, at the start position.
bool IsRelevantSystematic(const AnaEventC &event, const ToyBoxB &box, SystId_h systId, Int_t branch) const
Is this systematic relevant for this selection.
Leading tracks with good quality in FGD1.
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 * VetoTrack
For storing the veto track.
AnaTrackB * HMNtrack
For storing the highest momentum negative track.
Representation of a global track.
AnaEventSummaryC * Summary
A summary of the event with high level quantities.
bool IsRelevantTrueObjectForSystematicInToy(const AnaEventC &, const ToyBoxB &, AnaTrueObjectC *, SystId_h systId, Int_t branch=0) const
Is this true track relevant for a given systematic (after selection, called for each toy) ...
bool Apply(AnaEventC &event, ToyBoxB &box) const
bool IsRelevantRecObjectForSystematicInToy(const AnaEventC &, const ToyBoxB &, AnaRecObjectC *, SystId_h systId, Int_t branch=0) const
Is this track relevant for a given systematic (after selection, called for each toy) ...
Find the Vertex. For the moment it's just the Star position of the HM track.
void DefineDetectorFV()
Define the detector Fiducial Volume in which this selection is applied.
AnaTrueParticleB * GetTrueParticle() const
Return a casted version of the AnaTrueObject associated.
bool InFiducialVolume(SubDetId::SubDetEnum det, const Float_t *pos, const Float_t *FVdefmin, const Float_t *FVdefmax)
A cut on event quality. Requires good beam and ND280 data quality flags.
AnaTrackB * OOFVtrack
For storing the oofv fgd tracks.
void Initialize()
Initialize this selection: defines the steps and the detectorFV.