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 const SiDetectorElement * getDetectorElement(const Identifier &id) const = 0;
78  virtual const SiDetectorElement * getDetectorElement(const IdentifierHash &idHash) const = 0;
79 
86 
87 
88 
90  virtual void addDetectorElement(SiDetectorElement * element) = 0;
91 
93  virtual void initNeighbours() = 0;
94 
96  const std::string & tag() const;
97 
99  virtual bool isPixel() const = 0;
100  bool isSCT() const {return !isPixel();}
101 
103  virtual void addAlignableTransform (int level, const Identifier &id, GeoAlignableTransform *xf) = 0;
104 
106  virtual void invalidateAll();
107 
109  virtual void updateAll() const;
110 
113  const Amg::Transform3D & delta,
114  GeoVAlignmentStore* alignStore=nullptr) ;
115 
118  const Amg::Transform3D & localToGlobalXF,
119  const Amg::Transform3D & delta,
120  GeoVAlignmentStore* alignStore=nullptr) ;
121 
123  const SiDetectorDesign * addDesign(std::unique_ptr<const SiDetectorDesign>&&);
124  int numDesigns() const;
125  const SiDetectorDesign * getDesign(int i) const;
126 
128  const SiNumerology & numerology() const {return m_numerology;}
130 
132  void setCommonItems(std::unique_ptr<const SiCommonItems>&& commonItems);
133 
134  private:
135  //** Prevent copy and assignment */
138 
141  const Identifier & id,
142  const Amg::Transform3D & delta,
143  FrameType frame,
144  GeoVAlignmentStore* alignStore) const = 0;
145 
146 
147 
148  std::string m_tag;
150  std::vector<std::unique_ptr<const SiDetectorDesign>> m_designs;
151  std::unique_ptr<const SiCommonItems> m_commonItems;
152 
153  };
154 
155 
156 } // namespace InDetDD
157 
158 #ifndef GAUDI_NEUTRAL
159 #include "AthenaKernel/CLASS_DEF.h"
160 
162 #endif
163 
164 #endif // INDETREADOUTGEOMETRY_SIDETECTORMANAGER_H
InDetDD::FrameType
FrameType
Definition: InDetDD_Defs.h:16
InDetDD::SiDetectorManager::initNeighbours
virtual void initNeighbours()=0
Initialize the neighbours.
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
InDetDD::SiDetectorManager::getDetectorElement
virtual const 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:148
InDetDD::SiDetectorManager::numerology
const SiNumerology & numerology() const
Access Numerology.
Definition: SiDetectorManager.h:128
InDetDD::SiDetectorManager::invalidateAll
virtual void invalidateAll()
Invalidate cache for all detector elements.
Definition: SiDetectorManager.cxx:39
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:27
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:150
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
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:120
InDetDD_Defs.h
SiNumerology.h
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
lumiFormat.i
int i
Definition: lumiFormat.py:85
InDetDD::SiDetectorManager::getDetectorElement
virtual const SiDetectorElement * getDetectorElement(const IdentifierHash &idHash) const =0
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:240
InDetDD::SiDetectorManager::getDetectorElementEnd
virtual SiDetectorElementCollection::iterator getDetectorElementEnd()=0
InDetDD::SiDetectorManager::m_numerology
SiNumerology m_numerology
Definition: SiDetectorManager.h:149
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:129
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:67
InDetDD::SiDetectorManager
Definition: SiDetectorManager.h:60
InDetDD::SiDetectorManager::isSCT
bool isSCT() const
Definition: SiDetectorManager.h:100
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
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::SiDetectorDesign
Definition: SiDetectorDesign.h:50
InDetDD::SiDetectorManager::getDetectorElementBegin
virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const =0
InDetDD::SiDetectorManager::getDetectorElementBegin
virtual SiDetectorElementCollection::iterator getDetectorElementBegin()=0
InDetDD::SiDetectorManager::m_commonItems
std::unique_ptr< const SiCommonItems > m_commonItems
Definition: SiDetectorManager.h:151
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:52
Identifier
Definition: IdentifierFieldParser.cxx:14