ATLAS Offline Software
Loading...
Searching...
No Matches
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
49class MsgStream;
50
51namespace InDet {
52
59
60
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
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
121 std::deque<Amg::Vector3D>&,
122 std::vector<const InDetDD::TRT_BaseElement*>&,
124 const EventContext& ctx) const;
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
#define ATH_MSG_FATAL(x)
Maintain a set of objects, one per slot.
static Double_t Tp(Double_t *t, Double_t *par)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Virtual base class of TRT readout elements.
static double stepToDetElement(const InDetDD::TRT_BaseElement *&, Amg::Vector3D &, Amg::Vector3D &)
double getTRTMinR(const EventContext &ctx) const
static MsgStream & dumpEvent(MsgStream &out, int size_road)
void detElementsRoadATL(std::deque< Amg::Vector3D > &, std::vector< const InDetDD::TRT_BaseElement * > &, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used, const EventContext &ctx) const
MsgStream & dumpConditions(MsgStream &out) const
TRT_DetElementsRoadMaker_xk(const std::string &, const std::string &, const IInterface *)
SG::ReadCondHandleKey< TRT_DetElementsRoadData_xk > m_roadDataKey
Trk::CylinderBounds getBound(MagField::AtlasFieldCache &fieldCache, const Trk::TrackParameters &, const EventContext &ctx) const
void detElementsRoadCTB(std::deque< Amg::Vector3D > &, std::vector< const InDetDD::TRT_BaseElement * > &, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used, const EventContext &ctx) const
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
PublicToolHandle< Trk::IPropagator > m_proptool
const TRT_DetElementsLayerVectors_xk * getLayers(const EventContext &ctx) const
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
const Trk::CylinderBounds get_bounds(const EventContext &ctx) const
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Bounds for a cylindrical Surface.
holding In fact this class is here in order to allow STL container for all features This class is sho...
Eigen::Matrix< double, 3, 1 > Vector3D
Primary Vertex Finder.
PropDirection
PropDirection, enum for direction of the propagation.
MagneticFieldMode
MagneticFieldMode describing the field setup within a volume.
@ FullField
Field is set to be realistic, but within a given Volume.
ParametersBase< TrackParametersDim, Charged > TrackParameters
-event-from-file
#define private