ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
InDetDD::PixelDetectorManager Class Reference

#include <PixelDetectorManager.h>

Inheritance diagram for InDetDD::PixelDetectorManager:
Collaboration diagram for InDetDD::PixelDetectorManager:

Public Member Functions

 PixelDetectorManager (StoreGateSvc *detStore)
 Constructor. More...
 
 PixelDetectorManager (StoreGateSvc *detStore, const std::string &name, const std::string &pixelIDName)
 Constructor with name. More...
 
virtual unsigned int getNumTreeTops () const override
 Access to raw geometry: More...
 
virtual PVConstLink getTreeTop (unsigned int i) const override
 
void addTreeTop (const PVConstLink &vol)
 Add a Tree top: More...
 
virtual const SiDetectorElementgetDetectorElement (const Identifier &id) const override
 access to individual elements : via Identifier More...
 
virtual const SiDetectorElementgetDetectorElement (const IdentifierHash &idHash) const override
 access to individual elements : via IdentifierHash More...
 
const SiDetectorElementgetDetectorElement (int barrel_endcap, int layer_wheel, int phi_module, int eta_module) const
 access to individual elements : via element identification More...
 
virtual const SiDetectorElementCollectiongetDetectorElementCollection () const override
 access to whole collection via Iterators More...
 
virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin () const override
 
virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd () const override
 
virtual SiDetectorElementCollection::iterator getDetectorElementBegin () override
 
virtual SiDetectorElementCollection::iterator getDetectorElementEnd () override
 
virtual void addDetectorElement (SiDetectorElement *element) override
 Add elememts. More...
 
virtual void addAlignableTransform (int level, const Identifier &id, GeoAlignableTransform *xf, const GeoVFullPhysVol *child)
 Add alignable transforms. More...
 
virtual void addAlignableTransform (int level, const Identifier &id, GeoAlignableTransform *xf, const GeoVPhysVol *child)
 As above but does a dynamic_cast to GeoVFullPhysVol. More...
 
virtual void addAlignableTransform (int, const Identifier &, GeoAlignableTransform *) override
 Add alignable transforms. More...
 
virtual void initNeighbours () override
 Initialize the neighbours. More...
 
virtual bool isPixel () const override
 Methods to query which manager we have. More...
 
virtual bool identifierBelongs (const Identifier &id) const override
 Check identifier is for this detector. More...
 
unsigned int getBarrelLayers () const
 Layers built. More...
 
unsigned int getEndcapLayers () const
 Layers built. More...
 
virtual const PixelModuleDesigngetPixelDesign (int i) const
 Access to module design, Casts to PixelModuleDesign. More...
 
bool processSpecialAlignment (const std::string &, InDetDD::AlignFolderType) override
 Process new IBLDist DB folder. More...
 
bool processSpecialAlignment (const std::string &key, const CondAttrListCollection *obj=nullptr, GeoVAlignmentStore *alignStore=nullptr) const override
 
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. More...
 
const std::string & tag () const
 Get tag used in dictionary. More...
 
bool isSCT () const
 
virtual void invalidateAll ()
 Invalidate cache for all detector elements. More...
 
virtual void updateAll () const
 Update all caches. More...
 
const SiDetectorDesignaddDesign (std::unique_ptr< const SiDetectorDesign > &&)
 Access to module design; returns an observer pointer. More...
 
int numDesigns () const
 
const SiDetectorDesigngetDesign (int i) const
 
const SiNumerologynumerology () const
 Access Numerology. More...
 
SiNumerologynumerology ()
 
void setCommonItems (std::unique_ptr< const SiCommonItems > &&commonItems)
 Set SiCommonItems. More...
 
const VersiongetVersion () const
 Get version information. More...
 
const std::string & getLayout () const
 
void setVersion (const Version &version)
 
void addChannel (const std::string &key, int level, FrameType frame)
 Alignment access. More...
 
void addFolder (const std::string &key)
 
void addSpecialFolder (const std::string &key)
 
void addGlobalFolder (const std::string &key)
 
void addAlignFolderType (const AlignFolderType alignfolder)
 
StatusCode align (IOVSVC_CALLBACK_ARGS)
 
StatusCode align (const RawAlignmentObjects &alignObjects, GeoVAlignmentStore *alignStore) const
 
bool msgLvl (const MSG::Level lvl) const
 Test the output level. More...
 
MsgStream & msg () const
 The standard message stream. More...
 
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream. More...
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

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. More...
 
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. More...
 

Public Attributes

AlignFolderType m_alignfoldertype
 

Protected Attributes

StoreGateSvcm_detStore
 
std::atomic_bool m_suppressWarnings
 

Private Types

typedef std::map< Identifier, std::unique_ptr< ExtendedAlignableTransform > > AlignableTransformMap
 

Private Member Functions

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 LocalDelta or GlobalDelta function of SiDetectorManager More...
 
const PixelDetectorManageroperator= (const PixelDetectorManager &right)
 prevent copy and assignment More...
 
 PixelDetectorManager (const PixelDetectorManager &right)
 
virtual const PixelIDgetIdHelper () const override
 
void printTransform (MSG::Level level, const Amg::Transform3D &tr) const
 
const LevelInfogetLevel (const std::string &key) const
 Retrieve level information. More...
 
bool processAlignmentContainer (const std::string &key) const
 return align folder string to use More...
 
bool processAlignmentContainer (const AlignableTransformContainer *container, GeoVAlignmentStore *alignStore) const
 
bool processKey (const std::string &key, const AlignableTransform *transformCollection, GeoVAlignmentStore *alignStore=nullptr) const
 Called by processAlignmentContainer, applies only one key on the transform Collections. More...
 
bool processGlobalAlignmentContainer (const std::string &key, const CondAttrListCollection *obj=nullptr, GeoVAlignmentStore *alignStore=nullptr) const
 
void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Private Attributes

std::vector< PVConstLink > m_volume
 
SiDetectorElementCollection m_elementCollection
 
std::vector< AlignableTransformMapm_higherAlignableTransforms
 
std::vector< std::unique_ptr< ExtendedAlignableTransform > > m_alignableTransforms
 
const PixelIDm_idHelper
 
bool m_isLogical
 This variable switches the how the local alignment corrections are applied If true they will be calcualted on top of all of other corrections but in the default reference frame If false they will be calcualted on top of all of other corrections but in the globally aligned reference frame. More...
 
std::string m_tag
 
SiNumerology m_numerology
 
std::vector< std::unique_ptr< const SiDetectorDesign > > m_designs
 
std::unique_ptr< const SiCommonItemsm_commonItems
 
Version m_version
 
std::map< std::string, LevelInfom_keys
 
std::set< std::string > m_folders
 
std::set< std::string > m_specialFolders
 
std::set< std::string > m_globalFolders
 
std::string m_nm
 Message source name. More...
 
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels) More...
 
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer. More...
 
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level. More...
 
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging) More...
 

Static Private Attributes

static const LevelInfo s_invalidLevel
 

Detailed Description

Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated pixel information, access.

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

Definition at line 47 of file PixelDetectorManager.h.

Member Typedef Documentation

◆ AlignableTransformMap

Definition at line 164 of file PixelDetectorManager.h.

Constructor & Destructor Documentation

◆ PixelDetectorManager() [1/3]

InDetDD::PixelDetectorManager::PixelDetectorManager ( StoreGateSvc detStore)

Constructor.

Definition at line 63 of file PixelDetectorManager.cxx.

64  : PixelDetectorManager(detStore, "Pixel", "PixelID"){ }

◆ PixelDetectorManager() [2/3]

InDetDD::PixelDetectorManager::PixelDetectorManager ( StoreGateSvc detStore,
const std::string &  name,
const std::string &  pixelIDName 
)

Constructor with name.

Definition at line 25 of file PixelDetectorManager.cxx.

29  m_idHelper(nullptr),
30  m_isLogical(false) // Change to true to change the definition of local module corrections
31  {
32  //
33  // Initialized the Identifier helper.
34  //
35  if (pixelIDName == "PLR_ID") {
36  const PLR_ID* plr_idHelper;
37  StatusCode sc = detStore->retrieve(plr_idHelper, pixelIDName);
38  if (sc.isFailure()) {
39  ATH_MSG_ERROR("Could not retrieve PLR_ID helper");
40  }
41  m_idHelper = plr_idHelper;
42  // make the symlink
43  sc = detStore->symLink(plr_idHelper, m_idHelper);
44  if (sc.isFailure()) {
45  ATH_MSG_ERROR("Could not make PLR_ID symlink");
46  }
47  } else {
48  StatusCode sc = detStore->retrieve(m_idHelper, pixelIDName);
49  if (sc.isFailure()) {
50  ATH_MSG_ERROR("Could not retrieve PixelID helper");
51  }
52  }
53 
54  // Initialize the collections.
55  if (m_idHelper) {
58  }
59  //https://its.cern.ch/jira/browse/ATLASRECTS-4886
61  }

◆ PixelDetectorManager() [3/3]

