ATLAS Offline Software
Classes | Typedefs | Functions
CaloConstitHelpers Namespace Reference

Classes

struct  CaloClusterExtractor
 
class  CaloConstitExtractor
 Interface to retrieve calo informations from a jet constituent. More...
 
struct  FlowElementExtractor
 
struct  PFOExtractor
 

Typedefs

using JetConstitIterator = xAOD::JetConstituentVector::iterator
 

Functions

const CaloConstitExtractorextractorForJet (const xAOD::Jet *jet)
 returns a pointer to a CaloConstitExtractor for a given jet. More...
 

Typedef Documentation

◆ JetConstitIterator

Definition at line 21 of file JetCaloCalculations.cxx.

Function Documentation

◆ extractorForJet()

const CaloConstitExtractor* CaloConstitHelpers::extractorForJet ( const xAOD::Jet jet)

returns a pointer to a CaloConstitExtractor for a given jet.

Do not delete the pointer ! WARNING : not entirely safe. Assumes that all jet constituents have the same type as 1st constit.

Definition at line 185 of file JetCaloCalculations.cxx.

185  {
186  static const CaloConstitExtractor nullEx;
187  static const CaloClusterExtractor clusteEx;
188  static const PFOExtractor pfoEx;
189  static const FlowElementExtractor feEx;
190 
191  if(jet->numConstituents() == 0 ) return &nullEx;
192 
193  // WARNING not entirely safe : assume all constits are of same type
194 
195  switch(jet->rawConstituent(0)->type() ) {
197  return &clusteEx;
199  return &pfoEx;
201  return &feEx;
202  default:
203  break;
204  }
205  return &nullEx;
206  }
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
xAOD::FlowElement
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition: FlowElement.h:16
xAODType::ParticleFlow
@ ParticleFlow
The object is a particle-flow object.
Definition: ObjectType.h:41