ATLAS Offline Software
SiDetElementsRoadMaker_xk.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 
9 // Header file for class SiDetElementsRoadMaker_xk
11 // Version 1.0 3/10/2004 I.Gavrilenko
13 
14 #ifndef SiDetElementsRoadMaker_xk_H
15 #define SiDetElementsRoadMaker_xk_H
16 
19 
28 
29 #include "GaudiKernel/ToolHandle.h"
30 
31 // MagField cache
34 
35 #include <atomic>
36 #include <iosfwd>
37 #include <list>
38 #include <deque>
39 #include <vector>
40 #include <array>
41 
42 class MsgStream;
43 
44 namespace InDet{
55 
57  class SiDetElementRoadMakerData_xk;
58 
60  public extends<AthAlgTool, ISiDetElementsRoadMaker>
61  {
63  // Public methods:
65 
66  public:
67 
71 
73  (const std::string&, const std::string&, const IInterface*);
74  virtual ~SiDetElementsRoadMaker_xk() = default;
75  virtual StatusCode initialize() override;
76  virtual StatusCode finalize() override;
78 
94  virtual void detElementsRoad
95  (std::deque<Amg::Vector3D>& globalPositions,
96  std::vector<const InDetDD::SiDetectorElement*>& Road,
97  bool testDirection,
98  SiDetElementRoadMakerData_xk & roadMakerData,
99  const EventContext& ctx) const override;
100 
101 
110  virtual void detElementsRoad
111  (const EventContext& ctx,
112  MagField::AtlasFieldCache& fieldCache,
113  const Trk::TrackParameters& Tp,
114  Trk::PropDirection direction,
115  std::vector<const InDetDD::SiDetectorElement*>& Road,
116  SiDetElementRoadMakerData_xk & roadMakerData) const override;
118 
122 
123  MsgStream& dump(MsgStream & out) const override;
124  std::ostream& dump(std::ostream& out) const override;
126 
127  private:
128 
130  // Protected Data
132 
134 
135  PublicToolHandle<Trk::IPropagator> m_proptool{this, "PropagatorTool",
136  "Trk::RungeKuttaPropagator/InDetPropagator", "Propagator tool"};
138 
140 
142  "SiDetElementsLayerVectors_xk", "Key of SiDetElementsLayerVectors_xk"};
144  SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey{this, "AtlasFieldCacheCondObj", "fieldCondObj",
145  "Name of the Magnetic Field conditions object key"}; // Necessary only for dumpConditions method
147 
149 
150  BooleanProperty m_usePIX{this, "usePixel", true};
151  BooleanProperty m_useSCT{this, "useSCT", true};
152  FloatProperty m_width{this, "RoadWidth", 20., "Width of the road"};
153  DoubleProperty m_step{this, "MaxStep", 40., "Max step allowed"};
154  StringProperty m_pix{this, "PixManagerLocation", "Pixel", "PIX manager location"};
155  StringProperty m_sct{this, "SCTManagerLocation", "SCT", "SCT manager location"};
156  StringProperty m_fieldmode{this, "MagneticFieldMode", "MapSolenoid", "Mode of magnetic field"};
157  BooleanProperty m_ITkGeometry{this, "ITkGeometry", false};
159 
161 
166 
168  // Methods
170 
171  void computeBounds();
172  static float stepToDetElement(const InDetDD::SiDetectorElement*&,
174 
176  const Trk::TrackParameters&) const;
177 
178  MsgStream& dumpConditions(MsgStream& out) const;
179 
180  inline
181  const SiDetElementsLayerVectors_xk *getLayers(const EventContext& ctx) const {
183  if (not layerVec.isValid()) {
184  ATH_MSG_ERROR("Failed to get " << m_layerVecKey.key());
185  }
186  return layerVec.cptr();
187  }
192 
193  };
194 
195  MsgStream& operator << (MsgStream& , const SiDetElementsRoadMaker_xk&);
196  std::ostream& operator << (std::ostream&, const SiDetElementsRoadMaker_xk&);
197 
198 } // end of name space
199 
200 #endif // SiDetElementsRoadMaker_xk_H
InDet::SiDetElementsRoadMaker_xk::m_proptool
PublicToolHandle< Trk::IPropagator > m_proptool
Definition: SiDetElementsRoadMaker_xk.h:135
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
InDet::operator<<
MsgStream & operator<<(MsgStream &, const GNNTrackReaderTool &)
SiDetElementsLayerVectors_xk.h
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
InDet::SiDetElementsRoadMaker_xk::initialize
virtual StatusCode initialize() override
Definition: SiDetElementsRoadMaker_xk.cxx:44
AtlasFieldCacheCondObj.h
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
SiDetElementsLayer_xk.h
InDet::SiDetElementsRoadMaker_xk::finalize
virtual StatusCode finalize() override
Definition: SiDetElementsRoadMaker_xk.cxx:83
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
SG::ReadCondHandle::isValid
bool isValid()
Definition: ReadCondHandle.h:206
InDet::SiDetElementsRoadMaker_xk::m_ITkGeometry
BooleanProperty m_ITkGeometry
Definition: SiDetElementsRoadMaker_xk.h:157
IPropagator.h
InDet::SiDetElementsRoadMaker_xk::m_useSCT
BooleanProperty m_useSCT
Definition: SiDetElementsRoadMaker_xk.h:151
InDet::SiDetElementsRoadMaker_xk::stepToDetElement
static float stepToDetElement(const InDetDD::SiDetectorElement *&, Amg::Vector3D &, Amg::Vector3D &)
Definition: SiDetElementsRoadMaker_xk.cxx:761
InDet::SiDetElementsRoadMaker_xk::m_fieldmode
StringProperty m_fieldmode
Definition: SiDetElementsRoadMaker_xk.h:156
InDet::SiDetElementsRoadMaker_xk
Definition: SiDetElementsRoadMaker_xk.h:61
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
InDet::SiDetElementsRoadMaker_xk::dump
MsgStream & dump(MsgStream &out) const override
Definition: SiDetElementsRoadMaker_xk.cxx:93
InDet::SiDetElementsRoadMaker_xk::m_pix
StringProperty m_pix
Definition: SiDetElementsRoadMaker_xk.h:154
ReadCondHandle.h
InDet::SiDetElementRoadMakerData_xk
Definition: SiDetElementRoadMakerData_xk.h:28
InDet::SiDetElementsRoadMaker_xk::bookUsageTracker
static void bookUsageTracker(InDet::SiDetElementRoadMakerData_xk &data, const SiDetElementsLayerVectors_xk &layers)
this method is used to initialize the detector element usage tracker member of the event data struct ...
Definition: SiDetElementsRoadMaker_xk.cxx:521
MagneticFieldProperties.h
InDet::SiDetElementsRoadMaker_xk::m_layerVecKey
SG::ReadCondHandleKey< SiDetElementsLayerVectors_xk > m_layerVecKey
Created by SiDetElementsRoadCondAlg_xk.
Definition: SiDetElementsRoadMaker_xk.h:141
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
InDet::SiDetElementsRoadMaker_xk::m_sct
StringProperty m_sct
Definition: SiDetElementsRoadMaker_xk.h:155
InDet::SiDetElementsRoadMaker_xk::m_bounds
Trk::CylinderBounds m_bounds
Definition: SiDetElementsRoadMaker_xk.h:162
InDet::SiDetElementsRoadMaker_xk::m_fieldCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Definition: SiDetElementsRoadMaker_xk.h:144
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ISiDetElementsRoadMaker.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::SiDetElementsRoadMaker_xk::m_outputlevel
int m_outputlevel
Definition: SiDetElementsRoadMaker_xk.h:164
InDet::SiDetElementsRoadMaker_xk::SiDetElementsRoadMaker_xk
SiDetElementsRoadMaker_xk(const std::string &, const std::string &, const IInterface *)
Definition: SiDetElementsRoadMaker_xk.cxx:35
Trk::ParametersBase
Definition: ParametersBase.h:55
InDet::SiDetElementsRoadMaker_xk::~SiDetElementsRoadMaker_xk
virtual ~SiDetElementsRoadMaker_xk()=default
Trk::FullField
@ FullField
Field is set to be realistic, but within a given Volume.
Definition: MagneticFieldMode.h:21
ReadCondHandleKey.h
InDet::SiDetElementsRoadMaker_xk::dumpConditions
MsgStream & dumpConditions(MsgStream &out) const
Definition: SiDetElementsRoadMaker_xk.cxx:103
InDet::SiDetElementsLayerVectors_xk
std::vector< std::vector< InDet::SiDetElementsLayer_xk > > SiDetElementsLayerVectors_xk
Definition: SiDetElementsLayerVectors_xk.h:22
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::SiDetElementsRoadMaker_xk::computeBounds
void computeBounds()
Definition: SiDetElementsRoadMaker_xk.cxx:606
SG::ReadCondHandleKey< SiDetElementsLayerVectors_xk >
InDet::SiDetElementsRoadMaker_xk::detElementsRoad
virtual void detElementsRoad(std::deque< Amg::Vector3D > &globalPositions, std::vector< const InDetDD::SiDetectorElement * > &Road, bool testDirection, SiDetElementRoadMakerData_xk &roadMakerData, const EventContext &ctx) const override
This signature assumes you already have a list of positions along the trajectory.
Definition: SiDetElementsRoadMaker_xk.cxx:306
CylinderBounds.h
InDet::SiDetElementsRoadMaker_xk::getLayers
const SiDetElementsLayerVectors_xk * getLayers(const EventContext &ctx) const
Definition: SiDetElementsRoadMaker_xk.h:181
MagField::AtlasFieldCache
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Definition: AtlasFieldCache.h:43
InDet::SiDetElementsRoadMaker_xk::m_width
FloatProperty m_width
Definition: SiDetElementsRoadMaker_xk.h:152
SlotSpecificObj.h
Maintain a set of objects, one per slot.
InDet::SiDetElementsRoadMaker_xk::getBound
Trk::CylinderBounds getBound(MagField::AtlasFieldCache &fieldCache, const Trk::TrackParameters &) const
Definition: SiDetElementsRoadMaker_xk.cxx:775
Trk::MagneticFieldMode
MagneticFieldMode
Definition: MagneticFieldMode.h:17
InDet::SiDetElementsRoadMaker_xk::m_usePIX
BooleanProperty m_usePIX
Definition: SiDetElementsRoadMaker_xk.h:150
InDet::SiDetElementsRoadMaker_xk::m_step
DoubleProperty m_step
Definition: SiDetElementsRoadMaker_xk.h:153
SG::ReadCondHandle::cptr
const_pointer_type cptr()
Definition: ReadCondHandle.h:67
InDet::SiDetElementsRoadMaker_xk::m_fieldModeEnum
Trk::MagneticFieldMode m_fieldModeEnum
Definition: SiDetElementsRoadMaker_xk.h:163