InDetDD::PixelDetectorManager::PixelDetectorManager ( const PixelDetectorManager right)
private

Member Function Documentation

◆ addAlignableTransform() [1/3]

void InDetDD::PixelDetectorManager::addAlignableTransform ( int  level,
const Identifier id,
GeoAlignableTransform *  xf,
const GeoVFullPhysVol *  child 
)
virtual

Add alignable transforms.

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

Definition at line 274 of file PixelDetectorManager.cxx.

278  {
280  if (m_idHelper) {
281  if (level == 0) {
282  IdentifierHash idHash = m_idHelper->wafer_hash(id);
283  if (idHash.is_valid()) {
284  m_alignableTransforms[idHash]= std::make_unique<ExtendedAlignableTransform>(transform, child);
285  }
286  } else {
287  // Higher levels are saved in a map. NB the index is level-1 as level=0 is treated above.
289  if (index >= static_cast<int>(m_higherAlignableTransforms.size())) m_higherAlignableTransforms.resize(index+1);
290  m_higherAlignableTransforms[index][id] = std::make_unique<ExtendedAlignableTransform>(transform, child);
291  }
292  }
293  }

◆ addAlignableTransform() [2/3]

void InDetDD::PixelDetectorManager::addAlignableTransform ( int  level,
const Identifier id,
GeoAlignableTransform *  xf,
const GeoVPhysVol *  child 
)
virtual

As above but does a dynamic_cast to GeoVFullPhysVol.

Definition at line 257 of file PixelDetectorManager.cxx.

261  {
263  if (m_idHelper) {
264 
265  const GeoVFullPhysVol * childFPV = dynamic_cast<const GeoVFullPhysVol *>(child);
266  if (!childFPV) {
267  ATH_MSG_ERROR("Child of alignable transform is not a full physical volume");
268  } else {
269  addAlignableTransform (level, id, transform, childFPV);
270  }
271  }
272  }

◆ addAlignableTransform() [3/3]

virtual void InDetDD::PixelDetectorManager::addAlignableTransform ( int  level,
const Identifier id,
GeoAlignableTransform *  xf 
)
inlineoverridevirtual

Add alignable transforms.

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

Implements InDetDD::SiDetectorManager.

Definition at line 101 of file PixelDetectorManager.h.

103  {}; // For backward compatibility

◆ addAlignFolderType()

void InDetDD::InDetDetectorManager::addAlignFolderType ( const AlignFolderType  alignfolder)
inherited

Definition at line 81 of file InDetDetectorManager.cxx.

82  {
83  m_alignfoldertype = alignfolder;
84  }

◆ addChannel()

void InDetDD::InDetDetectorManager::addChannel ( const std::string &  key,
int  level,
FrameType  frame 
)
inherited

Alignment access.

Definition at line 56 of file InDetDetectorManager.cxx.

57  {
58  std::string frameStr = "other";
59  if (frame == InDetDD::global) frameStr = "global";
60  if (frame == InDetDD::local) frameStr = "local";
61  ATH_MSG_INFO("Registering alignment channel with key " << key << ", level " << level
62  << ", with frame " << frameStr << ".");
63  m_keys[key] = LevelInfo(level, frame);
64  }

◆ addDesign()

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

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  }

◆ addDetectorElement()

void InDetDD::PixelDetectorManager::addDetectorElement ( SiDetectorElement element)
overridevirtual

Add elememts.

Implements InDetDD::SiDetectorManager.

Definition at line 128 of file PixelDetectorManager.cxx.

129  {
130  IdentifierHash idHash = element->identifyHash();
131  if (idHash >= m_elementCollection.size())
132  throw std::runtime_error("PixelDetectorManager: Error adding detector element.");
133  m_elementCollection[idHash] = element;
134  }

◆ addFolder()

void InDetDD::InDetDetectorManager::addFolder ( const std::string &  key)
inherited

Definition at line 66 of file InDetDetectorManager.cxx.

67  {
68  m_folders.insert(key);
69  }

◆ addGlobalFolder()

void InDetDD::InDetDetectorManager::addGlobalFolder ( const std::string &  key)
inherited

Definition at line 76 of file InDetDetectorManager.cxx.

77  {
78  m_globalFolders.insert(key);
79  }

◆ addSpecialFolder()

void InDetDD::InDetDetectorManager::addSpecialFolder ( const std::string &  key)
inherited

Definition at line 71 of file InDetDetectorManager.cxx.

72  {
73  m_specialFolders.insert(key);
74  }

◆ addTreeTop()

void InDetDD::PixelDetectorManager::addTreeTop ( const PVConstLink &  vol)

Add a Tree top:

Definition at line 76 of file PixelDetectorManager.cxx.

76  {
77  m_volume.push_back(vol);
78  }

◆ align() [1/2]

StatusCode InDetDD::InDetDetectorManager::align ( const RawAlignmentObjects alignObjects,
GeoVAlignmentStore *  alignStore 
) const
inherited

Definition at line 209 of file InDetDetectorManager.cxx.

210  {
211 
212  ATH_MSG_DEBUG("align() called from an alignment CondAlg");
213  if (!getIdHelper()) return StatusCode::SUCCESS; // To Do: is it really a success?
214 
215  bool alignmentChange = false;
216  // const AlignInfo &aligninfo = AlignInfo(m_alignfoldertype);
217 
218  for(const auto& alignObj : alignObjects) {
219  const std::string& key = alignObj.first;
220 
221  ATH_MSG_DEBUG(" Processing folder " << key);
222 
223  if(m_globalFolders.find(key)!=m_globalFolders.end()) {
224  try {
225  // New global alignemnts
226  const CondAttrListCollection* obj = static_cast<const CondAttrListCollection*>(alignObj.second);
227  bool status = processGlobalAlignmentContainer(key,obj,alignStore);
228  alignmentChange = (alignmentChange || status);
229  } catch(std::runtime_error& err) {
230  // alignments should always exist so we return fatal if we could not process the alignment for this key
231  ATH_MSG_FATAL(err.what());
232  return StatusCode::FAILURE;
233  }
234  }
235  else if(m_folders.find(key)!=m_folders.end()) {
236  try {
237  // Regular alignemnts
238  const AlignableTransformContainer* container = static_cast<const AlignableTransformContainer*>(alignObj.second);
239  bool status = processAlignmentContainer(container,alignStore);
240  alignmentChange = (alignmentChange || status);
241  } catch(std::runtime_error& err) {
242  // alignments should always exist so we return fatal if we could not process the alignment for this key
243  ATH_MSG_FATAL(err.what());
244  return StatusCode::FAILURE;
245  }
246  }
247  else if(m_specialFolders.find(key)!=m_specialFolders.end()) {
248  try {
249  // Detector specific alignments
250  const CondAttrListCollection *obj =
251  static_cast<const CondAttrListCollection*>(alignObj.second);
252  bool status = processSpecialAlignment(key, obj, alignStore);
253  alignmentChange = (alignmentChange || status);
254  }
255  catch(std::runtime_error& err) {
256  // Should always exist if the folder was requested so we return fatal if
257  // we could not process the alignment for this key
258  ATH_MSG_FATAL(err.what());
259  return StatusCode::FAILURE;
260  }
261  }
262  else {
263  // Should not be any other keys specified in raw alignment object.
264  ATH_MSG_ERROR("Unrecognized folder name "<<key<<". Expected names are:");
265  for (const std::string& out:m_globalFolders) ATH_MSG_ERROR("--"<<out);
266  for (const std::string& out:m_folders) ATH_MSG_ERROR("--"<<out);
267  for (const std::string& out:m_specialFolders) ATH_MSG_ERROR("--"<<out);
268 
269  return StatusCode::RECOVERABLE;
270  }
271  }
272  return StatusCode::SUCCESS;
273  }

◆ align() [2/2]

StatusCode InDetDD::InDetDetectorManager::align ( IOVSVC_CALLBACK_ARGS  )
inherited

◆ getBarrelLayers()

unsigned int InDetDD::PixelDetectorManager::getBarrelLayers ( ) const

Layers built.

Deprecated. Recommend to access via numerology (see SiDetectorManager) Warning: decodes in "human-readable", e.g. using 3 out of 3 pixel layers yiels 111, the laset two out of 3 in 110, etc.

Definition at line 172 of file PixelDetectorManager.cxx.

173  {
174  unsigned int barrelLayers = 0;
175  for (int i = numerology().numLayers() - 1; i >= 0; --i) {
176  barrelLayers *= 10;
177  barrelLayers += numerology().useLayer(i);
178  }
179  return barrelLayers;
180  }

◆ getDesign()

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

Definition at line 146 of file SiDetectorManager.cxx.

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

◆ getDetectorElement() [1/3]

const SiDetectorElement * InDetDD::PixelDetectorManager::getDetectorElement ( const Identifier id) const
overridevirtual

access to individual elements : via Identifier

Implements InDetDD::SiDetectorManager.

Definition at line 80 of file PixelDetectorManager.cxx.

