ATLAS Offline Software
PixelDetectorManager.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 // PixelDectorManager.h
8 // (c) ATLAS Detector software
10 
11 #ifndef InDetReadoutGeometry_PixelDetectorManager_h
12 #define InDetReadoutGeometry_PixelDetectorManager_h 1
13 
18 
19 #include "InDetIdentifier/PixelID.h" //covariant return type
20 
21 #include <map>
22 #include <vector>
23 
24 class StoreGateSvc;
25 class Identifier;
26 class IdentifierHash;
27 class GeoAlignableTransform;
28 class GeoVFullPhysVol;
29 class GeoVPhysVol;
30 class GeoVAlignmentStore;
32 
33 namespace InDetDD {
34 
35  class PixelModuleDesign;
36  class SiDetectorElement;
37 
48 
49  public:
50 
54  PixelDetectorManager(StoreGateSvc* detStore, const std::string& name, const std::string& pixelIDName);
55 
57  virtual unsigned int getNumTreeTops() const override;
58  virtual PVConstLink getTreeTop(unsigned int i) const override;
59 
61  void addTreeTop(const PVConstLink& vol);
62 
63  //
64  // Access Readout Elements
65  //
67  virtual const SiDetectorElement * getDetectorElement(const Identifier &id) const override;
68 
70  virtual const SiDetectorElement * getDetectorElement(const IdentifierHash &idHash) const override;
71 
73  const SiDetectorElement * getDetectorElement(int barrel_endcap,
74  int layer_wheel,
75  int phi_module,
76  int eta_module) const;
77 
79  virtual const SiDetectorElementCollection * getDetectorElementCollection() const override;
84 
86  virtual void addDetectorElement(SiDetectorElement * element) override;
87 
89  virtual void addAlignableTransform (int level,
90  const Identifier &id,
91  GeoAlignableTransform *xf,
92  const GeoVFullPhysVol * child);
93 
95  virtual void addAlignableTransform (int level,
96  const Identifier &id,
97  GeoAlignableTransform *xf,
98  const GeoVPhysVol * child);
99 
100  // DEPRECATED
101  virtual void addAlignableTransform (int,
102  const Identifier &,
103  GeoAlignableTransform *) override {}; // For backward compatibility
104 
105 
107  virtual void initNeighbours() override;
108 
110  virtual bool isPixel() const override {return true;}
111 
113  virtual bool identifierBelongs(const Identifier & id) const override;
114 
115 
119  unsigned int getBarrelLayers() const ;
120 
124  unsigned int getEndcapLayers() const;
125 
127  virtual const PixelModuleDesign * getPixelDesign(int i) const;
128 
130  bool processSpecialAlignment(const std::string &, InDetDD::AlignFolderType) override;
131 
132  bool processSpecialAlignment(const std::string& key,
133  const CondAttrListCollection* obj=nullptr,
134  GeoVAlignmentStore* alignStore=nullptr) const override;
135 
137  virtual
138  bool processGlobalAlignment(const std::string &, int level, FrameType frame,
140  GeoVAlignmentStore* alignStore) const override;
141 
142  private:
143 
147  virtual bool setAlignableTransformDelta(int level,
148  const Identifier & id,
149  const Amg::Transform3D & delta,
150  FrameType frame,
151  GeoVAlignmentStore* alignStore) const override;
152 
153 
157 
158 
159  virtual const PixelID * getIdHelper() const override;
160 
161  // data members
162  std::vector<PVConstLink> m_volume;
164  typedef std::map<Identifier, std::unique_ptr<ExtendedAlignableTransform>> AlignableTransformMap;
165  std::vector< AlignableTransformMap > m_higherAlignableTransforms;
166  std::vector< std::unique_ptr<ExtendedAlignableTransform> > m_alignableTransforms;
168 
169  // Helpful function for debugging of transforms
171  const Amg::Transform3D & tr) const;
172 
173 
179 
180  };
181 
182 } // namespace InDetDD
183 
184 #ifndef GAUDI_NEUTRAL
185 #include "AthenaKernel/CLASS_DEF.h"
187 
188 #endif
189 
190 #endif
191 
192 
193 
194 
195 
InDetDD::FrameType
FrameType
Definition: InDetDD_Defs.h:16
InDetDD::PixelDetectorManager::printTransform
void printTransform(MSG::Level level, const Amg::Transform3D &tr) const
Definition: PixelDetectorManager.cxx:663
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
InDetDD::PixelDetectorManager::getBarrelLayers
unsigned int getBarrelLayers() const
Layers built.
Definition: PixelDetectorManager.cxx:172
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
InDetDD::PixelDetectorManager::m_elementCollection
SiDetectorElementCollection m_elementCollection
Definition: PixelDetectorManager.h:163
InDetDD::PixelDetectorManager::isPixel
virtual bool isPixel() const override
Methods to query which manager we have.
Definition: PixelDetectorManager.h:110
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:27
InDetDD::PixelModuleDesign
Definition: PixelModuleDesign.h:45
InDetDD::PixelDetectorManager::m_idHelper
const PixelID * m_idHelper
Definition: PixelDetectorManager.h:167
ExtendedAlignableTransform.h
InDetDD::PixelDetectorManager::processSpecialAlignment
bool processSpecialAlignment(const std::string &, InDetDD::AlignFolderType) override
Process new IBLDist DB folder.
Definition: PixelDetectorManager.cxx:311
InDetDD::PixelDetectorManager::AlignableTransformMap
std::map< Identifier, std::unique_ptr< ExtendedAlignableTransform > > AlignableTransformMap
Definition: PixelDetectorManager.h:164
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
InDetDD::PixelDetectorManager::m_isLogical
bool m_isLogical
This variable switches the how the local alignment corrections are applied If true they will be calcu...
Definition: PixelDetectorManager.h:178
InDetDD::PixelDetectorManager::getDetectorElementCollection
virtual const SiDetectorElementCollection * getDetectorElementCollection() const override
access to whole collection via Iterators
Definition: PixelDetectorManager.cxx:104
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:120
InDetDD::PixelDetectorManager::getEndcapLayers
unsigned int getEndcapLayers() const
Layers built.
Definition: PixelDetectorManager.cxx:182
InDetDD_Defs.h
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
lumiFormat.i
int i
Definition: lumiFormat.py:85
InDetDD::PixelDetectorManager::addAlignableTransform
virtual void addAlignableTransform(int, const Identifier &, GeoAlignableTransform *) override
Add alignable transforms.
Definition: PixelDetectorManager.h:101
InDetDD::PixelDetectorManager::identifierBelongs
virtual bool identifierBelongs(const Identifier &id) const override
Check identifier is for this detector.
Definition: PixelDetectorManager.cxx:295
InDetDD::PixelDetectorManager::initNeighbours
virtual void initNeighbours() override
Initialize the neighbours.
Definition: PixelDetectorManager.cxx:136
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
InDetDD::PixelDetectorManager::PixelDetectorManager
PixelDetectorManager(StoreGateSvc *detStore)
Constructor.
Definition: PixelDetectorManager.cxx:63
InDetDD::PixelDetectorManager::getDetectorElementBegin
virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const override
Definition: PixelDetectorManager.cxx:109
InDetDD::PixelDetectorManager::addTreeTop
void addTreeTop(const PVConstLink &vol)
Add a Tree top:
Definition: PixelDetectorManager.cxx:76
InDetDD::PixelDetectorManager::addAlignableTransform
virtual void addAlignableTransform(int level, const Identifier &id, GeoAlignableTransform *xf, const GeoVFullPhysVol *child)
Add alignable transforms.
Definition: PixelDetectorManager.cxx:274
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
InDetDD::PixelDetectorManager
Definition: PixelDetectorManager.h:47
InDetDD::PixelDetectorManager::m_volume
std::vector< PVConstLink > m_volume
Definition: PixelDetectorManager.h:162
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
InDetDD::PixelDetectorManager::getIdHelper
virtual const PixelID * getIdHelper() const override
Definition: PixelDetectorManager.cxx:167
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SiDetectorElementCollection.h
InDetDD::PixelDetectorManager::getNumTreeTops
virtual unsigned int getNumTreeTops() const override
Access to raw geometry:
Definition: PixelDetectorManager.cxx:66
InDetDD::PixelDetectorManager::operator=
const PixelDetectorManager & operator=(const PixelDetectorManager &right)
prevent copy and assignment
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
InDetDD::PixelDetectorManager::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: PixelDetectorManager.cxx:193
InDetDD::PixelDetectorManager::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: PixelDetectorManager.cxx:577
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::PixelDetectorManager::getTreeTop
virtual PVConstLink getTreeTop(unsigned int i) const override
Definition: PixelDetectorManager.cxx:71
InDetDD::SiDetectorManager
Definition: SiDetectorManager.h:60
InDetDD::PixelDetectorManager::m_alignableTransforms
std::vector< std::unique_ptr< ExtendedAlignableTransform > > m_alignableTransforms
Definition: PixelDetectorManager.h:166
InDetDD::PixelDetectorManager::getDetectorElementEnd
virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd() const override
Definition: PixelDetectorManager.cxx:114
InDetDD::PixelDetectorManager::getDetectorElement
virtual const SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
Definition: PixelDetectorManager.cxx:80
InDetDD::PixelDetectorManager::PixelDetectorManager
PixelDetectorManager(const PixelDetectorManager &right)
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
python.PyAthena.obj
obj
Definition: PyAthena.py:132
PixelID
Definition: PixelID.h:67
CLASS_DEF.h
macros to associate a CLID to a type
InDetDD::AlignFolderType
AlignFolderType
Definition: InDetDD_Defs.h:19
InDetDD::PixelDetectorManager::m_higherAlignableTransforms
std::vector< AlignableTransformMap > m_higherAlignableTransforms
Definition: PixelDetectorManager.h:165
InDetDD::PixelDetectorManager::getPixelDesign
virtual const PixelModuleDesign * getPixelDesign(int i) const
Access to module design, Casts to PixelModuleDesign.
Definition: PixelDetectorManager.cxx:302
InDetDD::PixelDetectorManager::addDetectorElement
virtual void addDetectorElement(SiDetectorElement *element) override
Add elememts.
Definition: PixelDetectorManager.cxx:128
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
Identifier
Definition: IdentifierFieldParser.cxx:14