ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::Cache Struct Reference

#include <LocalExtrapolatorCache.h>

Public Types

enum  ERecursionValues { kCurrentRecursionCount , kMaxRecursionCount , kNRecursionValues }
enum  EStatus { kContinue , kRecursionCountExceeded }
using TrackParametersUVector = std::vector<std::unique_ptr<Trk::TrackParameters>>
using identifiedParameters_t = std::vector<std::pair<std::unique_ptr<Trk::TrackParameters>, int>>
using DestSurf = std::pair<const Surface*, BoundaryCheck>
 The class holding the unique ptr during the extrapolation loop.

Public Member Functions

 Cache (Dbg::PropStat &stat)
 ~Cache ()
 Cache (const std::vector< const IMaterialEffectsUpdator * > &updaters)
void setTrackingGeometry (const Trk::INavigator &navigator, const EventContext &ctx)
const Trk::TrackingVolumevolume (const EventContext &, const Amg::Vector3D &gp) const
IMaterialEffectsUpdator::ICachesubMaterialEffectsUpdatorCache (const TrackingVolume &tvol)
 Get the IMaterialEffectsUpdator::ICache for the MaterialEffectsUpdator.
IMaterialEffectsUpdator::ICachesubMaterialEffectsUpdatorCache ()
void populateMatEffUpdatorCache (const std::vector< const IMaterialEffectsUpdator * > &updaters)
void setRecallInformation (const Surface &, const Layer &, const TrackingVolume &)
 Private method for setting recall Information.
void resetRecallInformation ()
std::string to_string (const std::string &txt) const
 String representation of cache.
bool elossPointerOverwritten () const
 Check cache integrity.
std::string elossPointerErrorMsg (int lineNumber=0) const
 String error message if the cache has a problem.
void retrieveBoundaries ()
 Retrieve boundaries.
void addOneNavigationLayer (const Trk::TrackingVolume *pDetVol, const Trk::Layer *pLayer, bool boundaryCheck=true)
 Add one layer and navigLayer.
void addOneNavigationLayer (const Trk::Layer *pLayer, bool boundaryCheck=true)
 Add one layer and navigLayer using the current static vol.
void copyToNavigationSurfaces ()
 Insert navigation surfaces from layers, dense boundaries, navig boundaries and detached boundaries.

Public Attributes

Trk::ExtrUniquePtrHolder< Trk::TrackParametersm_ownedPtrs
 parameters to be used for final propagation in case of fallback
Trk::TrackParametersm_lastValidParameters = nullptr
 return helper for parameters and boundary
ParametersNextVolume m_parametersAtBoundary {}
 Caches per MaterialUpdator.
std::vector< Trk::IMaterialEffectsUpdator::ICachem_MaterialUpCache
 internal switch for resolved configuration
bool m_dense = false
unsigned int m_layerResolved {}
unsigned int m_methodSequence = 0
const Surfacem_destinationSurface = nullptr
 the boundary volume check
const Volumem_boundaryVolume = nullptr
 Destination Surface for recall.
const Surfacem_recallSurface = nullptr
 Destination Layer for recall.
const Layerm_recallLayer = nullptr
 Destination TrackingVolume for recall.
const TrackingVolumem_recallTrackingVolume = nullptr
const Trk::TrackingVolumem_currentStatic = nullptr
const Trk::TrackingVolumem_currentDense = nullptr
const Trk::TrackingVolumem_highestVolume = nullptr
const Trk::TrackingGeometrym_trackingGeometry = nullptr
double m_path {}
 Pointer (not owning) pointing.
TrackParametersUVectorm_parametersOnDetElements = nullptr
 cache layer with last material update
bool m_cacheLastMatLayer = false
const Layerm_lastMaterialLayer = nullptr
 cache for collecting the total X0 ans Eloss
Trk::ExtrapolationCachem_extrapolationCache = nullptr
 cache pointer for Eloss
const Trk::EnergyLossm_cacheEloss = nullptr
 cache of TrackStateOnSurfaces