81  {
82  // NB the id helpers implementation for getting a hash is not optimal.
83  // Essentially does a binary search.
84  // Make sure it is a wafer Id
85  Identifier waferId = m_idHelper->wafer_id(id);
86  IdentifierHash idHash = m_idHelper->wafer_hash(waferId);
87  if (idHash.is_valid()) {
88  return m_elementCollection[idHash];
89  } else {
90  return nullptr;
91  }
92  }

◆ getDetectorElement() [2/3]

const SiDetectorElement * InDetDD::PixelDetectorManager::getDetectorElement ( const IdentifierHash idHash) const
overridevirtual

access to individual elements : via IdentifierHash

Implements InDetDD::SiDetectorManager.

Definition at line 94 of file PixelDetectorManager.cxx.

95  {
96  return m_elementCollection[idHash];
97  }

◆ getDetectorElement() [3/3]

const SiDetectorElement * InDetDD::PixelDetectorManager::getDetectorElement ( int  barrel_endcap,
int  layer_wheel,
int  phi_module,
int  eta_module 
) const

access to individual elements : via element identification

Definition at line 99 of file PixelDetectorManager.cxx.

100  {
101  return getDetectorElement(m_idHelper->wafer_id(barrel_endcap, layer_wheel, phi_module, eta_module));
102  }

◆ getDetectorElementBegin() [1/2]

SiDetectorElementCollection::const_iterator InDetDD::PixelDetectorManager::getDetectorElementBegin ( ) const
overridevirtual

Implements InDetDD::SiDetectorManager.

Definition at line 109 of file PixelDetectorManager.cxx.

110  {
111  return m_elementCollection.begin();
112  }

◆ getDetectorElementBegin() [2/2]

SiDetectorElementCollection::iterator InDetDD::PixelDetectorManager::getDetectorElementBegin ( )
overridevirtual

Implements InDetDD::SiDetectorManager.

Definition at line 118 of file PixelDetectorManager.cxx.

119  {
120  return m_elementCollection.begin();
121  }

◆ getDetectorElementCollection()

const SiDetectorElementCollection * InDetDD::PixelDetectorManager::getDetectorElementCollection ( ) const
overridevirtual

access to whole collection via Iterators

Implements InDetDD::SiDetectorManager.

Definition at line 104 of file PixelDetectorManager.cxx.

105  {
106  return &m_elementCollection;
107  }

◆ getDetectorElementEnd() [1/2]

SiDetectorElementCollection::const_iterator InDetDD::PixelDetectorManager::getDetectorElementEnd ( ) const
overridevirtual

Implements InDetDD::SiDetectorManager.

Definition at line 114 of file PixelDetectorManager.cxx.

115  {
116  return m_elementCollection.end();
117  }

◆ getDetectorElementEnd() [2/2]

SiDetectorElementCollection::iterator InDetDD::PixelDetectorManager::getDetectorElementEnd ( )
overridevirtual

Implements InDetDD::SiDetectorManager.

Definition at line 123 of file PixelDetectorManager.cxx.

124  {
125  return m_elementCollection.end();
126  }

◆ getEndcapLayers()

unsigned int InDetDD::PixelDetectorManager::getEndcapLayers ( ) const

Layers built.

Deprecated. Recommend to access via numerology (see SiDetectorManager) Warning: decodes in "human-readable", e.g. using 3 out of 3 pixel layers yiels 111, the laset two out of 3 in 110, etc.

Definition at line 182 of file PixelDetectorManager.cxx.

183  {
184  unsigned int endcapLayers = 0;
185  for (int i = numerology().numDisks() - 1; i >= 0; --i) {
186  endcapLayers *= 10;
187  endcapLayers += numerology().useDisk(i);
188  }
189  return endcapLayers;
190  }

◆ getIdHelper()

const PixelID * InDetDD::PixelDetectorManager::getIdHelper ( ) const
overrideprivatevirtual

Implements InDetDD::InDetDetectorManager.

Definition at line 167 of file PixelDetectorManager.cxx.

168  {
169  return m_idHelper;
170  }

◆ getLayout()

const std::string & InDetDD::InDetDetectorManager::getLayout ( ) const
inherited

Definition at line 38 of file InDetDetectorManager.cxx.

39  {
40  return m_version.layout();
41  }

◆ getLevel()

const InDetDetectorManager::LevelInfo & InDetDD::InDetDetectorManager::getLevel ( const std::string &  key) const
privateinherited

Retrieve level information.

Definition at line 87 of file InDetDetectorManager.cxx.

88  {
89  std::map<std::string, LevelInfo>::const_iterator iter;
90  iter = m_keys.find(key);
91  if (iter == m_keys.end()) return s_invalidLevel;
92  return iter->second;
93  }

◆ getNumTreeTops()

unsigned int InDetDD::PixelDetectorManager::getNumTreeTops ( ) const
overridevirtual

Access to raw geometry:

Definition at line 66 of file PixelDetectorManager.cxx.

67  {
68  return m_volume.size();
69  }

◆ getPixelDesign()

const PixelModuleDesign * InDetDD::PixelDetectorManager::getPixelDesign ( int  i) const
virtual

Access to module design, Casts to PixelModuleDesign.

Definition at line 302 of file PixelDetectorManager.cxx.

303  {
304  return dynamic_cast<const PixelModuleDesign *>(getDesign(i));
305  }

◆ getTreeTop()

PVConstLink InDetDD::PixelDetectorManager::getTreeTop ( unsigned int  i) const
overridevirtual

Definition at line 71 of file PixelDetectorManager.cxx.

72  {
73  return m_volume[i];
74  }

◆ getVersion()

const Version & InDetDD::InDetDetectorManager::getVersion ( ) const
inherited

Get version information.

Definition at line 33 of file InDetDetectorManager.cxx.

34  {
35  return m_version;
36  }

◆ identifierBelongs()

bool InDetDD::PixelDetectorManager::identifierBelongs ( const Identifier id) const
overridevirtual

Check identifier is for this detector.

Implements InDetDD::InDetDetectorManager.

Definition at line 295 of file PixelDetectorManager.cxx.

296  {
297  return getIdHelper()->is_pixel(id);
298  }

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40 {
42  m_lvl = m_imsg ?
43  static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
44  MSG::INFO;
45 }

◆ initNeighbours()

void InDetDD::PixelDetectorManager::initNeighbours ( )
overridevirtual

Initialize the neighbours.

This can only be done when all elements are built.

Implements InDetDD::SiDetectorManager.

Definition at line 136 of file PixelDetectorManager.cxx.

137  {
139 
140  // Loop over all elements and set the neighbours
142 
143  SiDetectorElement * element = *iter;
144  if (element) {
145 
146  IdentifierHash idHash = element->identifyHash();
147  IdentifierHash idHashOther;
148 
149  int result;
150  // If no neighbour, result != 0 in which case we leave neighbour as null
151  result = m_idHelper->get_next_in_eta(idHash, idHashOther);
152  if (result==0) element->setNextInEta(m_elementCollection[idHashOther]);
153 
154  result = m_idHelper->get_prev_in_eta(idHash, idHashOther);
155  if (result==0) element->setPrevInEta(m_elementCollection[idHashOther]);
156 
157  result = m_idHelper->get_next_in_phi(idHash, idHashOther);
158  if (result==0) element->setNextInPhi(m_elementCollection[idHashOther]);
159 
160  result = m_idHelper->get_prev_in_phi(idHash, idHashOther);
161  if (result==0) element->setPrevInPhi(m_elementCollection[idHashOther]);
162  }
163  }
164  }

◆ invalidateAll()

void InDetDD::SiDetectorManager::invalidateAll ( )
virtualinherited

Invalidate cache for all detector elements.

Implements InDetDD::InDetDetectorManager.

Definition at line 39 of file SiDetectorManager.cxx.

40  {
42  element_iter != getDetectorElementEnd();
43  ++element_iter) {
44 
45  if (*element_iter) {
46  (*element_iter)->invalidate();
47  }
48  }
49  }

◆ isPixel()

virtual bool InDetDD::PixelDetectorManager::isPixel ( ) const
inlineoverridevirtual

Methods to query which manager we have.

Implements InDetDD::SiDetectorManager.

Definition at line 110 of file PixelDetectorManager.h.

110 {return true;}

◆ isSCT()

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

Definition at line 100 of file SiDetectorManager.h.

100 {return !isPixel();}

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 164 of file AthMessaging.h.

165 {
166  MsgStream* ms = m_msg_tls.get();
167  if (!ms) {
168  if (!m_initialized.test_and_set()) initMessaging();
169  ms = new MsgStream(m_imsg,m_nm);
170  m_msg_tls.reset( ms );
171  }
172 
173  ms->setLevel (m_lvl);
174  return *ms;
175 }

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level  lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 179 of file AthMessaging.h.

180 { return msg() << lvl; }

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152 {
153  if (!m_initialized.test_and_set()) initMessaging();
154  if (m_lvl <= lvl) {
155  msg() << lvl;
156  return true;
157  } else {
158  return false;
159  }
160 }

