ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_DetectorManager.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
168 // Alignment stuff
169 // DEPRECATED - kept for compatibilty with Lisbon CondDB
170 void addKey ATLAS_NOT_THREAD_SAFE (const std::string & key, int level);
171 // DEPRECATED use addChannel
172 void addKey(const std::string & key, int level, FrameType frame);
173
174
175
177 void addAlignableTransform (int level,
178 const Identifier &id,
179 GeoAlignableTransform *transform,
180 const GeoVFullPhysVol * child = 0,
181 const GeoVFullPhysVol * frameVol = 0);
182
184 void addAlignableTransform (int level,
185 const Identifier &id,
186 GeoAlignableTransform *transform,
187 const GeoVPhysVol * child = 0,
188 const GeoVPhysVol * frameVol = 0);
189
191 virtual bool setAlignableTransformDelta(int level,
192 const Identifier & id,
193 const Amg::Transform3D & delta,
194 FrameType frame,
195 GeoVAlignmentStore* alignStore) const override;
196
199 const Amg::Transform3D & delta,
200 FrameType frame,
201 GeoVAlignmentStore* alignStore) const;
202
203
205 virtual void invalidateAll() override;
206
208 virtual void updateAll() const override;
209
210
212 virtual bool identifierBelongs(const Identifier & id) const override;
213
216
218 virtual
219 bool processGlobalAlignment(const std::string &, int level, FrameType frame,
220 const CondAttrListCollection* obj,
221 GeoVAlignmentStore* alignStore) const override;
222
223 bool processSpecialAlignment(const std::string & key, InDetDD::AlignFolderType dummy) override;
224
225 bool processSpecialAlignment(const std::string& key,
226 const CondAttrListCollection* obj=nullptr,
227 GeoVAlignmentStore* alignStore=nullptr) const override;
228
230 void setBarrelDescriptor(const TRT_BarrelDescriptor* barrelDescriptor);
231 void setEndcapDescriptor(const TRT_EndcapDescriptor* endcapDescriptor);
232
233 private:
234
235
236 // Illegal operations:---------------------------------------------------------//
237 // //
240 // //
241 //-----------------------------------------------------------------------------//
242
243
244 // Private member data:--------------------------------------------------------//
245 std::vector<PVLink> m_volume; //
246 // //
248 // //
252 const GeoXF::Function *m_barrelXF[3]{}; //
253 const GeoXF::Function *m_endcapXF[3]{}; //
254 // //
256 unsigned int m_digvers; //
257 std::string m_digversname; //
258
259 // Alignment stuff
260 typedef std::map<Identifier, ExtendedAlignableTransform *> AlignableTransformMap;
261 std::vector< AlignableTransformMap > m_alignableTransforms;
262
263 // Descriptors are owned by TRT_DetectorManager.
264 std::set<const TRT_BarrelDescriptor*> m_barrelDescriptors;
265 std::set<const TRT_EndcapDescriptor*> m_endcapDescriptors;
266
267 // here temporarily
268 virtual const TRT_ID *getIdHelper() const override; //
269
270 //-----------------------------------------------------------------------------//
271 };
272}
273#ifndef GAUDI_NEUTRAL
276#endif
277#endif
278
279
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
#define IOVSVC_CALLBACK_ARGS
short hand for IOVSvc call back argument list, to be used when no access to formal arguments is neede...
Definition IOVSvcDefs.h:24
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.
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)
StatusCode alignmentCallback(IOVSVC_CALLBACK_ARGS)
Call back for alignment updates, DEPRECATED.
void addKey ATLAS_NOT_THREAD_SAFE(const std::string &key, int level)
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: -----------------------------------------------------—.
void addKey(const std::string &key, int level, FrameType frame)
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.