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"
35 
36 //<<<<<< CLASS DECLARATIONS >>>>>>
37 
38 namespace Trk {
39  class MagneticFieldProperties;
40 } // namespace Trk
41 
42 namespace Rec {
43 
45  public:
46  MuidCaloTrackStateOnSurface(const std::string& type, const std::string& name, const IInterface* parent);
47  virtual ~MuidCaloTrackStateOnSurface() = default; // destructor
48 
49  StatusCode initialize() override;
50  StatusCode finalize() override;
51 
55  std::vector<std::unique_ptr<const Trk::TrackStateOnSurface>> caloTSOS(const EventContext& ctx,
56  const Trk::TrackParameters& parameters) const override;
57 
61  std::unique_ptr<Trk::TrackStateOnSurface> innerTSOS(const EventContext& ctx, const Trk::TrackParameters& parameters) const override;
62  std::unique_ptr<Trk::TrackStateOnSurface> outerTSOS(const EventContext& ctx, const Trk::TrackParameters& parameters) const override;
63 
69  std::unique_ptr<Trk::TrackStateOnSurface> middleTSOS(const EventContext& ctx, const Trk::TrackParameters& middleParameters,
70  const Trk::TrackParameters* innerParameters,
71  const Trk::TrackParameters* outerParameters) const override;
72 
73  private:
74  // private methods
76  const Trk::Surface* getCaloSurface(const double eta, const short layer) const;
77 
78  std::unique_ptr<const Trk::TrackParameters> getExtrapolatedParameters(const EventContext& ctx,
80  const short layer) const;
81 
83 
84  // helpers, managers, tools
85  ToolHandle<Rec::IMuidCaloEnergy> m_caloEnergyDeposit{
86  this,
87  "CaloEnergyDeposit",
88  "Rec::MuidCaloEnergyTool/MuidCaloEnergyTool",
89  };
90  ToolHandle<Rec::IMuidCaloEnergy> m_caloEnergyParam{
91  this,
92  "CaloEnergyParam",
93  "Rec::MuidCaloEnergyTool/MuidCaloEnergyToolParam",
94  };
95  ToolHandle<Rec::IMuidCaloMaterialParam> m_caloMaterialParam{
96  this,
97  "CaloMaterialParam",
98  "Rec::MuidCaloMaterialParam/MuidCaloMaterialParam",
99  };
100  ToolHandle<Trk::IPropagator> m_propagator{
101  this,
102  "Propagator",
103  "Trk::IntersectorWrapper/IntersectorWrapper",
104  };
105 
107 
108  // Read handle for conditions object to get the field cache
109  SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey{this, "AtlasFieldCacheCondObj", "fieldCondObj",
110  "Name of the Magnetic Field conditions object key"};
111 
112  // configurable cut-off values
115  double m_paramPtCut;
116 
117  // counters (for finalize)
118  mutable std::atomic_int m_count{0};
119  mutable std::atomic_int m_countArbitrarySolution{0};
120  mutable std::atomic_int m_countCompleteFailure{0};
121  mutable std::atomic_int m_countInnerFailure{0};
122  mutable std::atomic_int m_countOuterFailure{0};
123  };
124 
125 } // namespace Rec
126 
127 #endif // MUIDCALOSCATTERINGTOOLS_MUIDCALOTRACKSTATEONSURFACE_H
Rec::MuidCaloTrackStateOnSurface::m_caloEnergyDeposit
ToolHandle< Rec::IMuidCaloEnergy > m_caloEnergyDeposit
Definition: MuidCaloTrackStateOnSurface.h:85
Rec::MuidCaloTrackStateOnSurface::m_countInnerFailure
std::atomic_int m_countInnerFailure
Definition: MuidCaloTrackStateOnSurface.h:121
Rec::IMuidCaloTrackStateOnSurface
Definition: IMuidCaloTrackStateOnSurface.h:34
IMuidCaloTrackStateOnSurface.h
Trk::MagneticFieldProperties
Definition: MagneticFieldProperties.h:31
Rec::MuidCaloTrackStateOnSurface::initialize
StatusCode initialize() override
Definition: MuidCaloTrackStateOnSurface.cxx:52
AtlasFieldCacheCondObj.h
Rec::MuidCaloTrackStateOnSurface::m_minCaloRadius
double m_minCaloRadius
Definition: MuidCaloTrackStateOnSurface.h:113
Rec::MuidCaloTrackStateOnSurface
Definition: MuidCaloTrackStateOnSurface.h:44
Rec::MuidCaloTrackStateOnSurface::m_countOuterFailure
std::atomic_int m_countOuterFailure
Definition: MuidCaloTrackStateOnSurface.h:122
Rec::MuidCaloTrackStateOnSurface::Inner
@ Inner
Definition: MuidCaloTrackStateOnSurface.h:75
Rec::MuidCaloTrackStateOnSurface::SurfaceLayer
SurfaceLayer
Definition: MuidCaloTrackStateOnSurface.h:75
Rec::MuidCaloTrackStateOnSurface::getCaloSurface
const Trk::Surface * getCaloSurface(const double eta, const short layer) const
Definition: MuidCaloTrackStateOnSurface.cxx:310
IPropagator.h
Rec::MuidCaloTrackStateOnSurface::outerTSOS
std::unique_ptr< Trk::TrackStateOnSurface > outerTSOS(const EventContext &ctx, const Trk::TrackParameters &parameters) const override
Definition: MuidCaloTrackStateOnSurface.cxx:280
Rec::MuidCaloTrackStateOnSurface::m_countArbitrarySolution
std::atomic_int m_countArbitrarySolution
Definition: MuidCaloTrackStateOnSurface.h:119
Rec::MuidCaloTrackStateOnSurface::m_count
std::atomic_int m_count
Definition: MuidCaloTrackStateOnSurface.h:118
Rec::MuidCaloTrackStateOnSurface::Middle
@ Middle
Definition: MuidCaloTrackStateOnSurface.h:75
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:289
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:39
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:85
Rec::MuidCaloTrackStateOnSurface::m_caloEnergyParam
ToolHandle< Rec::IMuidCaloEnergy > m_caloEnergyParam
Definition: MuidCaloTrackStateOnSurface.h:90
Trk::ParametersBase
Definition: ParametersBase.h:55
Rec::MuidCaloTrackStateOnSurface::useEtaPhiFromDirection
static bool useEtaPhiFromDirection(const Trk::TrackParameters &parameters)
Definition: MuidCaloTrackStateOnSurface.cxx:437
Rec::MuidCaloTrackStateOnSurface::m_fieldCacheCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition: MuidCaloTrackStateOnSurface.h:109
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:95
Rec::MuidCaloTrackStateOnSurface::Outer
@ Outer
Definition: MuidCaloTrackStateOnSurface.h:75
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Rec::MuidCaloTrackStateOnSurface::finalize
StatusCode finalize() override
Definition: MuidCaloTrackStateOnSurface.cxx:74
SG::ReadCondHandleKey< AtlasFieldCacheCondObj >
Rec::MuidCaloTrackStateOnSurface::m_propagator
ToolHandle< Trk::IPropagator > m_propagator
Definition: MuidCaloTrackStateOnSurface.h:100
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:271
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Rec::MuidCaloTrackStateOnSurface::getExtrapolatedParameters
std::unique_ptr< const Trk::TrackParameters > getExtrapolatedParameters(const EventContext &ctx, const Trk::TrackParameters &parameters, const short layer) const
Definition: MuidCaloTrackStateOnSurface.cxx:317
IMuidCaloEnergy.h
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
Rec::MuidCaloTrackStateOnSurface::m_paramPtCut
double m_paramPtCut
Definition: MuidCaloTrackStateOnSurface.h:115
Rec::MuidCaloTrackStateOnSurface::m_minRemainingEnergy
double m_minRemainingEnergy
Definition: MuidCaloTrackStateOnSurface.h:114
AthAlgTool
Definition: AthAlgTool.h:26
Rec::MuidCaloTrackStateOnSurface::m_magFieldProperties
Trk::MagneticFieldProperties m_magFieldProperties
Definition: MuidCaloTrackStateOnSurface.h:106
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Rec::MuidCaloTrackStateOnSurface::~MuidCaloTrackStateOnSurface
virtual ~MuidCaloTrackStateOnSurface()=default
Rec::MuidCaloTrackStateOnSurface::m_countCompleteFailure
std::atomic_int m_countCompleteFailure
Definition: MuidCaloTrackStateOnSurface.h:120