◆ numDesigns()

int InDetDD::SiDetectorManager::numDesigns ( ) const
inherited

Definition at line 140 of file SiDetectorManager.cxx.

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

◆ numerology() [1/2]

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

Definition at line 129 of file SiDetectorManager.h.

129 {return m_numerology;}

◆ numerology() [2/2]

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

Access Numerology.

Definition at line 128 of file SiDetectorManager.h.

128 {return m_numerology;}

◆ operator=()

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

prevent copy and assignment

◆ printTransform()

void InDetDD::PixelDetectorManager::printTransform ( MSG::Level  level,
const Amg::Transform3D tr 
) const
private

Definition at line 663 of file PixelDetectorManager.cxx.

665  {
666  ATH_MSG_LVL_NOCHK(level, " - translation: " << tr.translation().x() << " " <<tr.translation().y() << " " <<tr.translation().z());
667  ATH_MSG_LVL_NOCHK(level, " - rotation:");
668  ATH_MSG_LVL_NOCHK(level, " " << tr(0,0) << " " << tr(0,1) << " " << tr(0,2));
669  ATH_MSG_LVL_NOCHK(level, " " << tr(1,0) << " " << tr(1,1) << " " << tr(1,2));
670  ATH_MSG_LVL_NOCHK(level, " " << tr(2,0) << " " << tr(2,1) << " " << tr(2,2));
671  }

◆ processAlignmentContainer() [1/2]

bool InDetDD::InDetDetectorManager::processAlignmentContainer ( const AlignableTransformContainer container,
GeoVAlignmentStore *  alignStore 
) const
privateinherited

Definition at line 303 of file InDetDetectorManager.cxx.

304  {
305  bool alignmentChange = false;
306 
307  // Check if container is empty - this can occur if it is an invalid IOV.
308  if (container->empty()) {
309  ATH_MSG_ERROR("AlignableTransformContainer "
310  << " is empty. Probably due to out of range IOV"); // To Do: add key to this printout for making it more informative
311  // This should not occur in normal situations so we force job to abort.
312  throw std::runtime_error("Unable to apply Inner Detector alignments.");
313  }
314  // loop over all the AlignableTransform objects in the collection
315  // use only the last ones.
316  // /Indet/AlignL3/SCTEA9 appear repeatedly in tags of the /Indet/AlignL3 folder
317  std::map<const std::string, const AlignableTransform*> stringToTransform;
318  for (const auto *pat : *container) {
319  stringToTransform[pat->tag()] = pat;
320  }
321  for (const std::pair<const std::string, const AlignableTransform*>& value: stringToTransform) {
322  bool status = processKey(value.first, value.second, alignStore);
323  alignmentChange = (alignmentChange || status);
324  }
325  return alignmentChange;
326  }

◆ processAlignmentContainer() [2/2]

bool InDetDD::InDetDetectorManager::processAlignmentContainer ( const std::string &  key) const
privateinherited

return align folder string to use

Process the alignment container, calls processKey

Definition at line 275 of file InDetDetectorManager.cxx.

276  {
277  bool alignmentChange = false;
278 
279  ATH_MSG_DEBUG("Dealing with key as container");
280  const AlignableTransformContainer* container;
281  if (StatusCode::SUCCESS!=m_detStore->retrieve(container, key)) {
282  ATH_MSG_ERROR("Cannot find AlignableTransformContainer for key "
283  << key << " - no misalignment");
284  // This should not occur in normal situations so we force job to abort.
285  throw std::runtime_error("Unable to apply Inner Detector alignments");
286  }
287  // Check if container is empty - this can occur if it is an invalid IOV.
288  if (container->empty()) {
289  ATH_MSG_ERROR("AlignableTransformContainer for key "
290  << key << " is empty. Probably due to out of range IOV");
291  // This should not occur in normal situations so we force job to abort.
292  throw std::runtime_error("Unable to apply Inner Detector alignments.");
293  }
294  // loop over all the AlignableTransform objects in the collection
295  for (const auto *pat : *container) {
296 
297  bool status = processKey(pat->tag(),pat);
298  alignmentChange = (alignmentChange || status);
299  }
300  return alignmentChange;
301  }

◆ processGlobalAlignment()

bool InDetDD::PixelDetectorManager::processGlobalAlignment ( const std::string &  key,
int  level,
FrameType  frame,
const CondAttrListCollection obj,
GeoVAlignmentStore *  alignStore 
) const
overridevirtual

Process new global DB folders for L1 and L2.

Reimplemented from InDetDD::InDetDetectorManager.

Definition at line 577 of file PixelDetectorManager.cxx.

578  {
579 
580  bool alignmentChange = false;
581 
582  ATH_MSG_INFO("Processing new global alignment containers with key " << key
583  << " in the " << frame << " frame at level " << level);
584 
586  const CondAttrListCollection* atrlistcol=obj;
587  //cppcheck-suppress nullPointerRedundantCheck
588  if (!atrlistcol) {
589  ATH_MSG_INFO("Read alignment from detector store with key " << key);
590  if (StatusCode::SUCCESS!=m_detStore->retrieve(atrlistcol,key)) {
591  ATH_MSG_WARNING("Cannot find new global align Container for key "
592  << key << " - no new global alignment");
593  return alignmentChange;
594  }
595  }
596  // Avoid cppcheck warning.
597  if (!atrlistcol) {
598  return alignmentChange;
599  }
600  {
601  // loop over objects in collection
602  //cppcheck-suppress nullPointerRedundantCheck
603  for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); citr!=atrlistcol->end();++citr) {
604  const coral::AttributeList& atrlist=citr->second;
605  // We are in the Pixel manager, therefore ignore all that is not Pixel Identifier
606  if (atrlist["det"].data<int>()!=1) continue;
607 
608  ident = getIdHelper()->wafer_id(atrlist["bec"].data<int>(),
609  atrlist["layer"].data<int>(),
610  atrlist["ring"].data<int>(),
611  atrlist["sector"].data<int>());
612 
613  // Make sure we have valid HashID (This ONLY works here as the 0-modules exist)
614  // Precaution which does not work for e.g. SCT
615  if (!(getIdHelper()->wafer_hash(ident)).is_valid()){
616  ATH_MSG_WARNING("Invalid HashID for identifier " << getIdHelper()->show_to_string(ident));
617  ATH_MSG_WARNING("No global alignment corrections can be applied for invalid HashID's - exiting");
618  return false;
619  }
620 
621  // construct new transform
622  // Order of rotations is defined as around z, then y, then x.
623  Amg::Translation3D newtranslation(atrlist["Tx"].data<float>(),atrlist["Ty"].data<float>(),atrlist["Tz"].data<float>());
624  Amg::Transform3D newtrans = newtranslation * Amg::RotationMatrix3D::Identity();
625  newtrans *= Amg::AngleAxis3D(atrlist["Rz"].data<float>()*CLHEP::mrad, Amg::Vector3D(0.,0.,1.));
626  newtrans *= Amg::AngleAxis3D(atrlist["Ry"].data<float>()*CLHEP::mrad, Amg::Vector3D(0.,1.,0.));
627  newtrans *= Amg::AngleAxis3D(atrlist["Rx"].data<float>()*CLHEP::mrad, Amg::Vector3D(1.,0.,0.));
628 
629  ATH_MSG_DEBUG("New global DB -- channel: " << citr->first
630  << " ,det: " << atrlist["det"].data<int>()
631  << " ,bec: " << atrlist["bec"].data<int>()
632  << " ,layer: " << atrlist["layer"].data<int>()
633  << " ,ring: " << atrlist["ring"].data<int>()
634  << " ,sector: " << atrlist["sector"].data<int>()
635  << " ,Tx: " << atrlist["Tx"].data<float>()
636  << " ,Ty: " << atrlist["Ty"].data<float>()
637  << " ,Tz: " << atrlist["Tz"].data<float>()
638  << " ,Rx: " << atrlist["Rx"].data<float>()
639  << " ,Ry: " << atrlist["Ry"].data<float>()
640  << " ,Rz: " << atrlist["Rz"].data<float>());
641 
642  // Set the new transform; Will replace existing one with updated transform
644  ident,
645  newtrans,
646  frame,
647  alignStore);
648 
649  if (!status) {
650  ATH_MSG_DEBUG("Cannot set AlignableTransform for identifier."
651  << getIdHelper()->show_to_string(ident)
652  << " at level " << level << " for new global DB");
653  }
654 
655  alignmentChange = (alignmentChange || status);
656  }
657  }
658  return alignmentChange;
659  }

◆ processGlobalAlignmentContainer()

bool InDetDD::InDetDetectorManager::processGlobalAlignmentContainer ( const std::string &  key,
const CondAttrListCollection obj = nullptr,
GeoVAlignmentStore *  alignStore = nullptr 
) const
privateinherited

Definition at line 391 of file InDetDetectorManager.cxx.

