26#include "GaudiKernel/TypeNameString.h"
37 declareInterface<eflowTrackExtrapolatorBaseAlgTool>(
this);
48 return StatusCode::SUCCESS;
59 return StatusCode::SUCCESS;
75 std::map<eflowCalo::LAYER, const Trk::TrackParameters*> parametersMap;
76 std::map<CaloCell_ID::CaloSample,const Trk::TrackParameters*> tileParametersMap;
80 std::unique_ptr<Trk::CaloExtension> uniqueExtension;
81 const int index = track->index();
84 extrapolation_timer.start();
89 Gaudi::Hive::currentContext(), *track);
90 extension = uniqueExtension.get();
95 extension = (*particleCache)[
index];
98 ATH_MSG_VERBOSE(
"Cache does not contain a calo extension -> Calculating with the a CaloExtensionTool" );
100 Gaudi::Hive::currentContext(), *track);
101 extension = uniqueExtension.get();
104 extrapolation_timer.stop();
106 if (extension !=
nullptr) {
114 if (parametersMap[
getLayer(&clParameter)] ==
nullptr) {
115 parametersMap[
getLayer(&clParameter)] = &clParameter;
117 parametersMap[
getLayer(&clParameter)] = &clParameter;
122 if (tileParametersMap[caloSample] ==
nullptr){
123 tileParametersMap[caloSample] = &clParameter;
125 tileParametersMap[caloSample] = &clParameter;
137 return std::make_unique<eflowTrackCaloPoints>(parametersMap,tileParametersMap);
141 if (track->pt() > 3*Gaudi::Units::GeV)
ATH_MSG_WARNING(
"TrackExtension failed for track with pt and eta " << track->pt() <<
" and " << track->eta());
143 return std::make_unique<eflowTrackCaloPoints>(parametersMap);
148 return StatusCode::SUCCESS;
153 unsigned int parametersIdentifier = clParameter->
cIdentifier();
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
CaloSampling::CaloSample CaloSample
Group of local monitoring quantities and retain correlation when filling histograms
Declare a monitored scalar variable.
Helper class to create a scoped timer.
Tracking class to hold the extrapolation through calorimeter Layers Both the caloEntryLayerIntersecti...
const std::vector< CurvilinearParameters > & caloLayerIntersections() const
access to the intersections with the calorimeter layers.
unsigned int cIdentifier() const
the curvilinear parameters identifier
static LAYER translateSampl(CaloCell_ID::CaloSample sampl)
Ensure that the ATLAS eigen extensions are properly loaded.
CurvilinearParametersT< TrackParametersDim, Charged, PlaneSurface > CurvilinearParameters
TrackParticle_v1 TrackParticle
Reference the current persistent version: