ATLAS Offline Software
Loading...
Searching...
No Matches
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.

Typedef Documentation

◆ JetConstitIterator

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 }
@ ParticleFlow
The object is a particle-flow object.
Definition ObjectType.h:41
@ FlowElement
The object is a track-calo-cluster.
Definition ObjectType.h:52
@ CaloCluster
The object is a calorimeter cluster.
Definition ObjectType.h:39
Interface to retrieve calo informations from a jet constituent.