394  {
395  bool alignmentChange = false;
396 
397  ATH_MSG_DEBUG("processing GlobalAlignmentContainer with key: " << key);
398  // From the key determine what level in hierarchy we are dealing with.
399  // returns -1 if unrecognized.
400  const LevelInfo & levelInfo = getLevel(key);
401  if (levelInfo.isValid()) {
402  ATH_MSG_VERBOSE("Processing channel: " << key);
403  } else {
404  ATH_MSG_DEBUG("Channel " << key << " not registered in this manager");
405  }
406  // return silently if unrecognised - this can happen in container mode
407  // when a single container holds transforms for both pixel and SCT
408  if (!levelInfo.isValid() ) return false;
409 
410  // Within detector specific code
411  bool status = processGlobalAlignment(key, levelInfo.level(), levelInfo.frame(), obj, alignStore);
412 
413  alignmentChange = (alignmentChange || status);
414 
415  return alignmentChange;
416 
417  }

◆ processKey()

bool InDetDD::InDetDetectorManager::processKey ( const std::string &  key,
const AlignableTransform transformCollection,
GeoVAlignmentStore *  alignStore = nullptr 
) const
privateinherited

Called by processAlignmentContainer, applies only one key on the transform Collections.

Definition at line 328 of file InDetDetectorManager.cxx.

331  {
332  bool alignmentChange = false;
333 
334  // From the key determine what level in hierarchy we are dealing with.
335  // returns -1 if unrecognized.
336  const LevelInfo & levelInfo = getLevel(key);
337  if (levelInfo.isValid()) {
338  ATH_MSG_VERBOSE("Processing channel: " << key);
339  } else {
340  ATH_MSG_DEBUG("Channel " << key << " not registered in this manager");
341  }
342  // return silently if unrecognised - this can happen in container mode
343  // when a single container holds transforms for both pixel and SCT
344  if (!levelInfo.isValid() ) return false;
345 
346  //Loop over the effected nodes.
347  for (AlignableTransform::AlignTransMem_citr trans_iter = transformCollection->begin();
348  trans_iter != transformCollection->end();
349  ++trans_iter) {
350  ATH_MSG_DEBUG( "Get alignment for identifier "
351  << getIdHelper()->show_to_string(trans_iter->identify())
352  << " at level " << levelInfo.level());
353 
354  // The delta in the conditions DB is not necessarily the same as what is needed in the
355  // alignable transform. At the moment we support global frame, local frame or an alternative frame
356  // The setAlignableTransformDelta method takes care of this correction - this is CLHEP <--> Amg interfaced
357  bool status = setAlignableTransformDelta(levelInfo.level(),
358  trans_iter->identify(),
359  Amg::CLHEPTransformToEigen(trans_iter->transform()),
360  levelInfo.frame(),
361  alignStore);
362 
363  alignmentChange = (alignmentChange || status);
364 
365  if (!status) {
366  if (!identifierBelongs(trans_iter->identify())) {
367  // Its probably OK. Eg /Indet/Align/ID contains alse pixel and sct ids.
368  ATH_MSG_DEBUG("Cannot set AlignableTransform for identifier."
369  << " Probably OK if its /Indet/Align/ID folder. "
370  << getIdHelper()->show_to_string(trans_iter->identify())
371  << " at level " << levelInfo.level());
372  } else {
373  if (m_suppressWarnings) {
374  ATH_MSG_DEBUG("WARNING: Cannot set AlignableTransform for identifier "
375  << getIdHelper()->show_to_string(trans_iter->identify())
376  << " at level " << levelInfo.level());
377  } else {
378  ATH_MSG_WARNING("Cannot set AlignableTransform for identifier "
379  << getIdHelper()->show_to_string(trans_iter->identify())
380  << " at level " << levelInfo.level());
381  ATH_MSG_WARNING("Subsequent WARNINGS will be printed at DEBUG level.");
382  m_suppressWarnings = true;
383  }
384  }
385  }
386  }
387  return alignmentChange;
388  }

◆ processSpecialAlignment() [1/2]

bool InDetDD::PixelDetectorManager::processSpecialAlignment ( const std::string &  key,
InDetDD::AlignFolderType  alignfolderType 
)
overridevirtual

Process new IBLDist DB folder.

Matthias D. (Oct. 2016): The idea of this first implementation is to get the AlignTransforms for IBL modules from their folder; Calculate from the new DB entries the Tx displacement for this module; Make a simple transfrom in local frame; Add the Tx to the aligntransform; Apply this new transform with the setAlignableTransformDelta() function; This is non-optimal as it simply overrides the previous Delta (these are included in total Delta); Possibly we could extend this in future to add tweak() functionality to GeoAlignableTransform?

Verbose level debug section for transforms

End of verbose level debug section

Implements InDetDD::InDetDetectorManager.

Definition at line 311 of file PixelDetectorManager.cxx.

312  {
313 
314  bool alignmentChange = false;
315 
316  std::string alignfolder;
317  if (alignfolderType == InDetDD::static_run1) alignfolder = "/Indet/Align";
318  if (alignfolderType == InDetDD::timedependent_run2) alignfolder = "/Indet/AlignL3";
319 
320  ATH_MSG_INFO("Processing IBLDist alignment container with key (" << key << ")"
321  << "and alignment folder pointing to " << alignfolder);
322 
323  int nstaves = 0;
324  if (numerology().numPhiModulesForLayer(0)<14) nstaves = 14;
325  else nstaves = numerology().numPhiModulesForLayer(0);
326 
327  std::vector<float> ibldist;
328  std::vector<float> iblbaseline;
329  ibldist.resize(nstaves);
330  iblbaseline.resize(nstaves);
331 
332  const CondAttrListCollection* atrlistcol=nullptr;
333  if (StatusCode::SUCCESS==m_detStore->retrieve(atrlistcol,key)) {
334  // loop over objects in collection
335  for (CondAttrListCollection::const_iterator citr=atrlistcol->begin(); citr!=atrlistcol->end();++citr) {
336  const coral::AttributeList& atrlist=citr->second;
337  ibldist[atrlist["stave"].data<int>()] = atrlist["mag"].data<float>();
338  iblbaseline[atrlist["stave"].data<int>()] = atrlist["base"].data<float>();
339 
340  ATH_MSG_VERBOSE("IBLDist DB -- channel: " << citr->first
341  << " ,stave: " << atrlist["stave"].data<int>()
342  << " ,mag: " << atrlist["mag"].data<float>()
343  << " ,base: " << atrlist["base"].data<float>());
344  }
345  }
346  else {
347  ATH_MSG_WARNING("Cannot find IBLDist Container for key "
348  << key << " - no IBL bowing alignment");
349  return alignmentChange;
350  }
351 
363  const AlignableTransformContainer* container;
364  if (StatusCode::SUCCESS!=m_detStore->retrieve(container, alignfolder)) {
365  ATH_MSG_ERROR("Cannot find AlignableTransformContainer for key "
366  << key << " - no misalignment");
367  // This should not occur in normal situations so we force job to abort.
368  throw std::runtime_error("Unable to apply Inner Detector alignments");
369  }
370  // Check if container is empty - this can occur if it is an invalid IOV.
371  if (container->empty()) {
372  ATH_MSG_ERROR("AlignableTransformContainer for key "
373  << key << " is empty. Probably due to out of range IOV");
374  // This should not occur in normal situations so we force job to abort.
375  throw std::runtime_error("Unable to apply Inner Detector alignments.");
376  }
377  // loop over all the AlignableTransform objects in the collection
378  std::string IBLalignfolder = alignfolder;
379  IBLalignfolder.append("/PIXB1");// "/Indet/Align/PIXB1"
380  for (const auto *pat : *container)
381  {
382  if (!( pat->tag()==IBLalignfolder &&
383  numerology().numPhiModulesForLayer(0)==14 &&
384  numerology().numLayers()==4) ){ // hard-coded to IBL for now; no other geometry should really apply this!
385  ATH_MSG_DEBUG("IBLDist; ignoring collections " << pat->tag());
386  }
387  else{
388  const AlignableTransform* transformCollection = pat;
389  for (AlignableTransform::AlignTransMem_citr trans_iter = transformCollection->begin();
390  trans_iter != transformCollection->end();
391  ++trans_iter)
392  {
393  ATH_MSG_DEBUG("IBLDist alignment for identifier "
394  << getIdHelper()->show_to_string(trans_iter->identify()));
395 
396  IdentifierHash idHash = getIdHelper()->wafer_hash(trans_iter->identify());
397  if (!idHash.is_valid()){
398  ATH_MSG_WARNING("Invalid HashID for identifier "
399  << getIdHelper()->show_to_string(trans_iter->identify()));
400  ATH_MSG_WARNING("No IBLDist corrections can be applied for invalid HashID's - exiting");
401  return false;
402  }
403  const SiDetectorElement * sielem = m_elementCollection[idHash];
404  //This should work as Bowing is in L3 frame, i.e. local module frame
405  Amg::Vector3D center = sielem->defTransform() * Amg::Vector3D{0, 0, 0};
406  double z = center[2];
407  const double y0y0 = 366.5*366.5;
408 
409  double bowx = ibldist[getIdHelper()->phi_module(trans_iter->identify())] * ( z*z - y0y0 ) / y0y0;
410  double basex= iblbaseline[getIdHelper()->phi_module(trans_iter->identify())];
411  // This is in the module frame, as bowing corrections are directly L3
412 
413  ATH_MSG_DEBUG("Total IBL-module Tx shift (baseline+bowing): " << basex+bowx);
414  if ( (basex+bowx)==0 ) continue; // make sure we ignore NULL corrections
415 
416  Amg::Transform3D shift = Amg::Translation3D(basex+bowx,0,0) * Amg::RotationMatrix3D::Identity();
417 
418  const AlignableTransform* cpat = pat;
419  AlignableTransform::AlignTransMem_citr this_trans=cpat->findIdent(trans_iter->identify());
420  HepGeom::Transform3D newtrans = Amg::EigenTransformToCLHEP(shift)*this_trans->transform();
421 
423  if (msgLvl(MSG::VERBOSE)) {
424  ATH_MSG_LVL_NOCHK(MSG::VERBOSE, "Bowing Transformation only:");
426  ATH_MSG_LVL_NOCHK(MSG::VERBOSE, "Original alignable Transformation from StoreGate:");
427  printTransform(MSG::VERBOSE, Amg::CLHEPTransformToEigen(this_trans->transform()));
428  ATH_MSG_LVL_NOCHK(MSG::VERBOSE, "Final mModified Transformation:");
430  }
433  // Set the new transform; Will replace existing one with updated transform
435  trans_iter->identify(),
436  Amg::CLHEPTransformToEigen(newtrans),
438  nullptr);
439 
440  if (!status) {
441  ATH_MSG_DEBUG("Cannot set AlignableTransform for identifier."
442  << getIdHelper()->show_to_string(trans_iter->identify())
443  << " at level 0 for IBLDist bowing deformation");
444  }
445  alignmentChange = (alignmentChange || status);
446  }
447  }
448  }
449 
450  return alignmentChange;
451  }

