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 SiDetectorElement * getDetectorElement(const Identifier &id) const override;
68 
70  virtual SiDetectorElement * getDetectorElement(const IdentifierHash &idHash) const override;
71 
73  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;
80  virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const override;
81  virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd() const override;
82 
84  virtual void addDetectorElement(SiDetectorElement * element) override;
85 
87  virtual void addAlignableTransform (int level,
88  const Identifier &id,
89  GeoAlignableTransform *xf,
90  const GeoVFullPhysVol * child);
91 
93  virtual void addAlignableTransform (int level,
94  const Identifier &id,
95  GeoAlignableTransform *xf,
96  const GeoVPhysVol * child);
97 
98  // DEPRECATED
99  virtual void addAlignableTransform (int,
100  const Identifier &,
101  GeoAlignableTransform *) override {}; // For backward compatibility
102 
103 
105  virtual void initNeighbours() override;
106 
108  virtual bool isPixel() const override {return true;}
109 
111  virtual bool identifierBelongs(const Identifier & id) const override;
112 
113 
117  unsigned int getBarrelLayers() const ;
118 
122  unsigned int getEndcapLayers() const;
123 
125  virtual const PixelModuleDesign * getPixelDesign(int i) const;
126 
128  bool processSpecialAlignment(const std::string &, InDetDD::AlignFolderType) const override;
129 
130  bool processSpecialAlignment(const std::string& key,
131  const CondAttrListCollection* obj=nullptr,
132  GeoVAlignmentStore* alignStore=nullptr) const override;
133 
135  virtual
136  bool processGlobalAlignment(const std::string &, int level, FrameType frame,
138  GeoVAlignmentStore* alignStore) const override;
139 
140  private:
141 
145  virtual bool setAlignableTransformDelta(int level,
146  const Identifier & id,
147  const Amg::Transform3D & delta,
148  FrameType frame,
149  GeoVAlignmentStore* alignStore) const override;
150 
151 
155 
156 
157  virtual const PixelID * getIdHelper() const override;
158 
159  // data members
160  std::vector<PVConstLink> m_volume;
162  typedef std::map<Identifier, std::unique_ptr<ExtendedAlignableTransform>> AlignableTransformMap;
163  std::vector< AlignableTransformMap > m_higherAlignableTransforms;
164  std::vector< std::unique_ptr<ExtendedAlignableTransform> > m_alignableTransforms;
166 
167  // Helpful function for debugging of transforms
169  const Amg::Transform3D & tr) const;
170 
171 
176  bool m_isLogical;
177 
178  };
179 
180 } // namespace InDetDD
181 
182 #ifndef GAUDI_NEUTRAL
183 #include "AthenaKernel/CLASS_DEF.h"
185 
186 #endif
187 
188 #endif
189 
190 
191 
192 
193 
InDetDD::FrameType
FrameType
Definition: InDetDD_Defs.h:16
InDetDD::PixelDetectorManager::printTransform
void printTransform(MSG::Level level, const Amg::Transform3D &tr) const
Definition: PixelDetectorManager.cxx:651
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:165
InDetDD::PixelDetectorManager::m_elementCollection
SiDetectorElementCollection m_elementCollection
Definition: PixelDetectorManager.h:161
InDetDD::PixelDetectorManager::isPixel
virtual bool isPixel() const override
Methods to query which manager we have.
Definition: PixelDetectorManager.h:108
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
InDetDD::PixelModuleDesign
Definition: PixelModuleDesign.h:48
InDetDD::PixelDetectorManager::m_idHelper
const PixelID * m_idHelper
Definition: PixelDetectorManager.h:165
ExtendedAlignableTransform.h
InDetDD::PixelDetectorManager::AlignableTransformMap
std::map< Identifier, std::unique_ptr< ExtendedAlignableTransform > > AlignableTransformMap
Definition: PixelDetectorManager.h:162
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:176
InDetDD::PixelDetectorManager::getDetectorElementCollection
virtual const SiDetectorElementCollection * getDetectorElementCollection() const override
access to whole collection via Iterators
Definition: PixelDetectorManager.cxx:105
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
InDetDD::PixelDetectorManager::getEndcapLayers
unsigned int getEndcapLayers() const
Layers built.
Definition: PixelDetectorManager.cxx:175
InDetDD_Defs.h
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
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:99
InDetDD::PixelDetectorManager::identifierBelongs
virtual bool identifierBelongs(const Identifier &id) const override
Check identifier is for this detector.
Definition: PixelDetectorManager.cxx:283
InDetDD::PixelDetectorManager::initNeighbours
virtual void initNeighbours() override
Initialize the neighbours.
Definition: PixelDetectorManager.cxx:129
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:110
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:262
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:160
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
InDetDD::PixelDetectorManager::getIdHelper
virtual const PixelID * getIdHelper() const override
Definition: PixelDetectorManager.cxx:160
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:186
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:565
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::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:164
InDetDD::PixelDetectorManager::getDetectorElementEnd
virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd() const override
Definition: PixelDetectorManager.cxx:115
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:163
InDetDD::PixelDetectorManager::getPixelDesign
virtual const PixelModuleDesign * getPixelDesign(int i) const
Access to module design, Casts to PixelModuleDesign.
Definition: PixelDetectorManager.cxx:290
InDetDD::PixelDetectorManager::addDetectorElement
virtual void addDetectorElement(SiDetectorElement *element) override
Add elememts.
Definition: PixelDetectorManager.cxx:121
InDetDD::PixelDetectorManager::processSpecialAlignment
bool processSpecialAlignment(const std::string &, InDetDD::AlignFolderType) const override
Process new IBLDist DB folder.
Definition: PixelDetectorManager.cxx:299
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
InDetDD::PixelDetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
Definition: PixelDetectorManager.cxx:80
Identifier
Definition: IdentifierFieldParser.cxx:14