std::vector< const Trk::TrackStateOnSurface * > * m_matstates = nullptr
std::unique_ptr< identifiedParameters_tm_identifiedParameters {}
std::pair< unsigned int, unsigned int > m_denseResolved {}
std::vector< DestSurfm_staticBoundaries {}
std::vector< DestSurfm_detachedBoundaries {}
std::vector< DestSurfm_denseBoundaries {}
std::vector< DestSurfm_navigBoundaries {}
std::vector< DestSurfm_layers {}
std::vector< std::pair< const Trk::DetachedTrackingVolume *, unsigned int > > m_detachedVols {}
std::vector< std::pair< const Trk::TrackingVolume *, unsigned int > > m_denseVols {}
std::vector< std::pair< const Trk::TrackingVolume *, const Trk::Layer * > > m_navigLays {}
std::vector< std::pair< const Trk::Surface *, Trk::BoundaryCheck > > m_navigSurfs {}
std::vector< const Trk::DetachedTrackingVolume * > m_navigVols {}
std::vector< std::pair< const Trk::TrackingVolume *, unsigned int > > m_navigVolsInt {}
Dbg::PropStatm_statPtr =nullptr
std::array< unsigned short, kNRecursionValuesm_recursionCount {}
unsigned int m_nPropagations {}
enum Trk::Cache::EStatus m_status =kContinue

Detailed Description

Definition at line 35 of file LocalExtrapolatorCache.h.

Member Typedef Documentation

◆ DestSurf

using Trk::Cache::DestSurf = std::pair<const Surface*, BoundaryCheck>

The class holding the unique ptr during the extrapolation loop.

Definition at line 39 of file LocalExtrapolatorCache.h.

◆ identifiedParameters_t

using Trk::Cache::identifiedParameters_t = std::vector<std::pair<std::unique_ptr<Trk::TrackParameters>, int>>

Definition at line 38 of file LocalExtrapolatorCache.h.

◆ TrackParametersUVector

using Trk::Cache::TrackParametersUVector = std::vector<std::unique_ptr<Trk::TrackParameters>>

Definition at line 37 of file LocalExtrapolatorCache.h.

Member Enumeration Documentation

◆ ERecursionValues

Enumerator
kCurrentRecursionCount 
kMaxRecursionCount 
kNRecursionValues 

Definition at line 100 of file LocalExtrapolatorCache.h.

◆ EStatus

Enumerator
kContinue 
kRecursionCountExceeded 

Definition at line 103 of file LocalExtrapolatorCache.h.

Constructor & Destructor Documentation

◆ Cache() [1/2]

Trk::Cache::Cache ( Dbg::PropStat & stat)

Definition at line 20 of file LocalExtrapolatorCache.cxx.

21 : m_ownedPtrs(128)
22 , m_statPtr(&stat){
23 m_navigSurfs.reserve(1024);
24 m_navigVols.reserve(64);
25 m_navigVolsInt.reserve(64);
26 }
std::vector< std::pair< const Trk::Surface *, Trk::BoundaryCheck > > m_navigSurfs
std::vector< const Trk::DetachedTrackingVolume * > m_navigVols
Dbg::PropStat * m_statPtr
Trk::ExtrUniquePtrHolder< Trk::TrackParameters > m_ownedPtrs
parameters to be used for final propagation in case of fallback
std::vector< std::pair< const Trk::TrackingVolume *, unsigned int > > m_navigVolsInt

◆ ~Cache()

Trk::Cache::~Cache ( )

Definition at line 36 of file LocalExtrapolatorCache.cxx.

36 {
37 if (m_statPtr) {
39 // only consider cases with some depth
40 setMaxAtomic(m_recursionCount[kMaxRecursionCount], m_statPtr->m_maxRecursionCount);
41 }
42 if (m_nPropagations > 200 ) {
43 // only consider cases with some propagations.
44 setMaxAtomic(m_nPropagations, m_statPtr->m_maxPropagations);
45 }
46 if (m_methodSequence>100 ) {
47 setMaxAtomic(m_methodSequence, m_statPtr->m_maxMethodSequence);
48 }
49 }
50 }
std::array< unsigned short, kNRecursionValues > m_recursionCount
unsigned int m_nPropagations
unsigned int m_methodSequence

◆ Cache() [2/2]

Trk::Cache::Cache ( const std::vector< const IMaterialEffectsUpdator * > & updaters)

