ATLAS Offline Software
MuidCaloTrackStateOnSurface.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
17 
19 #ifndef MUIDCALOSCATTERINGTOOLS_MUIDCALOTRACKSTATEONSURFACE_H
20 #define MUIDCALOSCATTERINGTOOLS_MUIDCALOTRACKSTATEONSURFACE_H
21 
22 //<<<<<< INCLUDES >>>>>>
23 
25 // For magneticfield
26 #include <atomic>
27 
28 #include "GaudiKernel/ServiceHandle.h"
29 #include "GaudiKernel/ToolHandle.h"
36 
37 namespace Rec {
38 
40  public:
41  MuidCaloTrackStateOnSurface(const std::string& type, const std::string& name, const IInterface* parent);
42  virtual ~MuidCaloTrackStateOnSurface() = default; // destructor
43 
44  StatusCode initialize() override;
45  StatusCode finalize() override;
46 
50  std::vector<std::unique_ptr<const Trk::TrackStateOnSurface>> caloTSOS(const EventContext& ctx,
51  const Trk::TrackParameters& parameters) const override;
52 
56  std::unique_ptr<Trk::TrackStateOnSurface> innerTSOS(const EventContext& ctx, const Trk::TrackParameters& parameters) const override;
57  std::unique_ptr<Trk::TrackStateOnSurface> outerTSOS(const EventContext& ctx, const Trk::TrackParameters& parameters) const override;
58 
64  std::unique_ptr<Trk::TrackStateOnSurface> middleTSOS(const EventContext& ctx, const Trk::TrackParameters& middleParameters,
65  const Trk::TrackParameters* innerParameters,
66  const Trk::TrackParameters* outerParameters) const override;
67 
68  private:
69  // private methods
71  const Trk::Surface* getCaloSurface(const double eta, const short layer) const;
72 
73  std::unique_ptr<const Trk::TrackParameters> getExtrapolatedParameters(const EventContext& ctx,
75  const short layer) const;
76 
78 
79  // helpers, managers, tools
80  ToolHandle<Rec::IMuidCaloEnergy> m_caloEnergyDeposit{
81  this,
82  "CaloEnergyDeposit",
83  "Rec::MuidCaloEnergyTool/MuidCaloEnergyTool",
84  };
85  ToolHandle<Rec::IMuidCaloEnergy> m_caloEnergyParam{
86  this,
87  "CaloEnergyParam",
88  "Rec::MuidCaloEnergyTool/MuidCaloEnergyToolParam",
89  };
90  ToolHandle<Rec::IMuidCaloMaterialParam> m_caloMaterialParam{
91  this,
92  "CaloMaterialParam",
93  "Rec::MuidCaloMaterialParam/MuidCaloMaterialParam",
94  };
95  ToolHandle<Trk::IPropagator> m_propagator{
96  this,
97  "Propagator",
98  "Trk::IntersectorWrapper/IntersectorWrapper",
99  };
100 
102 
103  // Read handle for conditions object to get the field cache
104  SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey{this, "AtlasFieldCacheCondObj", "fieldCondObj",
105  "Name of the Magnetic Field conditions object key"};
106 
107  // configurable cut-off values
110  double m_paramPtCut;
111 
112  // counters (for finalize)
113  mutable std::atomic_int m_count{0};
114  mutable std::atomic_int m_countArbitrarySolution{0};
115  mutable std::atomic_int m_countCompleteFailure{0};
116  mutable std::atomic_int m_countInnerFailure{0};
117  mutable std::atomic_int m_countOuterFailure{0};
118  };
119 
120 } // namespace Rec
121 
122 #endif // MUIDCALOSCATTERINGTOOLS_MUIDCALOTRACKSTATEONSURFACE_H
Rec::MuidCaloTrackStateOnSurface::m_caloEnergyDeposit
ToolHandle< Rec::IMuidCaloEnergy > m_caloEnergyDeposit
Definition: MuidCaloTrackStateOnSurface.h:80
Rec::MuidCaloTrackStateOnSurface::m_countInnerFailure
std::atomic_int m_countInnerFailure
Definition: MuidCaloTrackStateOnSurface.h:116
Rec::IMuidCaloTrackStateOnSurface
Definition: IMuidCaloTrackStateOnSurface.h:34
IMuidCaloTrackStateOnSurface.h
Trk::MagneticFieldProperties
Definition: MagneticFieldProperties.h:31
Rec::MuidCaloTrackStateOnSurface::initialize
StatusCode initialize() override
Definition: MuidCaloTrackStateOnSurface.cxx:51
AtlasFieldCacheCondObj.h
Rec::MuidCaloTrackStateOnSurface::m_minCaloRadius
double m_minCaloRadius
Definition: MuidCaloTrackStateOnSurface.h:108
Rec::MuidCaloTrackStateOnSurface
Definition: MuidCaloTrackStateOnSurface.h:39
Rec::MuidCaloTrackStateOnSurface::m_countOuterFailure
std::atomic_int m_countOuterFailure
Definition: MuidCaloTrackStateOnSurface.h:117
Rec::MuidCaloTrackStateOnSurface::Inner
@ Inner
Definition: MuidCaloTrackStateOnSurface.h:70
Rec::MuidCaloTrackStateOnSurface::SurfaceLayer
SurfaceLayer
Definition: MuidCaloTrackStateOnSurface.h:70
Rec::MuidCaloTrackStateOnSurface::getCaloSurface
const Trk::Surface * getCaloSurface(const double eta, const short layer) const
Definition: MuidCaloTrackStateOnSurface.cxx:309
IPropagator.h
Rec::MuidCaloTrackStateOnSurface::outerTSOS
std::unique_ptr< Trk::TrackStateOnSurface > outerTSOS(const EventContext &ctx, const Trk::TrackParameters &parameters) const override
Definition: MuidCaloTrackStateOnSurface.cxx:279
Rec::MuidCaloTrackStateOnSurface::m_countArbitrarySolution
std::atomic_int m_countArbitrarySolution
Definition: MuidCaloTrackStateOnSurface.h:114
Rec::MuidCaloTrackStateOnSurface::m_count
std::atomic_int m_count
Definition: MuidCaloTrackStateOnSurface.h:113
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
MagneticFieldProperties.h
Rec::MuidCaloTrackStateOnSurface::Middle
@ Middle
Definition: MuidCaloTrackStateOnSurface.h:70
IMuidCaloMaterialParam.h
Rec
Name: MuonSpContainer.h Package : offline/Reconstruction/MuonIdentification/muonEvent.
Definition: FakeTrackBuilder.h:10
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Rec::MuidCaloTrackStateOnSurface::middleTSOS
std::unique_ptr< Trk::TrackStateOnSurface > middleTSOS(const EventContext &ctx, const Trk::TrackParameters &middleParameters, const Trk::TrackParameters *innerParameters, const Trk::TrackParameters *outerParameters) const override
IMuidCaloTrackStateOnSurface interface: to get the energy deposit TSOS representing the calorimeter.
Definition: MuidCaloTrackStateOnSurface.cxx:288
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Rec::MuidCaloTrackStateOnSurface::MuidCaloTrackStateOnSurface
MuidCaloTrackStateOnSurface(const std::string &type, const std::string &name, const IInterface *parent)
Definition: MuidCaloTrackStateOnSurface.cxx:38
Rec::MuidCaloTrackStateOnSurface::caloTSOS
std::vector< std::unique_ptr< const Trk::TrackStateOnSurface > > caloTSOS(const EventContext &ctx, const Trk::TrackParameters &parameters) const override
IMuidCaloTrackStateOnSurface interface: to get the 3 scattering and energy deposit TSOS'es representi...
Definition: MuidCaloTrackStateOnSurface.cxx:84
Rec::MuidCaloTrackStateOnSurface::m_caloEnergyParam
ToolHandle< Rec::IMuidCaloEnergy > m_caloEnergyParam
Definition: MuidCaloTrackStateOnSurface.h:85
Trk::ParametersBase
Definition: ParametersBase.h:55
Rec::MuidCaloTrackStateOnSurface::useEtaPhiFromDirection
static bool useEtaPhiFromDirection(const Trk::TrackParameters &parameters)
Definition: MuidCaloTrackStateOnSurface.cxx:436
Rec::MuidCaloTrackStateOnSurface::m_fieldCacheCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition: MuidCaloTrackStateOnSurface.h:104
Trk::FullField
@ FullField
Field is set to be realistic, but within a given Volume.
Definition: MagneticFieldMode.h:21
Rec::MuidCaloTrackStateOnSurface::m_caloMaterialParam
ToolHandle< Rec::IMuidCaloMaterialParam > m_caloMaterialParam
Definition: MuidCaloTrackStateOnSurface.h:90
Rec::MuidCaloTrackStateOnSurface::Outer
@ Outer
Definition: MuidCaloTrackStateOnSurface.h:70
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Rec::MuidCaloTrackStateOnSurface::finalize
StatusCode finalize() override
Definition: MuidCaloTrackStateOnSurface.cxx:73
SG::ReadCondHandleKey< AtlasFieldCacheCondObj >
Rec::MuidCaloTrackStateOnSurface::m_propagator
ToolHandle< Trk::IPropagator > m_propagator
Definition: MuidCaloTrackStateOnSurface.h:95
Rec::MuidCaloTrackStateOnSurface::innerTSOS
std::unique_ptr< Trk::TrackStateOnSurface > innerTSOS(const EventContext &ctx, const Trk::TrackParameters &parameters) const override
IMuidCaloTrackStateOnSurface interface: to get individually the scattering TSOS'es representing the c...
Definition: MuidCaloTrackStateOnSurface.cxx:270
Rec::MuidCaloTrackStateOnSurface::getExtrapolatedParameters
std::unique_ptr< const Trk::TrackParameters > getExtrapolatedParameters(const EventContext &ctx, const Trk::TrackParameters &parameters, const short layer) const
Definition: MuidCaloTrackStateOnSurface.cxx:316
IMuidCaloEnergy.h
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
Rec::MuidCaloTrackStateOnSurface::m_paramPtCut
double m_paramPtCut
Definition: MuidCaloTrackStateOnSurface.h:110
Rec::MuidCaloTrackStateOnSurface::m_minRemainingEnergy
double m_minRemainingEnergy
Definition: MuidCaloTrackStateOnSurface.h:109
AthAlgTool
Definition: AthAlgTool.h:26
Rec::MuidCaloTrackStateOnSurface::m_magFieldProperties
Trk::MagneticFieldProperties m_magFieldProperties
Definition: MuidCaloTrackStateOnSurface.h:101
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:79
Rec::MuidCaloTrackStateOnSurface::~MuidCaloTrackStateOnSurface
virtual ~MuidCaloTrackStateOnSurface()=default
Rec::MuidCaloTrackStateOnSurface::m_countCompleteFailure
std::atomic_int m_countCompleteFailure
Definition: MuidCaloTrackStateOnSurface.h:115