ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_DetectorManager.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRT_READOUTGEOMETRY_TRT_DETECTORMANAGER_H
6#define TRT_READOUTGEOMETRY_TRT_DETECTORMANAGER_H
7
11
13
21#include "GeoModelKernel/GeoVPhysVol.h"
23#include "GeoModelKernel/GeoXF.h"
24
26
27#include <map>
28#include <set>
29#include <string>
30#include <vector>
31
32class Identifier;
33class GeoAlignableTransform;
34class GeoVAlignmentStore;
35class StoreGateSvc;
37
38namespace InDetDD {
39
43 class TRT_Numerology;
44
59
61 : public InDetDetectorManager,
62 public TRT_Conditions
63 {
64 public:
65
66 // Constructor
68
69 // Destructor
71
73 virtual unsigned int getNumTreeTops() const override; //
74 virtual PVConstLink getTreeTop(unsigned int i) const override; //
75 //-----------------------------------------------------------------------------//
76
78 void setIdHelper(const TRT_ID * idHelper, bool owns=true); //
79 //-----------------------------------------------------------------------------//
80
81
82 //** Get and set information about gasType. -----------------------------------*/
84 ActiveGasType gasType() const; //
85 void setGasType(const ActiveGasType &); //
86 //-----------------------------------------------------------------------------//
87
90 const TRT_Numerology * getNumerology() const; //
91 //-----------------------------------------------------------------------------//
92
93
95 const TRT_BaseElement *getElement(Identifier id) const; // Slow //
96 const TRT_BaseElement *getElement(IdentifierHash id) const; // Fast //
97 //-----------------------------------------------------------------------------//
98
101
108
109
110 //-----------------------------------------------------------------------------//
111
112
114 const TRT_BarrelElement *getBarrelElement(unsigned int positive //
115 , unsigned int moduleIndex //
116 , unsigned int phiIndex //
117 , unsigned int strawLayerIndex) const;
118
119 TRT_BarrelElement *getBarrelElement(unsigned int positive //
120 , unsigned int moduleIndex //
121 , unsigned int phiIndex //
122 , unsigned int strawLayerIndex); //
123 // //
124 //-----------------------------------------------------------------------------//
125
126
128 const TRT_EndcapElement *getEndcapElement(unsigned int positive //
129 , unsigned int wheelIndex //
130 , unsigned int strawLayerIndex //
131 , unsigned int phiIndex) const; //
132 TRT_EndcapElement *getEndcapElement(unsigned int positive //
133 , unsigned int wheelIndex //
134 , unsigned int strawLayerIndex //
135 , unsigned int phiIndex); //
136 // //
137 //------------------------------------------------------------------------------//
138
140 const TRT_Conditions * conditions() const; //
141 //-----------------------------------------------------------------------------//
142
143
144 // This is for Detector Descriptors -------------------------------------------//
145 void addTreeTop(const PVLink&); //
146 // //
147 // Manage the barrel elements: //
149 // //
150 // Manage the endcap elements: //
151 void manageEndcapElement(TRT_EndcapElement *endcap); //
152 // //
153 //-----------------------------------------------------------------------------//
154
155 //-----------------------------------------------------------------------------//
156 // //
157 // Transform of straw relative to module. Stored as a tranformation field //
158 // to make this compact. Note , GeoXF::Function * is a pointer to a so- //
159 // called "TRANSFUNCTION". Functions are delete when the manager is deleted. //
160 // //
161 void setBarrelTransformField(size_t i, const GeoXF::Function *field); //
162 const GeoXF::Function *barrelTransformField(size_t i) const; //
163 void setEndcapTransformField(size_t i, const GeoXF::Function *field); //
164 const GeoXF::Function *endcapTransformField(size_t i) const; //
165 // //
166 //-----------------------------------------------------------------------------//
167
169 void addAlignableTransform (int level,
170 const Identifier &id,
171 GeoAlignableTransform *transform,
172 const GeoVFullPhysVol * child = 0,
173 const GeoVFullPhysVol * frameVol = 0);
174
176 void addAlignableTransform (int level,
177 const Identifier &id,
178 GeoAlignableTransform *transform,
179 const GeoVPhysVol * child = 0,
180 const GeoVPhysVol * frameVol = 0);
181
183 virtual bool setAlignableTransformDelta(int level,
184 const Identifier & id,
185 const Amg::Transform3D & delta,
186 FrameType frame,
187 GeoVAlignmentStore* alignStore) const override;
188
191 const Amg::Transform3D & delta,
192 FrameType frame,
193 GeoVAlignmentStore* alignStore) const;
194
195
197 virtual void invalidateAll() override;
198
200 virtual void updateAll() const override;
201
202
204 virtual bool identifierBelongs(const Identifier & id) const override;
205
207 StatusCode alignmentCallback();
208
210 virtual
211 bool processGlobalAlignment(const std::string &, int level, FrameType frame,
212 const CondAttrListCollection* obj,
213 GeoVAlignmentStore* alignStore) const override;
214
215 bool processSpecialAlignment(const std::string & key, InDetDD::AlignFolderType dummy) override;
216
217 bool processSpecialAlignment(const std::string& key,
218 const CondAttrListCollection* obj=nullptr,
219 GeoVAlignmentStore* alignStore=nullptr) const override;
220
222 void setBarrelDescriptor(const TRT_BarrelDescriptor* barrelDescriptor);
223 void setEndcapDescriptor(const TRT_EndcapDescriptor* endcapDescriptor);
224
225 private:
226
227
228 // Illegal operations:---------------------------------------------------------//
229 // //
232 // //
233 //-----------------------------------------------------------------------------//
234
235
236 // Private member data:--------------------------------------------------------//
237 std::vector<PVLink> m_volume; //
238 // //
240 // //
244 const GeoXF::Function *m_barrelXF[3]{}; //
245 const GeoXF::Function *m_endcapXF[3]{}; //
246 // //
248 unsigned int m_digvers; //
249 std::string m_digversname; //
250
251 // Alignment stuff
252 typedef std::map<Identifier, ExtendedAlignableTransform *> AlignableTransformMap;
253 std::vector< AlignableTransformMap > m_alignableTransforms;
254
255 // Descriptors are owned by TRT_DetectorManager.
256 std::set<const TRT_BarrelDescriptor*> m_barrelDescriptors;
257 std::set<const TRT_EndcapDescriptor*> m_endcapDescriptors;
258
259 // here temporarily
260 virtual const TRT_ID *getIdHelper() const override; //
261
262 //-----------------------------------------------------------------------------//
263 };
264}
265#ifndef GAUDI_NEUTRAL
268#endif
269#endif
270
271
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
This is an Identifier helper class for the TRT subdetector.
Define macros for attributes used to control the static checker.
This class is a collection of AttributeLists where each one is associated with a channel number.
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
DataModel_detail::iterator< DataVector > iterator
Definition DataVector.h:842
This is a "hash" representation of an Identifier.
Class to hold alignable transform plus a pointer to the child volume and optionally a frame volume.
InDetDetectorManager(StoreGateSvc *detStore, const std::string &name)
Local Straw Positions (from the center of the module.)
Extended TRT_BaseElement to describe a TRT readout element, this is a planar layer with n ( order of ...
Virtual base class of TRT readout elements.
This class is an interface to conditions objects.
Class to hold collection of TRT detector elements.
Class to hold different TRT detector elements structures.
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
virtual const TRT_ID * getIdHelper() const override
const GeoXF::Function * m_barrelXF[3]
const TRT_BaseElement * getElement(Identifier id) const
Access Elements Generically---------------------------------------------—.
virtual bool processGlobalAlignment(const std::string &, int level, FrameType frame, const CondAttrListCollection *obj, GeoVAlignmentStore *alignStore) const override
Process new global DB folders for L1 and L2.
void manageBarrelElement(TRT_BarrelElement *barrel)
const TRT_BarrelElement * getBarrelElement(unsigned int positive, unsigned int moduleIndex, unsigned int phiIndex, unsigned int strawLayerIndex) const
Access Barrel Elements:---------------—(Fast)-------------------------—.
void setBarrelTransformField(size_t i, const GeoXF::Function *field)
virtual void invalidateAll() override
Invalidate cache for all detector elements.
void setGasType(const ActiveGasType &)
std::map< Identifier, ExtendedAlignableTransform * > AlignableTransformMap
TRT_Numerology * getNumerology()
Access Numerological information:---------------------------------------—.
const GeoXF::Function * endcapTransformField(size_t i) const
bool processSpecialAlignment(const std::string &key, InDetDD::AlignFolderType dummy) override
std::set< const TRT_BarrelDescriptor * > m_barrelDescriptors
void setBarrelDescriptor(const TRT_BarrelDescriptor *barrelDescriptor)
Set TRT_Barrel/EndcapDescriptor pointer to the internal sets to delete them in the destructor.
virtual bool identifierBelongs(const Identifier &id) const override
Check identifier is for this detector.
TRT_DetectorManager(StoreGateSvc *detStore)
virtual void updateAll() const override
Update all caches.
const TRT_DetectorManager & operator=(const TRT_DetectorManager &right)
bool setAlignableTransformAnyFrameDelta(ExtendedAlignableTransform *extXF, const Amg::Transform3D &delta, FrameType frame, GeoVAlignmentStore *alignStore) const
Set alignable transforms: Amg based.
StatusCode alignmentCallback()
Call back for alignment updates, DEPRECATED.
virtual PVConstLink getTreeTop(unsigned int i) const override
TRT_DetElementCollection::const_iterator getDetectorElementBegin() const
void setEndcapTransformField(size_t i, const GeoXF::Function *field)
const TRT_Conditions * conditions() const
Conditions interface (mostly for internal use):-------------------------—.
std::vector< AlignableTransformMap > m_alignableTransforms
const TRT_DetElementContainer * getDetectorElementContainer() const
Access the element container -------------------------------------------—.
TRT_DetElementCollection::const_iterator getDetectorElementEnd() const
const GeoXF::Function * barrelTransformField(size_t i) const
void setEndcapDescriptor(const TRT_EndcapDescriptor *endcapDescriptor)
void manageEndcapElement(TRT_EndcapElement *endcap)
void addAlignableTransform(int level, const Identifier &id, GeoAlignableTransform *transform, const GeoVFullPhysVol *child=0, const GeoVFullPhysVol *frameVol=0)
Add alignable transforms: GeoModel/CLHEP based.
const TRT_EndcapElement * getEndcapElement(unsigned int positive, unsigned int wheelIndex, unsigned int strawLayerIndex, unsigned int phiIndex) const
Access Endcap Elements:---------------—(Fast)--------------------------—.
virtual bool setAlignableTransformDelta(int level, const Identifier &id, const Amg::Transform3D &delta, FrameType frame, GeoVAlignmentStore *alignStore) const override
Set alignable transforms: Amg based.
TRT_DetectorManager(const TRT_DetectorManager &right)
void setIdHelper(const TRT_ID *idHelper, bool owns=true)
Get the ID helper: -----------------------------------------------------—.
virtual unsigned int getNumTreeTops() const override
Access Raw Geometry:----------------------------------------------------—.
std::set< const TRT_EndcapDescriptor * > m_endcapDescriptors
TRT_DetElementContainer m_elementContainer
const TRT_DetElementCollection * getDetectorElementCollection() const
Access to Whole Collection of Elements ---------------------------------—.
const GeoXF::Function * m_endcapXF[3]
class TRT_EndcapDescriptor
Extended class of a TRT_BaseElement to describe a readout elment in the endcap.
Helper class to organize the straw elements on TRT readout elements.
The Athena Transient Store API.
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:82
Eigen::Affine3d Transform3D
Message Stream Member.