Definition at line 28 of file LocalExtrapolatorCache.cxx.

29 : m_ownedPtrs(128){
30 m_navigSurfs.reserve(1024);
31 m_navigVols.reserve(64);
32 m_navigVolsInt.reserve(64);
34 }
void populateMatEffUpdatorCache(const std::vector< const IMaterialEffectsUpdator * > &updaters)

Member Function Documentation

◆ addOneNavigationLayer() [1/2]

void Trk::Cache::addOneNavigationLayer ( const Trk::Layer * pLayer,
bool boundaryCheck = true )

Add one layer and navigLayer using the current static vol.

Definition at line 134 of file LocalExtrapolatorCache.cxx.

134 {
135 m_layers.emplace_back(&(pLayer->surfaceRepresentation()), boundaryCheck);
136 m_navigLays.emplace_back(m_currentStatic, pLayer);
137 }
virtual const Surface & surfaceRepresentation() const =0
Transforms the layer into a Surface representation for extrapolation.
std::vector< std::pair< const Trk::TrackingVolume *, const Trk::Layer * > > m_navigLays
const Trk::TrackingVolume * m_currentStatic
std::vector< DestSurf > m_layers

◆ addOneNavigationLayer() [2/2]

void Trk::Cache::addOneNavigationLayer ( const Trk::TrackingVolume * pDetVol,
const Trk::Layer * pLayer,
bool boundaryCheck = true )

Add one layer and navigLayer.

Definition at line 128 of file LocalExtrapolatorCache.cxx.

128 {
129 m_layers.emplace_back(&(pLayer->surfaceRepresentation()), boundaryCheck);
130 m_navigLays.emplace_back(pDetVol, pLayer);
131 }

◆ copyToNavigationSurfaces()

void Trk::Cache::copyToNavigationSurfaces ( )

Insert navigation surfaces from layers, dense boundaries, navig boundaries and detached boundaries.

Definition at line 140 of file LocalExtrapolatorCache.cxx.

140 {
141 if (!m_layers.empty()) {
142 m_navigSurfs.insert(m_navigSurfs.end(), m_layers.begin(), m_layers.end());
143 }
144 if (!m_denseBoundaries.empty()) {
145 m_navigSurfs.insert(m_navigSurfs.end(), m_denseBoundaries.begin(), m_denseBoundaries.end());
146 }
147 if (!m_navigBoundaries.empty()) {
148 m_navigSurfs.insert(m_navigSurfs.end(), m_navigBoundaries.begin(), m_navigBoundaries.end());
149 }
150 if (!m_detachedBoundaries.empty()) {
152 }
153 }
std::vector< DestSurf > m_detachedBoundaries
std::vector< DestSurf > m_navigBoundaries
std::vector< DestSurf > m_denseBoundaries

◆ elossPointerErrorMsg()

std::string Trk::Cache::elossPointerErrorMsg ( int lineNumber = 0) const

String error message if the cache has a problem.

Definition at line 109 of file LocalExtrapolatorCache.cxx.

109 {
110 std::string result;
111 if (lineNumber !=0) result = "Line " + std::to_string(lineNumber)+": ";
112 result += " PROBLEM Eloss cache pointer overwritten " + std::to_string(reinterpret_cast<std::uintptr_t>(m_cacheEloss))
113 + " from extrapolationCache " + std::to_string(reinterpret_cast<std::uintptr_t>(m_extrapolationCache->eloss()));
114 return result;
115 }
const Trk::EnergyLoss * m_cacheEloss
cache of TrackStateOnSurfaces
Trk::ExtrapolationCache * m_extrapolationCache
cache pointer for Eloss

◆ elossPointerOverwritten()

bool Trk::Cache::elossPointerOverwritten ( ) const

Check cache integrity.

Definition at line 104 of file LocalExtrapolatorCache.cxx.

104 {
105 return (m_cacheEloss != nullptr && m_cacheEloss != m_extrapolationCache->eloss());
106 }

◆ populateMatEffUpdatorCache()

void Trk::Cache::populateMatEffUpdatorCache ( const std::vector< const IMaterialEffectsUpdator * > & updaters)