◆ processSpecialAlignment() [2/2]

bool InDetDD::PixelDetectorManager::processSpecialAlignment ( const std::string &  key,
const CondAttrListCollection obj = nullptr,
GeoVAlignmentStore *  alignStore = nullptr 
) const
overridevirtual

Paul Gessinger (Jun 2019): For MT, we won't retrieve the underlying actual alignable transform container, since that's hard to come by. We loop over all detector elements, check if they match the detector elements we have IBL dist info for, retrieve the actual transform from the provided GeoAlignmentStore, and re-set it to the corrected value including IBL bowing.

The calculation of the bowing is taken from the non-MT implementation above.

Implements InDetDD::InDetDetectorManager.

Definition at line 453 of file PixelDetectorManager.cxx.

455  {
456  bool alignmentChange = false;
457 
458  ATH_MSG_INFO("Processing IBLDist alignment container with key " << key);
459  if(numerology().numLayers() != 4) {
460  // this doesn't appear to be Run 2, i.e. the IBL isn't there. Bailing
461  return alignmentChange;
462  }
463 
464  int nstaves = 0;
465  if (numerology().numPhiModulesForLayer(0) < 14)
466  nstaves = 14;
467  else
468  nstaves = numerology().numPhiModulesForLayer(0);
469 
470  std::vector<float> ibldist;
471  std::vector<float> iblbaseline;
472  ibldist.resize(nstaves);
473  iblbaseline.resize(nstaves);
474 
475  // loop over objects in collection
476  for (CondAttrListCollection::const_iterator citr = obj->begin();
477  citr != obj->end(); ++citr) {
478 
479  const coral::AttributeList &atrlist = citr->second;
480  ibldist[atrlist["stave"].data<int>()] = atrlist["mag"].data<float>();
481  iblbaseline[atrlist["stave"].data<int>()] = atrlist["base"].data<float>();
482 
483  ATH_MSG_VERBOSE("IBLDist DB -- channel: " << citr->first
484  << ", stave: " << atrlist["stave"].data<int>()
485  << ", mag: " << atrlist["mag"].data<float>()
486  << ", base: " << atrlist["base"].data<float>());
487  }
488 
501  for(const auto* detElem : *getDetectorElementCollection()) {
502  if(!detElem->isInnermostPixelLayer()) {
503  // skip non-IBL elements. This only works if the innermost pixel layer is in fact
504  // the IBL. That should be the case for Run2 until replacement of the ID.
505  continue;
506  }
507  std::string repr = getIdHelper()->show_to_string(detElem->identify());
508  ATH_MSG_DEBUG("IBLDist alignment for identifier " << repr);
509 
510 
511  IdentifierHash idHash = getIdHelper()->wafer_hash(detElem->identify());
512  if (!idHash.is_valid()) {
513  ATH_MSG_WARNING("Invalid HashID for identifier " << repr);
514  ATH_MSG_WARNING("No IBLDist corrections can be applied for "
515  "invalid HashID's - exiting ");
516  return false;
517  }
518 
519  // extract the stave number
520  int stave = getIdHelper()->phi_module(detElem->identify());
521 
522  Amg::Vector3D center = detElem->defTransform() * Amg::Vector3D{0, 0, 0};
523  double z = center[2];
524  const double y0y0 = 366.5 * 366.5;
525 
526  double bowx = ibldist[stave] * (z * z - y0y0) / y0y0;
527  double basex = iblbaseline[stave];
528  // This is in the module frame, as bowing corrections are directly L3
529 
530  ATH_MSG_DEBUG("Total IBL-module Tx shift (baseline+bowing): " << basex + bowx);
531 
532  if ((basex + bowx) == 0) {
533  continue; // make sure we ignore NULL corrections
534  }
535 
536  Amg::Transform3D shift = Amg::Translation3D(basex + bowx, 0, 0) *
537  Amg::RotationMatrix3D::Identity();
538 
539  // now we need to get the original alignment delta to apply this additional
540  // shift to
541  ExtendedAlignableTransform* eat = m_alignableTransforms[idHash].get();
542  const GeoTrf::Transform3D* currentDelta = alignStore->getDelta(eat->alignableTransform());
543  if (currentDelta == nullptr) {
544  ATH_MSG_ERROR("Have IBL Dist for element which does not have an alignment delta."
545  << " This indicates inconsistent alignment data");
546  return false;
547  }
548 
549  HepGeom::Transform3D recoToHitTransform = detElem->recoToHitTransform();
550  Amg::Transform3D r2h = Amg::CLHEPTransformToEigen(recoToHitTransform);
551 
552  ATH_MSG_VERBOSE("Previous delta for " << repr << ":\n" << currentDelta->matrix());
553  ATH_MSG_VERBOSE("Bowing-only delta for " << repr << ":\n" << shift.matrix());
554  Amg::Transform3D newDelta = shift * r2h.inverse() * (*currentDelta) * r2h;
555 
556  // We can probably just write it back to the geo alignment store.
557  // The IBL bowing is always at the module level, and that's the delta that
558  // we retrieved from the geo alignment store.
559 
561  detElem->identify(),
562  newDelta,
564  alignStore);
565 
566 
567  ATH_MSG_VERBOSE("New delta for " << repr << ":\n"
568  << alignStore->getDelta(eat->alignableTransform())->matrix());
569 
570  alignmentChange |= status;
571  }
572 
573  return alignmentChange;
574  }

◆ setAlignableTransformDelta()

bool InDetDD::PixelDetectorManager::setAlignableTransformDelta ( int  level,
const Identifier id,
const Amg::Transform3D delta,
FrameType  frame,
GeoVAlignmentStore *  alignStore 
) const
overrideprivatevirtual

implements the main alignment update for delta transforms in different frames, it translates into the LocalDelta or GlobalDelta function of SiDetectorManager

Implements InDetDD::SiDetectorManager.

Definition at line 193 of file PixelDetectorManager.cxx.

198  {
199 
200  if (level == 0) { // At the element level - local shift
201 
202  // We retrieve it via a hashId.
203  IdentifierHash idHash = m_idHelper->wafer_hash(id);
204  if (!idHash.is_valid()) return false;
205 
206  if (frame == InDetDD::global) {
207 
208  return setAlignableTransformGlobalDelta(m_alignableTransforms[idHash].get(), delta, alignStore);
209 
210  } else if (frame == InDetDD::local) {
211 
212  const SiDetectorElement * element = m_elementCollection[idHash];
213  if (!element) return false;
214 
215  // Its a local transform
216  //See header file for definition of m_isLogical
217  if( m_isLogical ){
218  // Ensure cache is up to date and use the alignment corrected local to
219  // global transform
220  element->updateCache();
222  m_alignableTransforms[idHash].get(), element->transform(), delta,
223  alignStore);
224  } else
225  //Use default local to global transform
227  m_alignableTransforms[idHash].get(), element->defTransform(),
228  delta, alignStore);
229  } else {
230  // other not supported
231  ATH_MSG_WARNING("Frames other than global or local are not supported.");
232  return false;
233  }
234 
235  } else { // higher level
236 
237  if (frame != InDetDD::global) {
238  ATH_MSG_WARNING("Non global shift at higher levels is not possible.");
239  return false;
240  }
241 
242  int index = level - FIRST_HIGHER_LEVEL; // level 0 is treated separately.
243  if (index >= static_cast<int>(m_higherAlignableTransforms.size())) return false;
244 
245  // We retrieve it from a map.
246  AlignableTransformMap::const_iterator iter;
248  if (iter == m_higherAlignableTransforms[index].end()) return false;
249 
250  // Its a global transform
251  return setAlignableTransformGlobalDelta((iter->second).get(), delta, alignStore);
252  }
253 
254  }

