ATLAS Offline Software
SiDetectorManager.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // SiDetectorManager.h
8 // (c) ATLAS Detector software
10 
11 #ifndef INDETREADOUTGEOMETRY_SIDETECTORMANAGER_H
12 #define INDETREADOUTGEOMETRY_SIDETECTORMANAGER_H
13 
15 
19 
20 // Amg stuff
22 
23 #include "CLHEP/Geometry/Transform3D.h"
24 
25 #include <map>
26 #include <memory>
27 #include <string>
28 
29 class StoreGateSvc;
30 class Identifier;
31 class IdentifierHash;
32 class AtlasDetectorID;
33 class GeoAlignableTransform;
34 class GeoVAlignmentStore;
35 
36 namespace InDetDD {
37 
38 class SiCommonItems;
39 class SiDetectorElement;
40 class SiDetectorDesign;
41 class ExtendedAlignableTransform;
42 class SiNumerology;
43 
61 
62 
63  public:
64 
65  // Constructor
66  SiDetectorManager(StoreGateSvc * detStore, const std::string & name);
67 
68  // Destructor
69  virtual ~SiDetectorManager();
70 
71 
72  //
73  // Access Readout Elements
74  //
75 
77  virtual SiDetectorElement * getDetectorElement(const Identifier &id) const = 0;
78  virtual SiDetectorElement * getDetectorElement(const IdentifierHash &idHash) const = 0;
79 
82  virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const = 0;
83  virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd() const = 0;
84 
85 
87  virtual void addDetectorElement(SiDetectorElement * element) = 0;
88 
90  virtual void initNeighbours() = 0;
91 
93  const std::string & tag() const;
94 
96  virtual bool isPixel() const = 0;
97  bool isSCT() const {return !isPixel();}
98 
100  virtual void addAlignableTransform (int level, const Identifier &id, GeoAlignableTransform *xf) = 0;
101 
103  virtual void invalidateAll() const;
104 
106  virtual void updateAll() const;
107 
108 
111  const Amg::Transform3D & delta,
112  GeoVAlignmentStore* alignStore=nullptr) ;
113 
116  const Amg::Transform3D & localToGlobalXF,
117  const Amg::Transform3D & delta,
118  GeoVAlignmentStore* alignStore=nullptr) ;
119 
121  const SiDetectorDesign * addDesign(std::unique_ptr<const SiDetectorDesign>&&);
122  int numDesigns() const;
123  const SiDetectorDesign * getDesign(int i) const;
124 
126  const SiNumerology & numerology() const {return m_numerology;}
128 
130  void setCommonItems(std::unique_ptr<const SiCommonItems>&& commonItems);
131 
132  private:
133  //** Prevent copy and assignment */
136 
139  const Identifier & id,
140  const Amg::Transform3D & delta,
141  FrameType frame,
142  GeoVAlignmentStore* alignStore) const = 0;
143 
144 
145 
146  std::string m_tag;
148  std::vector<std::unique_ptr<const SiDetectorDesign>> m_designs;
149  std::unique_ptr<const SiCommonItems> m_commonItems;
150 
151  };
152 
153 
154 } // namespace InDetDD
155 
156 #ifndef GAUDI_NEUTRAL
157 #include "AthenaKernel/CLASS_DEF.h"
158 
160 #endif
161 
162 #endif // INDETREADOUTGEOMETRY_SIDETECTORMANAGER_H
InDetDD::FrameType
FrameType
Definition: InDetDD_Defs.h:16
InDetDD::SiDetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const IdentifierHash &idHash) const =0
InDetDD::SiDetectorManager::initNeighbours
virtual void initNeighbours()=0
Initialize the neighbours.
InDetDD::SiDetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const =0
access to individual elements using Identifier or IdentiferHash
InDetDD::SiDetectorManager::m_tag
std::string m_tag
Definition: SiDetectorManager.h:146
InDetDD::SiDetectorManager::numerology
const SiNumerology & numerology() const
Access Numerology.
Definition: SiDetectorManager.h:126
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
InDetDD::SiDetectorManager::SiDetectorManager
SiDetectorManager(StoreGateSvc *detStore, const std::string &name)
Definition: SiDetectorManager.cxx:27
InDetDD::SiDetectorManager::m_designs
std::vector< std::unique_ptr< const SiDetectorDesign > > m_designs
Definition: SiDetectorManager.h:148
InDetDD::SiDetectorManager::numDesigns
int numDesigns() const
Definition: SiDetectorManager.cxx:140
InDetDD::SiDetectorManager::setAlignableTransformLocalDelta
static bool setAlignableTransformLocalDelta(ExtendedAlignableTransform *extXF, const Amg::Transform3D &localToGlobalXF, const Amg::Transform3D &delta, GeoVAlignmentStore *alignStore=nullptr)
Helper method to set delta transform from a local delta - Amg interface.
Definition: SiDetectorManager.cxx:62
InDetDD::SiDetectorManager::addDetectorElement
virtual void addDetectorElement(SiDetectorElement *element)=0
Add elememts.
InDetDD::SiDetectorManager::addDesign
const SiDetectorDesign * addDesign(std::unique_ptr< const SiDetectorDesign > &&)
Access to module design; returns an observer pointer.
Definition: SiDetectorManager.cxx:134
InDetDD::SiDetectorManager::getDetectorElementCollection
virtual const SiDetectorElementCollection * getDetectorElementCollection() const =0
access to whole collectiom
InDetDD::SiDetectorManager::setCommonItems
void setCommonItems(std::unique_ptr< const SiCommonItems > &&commonItems)
Set SiCommonItems.
Definition: SiDetectorManager.cxx:151
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
InDetDD::SiDetectorManager::setAlignableTransformGlobalDelta
static bool setAlignableTransformGlobalDelta(ExtendedAlignableTransform *extXF, const Amg::Transform3D &delta, GeoVAlignmentStore *alignStore=nullptr)
Helper method to set delta transform from a global delta - Amg interface.
Definition: SiDetectorManager.cxx:101
InDetDD::SiDetectorManager::~SiDetectorManager
virtual ~SiDetectorManager()
GeoPrimitives.h
InDetDD::SiDetectorManager::invalidateAll
virtual void invalidateAll() const
Invalidate cache for all detector elements.
Definition: SiDetectorManager.cxx:39
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
InDetDD_Defs.h
SiNumerology.h
lumiFormat.i
int i
Definition: lumiFormat.py:92
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
InDetDD::SiDetectorManager::getDesign
const SiDetectorDesign * getDesign(int i) const
Definition: SiDetectorManager.cxx:146
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
InDetDD::InDetDetectorManager
Definition: InDetDetectorManager.h:60
InDetDD::SiDetectorManager::operator=
const SiDetectorManager & operator=(const SiDetectorManager &right)
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
InDetDD::SiDetectorManager::tag
const std::string & tag() const
Get tag used in dictionary.
Definition: SiDetectorManager.cxx:34
InDetDD::SiDetectorManager::setAlignableTransformDelta
virtual bool setAlignableTransformDelta(int level, const Identifier &id, const Amg::Transform3D &delta, FrameType frame, GeoVAlignmentStore *alignStore) const =0
This method is called by the InDetDetectorManager.
InDetDD::SiDetectorManager::isPixel
virtual bool isPixel() const =0
Methods to query which manager we have.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
InDetDD::SiDetectorManager::m_numerology
SiNumerology m_numerology
Definition: SiDetectorManager.h:147
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDetDD::SiNumerology
Definition: SiNumerology.h:27
SiDetectorElementCollection.h
InDetDD::SiDetectorManager::addAlignableTransform
virtual void addAlignableTransform(int level, const Identifier &id, GeoAlignableTransform *xf)=0
Add alignable transforms.
InDetDD::SiDetectorManager::numerology
SiNumerology & numerology()
Definition: SiDetectorManager.h:127
InDetDetectorManager.h
InDetDD::ExtendedAlignableTransform
Definition: ExtendedAlignableTransform.h:31
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
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::SiDetectorManager
Definition: SiDetectorManager.h:60
InDetDD::SiDetectorManager::isSCT
bool isSCT() const
Definition: SiDetectorManager.h:97
InDetDD::SiDetectorManager::SiDetectorManager
SiDetectorManager(const SiDetectorManager &right)
InDetDD::SiDetectorManager::getDetectorElementEnd
virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd() const =0
InDetDD::SiDetectorManager::updateAll
virtual void updateAll() const
Update all caches.
Definition: SiDetectorManager.cxx:51
IdentifierHash
Definition: IdentifierHash.h:38
InDetDD::SiDetectorDesign
Definition: SiDetectorDesign.h:50
InDetDD::SiDetectorManager::getDetectorElementBegin
virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const =0
InDetDD::SiDetectorManager::m_commonItems
std::unique_ptr< const SiCommonItems > m_commonItems
Definition: SiDetectorManager.h:149
CLASS_DEF.h
macros to associate a CLID to a type
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57