Definition at line 63 of file LocalExtrapolatorCache.cxx.

63 {
64 const size_t numUpdaters = updaters.size();
65 m_MaterialUpCache.reserve(numUpdaters);
66 for (const auto & thisUpdater : updaters) {
67 m_MaterialUpCache.emplace_back(thisUpdater->getCache());
68 }
69 }
std::vector< Trk::IMaterialEffectsUpdator::ICache > m_MaterialUpCache
internal switch for resolved configuration

◆ resetRecallInformation()

void Trk::Cache::resetRecallInformation ( )

Definition at line 79 of file LocalExtrapolatorCache.cxx.

79 {
80 m_recallSurface = nullptr;
81 m_recallLayer = nullptr;
82 m_recallTrackingVolume = nullptr;
83 }
const TrackingVolume * m_recallTrackingVolume
const Layer * m_recallLayer
Destination TrackingVolume for recall.
const Surface * m_recallSurface
Destination Layer for recall.

◆ retrieveBoundaries()

void Trk::Cache::retrieveBoundaries ( )

Retrieve boundaries.

Definition at line 118 of file LocalExtrapolatorCache.cxx.

118 {
119 m_staticBoundaries.clear();
120 const auto& bounds = m_currentStatic->boundarySurfaces();
121 for (size_t ib=0; ib< bounds.size(); ++ib){
122 const Trk::Surface& surf = bounds[ib]->surfaceRepresentation();
123 m_staticBoundaries.emplace_back(&surf, true);
124 }
125 }
std::vector< DestSurf > m_staticBoundaries

◆ setRecallInformation()

void Trk::Cache::setRecallInformation ( const Surface & rsf,
const Layer & rlay,
const TrackingVolume & rvol )

Private method for setting recall Information.

Definition at line 72 of file LocalExtrapolatorCache.cxx.

72 {
73 m_recallSurface = &rsf;
74 m_recallLayer = &rlay;
76 }

◆ setTrackingGeometry()

void Trk::Cache::setTrackingGeometry ( const Trk::INavigator & navigator,
const EventContext & ctx )
inline

Definition at line 110 of file LocalExtrapolatorCache.h.

111 {
112 if (!m_trackingGeometry) {
113 m_trackingGeometry = navigator.trackingGeometry(ctx);
114 }
115 }
virtual const TrackingGeometry * trackingGeometry(const EventContext &ctx) const =0
INavigator interface method - returns the TrackingGeometry used for navigation.
const Trk::TrackingGeometry * m_trackingGeometry

◆ subMaterialEffectsUpdatorCache() [1/2]

IMaterialEffectsUpdator::ICache & Trk::Cache::subMaterialEffectsUpdatorCache ( )

Definition at line 58 of file LocalExtrapolatorCache.cxx.

58 {
59 return m_MaterialUpCache[m_currentStatic->geometrySignature()];
60 }

◆ subMaterialEffectsUpdatorCache() [2/2]

IMaterialEffectsUpdator::ICache & Trk::Cache::subMaterialEffectsUpdatorCache ( const TrackingVolume & tvol)

Get the IMaterialEffectsUpdator::ICache for the MaterialEffectsUpdator.

Definition at line 53 of file LocalExtrapolatorCache.cxx.

53 {
54 return m_MaterialUpCache[tvol.geometrySignature()];
55 }

◆ to_string()

std::string Trk::Cache::to_string ( const std::string & txt) const

String representation of cache.

Definition at line 86 of file LocalExtrapolatorCache.cxx.

86 {
87 std::string result;
90 } else {
91 result = txt + " X0 " +std::to_string(m_extrapolationCache->x0tot()) + " Eloss deltaE "
92 + std::to_string(m_extrapolationCache->eloss()->deltaE()) + " Eloss sigma "
93 + std::to_string(m_extrapolationCache->eloss()->sigmaDeltaE()) + " meanIoni "
94 + std::to_string(m_extrapolationCache->eloss()->meanIoni()) + " sigmaIoni "
95 + std::to_string(m_extrapolationCache->eloss()->sigmaIoni()) + " meanRad "
96 + std::to_string(m_extrapolationCache->eloss()->meanRad()) + " sigmaRad "
97 + std::to_string(m_extrapolationCache->eloss()->sigmaRad());
98 }
99 return result;
100 }
std::string elossPointerErrorMsg(int lineNumber=0) const
String error message if the cache has a problem.
bool elossPointerOverwritten() const
Check cache integrity.

