ATLAS Offline Software
Loading...
Searching...
No Matches
SiDetectorManager Class Referenceabstract

Base class for Pixel and SCT Detector managers. More...

#include <SiDetectorManager.h>

Inheritance diagram for SiDetectorManager:
Collaboration diagram for SiDetectorManager:

Public Member Functions

 SiDetectorManager (StoreGateSvc *detStore, const std::string &name)
virtual ~SiDetectorManager ()
virtual const SiDetectorElementgetDetectorElement (const Identifier &id) const=0
 access to individual elements using Identifier or IdentiferHash
virtual const SiDetectorElementgetDetectorElement (const IdentifierHash &idHash) const=0
virtual const SiDetectorElementCollection * getDetectorElementCollection () const=0
 access to whole collectiom
virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin () const=0
virtual SiDetectorElementCollection::iterator getDetectorElementBegin ()=0
virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd () const=0
virtual SiDetectorElementCollection::iterator getDetectorElementEnd ()=0
virtual void addDetectorElement (SiDetectorElement *element)=0
 Add elememts.
virtual void initNeighbours ()=0
 Initialize the neighbours.
const std::string & tag () const
 Get tag used in dictionary.
virtual bool isPixel () const=0
 Methods to query which manager we have.
bool isSCT () const
virtual void addAlignableTransform (int level, const Identifier &id, GeoAlignableTransform *xf)=0
 Add alignable transforms.
virtual void invalidateAll ()
 Invalidate cache for all detector elements.
virtual void updateAll () const
 Update all caches.
const SiDetectorDesign * addDesign (std::unique_ptr< const SiDetectorDesign > &&)
 Access to module design; returns an observer pointer.
int numDesigns () const
const SiDetectorDesign * getDesign (int i) const
const SiNumerology & numerology () const
 Access Numerology.
SiNumerology & numerology ()
void setCommonItems (std::unique_ptr< const SiCommonItems > &&commonItems)
 Set SiCommonItems.

Static Public Member Functions

static bool setAlignableTransformGlobalDelta (ExtendedAlignableTransform *extXF, const Amg::Transform3D &delta, GeoVAlignmentStore *alignStore=nullptr)
 Helper method to set delta transform from a global delta - Amg interface.
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.

Private Member Functions

 SiDetectorManager (const SiDetectorManager &right)
const SiDetectorManageroperator= (const SiDetectorManager &right)
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.

Private Attributes

std::string m_tag
SiNumerology m_numerology
std::vector< std::unique_ptr< const SiDetectorDesign > > m_designs
std::unique_ptr< const SiCommonItemsm_commonItems

Detailed Description

Base class for Pixel and SCT Detector managers.

The Detector manager has methods to retrieve the Identifier helper and methods to retrieve the detector elements. It also manages the alignment with methods to register the call backs and infrastructure to associate the alignment transforms with the appropriate alignable transform in GeoModel. There is also access to the layout (Initial, Final, TestBeam) and and version information.

Author
: Grant Gorfine
  • modified and maintained by Nick Styles & Andreas Salzburger

Definition at line 60 of file SiDetectorManager.h.

Constructor & Destructor Documentation

◆ SiDetectorManager() [1/2]

InDetDD::SiDetectorManager::SiDetectorManager ( StoreGateSvc * detStore,
const std::string & name )

Definition at line 27 of file SiDetectorManager.cxx.

28 : InDetDetectorManager(detStore, name)
29 {
30 }
InDetDetectorManager(StoreGateSvc *detStore, const std::string &name)

◆ SiDetectorManager() [2/2]

InDetDD::SiDetectorManager::SiDetectorManager ( const SiDetectorManager & right)
private

◆ ~SiDetectorManager()

InDetDD::SiDetectorManager::~SiDetectorManager ( )
virtualdefault

Member Function Documentation

◆ addAlignableTransform()

virtual void InDetDD::SiDetectorManager::addAlignableTransform ( int level,
const Identifier & id,
GeoAlignableTransform * xf )
pure virtual

Add alignable transforms.

No access to these, they will be changed by manager:

◆ addDesign()

const SiDetectorDesign * InDetDD::SiDetectorManager::addDesign ( std::unique_ptr< const SiDetectorDesign > && design)

Access to module design; returns an observer pointer.

Definition at line 134 of file SiDetectorManager.cxx.

135 {
136 m_designs.push_back(std::move(design));
137 return m_designs.back().get();
138 }
std::vector< std::unique_ptr< const SiDetectorDesign > > m_designs

◆ addDetectorElement()

virtual void InDetDD::SiDetectorManager::addDetectorElement ( SiDetectorElement * element)
pure virtual

