ATLAS Offline Software
SCT_DetectorManager.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // SCT_DetectorManager.h
8 
9 #ifndef INDETREADOUTGEOMETRY_SCT_DETECTORMANAGER_H
10 #define INDETREADOUTGEOMETRY_SCT_DETECTORMANAGER_H
11 
13 
14 #include "GeoModelKernel/GeoVPhysVol.h"
15 
21 
22 #include "InDetIdentifier/SCT_ID.h"
23 
24 #include <memory>
25 
26 class StoreGateSvc;
27 class Identifier;
28 class IdentifierHash;
29 class GeoAlignableTransform;
30 class GeoVFullPhysVol;
31 class GeoVPhysVol;
32 class GeoVAlignmentStore;
34 
35 namespace InDetDD {
36 
37  class SiDetectorElement;
38 
50 
51  public:
52 
55 
57  SCT_DetectorManager( StoreGateSvc* detStore, const std::string& name );
58 
63  virtual unsigned int getNumTreeTops() const override;
64  virtual PVConstLink getTreeTop(unsigned int i) const override;
66  void addTreeTop(const PVConstLink& vol);
68 
69 
74  virtual SiDetectorElement* getDetectorElement(const Identifier& id) const override;
76 
78  virtual SiDetectorElement* getDetectorElement(const IdentifierHash& idHash) const override;
79 
81  SiDetectorElement* getDetectorElement(int barrel_endcap, int layer_wheel, int phi_module, int eta_module, int side) const;
82 
87  virtual const SiDetectorElementCollection* getDetectorElementCollection() const override;
88  virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const override;
89  virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd() const override;
91 
93  virtual void addDetectorElement(SiDetectorElement* element) override;
95 
97  virtual void addAlignableTransform (int level,
98  const Identifier& id,
99  GeoAlignableTransform* xf,
100  const GeoVFullPhysVol* child);
101 
103  virtual void addAlignableTransform (int level,
104  const Identifier& id,
105  GeoAlignableTransform* xf,
106  const GeoVPhysVol* child);
107 
109  virtual void addAlignableTransform (int, const Identifier&, GeoAlignableTransform*) override {};
110 
112  virtual void initNeighbours() override;
113 
115  virtual bool isPixel() const override {return false;}
116 
118  virtual bool identifierBelongs(const Identifier& id) const override;
119 
121  const SCT_ModuleSideDesign* getSCT_Design(int i) const;
122 
124  virtual
125  bool processGlobalAlignment(const std::string&, int level, FrameType frame,
127  GeoVAlignmentStore* alignStore) const override;
128 
130  bool processSpecialAlignment(const std::string& key,
131  InDetDD::AlignFolderType alignfolder) const override;
132 
134  bool processSpecialAlignment(const std::string& key,
135  const CondAttrListCollection* obj=nullptr,
136  GeoVAlignmentStore* alignStore=nullptr) const override;
137 
138 
139  //Mother designs are containers for multiple designs which
140  //overall describe a simulated detector which has been split into multiple
141  //DetectorElements (each with its own design)
142  void addMotherDesign(std::unique_ptr<const SCT_ModuleSideDesign>&&);
143 
144  private:
149  virtual bool setAlignableTransformDelta(int level,
150  const Identifier& id,
151  const Amg::Transform3D& delta,
152  FrameType frame,
153  GeoVAlignmentStore* alignStore) const override;
154 
156  const SCT_DetectorManager& operator=(const SCT_DetectorManager& right) = delete;
158  SCT_DetectorManager(const SCT_DetectorManager& right) = delete;
159 
160  virtual const SCT_ID* getIdHelper() const override;
161 
166  std::vector<PVConstLink> m_volume;
168  typedef std::map<Identifier, std::unique_ptr<ExtendedAlignableTransform>> AlignableTransformMap;
169  std::vector<AlignableTransformMap> m_higherAlignableTransforms;
170  std::vector<std::unique_ptr<ExtendedAlignableTransform>> m_alignableTransforms;
171  std::vector<std::unique_ptr<ExtendedAlignableTransform>> m_moduleAlignableTransforms;
173  std::vector<std::unique_ptr<const SCT_ModuleSideDesign>> m_motherDesigns;
174 
182 
183  };
184 
185 } // namespace InDetDD
186 
187 #ifndef GAUDI_NEUTRAL
188 #include "AthenaKernel/CLASS_DEF.h"
190 #endif
191 
192 #endif // INDETREADOUTGEOMETRY_SCT_DETECTORMANAGER_H
InDetDD::FrameType
FrameType
Definition: InDetDD_Defs.h:16
InDetDD::SCT_DetectorManager::addMotherDesign
void addMotherDesign(std::unique_ptr< const SCT_ModuleSideDesign > &&)
Definition: SCT_DetectorManager.cxx:384
InDetDD::SCT_DetectorManager::m_higherAlignableTransforms
std::vector< AlignableTransformMap > m_higherAlignableTransforms
Definition: SCT_DetectorManager.h:169
InDetDD::SCT_DetectorManager::getNumTreeTops
virtual unsigned int getNumTreeTops() const override
Definition: SCT_DetectorManager.cxx:50
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
InDetDD::SCT_DetectorManager
Definition: SCT_DetectorManager.h:49
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
InDetDD::SCT_DetectorManager::SCT_DetectorManager
SCT_DetectorManager(StoreGateSvc *detStore)
Constructor.
Definition: SCT_DetectorManager.cxx:25
InDetDD::SCT_DetectorManager::identifierBelongs
virtual bool identifierBelongs(const Identifier &id) const override
Check identifier is for this detector.
Definition: SCT_DetectorManager.cxx:294
InDetDD::SCT_DetectorManager::m_moduleAlignableTransforms
std::vector< std::unique_ptr< ExtendedAlignableTransform > > m_moduleAlignableTransforms
Definition: SCT_DetectorManager.h:171
InDetDD::SCT_DetectorManager::m_motherDesigns
std::vector< std::unique_ptr< const SCT_ModuleSideDesign > > m_motherDesigns
Definition: SCT_DetectorManager.h:173
SCT_ModuleSideDesign.h
InDetDD::SCT_ModuleSideDesign
Definition: SCT_ModuleSideDesign.h:40
ExtendedAlignableTransform.h
InDetDD::SCT_DetectorManager::m_isLogical
bool m_isLogical
This variable switches the how the local alignment corrections are applied If true they will be calcu...
Definition: SCT_DetectorManager.h:180
InDetDD::SCT_DetectorManager::getDetectorElementBegin
virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const override
Definition: SCT_DetectorManager.cxx:93
InDetDD::SCT_DetectorManager::setAlignableTransformDelta
virtual bool setAlignableTransformDelta(int level, const Identifier &id, const Amg::Transform3D &delta, FrameType frame, GeoVAlignmentStore *alignStore) const override
implements the main alignment update for delta transforms in different frames, it translates into the...
Definition: SCT_DetectorManager.cxx:152
InDetDD::SCT_DetectorManager::SCT_DetectorManager
SCT_DetectorManager(const SCT_DetectorManager &right)=delete
Prevent copy constructor.
InDetDD::SCT_DetectorManager::processSpecialAlignment
bool processSpecialAlignment(const std::string &key, InDetDD::AlignFolderType alignfolder) const override
Comply with InDetDetectorManager interface (not implemented for SCT)
Definition: SCT_DetectorManager.cxx:372
InDetDD::SCT_DetectorManager::processGlobalAlignment
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.
Definition: SCT_DetectorManager.cxx:306
InDetDD::SCT_DetectorManager::m_idHelper
const SCT_ID * m_idHelper
Definition: SCT_DetectorManager.h:172
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
InDetDD::SCT_DetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements via Identifier
Definition: SCT_DetectorManager.cxx:64
InDetDD::SCT_DetectorManager::addAlignableTransform
virtual void addAlignableTransform(int, const Identifier &, GeoAlignableTransform *) override
DEPRECATED For backward compatibility.
Definition: SCT_DetectorManager.h:109
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
InDetDD::SCT_DetectorManager::getIdHelper
virtual const SCT_ID * getIdHelper() const override
Definition: SCT_DetectorManager.cxx:146
TRT::Hit::side
@ side
Definition: HitInfo.h:83
InDetDD::SCT_DetectorManager::getDetectorElementCollection
virtual const SiDetectorElementCollection * getDetectorElementCollection() const override
access to whole collectiom
Definition: SCT_DetectorManager.cxx:88
GeoPrimitives.h
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
InDetDD_Defs.h
lumiFormat.i
int i
Definition: lumiFormat.py:85
InDetDD::SCT_DetectorManager::m_alignableTransforms
std::vector< std::unique_ptr< ExtendedAlignableTransform > > m_alignableTransforms
Definition: SCT_DetectorManager.h:170
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
InDetDD::SCT_DetectorManager::addTreeTop
void addTreeTop(const PVConstLink &vol)
Add tree top.
Definition: SCT_DetectorManager.cxx:60
InDetDD::SCT_DetectorManager::getSCT_Design
const SCT_ModuleSideDesign * getSCT_Design(int i) const
Access to module design, casts to SCT_ModuleSideDesign.
Definition: SCT_DetectorManager.cxx:300
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
InDetDD::SCT_DetectorManager::m_elementCollection
SiDetectorElementCollection m_elementCollection
Definition: SCT_DetectorManager.h:167
InDetDD::SCT_DetectorManager::getDetectorElementEnd
virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd() const override
Definition: SCT_DetectorManager.cxx:98
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
InDetDD::SCT_DetectorManager::m_volume
std::vector< PVConstLink > m_volume
Definition: SCT_DetectorManager.h:166
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SiDetectorElementCollection.h
InDetDD::SCT_DetectorManager::getTreeTop
virtual PVConstLink getTreeTop(unsigned int i) const override
Definition: SCT_DetectorManager.cxx:55
SCT_ID
Definition: SCT_ID.h:68
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
InDetDD::SCT_DetectorManager::addAlignableTransform
virtual void addAlignableTransform(int level, const Identifier &id, GeoAlignableTransform *xf, const GeoVFullPhysVol *child)
Add alignable transforms. No access to these, they will be changed by manager:
Definition: SCT_DetectorManager.cxx:264
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
InDetDD::SCT_DetectorManager::addDetectorElement
virtual void addDetectorElement(SiDetectorElement *element) override
Add elememts during construction.
Definition: SCT_DetectorManager.cxx:104
InDetDD::SiDetectorManager
Definition: SiDetectorManager.h:60
InDetDD::SCT_DetectorManager::AlignableTransformMap
std::map< Identifier, std::unique_ptr< ExtendedAlignableTransform > > AlignableTransformMap
Definition: SCT_DetectorManager.h:168
InDetDD::SCT_DetectorManager::isPixel
virtual bool isPixel() const override
Methods to query which manager we have.
Definition: SCT_DetectorManager.h:115
SiDetectorManager.h
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
InDetDD::SCT_DetectorManager::operator=
const SCT_DetectorManager & operator=(const SCT_DetectorManager &right)=delete
Prevent assign operator.
python.PyAthena.obj
obj
Definition: PyAthena.py:132
CLASS_DEF.h
macros to associate a CLID to a type
InDetDD::AlignFolderType
AlignFolderType
Definition: InDetDD_Defs.h:19
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
InDetDD::SCT_DetectorManager::initNeighbours
virtual void initNeighbours() override
Initialize the neighbours. This can only be done when all elements are built.
Definition: SCT_DetectorManager.cxx:112
Identifier
Definition: IdentifierFieldParser.cxx:14