◆ volume()

const Trk::TrackingVolume * Trk::Cache::volume ( const EventContext & ,
const Amg::Vector3D & gp ) const
inline

Definition at line 117 of file LocalExtrapolatorCache.h.

118 {
119 assert(m_trackingGeometry);
120 return m_trackingGeometry->lowestTrackingVolume(gp);
121 }

Member Data Documentation

◆ m_boundaryVolume

const Volume* Trk::Cache::m_boundaryVolume = nullptr

Destination Surface for recall.

Definition at line 54 of file LocalExtrapolatorCache.h.

◆ m_cacheEloss

const Trk::EnergyLoss* Trk::Cache::m_cacheEloss = nullptr

cache of TrackStateOnSurfaces

Definition at line 77 of file LocalExtrapolatorCache.h.

◆ m_cacheLastMatLayer

bool Trk::Cache::m_cacheLastMatLayer = false

Definition at line 72 of file LocalExtrapolatorCache.h.

◆ m_currentDense

const Trk::TrackingVolume* Trk::Cache::m_currentDense = nullptr

Definition at line 62 of file LocalExtrapolatorCache.h.

◆ m_currentStatic

const Trk::TrackingVolume* Trk::Cache::m_currentStatic = nullptr

Definition at line 61 of file LocalExtrapolatorCache.h.

◆ m_dense

bool Trk::Cache::m_dense = false

Definition at line 49 of file LocalExtrapolatorCache.h.

◆ m_denseBoundaries

std::vector<DestSurf> Trk::Cache::m_denseBoundaries {}

Definition at line 87 of file LocalExtrapolatorCache.h.

87{};

◆ m_denseResolved

std::pair<unsigned int, unsigned int> Trk::Cache::m_denseResolved {}

Definition at line 83 of file LocalExtrapolatorCache.h.

83{};

◆ m_denseVols

std::vector<std::pair<const Trk::TrackingVolume*, unsigned int> > Trk::Cache::m_denseVols {}

Definition at line 92 of file LocalExtrapolatorCache.h.

92{};

◆ m_destinationSurface

const Surface* Trk::Cache::m_destinationSurface = nullptr

the boundary volume check

Definition at line 52 of file LocalExtrapolatorCache.h.

◆ m_detachedBoundaries

std::vector<DestSurf> Trk::Cache::m_detachedBoundaries {}

Definition at line 86 of file LocalExtrapolatorCache.h.

86{};

◆ m_detachedVols

std::vector<std::pair<const Trk::DetachedTrackingVolume*, unsigned int> > Trk::Cache::m_detachedVols {}

Definition at line 91 of file LocalExtrapolatorCache.h.

91{};

◆ m_extrapolationCache

Trk::ExtrapolationCache* Trk::Cache::m_extrapolationCache = nullptr

cache pointer for Eloss

Definition at line 75 of file LocalExtrapolatorCache.h.

◆ m_highestVolume

const Trk::TrackingVolume* Trk::Cache::m_highestVolume = nullptr

Definition at line 63 of file LocalExtrapolatorCache.h.

◆ m_identifiedParameters

std::unique_ptr<identifiedParameters_t> Trk::Cache::m_identifiedParameters {}

Definition at line 81 of file LocalExtrapolatorCache.h.

81{};

◆ m_lastMaterialLayer

const Layer* Trk::Cache::m_lastMaterialLayer = nullptr

cache for collecting the total X0 ans Eloss

Definition at line 73 of file LocalExtrapolatorCache.h.

◆ m_lastValidParameters

Trk::TrackParameters* Trk::Cache::m_lastValidParameters = nullptr

return helper for parameters and boundary

Definition at line 43 of file LocalExtrapolatorCache.h.

◆ m_layerResolved

unsigned int Trk::Cache::m_layerResolved {}

Definition at line 50 of file LocalExtrapolatorCache.h.

50{};

◆ m_layers