Add elememts.

◆ getDesign()

const SiDetectorDesign * InDetDD::SiDetectorManager::getDesign ( int i) const

Definition at line 146 of file SiDetectorManager.cxx.

147 {
148 return m_designs[i].get();
149 }

◆ getDetectorElement() [1/2]

virtual const SiDetectorElement * InDetDD::SiDetectorManager::getDetectorElement ( const Identifier & id) const
pure virtual

access to individual elements using Identifier or IdentiferHash

◆ getDetectorElement() [2/2]

virtual const SiDetectorElement * InDetDD::SiDetectorManager::getDetectorElement ( const IdentifierHash & idHash) const
pure virtual

◆ getDetectorElementBegin() [1/2]

virtual SiDetectorElementCollection::const_iterator InDetDD::SiDetectorManager::getDetectorElementBegin ( ) const
pure virtual

◆ getDetectorElementBegin() [2/2]

virtual SiDetectorElementCollection::iterator InDetDD::SiDetectorManager::getDetectorElementBegin ( )
pure virtual

◆ getDetectorElementCollection()

virtual const SiDetectorElementCollection * InDetDD::SiDetectorManager::getDetectorElementCollection ( ) const
pure virtual

access to whole collectiom

◆ getDetectorElementEnd() [1/2]

virtual SiDetectorElementCollection::const_iterator InDetDD::SiDetectorManager::getDetectorElementEnd ( ) const
pure virtual

◆ getDetectorElementEnd() [2/2]

virtual SiDetectorElementCollection::iterator InDetDD::SiDetectorManager::getDetectorElementEnd ( )
pure virtual

◆ initNeighbours()

virtual void InDetDD::SiDetectorManager::initNeighbours ( )
pure virtual

Initialize the neighbours.

This can only be done when all elements are built

◆ invalidateAll()

void InDetDD::SiDetectorManager::invalidateAll ( )
virtual

Invalidate cache for all detector elements.

Implements InDetDD::InDetDetectorManager.

Definition at line 39 of file SiDetectorManager.cxx.

40 {
41 for (SiDetectorElementCollection::iterator element_iter = getDetectorElementBegin();
42 element_iter != getDetectorElementEnd();
43 ++element_iter) {
44
45 if (*element_iter) {
46 (*element_iter)->invalidate();
47 }
48 }
49 }
virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd() const =0
virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const =0

◆ isPixel()

virtual bool InDetDD::SiDetectorManager::isPixel ( ) const
pure virtual

Methods to query which manager we have.

◆ isSCT()

bool InDetDD::SiDetectorManager::isSCT ( ) const
inline

Definition at line 100 of file SiDetectorManager.h.

100{return !isPixel();}
virtual bool isPixel() const =0
Methods to query which manager we have.

◆ numDesigns()

int InDetDD::SiDetectorManager::numDesigns ( ) const

Definition at line 140 of file SiDetectorManager.cxx.

141 {
142 return m_designs.size();
143 }

◆ numerology() [1/2]

SiNumerology & InDetDD::SiDetectorManager::numerology ( )
inline

Definition at line 129 of file SiDetectorManager.h.

129{return m_numerology;}
SiNumerology m_numerology

◆ numerology() [2/2]

const SiNumerology & InDetDD::SiDetectorManager::numerology ( ) const
inline

Access Numerology.

Definition at line 128 of file SiDetectorManager.h.

128{return m_numerology;}

◆ operator=()

const SiDetectorManager & InDetDD::SiDetectorManager::operator= ( const SiDetectorManager & right)
private

◆ setAlignableTransformDelta()

virtual bool InDetDD::SiDetectorManager::setAlignableTransformDelta ( int level,
const Identifier & id,
const Amg::Transform3D & delta,
FrameType frame,
GeoVAlignmentStore * alignStore ) const
privatepure virtual

This method is called by the InDetDetectorManager.

◆ setAlignableTransformGlobalDelta()

bool InDetDD::SiDetectorManager::setAlignableTransformGlobalDelta ( ExtendedAlignableTransform * extXF,
const Amg::Transform3D & delta,
GeoVAlignmentStore * alignStore = nullptr )
static

Helper method to set delta transform from a global delta - Amg interface.

Definition at line 101 of file SiDetectorManager.cxx.