◆ setAlignableTransformGlobalDelta()

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

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  }

◆ setAlignableTransformLocalDelta()

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

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)
inherited

Set SiCommonItems.

Definition at line 151 of file SiDetectorManager.cxx.

152  {
153  m_commonItems = std::move(commonItems);
154  }

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level  lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29 {
30  m_lvl = lvl;
31 }

◆ setVersion()

void InDetDD::InDetDetectorManager::setVersion ( const Version version)
inherited

Definition at line 43 of file InDetDetectorManager.cxx.

44  {
46 
47  // Since default alignments are for final layout, Pixel Rome-Initial
48  // layout will result in several (harmless) WARNING message. We suppress these.
49  // Also the SR1 layout produce warnings due to missing parts. We suppress these also.
50  m_suppressWarnings = ( (getName() == "Pixel" &&
51  (version.tag() == "Pixel-01" || version.tag() == "Pixel-DC2-Initial-00"))
52  || version.layout() == "SR1" || version.layout() == "SR1-EndcapC");
53 
54  }

◆ tag()

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

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
virtualinherited

Update all caches.

Implements InDetDD::InDetDetectorManager.

Definition at line 51 of file SiDetectorManager.cxx.

52  {
54  element_iter != getDetectorElementEnd();
55  ++element_iter) {
56  if (*element_iter) {
57  (*element_iter)->updateCache();
58  }
59  }
60  }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_alignableTransforms

std::vector< std::unique_ptr<ExtendedAlignableTransform> > InDetDD::PixelDetectorManager::m_alignableTransforms
private

Definition at line 166 of file PixelDetectorManager.h.

◆ m_alignfoldertype

AlignFolderType InDetDD::InDetDetectorManager::m_alignfoldertype
inherited

Definition at line 96 of file InDetDetectorManager.h.

◆ m_commonItems

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

Definition at line 151 of file SiDetectorManager.h.

◆ m_designs

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

Definition at line 150 of file SiDetectorManager.h.

◆ m_detStore

StoreGateSvc* InDetDD::InDetDetectorManager::m_detStore
protectedinherited

Definition at line 99 of file InDetDetectorManager.h.

◆ m_elementCollection

SiDetectorElementCollection InDetDD::PixelDetectorManager::m_elementCollection
private

Definition at line 163 of file PixelDetectorManager.h.

◆ m_folders

std::set<std::string> InDetDD::InDetDetectorManager::m_folders
privateinherited

Definition at line 182 of file InDetDetectorManager.h.

◆ m_globalFolders

std::set<std::string> InDetDD::InDetDetectorManager::m_globalFolders
privateinherited

Definition at line 184 of file InDetDetectorManager.h.

◆ m_higherAlignableTransforms

std::vector< AlignableTransformMap > InDetDD::PixelDetectorManager::m_higherAlignableTransforms
private

Definition at line 165 of file PixelDetectorManager.h.

◆ m_idHelper

const PixelID* InDetDD::PixelDetectorManager::m_idHelper
private

Definition at line 167 of file PixelDetectorManager.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_isLogical

bool InDetDD::PixelDetectorManager::m_isLogical
private

This variable switches the how the local alignment corrections are applied If true they will be calcualted on top of all of other corrections but in the default reference frame If false they will be calcualted on top of all of other corrections but in the globally aligned reference frame.

Definition at line 178 of file PixelDetectorManager.h.

◆ m_keys

std::map<std::string, LevelInfo> InDetDD::InDetDetectorManager::m_keys
privateinherited

Definition at line 181 of file InDetDetectorManager.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_numerology

SiNumerology InDetDD::SiDetectorManager::m_numerology
privateinherited

Definition at line 149 of file SiDetectorManager.h.

◆ m_specialFolders

std::set<std::string> InDetDD::InDetDetectorManager::m_specialFolders
privateinherited

Definition at line 183 of file InDetDetectorManager.h.

◆ m_suppressWarnings

std::atomic_bool InDetDD::InDetDetectorManager::m_suppressWarnings
mutableprotectedinherited

Definition at line 100 of file InDetDetectorManager.h.

◆ m_tag

std::string InDetDD::SiDetectorManager::m_tag
privateinherited

Definition at line 148 of file SiDetectorManager.h.

◆ m_version

Version InDetDD::InDetDetectorManager::m_version
privateinherited

Definition at line 180 of file InDetDetectorManager.h.

◆ m_volume

std::vector<PVConstLink> InDetDD::PixelDetectorManager::m_volume
private

Definition at line 162 of file PixelDetectorManager.h.

◆ s_invalidLevel

const InDetDetectorManager::LevelInfo InDetDD::InDetDetectorManager::s_invalidLevel
staticprivateinherited

Definition at line 186 of file InDetDetectorManager.h.


