ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Trk::IParticleCaloExtensionTool Class Referenceabstract

Interface for extending Particles with calo intersections. More...

#include <IParticleCaloExtensionTool.h>

Inheritance diagram for Trk::IParticleCaloExtensionTool:
Collaboration diagram for Trk::IParticleCaloExtensionTool:

Public Types

typedef std::unordered_map< size_t, std::unique_ptr< Trk::CaloExtension > > Cache
 

Public Member Functions

virtual std::unique_ptr< Trk::CaloExtensioncaloExtension (const EventContext &ctx, const xAOD::IParticle &particle) const =0
 Method returning the calo layers crossed by the IParticle track or the IParticle itself if it is neutral/TruthParticle The memory ownership is handled by the unique_ptr. More...
 
virtual const Trk::CaloExtensioncaloExtension (const EventContext &ctx, const xAOD::IParticle &particle, Cache &cache) const =0
 Method to return the calo layers crossed (CaloExtension) by the IParticle track or the IParticle itself if it is neutral/TruthParticle. More...
 
virtual const Trk::CaloExtensioncaloExtension (const xAOD::IParticle &particle, const CaloExtensionCollection &cache) const =0
 Method to return the calo layers crossed (CaloExtension) by the IParticle track or the IParticle itself if it is neutral/TruthParticle It returns the result stored in the CaloExtensionCollection created by the caloExtensionCollection method below. More...
 
virtual StatusCode caloExtensionCollection (const EventContext &ctx, const xAOD::IParticleContainer &particles, const std::vector< bool > &mask, CaloExtensionCollection &caloextensions) const =0
 Method that can be used by algorithms that : A. More...
 
virtual std::unique_ptr< Trk::CaloExtensioncaloExtension (const EventContext &ctx, const TrackParameters &startPars, PropDirection propDir, ParticleHypothesis particleType) const =0
 Method returning a unique_ptr to the caloExtension given the relevant starting point parameters , direction and particle hypothesis. More...
 
virtual std::vector< std::unique_ptr< Trk::Surface > > caloSurfacesFromLayers (const std::vector< CaloSampling::CaloSample > &clusterLayers, double eta, const CaloDetDescrManager &caloDD) const =0
 Method returning a vector of calo surfaces give calo layers/samplings. More...
 
virtual std::vector< std::pair< CaloSampling::CaloSample, std::unique_ptr< const Trk::TrackParameters > > > surfaceCaloExtension (const EventContext &ctx, const TrackParameters &startPars, const std::vector< CaloSampling::CaloSample > &clusterLayers, const std::vector< std::unique_ptr< Trk::Surface >> &caloSurfaces, ParticleHypothesis particleType) const =0
 Method returning a vector of the Track Parameters at layers/samplings. More...
 
virtual std::vector< std::pair< CaloSampling::CaloSample, std::unique_ptr< const Trk::TrackParameters > > > layersCaloExtension (const EventContext &ctx, const TrackParameters &startPars, const std::vector< CaloSampling::CaloSample > &clusterLayers, double eta, const CaloDetDescrManager &caloDD, ParticleHypothesis particleType=Trk::nonInteracting) const =0
 Method returning a vector of the Track Parameters at layers/samplings. More...
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Detailed Description

Interface for extending Particles with calo intersections.

Definition at line 95 of file IParticleCaloExtensionTool.h.

Member Typedef Documentation

◆ Cache

typedef std::unordered_map<size_t, std::unique_ptr<Trk::CaloExtension> > Trk::IParticleCaloExtensionTool::Cache

Definition at line 98 of file IParticleCaloExtensionTool.h.

Member Function Documentation

◆ caloExtension() [1/4]

virtual std::unique_ptr<Trk::CaloExtension> Trk::IParticleCaloExtensionTool::caloExtension ( const EventContext &  ctx,
const TrackParameters startPars,
PropDirection  propDir,
ParticleHypothesis  particleType 
) const
pure virtual

Method returning a unique_ptr to the caloExtension given the relevant starting point parameters , direction and particle hypothesis.

Parameters
ctxevent context needed for multithreading
startParsthe starting track parameters
propDirextrapolation direction
particleTypetype of particle

Implemented in Trk::ParticleCaloExtensionTool.

◆ caloExtension() [2/4]

virtual std::unique_ptr<Trk::CaloExtension> Trk::IParticleCaloExtensionTool::caloExtension ( const EventContext &  ctx,
const xAOD::IParticle particle 
) const
pure virtual

Method returning the calo layers crossed by the IParticle track or the IParticle itself if it is neutral/TruthParticle The memory ownership is handled by the unique_ptr.

Parameters
ctxevent context needed for multithreading
particlereference to the Particle
Returns
unique_ptr to a CaloExtension

Implemented in Trk::ParticleCaloExtensionTool.

◆ caloExtension() [3/4]

virtual const Trk::CaloExtension* Trk::IParticleCaloExtensionTool::caloExtension ( const EventContext &  ctx,
const xAOD::IParticle particle,
Cache cache 
) const
pure virtual