103 {
104 // ATTENTION -------------------------------------------------------- (A.S.)
105 // CLHEP < -- > AMG interface method
106
107 // Sets the alignable transform delta when the supplied delta is in the global frame.
108
109 // If the default transform down to the alignable transform is
110 // T = A*B*C
111 // and the alignable transform is C with delta c and the delta in the global frame is g, then
112 // A*B*C*c = g*A*B*C
113 // T*c = g*T
114 // c = T.inverse() * g * T
115
116 // To get default transform up and including the alignable transform,
117 // we assume the next volume down is a fullphys volume and so its
118 // transform is the transform we want (ie T=A*B*C in the above example).
119
120
121 if (!extXF) return false;
122
123 const GeoVFullPhysVol * child = extXF->child();
124 if (child && extXF->alignableTransform()) {
125 // do the calculation in CLHEP
126 const GeoTrf::Transform3D& transform = child->getDefAbsoluteTransform(alignStore);
127 extXF->alignableTransform()->setDelta(transform.inverse() * delta * transform, alignStore);
128 return true;
129 } else {
130 return false;
131 }
132 }
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.

◆ setAlignableTransformLocalDelta()

bool InDetDD::SiDetectorManager::setAlignableTransformLocalDelta ( ExtendedAlignableTransform * extXF,
const Amg::Transform3D & localToGlobalXF,
const Amg::Transform3D & delta,
GeoVAlignmentStore * alignStore = nullptr )
static

Helper method to set delta transform from a local delta - Amg interface.

Definition at line 62 of file SiDetectorManager.cxx.

66 {
67 // ATTENTION -------------------------------------------------------- (A.S.)
68 // CLHEP < -- > AMG interface method
69
70 // Sets the alignable transform delta when the supplied delta is in the local
71 // reconstruction frame
72
73 // If the default transform to the local recostruction frame is
74 // T = A*B*C*D*E
75 // and the alignable transform is C with delta c and the delat in the local frame is l, then
76 // A*B*C*c*D*E = A*B*C*D*E*l
77 // c = (D*E) * l * (D*E).inverse()
78 // c = (A*B*C).inverse * T * l * T.inverse() * (A*B*C)
79
80 // To get default transform up and including the alignable transform,
81 // we assume the next volume down is a fullphys volume and so its
82 // transform is the transform we want (ie A*B*C in the above example).
83
84 if (!extXF) return false;
85
86 const GeoVFullPhysVol* child = extXF->child();
87 if (child && extXF->alignableTransform()) {
88 // the definitiv absolut transform is in CLHEP -> do the calculation in CLHEP
89 const GeoTrf::Transform3D& transform = child->getDefAbsoluteTransform(alignStore);
90 // calucluate the corrected delta according to the formula above
91 GeoTrf::Transform3D correctedDelta = transform.inverse()*localToGlobalXF // (A*B*C).inverse() * T
92 * delta // l
93 * localToGlobalXF.inverse() * transform; // T.inverse() * (A*B*C)
94 extXF->alignableTransform()->setDelta(correctedDelta, alignStore);
95 return true;
96 } else {
97 return false;
98 }
99 }

◆ setCommonItems()

void InDetDD::SiDetectorManager::setCommonItems ( std::unique_ptr< const SiCommonItems > && commonItems)

Set SiCommonItems.

Definition at line 151 of file SiDetectorManager.cxx.

152 {
153 m_commonItems = std::move(commonItems);
154 }
std::unique_ptr< const SiCommonItems > m_commonItems

◆ tag()

const std::string & InDetDD::SiDetectorManager::tag ( ) const

Get tag used in dictionary.

Definition at line 34 of file SiDetectorManager.cxx.

35 {
36 return m_tag;
37 }

◆ updateAll()

void InDetDD::SiDetectorManager::updateAll ( ) const
virtual

Update all caches.

Implements InDetDD::InDetDetectorManager.

Definition at line 51 of file SiDetectorManager.cxx.

52 {
53 for (SiDetectorElementCollection::const_iterator element_iter = getDetectorElementBegin();
54 element_iter != getDetectorElementEnd();
55 ++element_iter) {
56 if (*element_iter) {
57 (*element_iter)->updateCache();
58 }
59 }
60 }

Member Data Documentation

◆ m_commonItems

std::unique_ptr<const SiCommonItems> InDetDD::SiDetectorManager::m_commonItems
private

Definition at line 151 of file SiDetectorManager.h.

◆ m_designs

std::vector<std::unique_ptr<const SiDetectorDesign> > InDetDD::SiDetectorManager::m_designs
private

Definition at line 150 of file SiDetectorManager.h.

◆ m_numerology

SiNumerology InDetDD::SiDetectorManager::m_numerology
private

Definition at line 149 of file SiDetectorManager.h.

◆ m_tag

std::string InDetDD::SiDetectorManager::m_tag
private

Definition at line 148 of file SiDetectorManager.h.


The documentation for this class was generated from the following files: