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 186 of file JetCaloCalculations.cxx.

186 {
187 static const CaloConstitExtractor nullEx;
188 static const CaloClusterExtractor clusteEx;
189 static const PFOExtractor pfoEx;
190 static const FlowElementExtractor feEx;
191
192 if(jet->numConstituents() == 0 ) return &nullEx;
193
194 // WARNING not entirely safe : assume all constits are of same type
195
196 switch(jet->rawConstituent(0)->type() ) {
198 return &clusteEx;
200 return &pfoEx;
202 return &feEx;
203 default:
204 break;
205 }
206 return &nullEx;
207 }
@ 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.