HighLAND
Public Member Functions | Public Attributes | List of all members
numuCC4piMultiPi::FindEcalPhotonsAction Class Reference
Inheritance diagram for numuCC4piMultiPi::FindEcalPhotonsAction:
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)
 

Public Attributes

int MostUpstreamLayerHitCut
 
bool prod5Cut
 

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 189 of file numuCC4piMultiPiSelection.hxx.

Member Function Documentation

§ Apply()

bool FindEcalPhotonsAction::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 222 of file numuCC4piMultiPiSelection.cxx.

222  {
223 //*********************************************************************
224  // Find whether there is a pi0 track in the ECal or not
225  // In order to apply a pi0 veto cut later
226  ToyBoxCC4piMultiPi * cc4piMultiPibox = static_cast<ToyBoxCC4piMultiPi*>(&box);
227  SubDetId::SubDetEnum det = static_cast<SubDetId::SubDetEnum>(box.DetectorFV);
228 
229  // Get all Ecal objects
230  EventBoxTracker::RecObjectGroupEnum groupID;
231  groupID = EventBoxTracker::kTracksWithECal;
232  EventBoxB* EventBox = event.EventBoxes[EventBoxId::kEventBoxTracker];
233 
234  AnaTrackB *highestObject = NULL;
235  double higherEnergyObject = 0;
236 
237  //loop over all ECal objects
238  for(int i = 0; i < EventBox->nRecObjectsInGroup[groupID]; i++ ) {
239  AnaTrackB *allECALObjects = static_cast<AnaTrackB*>(EventBox->RecObjectsInGroup[groupID][i]);
240  if(!(allECALObjects->nECALSegments)) continue;
241  // Check for isolated ecal object
242  if(!(anaUtils::TrackUsesOnlyDet(*allECALObjects,SubDetId::kDSECAL) ||
243  anaUtils::TrackUsesOnlyDet(*allECALObjects,SubDetId::kTopTECAL) ||
244  anaUtils::TrackUsesOnlyDet(*allECALObjects,SubDetId::kBottomTECAL) ||
245  anaUtils::TrackUsesOnlyDet(*allECALObjects,SubDetId::kLeftTECAL) ||
246  anaUtils::TrackUsesOnlyDet(*allECALObjects,SubDetId::kRightTECAL))
247  ) continue;
248 
249  AnaECALParticleB* ecalBase = allECALObjects->ECALSegments[0];
250  AnaTrackB* object = allECALObjects;
251  cc4piMultiPibox->ISOEcal.push_back(object);
252 
253  // Find the most energetic object in ECal
254  if(ecalBase->EMEnergy > higherEnergyObject){
255  higherEnergyObject = ecalBase->EMEnergy;
256  highestObject = object;
257  }
258  }// end of loop on allECALTracks
259 
260  // Save the highest energetic ecal object in the box and the pi0 track
261  if (highestObject){
262  cc4piMultiPibox->HObject = highestObject;
263  // Check if the highest energetic ecal object is shower-like
264  if( numuCC4piMultiPiUtils::ECALPi0Selection(event, box, highestObject, MostUpstreamLayerHitCut, det) ) {
265  cc4piMultiPibox->Pi0Ecaltrack = highestObject;
266  cc4piMultiPibox->nPi0Ecaltracks = cc4piMultiPibox->nPi0Ecaltracks+1;
267  }
268  }
269  return true;
270 }
AnaECALParticleB * ECALSegments[NMAXECALS]
The ECAL segments that contributed to this global track.
int nECALSegments
How many ECAL tracks are associated with this track.
SubDetId_h DetectorFV
Indicate the FV we are interested in.
Definition: ToyBoxB.hxx:52
Representation of an ECAL segment of a global track.
Int_t nRecObjectsInGroup[NMAXRECOBJECTGROUPS]
----—— RecObjects and TrueRecObjects used in the selection and systematics ------------—— ...
SubDetEnum
Enumeration of all detector systems and subdetectors.
Definition: SubDetId.hxx:25
Representation of a global track.
bool TrackUsesOnlyDet(const AnaTrackB &track, SubDetId::SubDetEnum det)

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