ATLAS Offline Software
SCT_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 
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, const bool doEncapNeighbour=false );
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 const SiDetectorElement* getDetectorElement(const Identifier& id) const override;
76 
78  virtual const SiDetectorElement* getDetectorElement(const IdentifierHash& idHash) const override;
79 
81  const 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;
93 
95  virtual void addDetectorElement(SiDetectorElement* element) override;
97 
99  virtual void addAlignableTransform (int level,
100  const Identifier& id,
101  GeoAlignableTransform* xf,
102  const GeoVFullPhysVol* child);
103 
105  virtual void addAlignableTransform (int level,
106  const Identifier& id,
107  GeoAlignableTransform* xf,
108  const GeoVPhysVol* child);
109 
111  virtual void addAlignableTransform (int, const Identifier&, GeoAlignableTransform*) override {};
112 
114  virtual void initNeighbours() override;
115 
117  virtual bool isPixel() const override {return false;}
118 
120  virtual bool identifierBelongs(const Identifier& id) const override;
121 
123  const SCT_ModuleSideDesign* getSCT_Design(int i) const;
124 
126  virtual
127  bool processGlobalAlignment(const std::string&, int level, FrameType frame,
129  GeoVAlignmentStore* alignStore) const override;
130 
132  bool processSpecialAlignment(const std::string& key,
133  InDetDD::AlignFolderType alignfolder) override;
134 
136  bool processSpecialAlignment(const std::string& key,
137  const CondAttrListCollection* obj=nullptr,
138  GeoVAlignmentStore* alignStore=nullptr) const override;
139 
140 
141  //Mother designs are containers for multiple designs which
142  //overall describe a simulated detector which has been split into multiple
143  //DetectorElements (each with its own design)
144  void addMotherDesign(std::unique_ptr<const SCT_ModuleSideDesign>&&);
145 
146  private:
147 
148  // Used by initNeighbours() to deal with strip encap eta overlap.
149  // This can only be done when all elements are built.
151  IdentifierHash& idHashNeighbour,
152  const bool phi_plus_one=false) const;
153 
158  virtual bool setAlignableTransformDelta(int level,
159  const Identifier& id,
160  const Amg::Transform3D& delta,
161  FrameType frame,
162  GeoVAlignmentStore* alignStore) const override;
163 
165  const SCT_DetectorManager& operator=(const SCT_DetectorManager& right) = delete;
167  SCT_DetectorManager(const SCT_DetectorManager& right) = delete;
168 
169  virtual const SCT_ID* getIdHelper() const override;
170 
175  std::vector<PVConstLink> m_volume;
177  typedef std::map<Identifier, std::unique_ptr<ExtendedAlignableTransform>> AlignableTransformMap;
178  std::vector<AlignableTransformMap> m_higherAlignableTransforms;
179  std::vector<std::unique_ptr<ExtendedAlignableTransform>> m_alignableTransforms;
180  std::vector<std::unique_ptr<ExtendedAlignableTransform>> m_moduleAlignableTransforms;
182  std::vector<std::unique_ptr<const SCT_ModuleSideDesign>> m_motherDesigns;
183 
191 
193  };
194 
195 } // namespace InDetDD
196 
197 #ifndef GAUDI_NEUTRAL
198 #include "AthenaKernel/CLASS_DEF.h"
200 #endif
201 
202 #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:473
InDetDD::SCT_DetectorManager::m_higherAlignableTransforms
std::vector< AlignableTransformMap > m_higherAlignableTransforms
Definition: SCT_DetectorManager.h:178
InDetDD::SCT_DetectorManager::getNumTreeTops
virtual unsigned int getNumTreeTops() const override
Definition: SCT_DetectorManager.cxx:52
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
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::SCT_DetectorManager::getStripEndcapEtaNeighbour
int getStripEndcapEtaNeighbour(const SiDetectorElement *element, IdentifierHash &idHashNeighbour, const bool phi_plus_one=false) const
Definition: SCT_DetectorManager.cxx:176
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:27
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:383
InDetDD::SCT_DetectorManager::m_moduleAlignableTransforms
std::vector< std::unique_ptr< ExtendedAlignableTransform > > m_moduleAlignableTransforms
Definition: SCT_DetectorManager.h:180
InDetDD::SCT_DetectorManager::m_motherDesigns
std::vector< std::unique_ptr< const SCT_ModuleSideDesign > > m_motherDesigns
Definition: SCT_DetectorManager.h:182
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:189
InDetDD::SCT_DetectorManager::getDetectorElementBegin
virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const override
Definition: SCT_DetectorManager.cxx:95
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:241
InDetDD::SCT_DetectorManager::SCT_DetectorManager
SCT_DetectorManager(const SCT_DetectorManager &right)=delete
Prevent copy constructor.
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:395
InDetDD::SCT_DetectorManager::m_idHelper
const SCT_ID * m_idHelper
Definition: SCT_DetectorManager.h:181
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 const SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements via Identifier
Definition: SCT_DetectorManager.cxx:66
InDetDD::SCT_DetectorManager::addAlignableTransform
virtual void addAlignableTransform(int, const Identifier &, GeoAlignableTransform *) override
DEPRECATED For backward compatibility.
Definition: SCT_DetectorManager.h:111
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:235
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:90
GeoPrimitives.h
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:120
InDetDD_Defs.h
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
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:179
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:62
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:389
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
InDetDD::SCT_DetectorManager::m_elementCollection
SiDetectorElementCollection m_elementCollection
Definition: SCT_DetectorManager.h:176
InDetDD::SCT_DetectorManager::processSpecialAlignment
bool processSpecialAlignment(const std::string &key, InDetDD::AlignFolderType alignfolder) override
Comply with InDetDetectorManager interface (not implemented for SCT)
Definition: SCT_DetectorManager.cxx:461
InDetDD::SCT_DetectorManager::getDetectorElementEnd
virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd() const override
Definition: SCT_DetectorManager.cxx:100
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
InDetDD::SCT_DetectorManager::m_volume
std::vector< PVConstLink > m_volume
Definition: SCT_DetectorManager.h:175
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SiDetectorElementCollection.h
InDetDD::SCT_DetectorManager::getTreeTop
virtual PVConstLink getTreeTop(unsigned int i) const override
Definition: SCT_DetectorManager.cxx:57
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:353
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:67
InDetDD::SCT_DetectorManager::addDetectorElement
virtual void addDetectorElement(SiDetectorElement *element) override
Add elememts during construction.
Definition: SCT_DetectorManager.cxx:117
InDetDD::SiDetectorManager
Definition: SiDetectorManager.h:60
InDetDD::SCT_DetectorManager::AlignableTransformMap
std::map< Identifier, std::unique_ptr< ExtendedAlignableTransform > > AlignableTransformMap
Definition: SCT_DetectorManager.h:177
InDetDD::SCT_DetectorManager::isPixel
virtual bool isPixel() const override
Methods to query which manager we have.
Definition: SCT_DetectorManager.h:117
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::m_doEndcapEtaNeighbour
bool m_doEndcapEtaNeighbour
Definition: SCT_DetectorManager.h:192
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:125
Identifier
Definition: IdentifierFieldParser.cxx:14