Method to return the calo layers crossed (CaloExtension) by the IParticle track or the IParticle itself if it is neutral/TruthParticle.

An alg looping over a single collection of IParticles re-using them multiple times can use a local cache of the form std::unordered_map<size_t,std::unique_ptr<Trk::CaloExtension>>. The key is the value of IParticle::index()

This method adds the relevant extension to the cache look-up table which retains ownership.

Parameters
ctxevent context needed for multithreading
particlereference to the Particle
cachethe look-up table cache
Returns
ptr to a const CaloExtension (owned by the cache)

Implemented in Trk::ParticleCaloExtensionTool.

◆ caloExtension() [4/4]

virtual const Trk::CaloExtension* Trk::IParticleCaloExtensionTool::caloExtension ( const xAOD::IParticle particle,
const CaloExtensionCollection cache 
) const
pure virtual

Method to return the calo layers crossed (CaloExtension) by the IParticle track or the IParticle itself if it is neutral/TruthParticle It returns the result stored in the CaloExtensionCollection created by the caloExtensionCollection method below.

In this case, the CaloExtensionCollection (DataVector<CaloExtension>) owns the caloExtension.

Parameters
particlereference to the Particle
cacheThe CaloExtensionCollections
Returns
ptr to a const CaloExtension (owned by the cache)

Implemented in Trk::ParticleCaloExtensionTool.

◆ caloExtensionCollection()

virtual StatusCode Trk::IParticleCaloExtensionTool::caloExtensionCollection ( const EventContext &  ctx,
const xAOD::IParticleContainer particles,
const std::vector< bool > &  mask,
CaloExtensionCollection caloextensions 
) const
pure virtual

Method that can be used by algorithms that : A.

Have an IParticleCollection B. Define a mask of the size of that collection C. Want back a Calo Extension Collection alligned with the input collection i.e 1 to 1 correspondance with the input collection. The Collection can then be used as such to retrieve the extensions or manipulated and written to StoreGate.

Parameters
ctxevent context needed for multithreading
particlesThe input collection
maskcontains true for the elements for which to permorm an extension, false otherwise
Returns
caloextension Output to be filled, will contain unfilled CaloExtension where the mask was false, otherwise it contains the relevant result.

Implemented in Trk::ParticleCaloExtensionTool.

◆ caloSurfacesFromLayers()

virtual std::vector<std::unique_ptr<Trk::Surface> > Trk::IParticleCaloExtensionTool::caloSurfacesFromLayers ( const std::vector< CaloSampling::CaloSample > &  clusterLayers,
double  eta,
const CaloDetDescrManager caloDD 
) const
pure virtual

Method returning a vector of calo surfaces give calo layers/samplings.

Parameters
ctxevent context needed for multithreading
clusterLayersthe layers (should be ordered) we aim to
etaeta used for the depth

Implemented in Trk::ParticleCaloExtensionTool.

◆ interfaceID()

const InterfaceID & Trk::IParticleCaloExtensionTool::interfaceID ( )
inlinestatic

Definition at line 247 of file IParticleCaloExtensionTool.h.

248 {
249  return IID_IParticleCaloExtensionTool;
250 }

◆ layersCaloExtension()

virtual std::vector<std::pair<CaloSampling::CaloSample, std::unique_ptr<const Trk::TrackParameters> > > Trk::IParticleCaloExtensionTool::layersCaloExtension ( const EventContext &  ctx,
const TrackParameters startPars,
const std::vector< CaloSampling::CaloSample > &  clusterLayers,
double  eta,
const CaloDetDescrManager caloDD,
ParticleHypothesis  particleType = Trk::nonInteracting 
) const
pure virtual

Method returning a vector of the Track Parameters at layers/samplings.

Parameters
ctxevent context needed for multithreading
startParsthe starting track parameters
clusterLayersthe layers (should be ordered) we aim to
etaeta used for the depth
particleTypetype of particle

Implemented in Trk::ParticleCaloExtensionTool.

◆ surfaceCaloExtension()

virtual std::vector<std::pair<CaloSampling::CaloSample, std::unique_ptr<const Trk::TrackParameters> > > Trk::IParticleCaloExtensionTool::surfaceCaloExtension ( const EventContext &  ctx,
const TrackParameters startPars,
const std::vector< CaloSampling::CaloSample > &  clusterLayers,
const std::vector< std::unique_ptr< Trk::Surface >> &  caloSurfaces,
ParticleHypothesis  particleType 
) const
pure virtual

Method returning a vector of the Track Parameters at layers/samplings.

Parameters
ctxevent context needed for multithreading
startParsthe starting track parameters
clusterLayersthe layers (should be ordered) we aim to
clusterSurfacesthe surfaces for each layer
particleTypetype of particle

The clusterLayers and clusterSurfaces need to be 1-1 this can be done via the caloSurfacesFromLayers method above.

Implemented in Trk::ParticleCaloExtensionTool.


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