The documentation for this class was generated from the following files:
InDetDD::PixelDetectorManager::printTransform
void printTransform(MSG::Level level, const Amg::Transform3D &tr) const
Definition: PixelDetectorManager.cxx:663
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:755
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
CondAttrListCollection::end
const_iterator end() const
Definition: CondAttrListCollection.h:315
createLinkingScheme.iter
iter
Definition: createLinkingScheme.py:62
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
InDetDD::PixelDetectorManager::m_elementCollection
SiDetectorElementCollection m_elementCollection
Definition: PixelDetectorManager.h:163
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
get_generator_info.result
result
Definition: get_generator_info.py:21
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
DataVector< SiDetectorElement >::iterator
DataModel_detail::iterator< DataVector > iterator
Standard iterator.
Definition: DataVector.h:841
InDetDD::InDetDetectorManager::identifierBelongs
virtual bool identifierBelongs(const Identifier &id) const =0
Check identifier is for this detector.
InDetDD::PixelDetectorManager::m_idHelper
const PixelID * m_idHelper
Definition: PixelDetectorManager.h:167
DataVector< SiDetectorElement >::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition: DataVector.h:837
InDetDD::timedependent_run2
@ timedependent_run2
Definition: InDetDD_Defs.h:19
InDetDD::SiDetectorManager::SiDetectorManager
SiDetectorManager(StoreGateSvc *detStore, const std::string &name)
Definition: SiDetectorManager.cxx:27
index
Definition: index.py:1
InDetDD::SiDetectorManager::m_designs
std::vector< std::unique_ptr< const SiDetectorDesign > > m_designs
Definition: SiDetectorManager.h:150
CondMultChanCollection
A CondMultChanCollection is a template class which can hold a collection of T* objects which are inte...
Definition: CondMultChanCollection.h:52
AlignableTransform::AlignTransMem_citr
std::vector< AlignTransMember >::const_iterator AlignTransMem_citr
Definition: AlignableTransform.h:46
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::InDetDetectorManager::getIdHelper
virtual const AtlasDetectorID * getIdHelper() const =0
InDetDD::SiNumerology::useLayer
bool useLayer(int layer) const
Check if layer exists.
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
PLR_ID
This is a Identifier helper class for the PLR subdetector. This class inherits from PixelID.
Definition: PLR_ID.h:22
InDetDD::InDetDetectorManager::m_suppressWarnings
std::atomic_bool m_suppressWarnings
Definition: InDetDetectorManager.h:100
CondAttrListCollection::begin
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
Definition: CondAttrListCollection.h:309
athena.value
value
Definition: athena.py:124
GeoNodePtr
GeoIntrusivePtr< T > GeoNodePtr
Definition: GeoNodePtr.h:12
InDetDD::static_run1
@ static_run1
Definition: InDetDD_Defs.h:19
PixelID::get_prev_in_phi
int get_prev_in_phi(const IdentifierHash &id, IdentifierHash &prev) const
Previous wafer hash in phi (return == 0 for neighbor found)
Definition: PixelID.cxx:415
InDetDD::global
@ global
Definition: InDetDD_Defs.h:16
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
InDetDD::Version::layout
const std::string & layout() const
Layout (eg Initial, Final, TestBeam)
Definition: Version.cxx:50
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
InDetDD::InDetDetectorManager::m_keys
std::map< std::string, LevelInfo > m_keys
Definition: InDetDetectorManager.h:181
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
InDetDD::InDetDetectorManager::getLevel
const LevelInfo & getLevel(const std::string &key) const
Retrieve level information.
Definition: InDetDetectorManager.cxx:87
PixelID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition: PixelID.h:360
dumpTruth.getName
getName
Definition: dumpTruth.py:34
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
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::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
StoreGateSvc::retrieve
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
ATH_MSG_LVL_NOCHK
#define ATH_MSG_LVL_NOCHK(lvl, x)
Definition: AthMsgStreamMacros.h:18
InDetDD::PixelDetectorManager::getDetectorElementCollection
virtual const SiDetectorElementCollection * getDetectorElementCollection() const override
access to whole collection via Iterators
Definition: PixelDetectorManager.cxx:104
PixelID::wafer_hash
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition: PixelID.h:383
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthMessaging::msgLvl
bool msgLvl(const MSG::Level lvl) const
Test the output level.
Definition: AthMessaging.h:151
PixelID::get_next_in_phi
int get_next_in_phi(const IdentifierHash &id, IdentifierHash &next) const
Next wafer hash in phi (return == 0 for neighbor found)
Definition: PixelID.cxx:428
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:183
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AlignableTransform::end
AlignTransMem_citr end() const
Definition: AlignableTransform.h:106
InDetDD::SiDetectorManager::getDesign
const SiDetectorDesign * getDesign(int i) const
Definition: SiDetectorManager.cxx:146
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
InDetDD::InDetDetectorManager::m_globalFolders
std::set< std::string > m_globalFolders
Definition: InDetDetectorManager.h:184
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
InDetDD::FIRST_HIGHER_LEVEL
const int FIRST_HIGHER_LEVEL
Definition: PixelDetectorManager.cxx:22
InDetDD::PixelDetectorManager::PixelDetectorManager
PixelDetectorManager(StoreGateSvc *detStore)
Constructor.
Definition: PixelDetectorManager.cxx:63
InDetDD::InDetDetectorManager::s_invalidLevel
static const LevelInfo s_invalidLevel
Definition: InDetDetectorManager.h:186
PyAthena::repr
std::string repr(PyObject *o)
returns the string representation of a python object equivalent of calling repr(o) in python
Definition: PyAthenaUtils.cxx:106
InDetDD::SiNumerology::useDisk
bool useDisk(int disk) const
Check if disk exists.
PixelID::get_next_in_eta
int get_next_in_eta(const IdentifierHash &id, IdentifierHash &next) const
Next wafer hash in eta (return == 0 for neighbor found)
Definition: PixelID.cxx:454
InDetDD::InDetDetectorManager::m_detStore
StoreGateSvc * m_detStore
Definition: InDetDetectorManager.h:99
InDetDD::InDetDetectorManager::setAlignableTransformDelta
virtual bool setAlignableTransformDelta(int level, const Identifier &id, const Amg::Transform3D &delta, FrameType frame, GeoVAlignmentStore *alignStore=nullptr) const =0
Set method applying the delta transform (in global or local frame) onto the geoModel transform : CLHE...
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
AlignableTransform
Definition: AlignableTransform.h:24
InDetDD::PixelDetectorManager::addAlignableTransform
virtual void addAlignableTransform(int level, const Identifier &id, GeoAlignableTransform *xf, const GeoVFullPhysVol *child)
Add alignable transforms.
Definition: PixelDetectorManager.cxx:274
IdentifierHash::is_valid
bool is_valid() const
Check if id is in a valid state.
InDetDD::local
@ local
Definition: InDetDD_Defs.h:16
PixelID::wafer_hash_max
size_type wafer_hash_max() const
Definition: PixelID.cxx:833
dso-stats.pat
pat
Definition: dso-stats.py:37
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
InDetDD::InDetDetectorManager::m_folders
std::set< std::string > m_folders
Definition: InDetDetectorManager.h:182
DataVector::resize
void resize(size_type sz)
Resizes the collection to the specified number of elements.
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:239
InDetDD::PixelDetectorManager::m_volume
std::vector< PVConstLink > m_volume
Definition: PixelDetectorManager.h:162
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::PixelDetectorManager::getIdHelper
virtual const PixelID * getIdHelper() const override
Definition: PixelDetectorManager.cxx:167
InDetDD::SiDetectorManager::m_numerology
SiNumerology m_numerology
Definition: SiDetectorManager.h:149
HI::TowerBins::numLayers
constexpr unsigned int numLayers()
Definition: HIEventDefs.h:23
python.SystemOfUnits.mrad
float mrad
Definition: SystemOfUnits.py:127
InDetDD::InDetDetectorManager::processGlobalAlignment
virtual bool processGlobalAlignment(const std::string &key, int level, FrameType frame, const CondAttrListCollection *obj=nullptr, GeoVAlignmentStore *alignStore=nullptr) const
Definition: InDetDetectorManager.cxx:420
TRT::Hit::ident
@ ident
Definition: HitInfo.h:77
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDetDD::InDetDetectorManager::processKey
bool processKey(const std::string &key, const AlignableTransform *transformCollection, GeoVAlignmentStore *alignStore=nullptr) const
Called by processAlignmentContainer, applies only one key on the transform Collections.
Definition: InDetDetectorManager.cxx:328
AlignableTransform::findIdent
AlignTransMem_citr findIdent(const Identifier &ident) const
Definition: AlignableTransform.h:118
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
get_generator_info.version
version
Definition: get_generator_info.py:33
DeMoScan.index
string index
Definition: DeMoScan.py:362
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:360
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.Constants.INFO
int INFO
Definition: Control/AthenaCommon/python/Constants.py:15
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
Amg::CLHEPTransformToEigen
Amg::Transform3D CLHEPTransformToEigen(const HepGeom::Transform3D &CLHEPtransf)
Converts a CLHEP-based HepGeom::Transform3D into an Eigen Amg::Transform3D.
Definition: CLHEPtoEigenConverter.h:38
InDetDD::InDetDetectorManager::m_specialFolders
std::set< std::string > m_specialFolders
Definition: InDetDetectorManager.h:183
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
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
InDetDD::InDetDetectorManager::processAlignmentContainer
bool processAlignmentContainer(const std::string &key) const
return align folder string to use
Definition: InDetDetectorManager.cxx:275
Amg::EigenTransformToCLHEP
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
Definition: CLHEPtoEigenConverter.h:120
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
InDetDD::SiNumerology::numPhiModulesForLayer
int numPhiModulesForLayer(int layer) const
Number of sectors in phi for a layer.
InDetDD::PixelDetectorManager::m_alignableTransforms
std::vector< std::unique_ptr< ExtendedAlignableTransform > > m_alignableTransforms
Definition: PixelDetectorManager.h:166
InDetDD::InDetDetectorManager::m_version
Version m_version
Definition: InDetDetectorManager.h:180
InDetDD::InDetDetectorManager::processGlobalAlignmentContainer
bool processGlobalAlignmentContainer(const std::string &key, const CondAttrListCollection *obj=nullptr, GeoVAlignmentStore *alignStore=nullptr) const
Definition: InDetDetectorManager.cxx:391
InDetDD::InDetDetectorManager::m_alignfoldertype
AlignFolderType m_alignfoldertype
Definition: InDetDetectorManager.h:96
InDetDD::InDetDetectorManager::processSpecialAlignment
virtual bool processSpecialAlignment(const std::string &key, InDetDD::AlignFolderType alignfolder)=0
Definition: InDetDetectorManager.cxx:428
Amg::AngleAxis3D
Eigen::AngleAxisd AngleAxis3D
Definition: GeoPrimitives.h:45
InDetDD::SiDetectorManager::getDetectorElementEnd
virtual SiDetectorElementCollection::const_iterator getDetectorElementEnd() const =0
InDetDD::PixelDetectorManager::getDetectorElement
virtual const SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
Definition: PixelDetectorManager.cxx:80
merge.status
status
Definition: merge.py:16
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
AlignableTransform::begin
AlignTransMem_citr begin() const
Definition: AlignableTransform.h:104
AthMessaging::initMessaging
void initMessaging() const
Initialize our message level and MessageSvc.
Definition: AthMessaging.cxx:39
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::SiDetectorManager::getDetectorElementBegin
virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const =0
AthMessaging::m_msg_tls
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
Definition: AthMessaging.h:132
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:640
python.PyAthena.obj
obj
Definition: PyAthena.py:132
InDetDD::SiDetectorManager::m_commonItems
std::unique_ptr< const SiCommonItems > m_commonItems
Definition: SiDetectorManager.h:151
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
PixelID::get_prev_in_eta
int get_prev_in_eta(const IdentifierHash &id, IdentifierHash &prev) const
Previous wafer hash in eta (return == 0 for neighbor found)
Definition: PixelID.cxx:441
InDetDD::PixelDetectorManager::m_higherAlignableTransforms
std::vector< AlignableTransformMap > m_higherAlignableTransforms
Definition: PixelDetectorManager.h:165
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
python.SystemOfUnits.ms
float ms
Definition: SystemOfUnits.py:148
Identifier
Definition: IdentifierFieldParser.cxx:14