ATLAS Offline Software
TRT_DetElementsRoadMaker_xk.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 // Header file for class TRT_DetElementsRoadMaker_xk
9 // (c) ATLAS Detector software
11 // Class for InDetDD::TRT_BaseElement* collection production
13 // Version 1.0 3/10/2004 I.Gavrilenko
15 
16 #ifndef TRT_DetElementsRoadMaker_xk_H
17 #define TRT_DetElementsRoadMaker_xk_H
18 
19 
20 
22 #include "GaudiKernel/ServiceHandle.h"
23 #include "GaudiKernel/AlgTool.h"
24 #include "GaudiKernel/ToolHandle.h"
25 #include "GaudiKernel/MsgStream.h"
26 
28 
31 
34 
37 
40 
42 
43 #include <atomic>
44 #include <mutex>
45 #include <list>
46 #include <vector>
47 #include <iosfwd>
48 
49 class MsgStream;
50 
51 namespace InDet {
52 
62  virtual public ITRT_DetElementsRoadMaker, public AthAlgTool
63  {
65  // Public methods:
67 
68  public:
69 
71  // Standard tool methods
73 
74  TRT_DetElementsRoadMaker_xk(const std::string&, const std::string&,
75  const IInterface*);
77  virtual StatusCode initialize() override;
78  virtual StatusCode finalize() override;
79 
81  // Main methods for road builder
83 
84  virtual std::vector<const InDetDD::TRT_BaseElement*> detElementsRoad(
85  const EventContext& ctx, MagField::AtlasFieldCache& fieldCache,
88 
90  // Print internal tool parameters and status
92 
93  virtual MsgStream& dump(MsgStream& out) const override;
94  virtual std::ostream& dump(std::ostream& out) const override;
95 
96 
97  private :
98 
100  "TRT_DetElementsRoadData_xk", "Key of TRT_DetElementsRoadData_xk"};
101 
102  SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey {this,"AtlasFieldCacheCondObj", "fieldCondObj",
103  "Name of the Magnetic Field conditions object key"}; // Necessary only for dumpConditions method
104 
105  PublicToolHandle<Trk::IPropagator> m_proptool{this, "PropagatorTool",
106  "Trk::RungeKuttaPropagator/InDetPropagator"};
107 
108  FloatProperty m_width{this, "RoadWidth", 10.,
109  "Width of the roadInnerDetector/InDetRecTools/"};
110  DoubleProperty m_step{this, "MaxStep", 20., "Max step allowed"};
111 
112  StringProperty m_fieldmode{this, "MagneticFieldMode", "MapSolenoid",
113  "Mode of magnetic field"};
115 
117  // Methods
119 
120  void detElementsRoadATL(
121  std::deque<Amg::Vector3D>&,
122  std::vector<const InDetDD::TRT_BaseElement*>&,
124  const EventContext& ctx) const;
125  void detElementsRoadCTB(
126  std::deque<Amg::Vector3D>&,
127  std::vector<const InDetDD::TRT_BaseElement*>&,
129  const EventContext& ctx) const;
130  static double stepToDetElement(const InDetDD::TRT_BaseElement*&,
132 
133  Trk::CylinderBounds getBound(MagField::AtlasFieldCache& fieldCache, const Trk::TrackParameters&, const EventContext& ctx) const;
134 
135  MsgStream& dumpConditions(MsgStream & out) const;
136 
137  static MsgStream& dumpEvent (MsgStream & out, int size_road) ;
138 
139  inline
140  const TRT_DetElementsLayerVectors_xk *getLayers(const EventContext& ctx) const {
142  if (not roadData.isValid()) {
143  ATH_MSG_FATAL("Failed to get " << m_roadDataKey.key());
144  }
145  return roadData->getLayers();
146  }
147 
148  inline
149  const Trk::CylinderBounds get_bounds(const EventContext& ctx) const{
151  if (not roadData.isValid()) {
152  ATH_MSG_FATAL("Failed to get " << m_roadDataKey.key());
153  }
154  return roadData->getBounds();
155  }
156 
157  inline
158  double getTRTMinR(const EventContext& ctx) const{
160  if (not roadData.isValid()) {
161  ATH_MSG_FATAL("Failed to get " << m_roadDataKey.key());
162  }
163  double rmintrt = roadData->getTRTMinR();
164  return rmintrt;
165  }
166 
167  };
168 
169 } // end of name space
170 
171 #endif // TRT_DetElementsRoadMaker_xk_H
TRT_DetElementsLayer_xk.h
used
InDet::TRT_DetElementsRoadMaker_xk::dumpConditions
MsgStream & dumpConditions(MsgStream &out) const
Definition: TRT_DetElementsRoadMaker_xk.cxx:96
InDet::TRT_DetElementsRoadMaker_xk
Definition: TRT_DetElementsRoadMaker_xk.h:63
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
InDet::TRT_DetElementsRoadMaker_xk::m_proptool
PublicToolHandle< Trk::IPropagator > m_proptool
Definition: TRT_DetElementsRoadMaker_xk.h:105
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
AtlasFieldCacheCondObj.h
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::TRT_DetElementsRoadMaker_xk::finalize
virtual StatusCode finalize() override
Definition: TRT_DetElementsRoadMaker_xk.cxx:78
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
SG::ReadCondHandle::isValid
bool isValid()
Definition: ReadCondHandle.h:206
InDet::TRT_DetElementsRoadMaker_xk::getTRTMinR
double getTRTMinR(const EventContext &ctx) const
Definition: TRT_DetElementsRoadMaker_xk.h:158
IPropagator.h
InDet::TRT_DetElementsLayerVectors_xk
std::vector< std::vector< InDet::TRT_DetElementsLayer_xk > > TRT_DetElementsLayerVectors_xk
Definition: TRT_DetElementsLayerVectors_xk.h:16
InDet::TRT_DetElementsRoadMaker_xk::detElementsRoadCTB
void detElementsRoadCTB(std::deque< Amg::Vector3D > &, std::vector< const InDetDD::TRT_BaseElement * > &, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used, const EventContext &ctx) const
Definition: TRT_DetElementsRoadMaker_xk.cxx:446
InDet::ITRT_DetElementsRoadMaker
Definition: ITRT_DetElementsRoadMaker.h:43
InDet::TRT_DetElementsRoadMaker_xk::dump
virtual MsgStream & dump(MsgStream &out) const override
Definition: TRT_DetElementsRoadMaker_xk.cxx:87
InDet::TRT_DetElementsRoadMaker_xk::m_fieldModeEnum
Trk::MagneticFieldMode m_fieldModeEnum
Definition: TRT_DetElementsRoadMaker_xk.h:114
InDet::TRT_DetElementsRoadMaker_xk::m_roadDataKey
SG::ReadCondHandleKey< TRT_DetElementsRoadData_xk > m_roadDataKey
Definition: TRT_DetElementsRoadMaker_xk.h:99
MagneticFieldProperties.h
InDet::TRT_DetElementsRoadMaker_xk::m_step
DoubleProperty m_step
Definition: TRT_DetElementsRoadMaker_xk.h:110
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
TRT_DetElementsRoadData_xk.h
ITRT_DetElementsRoadMaker.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::CylinderBounds
Definition: CylinderBounds.h:46
AthAlgTool.h
AtlasFieldCache.h
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::FullField
@ FullField
Field is set to be realistic, but within a given Volume.
Definition: MagneticFieldMode.h:21
ReadCondHandleKey.h
InDet::TRT_DetElementsRoadMaker_xk::detElementsRoadATL
void detElementsRoadATL(std::deque< Amg::Vector3D > &, std::vector< const InDetDD::TRT_BaseElement * > &, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used, const EventContext &ctx) const
Definition: TRT_DetElementsRoadMaker_xk.cxx:303
InDet::TRT_DetElementsRoadMaker_xk::m_fieldmode
StringProperty m_fieldmode
Definition: TRT_DetElementsRoadMaker_xk.h:112
InDet::TRT_DetElementsRoadMaker_xk::stepToDetElement
static double stepToDetElement(const InDetDD::TRT_BaseElement *&, Amg::Vector3D &, Amg::Vector3D &)
Definition: TRT_DetElementsRoadMaker_xk.cxx:536
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
InDet::TRT_DetElementsRoadMaker_xk::~TRT_DetElementsRoadMaker_xk
virtual ~TRT_DetElementsRoadMaker_xk()
InDet::TRT_DetElementsRoadMaker_xk::m_width
FloatProperty m_width
Definition: TRT_DetElementsRoadMaker_xk.h:108
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::TRT_DetElementsRoadMaker_xk::initialize
virtual StatusCode initialize() override
Definition: TRT_DetElementsRoadMaker_xk.cxx:59
SG::ReadCondHandleKey
Definition: ReadCondHandleKey.h:20
CylinderBounds.h
InDet::TRT_DetElementsRoadMaker_xk::getBound
Trk::CylinderBounds getBound(MagField::AtlasFieldCache &fieldCache, const Trk::TrackParameters &, const EventContext &ctx) const
Definition: TRT_DetElementsRoadMaker_xk.cxx:549
InDet::TRT_DetElementsRoadMaker_xk::dumpEvent
static MsgStream & dumpEvent(MsgStream &out, int size_road)
Definition: TRT_DetElementsRoadMaker_xk.cxx:244
MagField::AtlasFieldCache
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Definition: AtlasFieldCache.h:43
InDet::TRT_DetElementsRoadMaker_xk::getLayers
const TRT_DetElementsLayerVectors_xk * getLayers(const EventContext &ctx) const
Definition: TRT_DetElementsRoadMaker_xk.h:140
SlotSpecificObj.h
Maintain a set of objects, one per slot.
InDet::TRT_DetElementsRoadMaker_xk::get_bounds
const Trk::CylinderBounds get_bounds(const EventContext &ctx) const
Definition: TRT_DetElementsRoadMaker_xk.h:149
InDet::TRT_DetElementsRoadMaker_xk::TRT_DetElementsRoadMaker_xk
TRT_DetElementsRoadMaker_xk(const std::string &, const std::string &, const IInterface *)
Definition: TRT_DetElementsRoadMaker_xk.cxx:42
AthAlgTool
Definition: AthAlgTool.h:26
Trk::MagneticFieldMode
MagneticFieldMode
Definition: MagneticFieldMode.h:17
InDet::TRT_DetElementsRoadMaker_xk::m_fieldCacheCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition: TRT_DetElementsRoadMaker_xk.h:102
InDet::TRT_DetElementsRoadMaker_xk::detElementsRoad
virtual std::vector< const InDetDD::TRT_BaseElement * > detElementsRoad(const EventContext &ctx, MagField::AtlasFieldCache &fieldCache, const Trk::TrackParameters &Tp, Trk::PropDirection D, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used) const override
Definition: TRT_DetElementsRoadMaker_xk.cxx:270
InDetDD::TRT_BaseElement
Definition: TRT_BaseElement.h:57