HighLAND
Public Member Functions | List of all members
FindLongTPCTracks Class Reference
Inheritance diagram for FindLongTPCTracks:
StepBase

Public Member Functions

bool Apply (AnaEventC &event, ToyBoxB &box) const
 
StepBaseMakeClone ()
 MANDATORY FUNCTIONS !!!
 
- Public Member Functions inherited from StepBase
void SetTitle (const std::string &title)
 
void SetType (TypeEnum type)
 Set the type of this step.
 
void SetBreak (bool b)
 Set whether the cut sequence should be stopped when this cut fails.
 
void SetIndex (Int_t index)
 Set the index of this step.
 
const std::string & Title () const
 Return the title of this step.
 
TypeEnum Type () const
 Return the type of this step.
 
bool Break () const
 Return true if the cut sequence should be stopped when a cut fails.
 
Int_t Index () const
 Return the index of this step.
 
std::string ConvertType () const
 Convert into a string the type of this step.
 
void DisableInBranch (Int_t branch)
 Disable step in a given branch.
 
void EnableInBranch (Int_t branch)
 Enable step in a given branch.
 
bool IsDisabledInBranch (Int_t branch) const
 Returns true if the step is disabled in the specified branch.
 
const std::vector< StepBase * > & GetNextSteps () const
 Returns the vector of next steps.
 
void RemoveNextStep (const std::string &title, Int_t ID=0)
 Remove step with a given title (and branch ID) from next steps.
 
void AddBranchUniqueID (UInt_t ibranch)
 
void RemoveBranchUniqueID (UInt_t branch)
 Remove a branch unique ID from this step.
 
const std::vector< UInt_t > & GetBranchUniqueIDs () const
 Returns the vector of branche unique IDs associated to this step.
 
void AddNextStep (StepBase *step, Int_t branch=-1)
 
void GetNextSteps (std::vector< StepBase *> &steps, bool withSplits=false)
 Get the vector of next steps.
 
BranchStatus GetNextStepsInBranch (std::vector< StepBase *> &steps, Int_t branch)
 Get the vector of next steps in a given branch, returns a status code.
 
void ValidateStepRecursive () const
 check that the step and all its suns are correct (it was branch unique IDs defined)
 
 ClassDef (StepBase, 1)
 

Additional Inherited Members

- Public Types inherited from StepBase
enum  TypeEnum { kCut =0, kAction, kUnknown }
 Enumerator describing the values that _type member can take.
 
enum  BranchStatus { BranchOK =0, BranchEmpty, NoBranches, BranchOutOfRange }
 
- Protected Attributes inherited from StepBase
TypeEnum _type
 The type of this step: cut or action.
 
bool _break
 true if the cut sequence should be stopped when a cut fails
 
std::string _title
 The title of this step, which is used by the DrawingTools.
 
std::vector< bool > _disabledInBranch
 Is the step disabled in a given branch.
 
std::vector< StepBase * > _nextSteps
 The vector of next steps.
 
std::vector< UInt_t > _branchUniqueIDs
 Branch unique IDs associated to this step.
 
Int_t _index
 Index of the step in the selection.
 

Detailed Description

Definition at line 120 of file tutorialBranchesSelection.hxx.

Member Function Documentation

§ Apply()

bool FindLongTPCTracks::Apply ( AnaEventC event,
ToyBoxB box 
) const
virtual

The return value should specify whether the step was passed. For actions the return value is ignored

Reimplemented from StepBase.

Definition at line 182 of file tutorialBranchesSelection.cxx.

182  {
183 //*********************************************************************
184 
185  AnaEventB& event = *static_cast<AnaEventB*>(&eventC);
186 
187  // Get all tracks using the TPC
188  AnaTrackB* selTracks[NMAXPARTICLES];
189  int nTPC = anaUtils::GetAllTracksUsingTPC(event, selTracks);
190 
191  // Cast the box such that we can access nLongTPCTracks, not present in ToyBoxB
192  ToyBoxTutorial* tutBox = static_cast<ToyBoxTutorial*>(&box);
193 
194  // reset to 0
195  tutBox->nLongTPCTracks=0;
196 
197  //loop over tpc tracks
198  for (Int_t i=0;i<nTPC; ++i){
199  AnaTrackB* track = selTracks[i];
200 
201  // Apply the fiducial cut
202  if (!cutUtils::FiducialCut(*track, SubDetId::kFGD1)){
203  continue;
204  }
205 
206  // Gets the longest segment in the closest TPC
208 
209  // Apply the nodes cut
210  if (TPCSegment->NNodes>65) tutBox->nLongTPCTracks++;
211  }
212 
213  return true;
214 }
int GetAllTracksUsingTPC(const AnaEventB &event, AnaTrackB *selTracks[])
Int_t NNodes
The number of nodes in the reconstructed object.
Representation of a global track.
AnaParticleB * GetSegmentWithMostNodesInClosestTpc(const AnaTrackB &track)
Combined function to address NuMu selection needs as efficiently as possible - gets the TPC segment w...
Representation of a reconstructed particle (track or shower).

The documentation for this class was generated from the following files: