ATLAS Offline Software
TRT_DetElementsRoadMaker_xk.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 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 
41 
42 #include <atomic>
43 #include <mutex>
44 #include <list>
45 #include <vector>
46 #include <iosfwd>
47 
48 class MsgStream;
49 
50 namespace Trk {
51 
52  class IPropagator ;
53 }
54 
55 namespace InDet {
56 
66  virtual public ITRT_DetElementsRoadMaker, public AthAlgTool
67  {
69  // Public methods:
71 
72  public:
73 
75  // Standard tool methods
77 
78  TRT_DetElementsRoadMaker_xk(const std::string&, const std::string&,
79  const IInterface*);
81  virtual StatusCode initialize() override;
82  virtual StatusCode finalize() override;
83 
85  // Main methods for road builder
87 
88  virtual std::vector<const InDetDD::TRT_BaseElement*> detElementsRoad(
89  const EventContext& ctx, MagField::AtlasFieldCache& fieldCache,
92 
94  // Print internal tool parameters and status
96 
97  virtual MsgStream& dump(MsgStream& out) const override;
98  virtual std::ostream& dump(std::ostream& out) const override;
99 
100 
101  private :
102 
104  "TRT_DetElementsRoadData_xk", "Key of TRT_DetElementsRoadData_xk"};
105 
106  SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey {this,"AtlasFieldCacheCondObj", "fieldCondObj",
107  "Name of the Magnetic Field conditions object key"}; // Necessary only for dumpConditions method
108 
109  ToolHandle<Trk::IPropagator> m_proptool ; // Propagator tool
110 
111  float m_width{} ; // Width of the roadInnerDetector/InDetRecTools/
112  double m_step{} ; // Max step allowed
113 
114  std::string m_fieldmode; // Mode of magnetic field
116 
118  // Methods
120 
121  void detElementsRoadATL(
122  std::deque<Amg::Vector3D>&,
123  std::vector<const InDetDD::TRT_BaseElement*>&,
125  void detElementsRoadCTB(
126  std::deque<Amg::Vector3D>&,
127  std::vector<const InDetDD::TRT_BaseElement*>&,
129  static double stepToDetElement(const InDetDD::TRT_BaseElement*&,
131 
133 
134  MsgStream& dumpConditions(MsgStream & out) const;
135 
136  static MsgStream& dumpEvent (MsgStream & out, int size_road) ;
137 
138  inline
141  if (not roadData.isValid()) {
142  ATH_MSG_FATAL("Failed to get " << m_roadDataKey.key());
143  }
144  return roadData->getLayers();
145  }
146 
147  inline
150  if (not roadData.isValid()) {
151  ATH_MSG_FATAL("Failed to get " << m_roadDataKey.key());
152  }
153  return roadData->getBounds();
154  }
155 
156  inline
157  double getTRTMinR() const{
159  if (not roadData.isValid()) {
160  ATH_MSG_FATAL("Failed to get " << m_roadDataKey.key());
161  }
162  double rmintrt = roadData->getTRTMinR();
163  return rmintrt;
164  }
165 
166  };
167 
168 } // end of name space
169 
170 #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:105
InDet::TRT_DetElementsRoadMaker_xk
Definition: TRT_DetElementsRoadMaker_xk.h:67
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
Definition: TRT_DetElementsRoadMaker_xk.cxx:454
InDet::TRT_DetElementsRoadMaker_xk::m_fieldmode
std::string m_fieldmode
Definition: TRT_DetElementsRoadMaker_xk.h:114
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
InDet::TRT_DetElementsRoadMaker_xk::get_bounds
const Trk::CylinderBounds get_bounds() const
Definition: TRT_DetElementsRoadMaker_xk.h:148
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
AtlasFieldCacheCondObj.h
InDet
DUMMY Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::TRT_DetElementsRoadMaker_xk::getTRTMinR
double getTRTMinR() const
Definition: TRT_DetElementsRoadMaker_xk.h:157
InDet::TRT_DetElementsRoadMaker_xk::finalize
virtual StatusCode finalize() override
Definition: TRT_DetElementsRoadMaker_xk.cxx:87
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
SG::ReadCondHandle::isValid
bool isValid()
Definition: ReadCondHandle.h:205
InDet::TRT_DetElementsRoadMaker_xk::getLayers
const TRT_DetElementsLayerVectors_xk * getLayers() const
Definition: TRT_DetElementsRoadMaker_xk.h:139
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::m_width
float m_width
Definition: TRT_DetElementsRoadMaker_xk.h:111
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:96
InDet::TRT_DetElementsRoadMaker_xk::m_fieldModeEnum
Trk::MagneticFieldMode m_fieldModeEnum
Definition: TRT_DetElementsRoadMaker_xk.h:115
InDet::TRT_DetElementsRoadMaker_xk::m_roadDataKey
SG::ReadCondHandleKey< TRT_DetElementsRoadData_xk > m_roadDataKey
Definition: TRT_DetElementsRoadMaker_xk.h:103
MagneticFieldProperties.h
InDet::TRT_DetElementsRoadMaker_xk::m_proptool
ToolHandle< Trk::IPropagator > m_proptool
Definition: TRT_DetElementsRoadMaker_xk.h:109
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
InDet::TRT_DetElementsRoadMaker_xk::m_step
double m_step
Definition: TRT_DetElementsRoadMaker_xk.h:112
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::FullField
@ FullField
Field is set to be realistic, but within a given Volume.
Definition: MagneticFieldMode.h:21
InDet::TRT_DetElementsRoadMaker_xk::getBound
Trk::CylinderBounds getBound(MagField::AtlasFieldCache &fieldCache, const Trk::TrackParameters &) const
Definition: TRT_DetElementsRoadMaker_xk.cxx:556
ReadCondHandleKey.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDet::TRT_DetElementsRoadMaker_xk::stepToDetElement
static double stepToDetElement(const InDetDD::TRT_BaseElement *&, Amg::Vector3D &, Amg::Vector3D &)
Definition: TRT_DetElementsRoadMaker_xk.cxx:543
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
InDet::TRT_DetElementsRoadMaker_xk::~TRT_DetElementsRoadMaker_xk
virtual ~TRT_DetElementsRoadMaker_xk()
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:68
SG::ReadCondHandleKey
Definition: ReadCondHandleKey.h:20
CylinderBounds.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
Definition: TRT_DetElementsRoadMaker_xk.cxx:312
InDet::TRT_DetElementsRoadMaker_xk::dumpEvent
static MsgStream & dumpEvent(MsgStream &out, int size_road)
Definition: TRT_DetElementsRoadMaker_xk.cxx:253
MagField::AtlasFieldCache
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Definition: AtlasFieldCache.h:43
SlotSpecificObj.h
Maintain a set of objects, one per slot.
InDet::TRT_DetElementsRoadMaker_xk::TRT_DetElementsRoadMaker_xk
TRT_DetElementsRoadMaker_xk(const std::string &, const std::string &, const IInterface *)
Definition: TRT_DetElementsRoadMaker_xk.cxx:43
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:106
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:279
InDetDD::TRT_BaseElement
Definition: TRT_BaseElement.h:57