std::vector<DestSurf> Trk::Cache::m_layers {}

Definition at line 89 of file LocalExtrapolatorCache.h.

89{};

◆ m_MaterialUpCache

std::vector<Trk::IMaterialEffectsUpdator::ICache> Trk::Cache::m_MaterialUpCache

internal switch for resolved configuration

Definition at line 47 of file LocalExtrapolatorCache.h.

◆ m_matstates

std::vector<const Trk::TrackStateOnSurface*>* Trk::Cache::m_matstates = nullptr

Definition at line 79 of file LocalExtrapolatorCache.h.

◆ m_methodSequence

unsigned int Trk::Cache::m_methodSequence = 0

Definition at line 51 of file LocalExtrapolatorCache.h.

◆ m_navigBoundaries

std::vector<DestSurf> Trk::Cache::m_navigBoundaries {}

Definition at line 88 of file LocalExtrapolatorCache.h.

88{};

◆ m_navigLays

std::vector<std::pair<const Trk::TrackingVolume*, const Trk::Layer*> > Trk::Cache::m_navigLays {}

Definition at line 93 of file LocalExtrapolatorCache.h.

93{};

◆ m_navigSurfs

std::vector<std::pair<const Trk::Surface*, Trk::BoundaryCheck> > Trk::Cache::m_navigSurfs {}

Definition at line 94 of file LocalExtrapolatorCache.h.

94{};

◆ m_navigVols

std::vector<const Trk::DetachedTrackingVolume*> Trk::Cache::m_navigVols {}

Definition at line 95 of file LocalExtrapolatorCache.h.

95{};

◆ m_navigVolsInt

std::vector<std::pair<const Trk::TrackingVolume*, unsigned int> > Trk::Cache::m_navigVolsInt {}

Definition at line 96 of file LocalExtrapolatorCache.h.

96{};

◆ m_nPropagations

unsigned int Trk::Cache::m_nPropagations {}

Definition at line 102 of file LocalExtrapolatorCache.h.

102{};

◆ m_ownedPtrs

parameters to be used for final propagation in case of fallback

Definition at line 41 of file LocalExtrapolatorCache.h.

◆ m_parametersAtBoundary

ParametersNextVolume Trk::Cache::m_parametersAtBoundary {}

Caches per MaterialUpdator.

Definition at line 45 of file LocalExtrapolatorCache.h.

45{};

◆ m_parametersOnDetElements

TrackParametersUVector* Trk::Cache::m_parametersOnDetElements = nullptr

cache layer with last material update

Definition at line 70 of file LocalExtrapolatorCache.h.

◆ m_path

double Trk::Cache::m_path {}

Pointer (not owning) pointing.

Definition at line 67 of file LocalExtrapolatorCache.h.

67{};

◆ m_recallLayer

const Layer* Trk::Cache::m_recallLayer = nullptr

Destination TrackingVolume for recall.

Definition at line 58 of file LocalExtrapolatorCache.h.

◆ m_recallSurface

const Surface* Trk::Cache::m_recallSurface = nullptr

Destination Layer for recall.

Definition at line 56 of file LocalExtrapolatorCache.h.

◆ m_recallTrackingVolume

const TrackingVolume* Trk::Cache::m_recallTrackingVolume = nullptr

Definition at line 60 of file LocalExtrapolatorCache.h.

◆ m_recursionCount

std::array<unsigned short,kNRecursionValues> Trk::Cache::m_recursionCount {}

Definition at line 101 of file LocalExtrapolatorCache.h.

101{}; // current-recursion-level, max

◆ m_staticBoundaries

std::vector<DestSurf> Trk::Cache::m_staticBoundaries {}

Definition at line 85 of file LocalExtrapolatorCache.h.

85{};

◆ m_statPtr

Dbg::PropStat* Trk::Cache::m_statPtr =nullptr

Definition at line 99 of file LocalExtrapolatorCache.h.

◆ m_status

enum Trk::Cache::EStatus Trk::Cache::m_status =kContinue

◆ m_trackingGeometry

const Trk::TrackingGeometry* Trk::Cache::m_trackingGeometry = nullptr

Definition at line 65 of file LocalExtrapolatorCache.h.


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