1 #include "tutorialBranchesSelection.hxx" 2 #include "tutorialSelection.hxx" 3 #include "baseSelection.hxx" 4 #include "CutUtils.hxx" 5 #include "Parameters.hxx" 6 #include "SubDetId.hxx" 7 #include "EventBoxUtils.hxx" 10 tutorialBranchesSelection::tutorialBranchesSelection(
bool forceBreak):
SelectionBase(forceBreak,
EventBoxId::kEventBoxTracker){
23 SetDetectorFV(SubDetId::kFGD1);
56 SetBranchAlias(0,
"1-track", 0);
57 SetBranchAlias(1,
"2-tracks", 1);
58 SetBranchAlias(2,
">2-tracks", 2);
59 SetBranchAlias(3,
">2 long-tracks",3);
64 SetPreSelectionAccumLevel(2);
73 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD1NuMuCC0Pi;
76 else if (allCutsPassed[1]){
77 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD1NuMuCC1Pi;
80 else if (allCutsPassed[2]){
81 static_cast<AnaEventSummaryB*
>(
event.Summary)->EventSample = SampleId::kFGD1NuMuCCOther;
85 return (static_cast<AnaEventSummaryB*>(event.
Summary)->EventSample != SampleId::kUnassigned);
99 static_cast<AnaEventSummaryB*>(event.
Summary)->LeptonCandidate[SampleId::kFGD1NuMuCC1Pi] = box.
HMNtrack;
102 for(
int i = 0; i < 4; ++i){
126 if (box.nNegativeTPCtracks+box.nPositiveTPCtracks==1)
143 if (box.nNegativeTPCtracks+box.nPositiveTPCtracks==2)
160 if (box.nNegativeTPCtracks+box.nPositiveTPCtracks>2)
175 if (tutBox->nLongTPCTracks>2)
195 tutBox->nLongTPCTracks=0;
198 for (Int_t i=0;i<nTPC; ++i){
202 if (!cutUtils::FiducialCut(*track, SubDetId::kFGD1)){
210 if (TPCSegment->
NNodes>65) tutBox->nLongTPCTracks++;
223 if (!event.EventBoxes[EventBoxId::kEventBoxTracker])
224 event.EventBoxes[EventBoxId::kEventBoxTracker] =
new EventBoxTracker();
226 boxUtils::FillTracksWithTPC(event, static_cast<SubDetId::SubDetEnum>(GetDetectorFV()));
227 boxUtils::FillTracksWithFGD(event, static_cast<SubDetId::SubDetEnum>(GetDetectorFV()));
228 boxUtils::FillTrajsChargedInTPC(event);
229 boxUtils::FillTrajsChargedInFGDAndNoTPC(event, static_cast<SubDetId::SubDetEnum>(GetDetectorFV()));
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 Apply(AnaEventC &event, ToyBoxB &box) const
int GetAllTracksUsingTPC(const AnaEventB &event, AnaTrackB *selTracks[])
Int_t NNodes
The number of nodes in the reconstructed object.
bool Apply(AnaEventC &event, ToyBoxB &box) const
void InitializeEvent(AnaEventC &event)
Fill the EventBox with the objects needed by this selection.
virtual const ToyBoxTracker & box(Int_t isel=-1) const
Returns the ToyBoxTracker.
AnaTrackB * HMNtrack
For storing the highest momentum negative track.
Representation of a global track.
bool Apply(AnaEventC &event, ToyBoxB &box) const
AnaEventSummaryC * Summary
A summary of the event with high level quantities.
bool Apply(AnaEventC &event, ToyBoxB &box) const
AnaParticleB * GetSegmentWithMostNodesInClosestTpc(const AnaTrackB &track)
Combined function to address NuMu selection needs as efficiently as possible - gets the TPC segment w...
bool Apply(AnaEventC &event, ToyBoxB &box) const
bool FillEventSummary(AnaEventC &event, Int_t allCutsPassed[])
Fill the event summary information, which is needed by the fitters (BANFF, Mach3) ...
AnaTrueParticleB * GetTrueParticle() const
Return a casted version of the AnaTrueObject associated.
void DefineSteps()
========= These are mandatory functions ==================
Representation of a reconstructed particle (track or shower).
void DefineDetectorFV()
Set detector FV.
bool Apply(AnaEventC &event, ToyBoxB &box) const