Loading [MathJax]/jax/input/TeX/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 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:
145 
146  // Used by initNeighbours() to deal with strip encap eta overlap.
147  // This can only be done when all elements are built.
148  int getStripEndcapEtaNeighbour(const SiDetectorElement* element,
149  IdentifierHash& idHashNeighbour,
150  const bool phi_plus_one=false) const;
151 
156  virtual bool setAlignableTransformDelta(int level,
157  const Identifier& id,
158  const Amg::Transform3D& delta,
159  FrameType frame,
160  GeoVAlignmentStore* alignStore) const override;
161 
163  const SCT_DetectorManager& operator=(const SCT_DetectorManager& right) = delete;
165  SCT_DetectorManager(const SCT_DetectorManager& right) = delete;
166 
167  virtual const SCT_ID* getIdHelper() const override;
168 
173  std::vector<PVConstLink> m_volume;
175  typedef std::map<Identifier, std::unique_ptr<ExtendedAlignableTransform>> AlignableTransformMap;
176  std::vector<AlignableTransformMap> m_higherAlignableTransforms;
177  std::vector<std::unique_ptr<ExtendedAlignableTransform>> m_alignableTransforms;
178  std::vector<std::unique_ptr<ExtendedAlignableTransform>> m_moduleAlignableTransforms;
180  std::vector<std::unique_ptr<const SCT_ModuleSideDesign>> m_motherDesigns;
181 
189 
191  };
192 
193 } // namespace InDetDD
194 
195 #ifndef GAUDI_NEUTRAL
196 #include "AthenaKernel/CLASS_DEF.h"
198 #endif
199 
200 #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:462
InDetDD::SCT_DetectorManager::m_higherAlignableTransforms
std::vector< AlignableTransformMap > m_higherAlignableTransforms
Definition: SCT_DetectorManager.h:176
InDetDD::SCT_DetectorManager::getNumTreeTops
virtual unsigned int getNumTreeTops() const override
Definition: SCT_DetectorManager.cxx:52
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:165
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:372
InDetDD::SCT_DetectorManager::m_moduleAlignableTransforms
std::vector< std::unique_ptr< ExtendedAlignableTransform > > m_moduleAlignableTransforms
Definition: SCT_DetectorManager.h:178
InDetDD::SCT_DetectorManager::m_motherDesigns
std::vector< std::unique_ptr< const SCT_ModuleSideDesign > > m_motherDesigns
Definition: SCT_DetectorManager.h:180
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:187
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:230
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:450
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:384
InDetDD::SCT_DetectorManager::m_idHelper
const SCT_ID * m_idHelper
Definition: SCT_DetectorManager.h:179
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:66
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:224
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: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:177
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:378
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
InDetDD::SCT_DetectorManager::m_elementCollection
SiDetectorElementCollection m_elementCollection
Definition: SCT_DetectorManager.h:174
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:228
InDetDD::SCT_DetectorManager::m_volume
std::vector< PVConstLink > m_volume
Definition: SCT_DetectorManager.h:173
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:342
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:106
InDetDD::SiDetectorManager
Definition: SiDetectorManager.h:60
InDetDD::SCT_DetectorManager::AlignableTransformMap
std::map< Identifier, std::unique_ptr< ExtendedAlignableTransform > > AlignableTransformMap
Definition: SCT_DetectorManager.h:175
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::m_doEndcapEtaNeighbour
bool m_doEndcapEtaNeighbour
Definition: SCT_DetectorManager.h:190
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:114
Identifier
Definition: IdentifierFieldParser.cxx:14