ATLAS Offline Software
Loading...
Searching...
No Matches
InDetDD::TRT_DetectorManager Class Reference

The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements which can be retrieved from the TRT_DetectorManager either via numerology or Identifier access. More...

#include <TRT_DetectorManager.h>

Inheritance diagram for InDetDD::TRT_DetectorManager:

Public Types

enum  ActiveGasType { unknown , oldgas , newgas }

Public Member Functions

 TRT_DetectorManager (StoreGateSvc *detStore)
 ~TRT_DetectorManager ()
virtual unsigned int getNumTreeTops () const override
 Access Raw Geometry:----------------------------------------------------—.
virtual PVConstLink getTreeTop (unsigned int i) const override
void setIdHelper (const TRT_ID *idHelper, bool owns=true)
 Get the ID helper: -----------------------------------------------------—.
ActiveGasType gasType () const
void setGasType (const ActiveGasType &)
TRT_NumerologygetNumerology ()
 Access Numerological information:---------------------------------------—.
const TRT_NumerologygetNumerology () const
const TRT_BaseElementgetElement (Identifier id) const
 Access Elements Generically---------------------------------------------—.
const TRT_BaseElementgetElement (IdentifierHash id) const
const TRT_DetElementContainergetDetectorElementContainer () const
 Access the element container -------------------------------------------—.
const TRT_DetElementCollectiongetDetectorElementCollection () const
 Access to Whole Collection of Elements ---------------------------------—.
TRT_DetElementCollection::const_iterator getDetectorElementBegin () const
TRT_DetElementCollection::const_iterator getDetectorElementEnd () const
TRT_DetElementCollection::iterator getDetectorElementBegin ()
TRT_DetElementCollection::iterator getDetectorElementEnd ()
const TRT_BarrelElementgetBarrelElement (unsigned int positive, unsigned int moduleIndex, unsigned int phiIndex, unsigned int strawLayerIndex) const
 Access Barrel Elements:---------------—(Fast)-------------------------—.
TRT_BarrelElementgetBarrelElement (unsigned int positive, unsigned int moduleIndex, unsigned int phiIndex, unsigned int strawLayerIndex)
const TRT_EndcapElementgetEndcapElement (unsigned int positive, unsigned int wheelIndex, unsigned int strawLayerIndex, unsigned int phiIndex) const
 Access Endcap Elements:---------------—(Fast)--------------------------—.
TRT_EndcapElementgetEndcapElement (unsigned int positive, unsigned int wheelIndex, unsigned int strawLayerIndex, unsigned int phiIndex)
const TRT_Conditionsconditions () const
 Conditions interface (mostly for internal use):-------------------------—.
void addTreeTop (const PVLink &)
void manageBarrelElement (TRT_BarrelElement *barrel)
void manageEndcapElement (TRT_EndcapElement *endcap)
void setBarrelTransformField (size_t i, const GeoXF::Function *field)
const GeoXF::Function * barrelTransformField (size_t i) const
void setEndcapTransformField (size_t i, const GeoXF::Function *field)
const GeoXF::Function * endcapTransformField (size_t i) const
void addKey ATLAS_NOT_THREAD_SAFE (const std::string &key, int level)
void addKey (const std::string &key, int level, FrameType frame)
void addAlignableTransform (int level, const Identifier &id, GeoAlignableTransform *transform, const GeoVFullPhysVol *child=0, const GeoVFullPhysVol *frameVol=0)
 Add alignable transforms: GeoModel/CLHEP based.
void addAlignableTransform (int level, const Identifier &id, GeoAlignableTransform *transform, const GeoVPhysVol *child=0, const GeoVPhysVol *frameVol=0)
 Add alignable transforms: GeoModel/CLHEP based.
virtual bool setAlignableTransformDelta (int level, const Identifier &id, const Amg::Transform3D &delta, FrameType frame, GeoVAlignmentStore *alignStore) const override
 Set alignable transforms: Amg based.
bool setAlignableTransformAnyFrameDelta (ExtendedAlignableTransform *extXF, const Amg::Transform3D &delta, FrameType frame, GeoVAlignmentStore *alignStore) const
 Set alignable transforms: Amg based.
virtual void invalidateAll () override
 Invalidate cache for all detector elements.
virtual void updateAll () const override
 Update all caches.
virtual bool identifierBelongs (const Identifier &id) const override
 Check identifier is for this detector.
StatusCode alignmentCallback (IOVSVC_CALLBACK_ARGS)
 Call back for alignment updates, DEPRECATED.
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.
bool processSpecialAlignment (const std::string &key, InDetDD::AlignFolderType dummy) override
bool processSpecialAlignment (const std::string &key, const CondAttrListCollection *obj=nullptr, GeoVAlignmentStore *alignStore=nullptr) const override
void setBarrelDescriptor (const TRT_BarrelDescriptor *barrelDescriptor)
 Set TRT_Barrel/EndcapDescriptor pointer to the internal sets to delete them in the destructor.
void setEndcapDescriptor (const TRT_EndcapDescriptor *endcapDescriptor)
const VersiongetVersion () const
 Get version information.
const std::string & getLayout () const
void setVersion (const Version &version)
void addChannel (const std::string &key, int level, FrameType frame)
 Alignment access.
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.
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.
void setLevel (MSG::Level lvl)
 Change the current logging level.
const TRTCond::StrawDxContainerdxContainer () const

Public Attributes

AlignFolderType m_alignfoldertype

Protected Member Functions

void setDxContainer (const TRTCond::StrawDxContainer *container)

Protected Attributes

StoreGateSvcm_detStore
std::atomic_bool m_suppressWarnings

Private Types

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

Private Member Functions

const TRT_DetectorManageroperator= (const TRT_DetectorManager &right)
 TRT_DetectorManager (const TRT_DetectorManager &right)
virtual const TRT_IDgetIdHelper () const override
const LevelInfogetLevel (const std::string &key) const
 Retrieve level information.
bool processAlignmentContainer (const std::string &key) const
 return align folder string to use
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.
bool processGlobalAlignmentContainer (const std::string &key, const CondAttrListCollection *obj=nullptr, GeoVAlignmentStore *alignStore=nullptr) const
void initMessaging () const
 Initialize our message level and MessageSvc.

Private Attributes

std::vector< PVLink > m_volume
TRT_DetElementContainer m_elementContainer
TRT_Numerologym_numerology
const TRT_IDm_idHelper
bool m_ownsIdHelper
const GeoXF::Function * m_barrelXF [3] {}
const GeoXF::Function * m_endcapXF [3] {}
ActiveGasType m_gasType
unsigned int m_digvers
std::string m_digversname
std::vector< AlignableTransformMapm_alignableTransforms
std::set< const TRT_BarrelDescriptor * > m_barrelDescriptors
std::set< const TRT_EndcapDescriptor * > m_endcapDescriptors
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.
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels)
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer.
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging)
const TRTCond::StrawDxContainerm_dxContainer

Static Private Attributes

static const LevelInfo s_invalidLevel

Detailed Description

The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements which can be retrieved from the TRT_DetectorManager either via numerology or Identifier access.

In addition, the alignable transforms are set via Identifer and forwarded to the GeoModel class; hence, we are sitting at the interface between CLHEP and AMG.

Author
Grant Gorfine modified & maintined: Nick Styles, Andreas Salzburger

Definition at line 60 of file TRT_DetectorManager.h.

Member Typedef Documentation

◆ AlignableTransformMap

Member Enumeration Documentation

◆ ActiveGasType

Constructor & Destructor Documentation

◆ TRT_DetectorManager() [1/2]

InDetDD::TRT_DetectorManager::TRT_DetectorManager ( StoreGateSvc * detStore)

Definition at line 26 of file TRT_DetectorManager.cxx.

27 :InDetDetectorManager(detStore, "TRT"),
28 m_numerology(new TRT_Numerology()),
29 m_idHelper(nullptr),
30 m_ownsIdHelper(false),
32 m_digvers(9999),
33 m_digversname("ERROR:DIGVERSNOTSET!")
34 {
35 m_elementContainer.setNumerology(m_numerology);
36
37 m_barrelXF[0]=m_barrelXF[1]=m_barrelXF[2]=nullptr;
38 m_endcapXF[0]=m_endcapXF[1]=m_endcapXF[2]=nullptr;
39 }
InDetDetectorManager(StoreGateSvc *detStore, const std::string &name)
const GeoXF::Function * m_barrelXF[3]
TRT_DetElementContainer m_elementContainer
const GeoXF::Function * m_endcapXF[3]

◆ ~TRT_DetectorManager()

InDetDD::TRT_DetectorManager::~TRT_DetectorManager ( )

Definition at line 51 of file TRT_DetectorManager.cxx.

52 {
53 delete m_numerology;
54 if (m_ownsIdHelper) delete m_idHelper;
55 for (auto & i : m_barrelXF) delete i;
56 for (auto & i : m_endcapXF) delete i;
57
58
59 for (auto & m : m_alignableTransforms) {
60 for (auto & j : m) {
61 delete j.second;
62 }
63 }
64
65 for (const TRT_BarrelDescriptor* barrelDescriptor : m_barrelDescriptors) {
66 delete barrelDescriptor;
67 }
68 for (const TRT_EndcapDescriptor* endcapDescriptor : m_endcapDescriptors) {
69 delete endcapDescriptor;
70 }
71 }
std::set< const TRT_BarrelDescriptor * > m_barrelDescriptors
std::vector< AlignableTransformMap > m_alignableTransforms
std::set< const TRT_EndcapDescriptor * > m_endcapDescriptors

◆ TRT_DetectorManager() [2/2]

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

Member Function Documentation

◆ addAlignableTransform() [1/2]

void InDetDD::TRT_DetectorManager::addAlignableTransform ( int level,
const Identifier & id,
GeoAlignableTransform * transform,
const GeoVFullPhysVol * child = 0,
const GeoVFullPhysVol * frameVol = 0 )

Add alignable transforms: GeoModel/CLHEP based.

Definition at line 273 of file TRT_DetectorManager.cxx.

278 {
279 if (m_idHelper) {
280 if (level == 0) {
281 // Nothing implemented. Reserved in case we want alignable straws.
282 } else {
283
284 ExtendedAlignableTransform * extAlignableTransform = new ExtendedAlignableTransform(transform, child, frameVol);
285 if(msgLvl(MSG::VERBOSE)) {
286 msg(MSG::VERBOSE) << "TRT: Adding alignment at level " << level << " " << m_idHelper->show_to_string(id);
287 if (child && !frameVol) {
288 msg(MSG::VERBOSE) << " using global frame";
289 } else if (!child || child == frameVol ) {
290 msg(MSG::VERBOSE) << " using local frame";
291 } else {
292 msg(MSG::VERBOSE) << " using other frame";
293 }
294 msg(MSG::VERBOSE) << endmsg;
295 }
296 // Save in map
297 int index = level - FIRST_HIGHER_LEVEL; // level 0 treated separately.
298 if (index >= static_cast<int>(m_alignableTransforms.size())) m_alignableTransforms.resize(index+1);
299 m_alignableTransforms[index][id] = extAlignableTransform;
300 }
301 }
302 }
#define endmsg
MsgStream & msg() const
The standard message stream.
bool msgLvl(const MSG::Level lvl) const
Test the output level.
str index
Definition DeMoScan.py:362
const int FIRST_HIGHER_LEVEL

◆ addAlignableTransform() [2/2]

void InDetDD::TRT_DetectorManager::addAlignableTransform ( int level,
const Identifier & id,
GeoAlignableTransform * transform,
const GeoVPhysVol * child = 0,
const GeoVPhysVol * frameVol = 0 )

Add alignable transforms: GeoModel/CLHEP based.

Definition at line 242 of file TRT_DetectorManager.cxx.

247 {
248 if (m_idHelper) {
249 // Check if child and frame are actually full physical volumes.
250 // if they are non zero.
251 const GeoVFullPhysVol * childFPV = nullptr;
252 if (child) {
253 childFPV = dynamic_cast<const GeoVFullPhysVol *>(child);
254 }
255 const GeoVFullPhysVol * frameFPV = nullptr;
256 if (frameVol) {
257 frameFPV = dynamic_cast<const GeoVFullPhysVol *>(frameVol);
258 }
259 if (child && !childFPV) {
260 msg(MSG::ERROR)
261 << "Child of alignable transform is not a full physical volume"
262 << endmsg;
263 } else if (frameVol && !frameFPV) {
264 msg(MSG::ERROR)
265 << "Frame for alignable transform is not a full physical volume"
266 << endmsg;
267 } else {
268 addAlignableTransform (level, id, transform, childFPV, frameFPV);
269 }
270 }
271 }
void addAlignableTransform(int level, const Identifier &id, GeoAlignableTransform *transform, const GeoVFullPhysVol *child=0, const GeoVFullPhysVol *frameVol=0)
Add alignable transforms: GeoModel/CLHEP based.

◆ 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 }
#define ATH_MSG_INFO(x)
std::map< std::string, LevelInfo > m_keys

◆ 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 }
std::set< std::string > m_folders

◆ 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 }
std::set< std::string > m_globalFolders

◆ addKey()

void InDetDD::TRT_DetectorManager::addKey ( const std::string & key,
int level,
FrameType frame )

Definition at line 237 of file TRT_DetectorManager.cxx.

238 {
239 addChannel(key, level, frame);
240 }
void addChannel(const std::string &key, int level, FrameType frame)
Alignment access.

◆ 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 }
std::set< std::string > m_specialFolders

◆ addTreeTop()

void InDetDD::TRT_DetectorManager::addTreeTop ( const PVLink & vol)

Definition at line 84 of file TRT_DetectorManager.cxx.

84 {
85 m_volume.push_back(vol);
86 }

◆ 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 }
CondMultChanCollection< AlignableTransform > AlignableTransformContainer
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
virtual bool processSpecialAlignment(const std::string &key, InDetDD::AlignFolderType alignfolder)=0
bool processGlobalAlignmentContainer(const std::string &key, const CondAttrListCollection *obj=nullptr, GeoVAlignmentStore *alignStore=nullptr) const
virtual const AtlasDetectorID * getIdHelper() const =0
bool processAlignmentContainer(const std::string &key) const
return align folder string to use
status
Definition merge.py:16

◆ align() [2/2]

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

◆ alignmentCallback()

StatusCode InDetDD::TRT_DetectorManager::alignmentCallback ( IOVSVC_CALLBACK_ARGS )

Call back for alignment updates, DEPRECATED.

Now registered in tool.

Definition at line 420 of file TRT_DetectorManager.cxx.

421 {
422 return align(I, keys);
423 }
#define I(x, y, z)
Definition MD5.cxx:116
StatusCode align(IOVSVC_CALLBACK_ARGS)

◆ ATLAS_NOT_THREAD_SAFE()

void addKey InDetDD::TRT_DetectorManager::ATLAS_NOT_THREAD_SAFE ( const std::string & key,
int level )

◆ barrelTransformField()

const GeoXF::Function * InDetDD::TRT_DetectorManager::barrelTransformField ( size_t i) const

Definition at line 197 of file TRT_DetectorManager.cxx.

197 {
198 return m_barrelXF[i];
199 }

◆ conditions()

const TRT_Conditions * InDetDD::TRT_DetectorManager::conditions ( ) const

Conditions interface (mostly for internal use):-------------------------—.

Definition at line 486 of file TRT_DetectorManager.cxx.

487 {
488 return this;
489 }

◆ dxContainer()

const TRTCond::StrawDxContainer * InDetDD::TRT_Conditions::dxContainer ( ) const
inherited

Definition at line 14 of file TRT_Conditions.cxx.

15{
16 return m_dxContainer;
17}
const TRTCond::StrawDxContainer * m_dxContainer

◆ endcapTransformField()

const GeoXF::Function * InDetDD::TRT_DetectorManager::endcapTransformField ( size_t i) const

Definition at line 206 of file TRT_DetectorManager.cxx.

206 {
207 return m_endcapXF[i];
208 }

◆ gasType()

TRT_DetectorManager::ActiveGasType InDetDD::TRT_DetectorManager::gasType ( ) const

Definition at line 211 of file TRT_DetectorManager.cxx.

212 {
213 return m_gasType;
214 }

◆ getBarrelElement() [1/2]

TRT_BarrelElement * InDetDD::TRT_DetectorManager::getBarrelElement ( unsigned int positive,
unsigned int moduleIndex,
unsigned int phiIndex,
unsigned int strawLayerIndex )

Definition at line 108 of file TRT_DetectorManager.cxx.

112 {
113 return m_elementContainer.getBarrelDetElement(positive,moduleIndex,phiIndex,strawLayerIndex);
114 }

◆ getBarrelElement() [2/2]

const TRT_BarrelElement * InDetDD::TRT_DetectorManager::getBarrelElement ( unsigned int positive,
unsigned int moduleIndex,
unsigned int phiIndex,
unsigned int strawLayerIndex ) const

Access Barrel Elements:---------------—(Fast)-------------------------—.

Definition at line 100 of file TRT_DetectorManager.cxx.

104 {
105 return m_elementContainer.getBarrelDetElement(positive,moduleIndex,phiIndex,strawLayerIndex);
106 }

◆ getDetectorElementBegin() [1/2]

TRT_DetElementCollection::iterator InDetDD::TRT_DetectorManager::getDetectorElementBegin ( )

Definition at line 182 of file TRT_DetectorManager.cxx.

183 {
184 return m_elementContainer.getElements()->begin();
185 }

◆ getDetectorElementBegin() [2/2]

TRT_DetElementCollection::const_iterator InDetDD::TRT_DetectorManager::getDetectorElementBegin ( ) const

Definition at line 172 of file TRT_DetectorManager.cxx.

173 {
174 return m_elementContainer.getElements()->begin();
175 }

◆ getDetectorElementCollection()

const TRT_DetElementCollection * InDetDD::TRT_DetectorManager::getDetectorElementCollection ( ) const

Access to Whole Collection of Elements ---------------------------------—.

Definition at line 167 of file TRT_DetectorManager.cxx.

168 {
169 return m_elementContainer.getElements();
170 }

◆ getDetectorElementContainer()

const TRT_DetElementContainer * InDetDD::TRT_DetectorManager::getDetectorElementContainer ( ) const

Access the element container -------------------------------------------—.

Definition at line 162 of file TRT_DetectorManager.cxx.

163 {
164 return &m_elementContainer;
165 }

◆ getDetectorElementEnd() [1/2]

TRT_DetElementCollection::iterator InDetDD::TRT_DetectorManager::getDetectorElementEnd ( )

Definition at line 187 of file TRT_DetectorManager.cxx.

188 {
189 return m_elementContainer.getElements()->end();
190 }

◆ getDetectorElementEnd() [2/2]

TRT_DetElementCollection::const_iterator InDetDD::TRT_DetectorManager::getDetectorElementEnd ( ) const

Definition at line 177 of file TRT_DetectorManager.cxx.

178 {
179 return m_elementContainer.getElements()->end();
180 }

◆ getElement() [1/2]

const TRT_BaseElement * InDetDD::TRT_DetectorManager::getElement ( Identifier id) const

Access Elements Generically---------------------------------------------—.

Definition at line 145 of file TRT_DetectorManager.cxx.

146 {
147 // Make sure it is a straw_layer id
148 Identifier strawLayerId = m_idHelper->layer_id(id);
149 IdentifierHash hashId = m_idHelper->straw_layer_hash(strawLayerId);
150 const TRT_DetElementCollection* elements = m_elementContainer.getElements();
151 if (hashId>=elements->size()) return nullptr;
152 return (*elements)[hashId];
153 }

◆ getElement() [2/2]

const TRT_BaseElement * InDetDD::TRT_DetectorManager::getElement ( IdentifierHash id) const

Definition at line 155 of file TRT_DetectorManager.cxx.

156 {
157 const TRT_DetElementCollection* elements = m_elementContainer.getElements();
158 if (id>=elements->size()) return nullptr;
159 return (*elements)[id];
160 }

◆ getEndcapElement() [1/2]

TRT_EndcapElement * InDetDD::TRT_DetectorManager::getEndcapElement ( unsigned int positive,
unsigned int wheelIndex,
unsigned int strawLayerIndex,
unsigned int phiIndex )

Definition at line 124 of file TRT_DetectorManager.cxx.

128 {
129 return m_elementContainer.getEndcapDetElement(positive,wheelIndex,strawLayerIndex,phiIndex);
130 }

◆ getEndcapElement() [2/2]

const TRT_EndcapElement * InDetDD::TRT_DetectorManager::getEndcapElement ( unsigned int positive,
unsigned int wheelIndex,
unsigned int strawLayerIndex,
unsigned int phiIndex ) const

Access Endcap Elements:---------------—(Fast)--------------------------—.

Definition at line 116 of file TRT_DetectorManager.cxx.

120 {
121 return m_elementContainer.getEndcapDetElement(positive,wheelIndex,strawLayerIndex,phiIndex);
122 }

◆ getIdHelper()

const TRT_ID * InDetDD::TRT_DetectorManager::getIdHelper ( ) const
overrideprivatevirtual

Implements InDetDD::InDetDetectorManager.

Definition at line 132 of file TRT_DetectorManager.cxx.

133 {
134 return m_idHelper;
135 }

◆ 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 }
static const LevelInfo s_invalidLevel

◆ getNumerology() [1/2]

TRT_Numerology * InDetDD::TRT_DetectorManager::getNumerology ( )

Access Numerological information:---------------------------------------—.

Definition at line 43 of file TRT_DetectorManager.cxx.

43 {
44 return m_numerology;
45 }

◆ getNumerology() [2/2]

const TRT_Numerology * InDetDD::TRT_DetectorManager::getNumerology ( ) const

Definition at line 47 of file TRT_DetectorManager.cxx.

47 {
48 return m_numerology;
49 }

◆ getNumTreeTops()

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

Access Raw Geometry:----------------------------------------------------—.

Definition at line 74 of file TRT_DetectorManager.cxx.

75 {
76 return m_volume.size();
77 }

◆ getTreeTop()

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

Definition at line 79 of file TRT_DetectorManager.cxx.

80 {
81 return m_volume[i];
82 }

◆ 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::TRT_DetectorManager::identifierBelongs ( const Identifier & id) const
overridevirtual

Check identifier is for this detector.

Implements InDetDD::InDetDetectorManager.

Definition at line 451 of file TRT_DetectorManager.cxx.

452 {
453 return getIdHelper()->is_trt(id);
454 }
bool is_trt(Identifier id) const
virtual const TRT_ID * getIdHelper() const override

◆ 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 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)

◆ invalidateAll()

void InDetDD::TRT_DetectorManager::invalidateAll ( )
overridevirtual

Invalidate cache for all detector elements.

Implements InDetDD::InDetDetectorManager.

Definition at line 427 of file TRT_DetectorManager.cxx.

428 {
430 element_iter != getDetectorElementEnd();
431 ++element_iter) {
432 if (*element_iter) {
433 (*element_iter)->invalidate();
434 }
435 }
436 }
DataModel_detail::iterator< DataVector > iterator
Definition DataVector.h:842
TRT_DetElementCollection::const_iterator getDetectorElementBegin() const
TRT_DetElementCollection::const_iterator getDetectorElementEnd() const

◆ manageBarrelElement()

void InDetDD::TRT_DetectorManager::manageBarrelElement ( TRT_BarrelElement * barrel)

Definition at line 89 of file TRT_DetectorManager.cxx.

90 {
91 m_elementContainer.manageBarrelElement(barrel,m_idHelper);
92 }

◆ manageEndcapElement()

void InDetDD::TRT_DetectorManager::manageEndcapElement ( TRT_EndcapElement * endcap)

Definition at line 95 of file TRT_DetectorManager.cxx.

96 {
97 m_elementContainer.manageEndcapElement(endcap,m_idHelper);
98 }

◆ 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 163 of file AthMessaging.h.

164{
165 MsgStream* ms = m_msg_tls.get();
166 if (!ms) {
167 if (!m_initialized.test_and_set()) initMessaging();
168 ms = new MsgStream(m_imsg,m_nm);
169 m_msg_tls.reset( ms );
170 }
171
172 ms->setLevel (m_lvl);
173 return *ms;
174}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
void initMessaging() const
Initialize our message level and MessageSvc.

◆ 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 178 of file AthMessaging.h.

179{ 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_lvl <= lvl) {
154 msg() << lvl;
155 return true;
156 } else {
157 return false;
158 }
159}

◆ operator=()

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

◆ 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 }
bool empty() const noexcept
Returns true if the collection is empty.
bool processKey(const std::string &key, const AlignableTransform *transformCollection, GeoVAlignmentStore *alignStore=nullptr) const
Called by processAlignmentContainer, applies only one key on the transform Collections.

◆ 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::TRT_DetectorManager::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 492 of file TRT_DetectorManager.cxx.

494 {
495
496 bool alignmentChange = false;
497
498 ATH_MSG_INFO("Processing new global alignment containers with key " << key << " in the " << frame << " frame at level " << level);
499
500 Identifier ident=Identifier();
501 const CondAttrListCollection* atrlistcol=obj;
502 //cppcheck-suppress nullPointerRedundantCheck
503 if (!atrlistcol) {
504 ATH_MSG_INFO("Read alignment from detector store with key " << key);
505 if (StatusCode::SUCCESS!=m_detStore->retrieve(atrlistcol,key)) {
506 ATH_MSG_WARNING("Cannot find new global align Container for key "
507 << key << " - no new global alignment");
508 return alignmentChange;
509 }
510 }
511 // Avoid cppcheck warning.
512 if (!atrlistcol) {
513 return alignmentChange;
514 }
515 {
516 // loop over objects in collection
517 //cppcheck-suppress nullPointerRedundantCheck
518 for (const auto & citr : *atrlistcol) {
519
520 const coral::AttributeList& atrlist=citr.second;
521 ident = getIdHelper()->module_id(atrlist["bec"].data<int>(),
522 atrlist["layer"].data<int>(),
523 atrlist["sector"].data<int>());
524
525 // Follow same definitions as in TRT_AlignDbSvc.cxx
526 CLHEP::Hep3Vector newtranslation(atrlist["Tx"].data<float>(),atrlist["Ty"].data<float>(),atrlist["Tz"].data<float>());
527 CLHEP::HepRotation newrotation;
528 newrotation.set(atrlist["phi"].data<float>(),atrlist["theta"].data<float>(),atrlist["psi"].data<float>());
529 HepGeom::Transform3D newtransform(newrotation, newtranslation);
530
531 msg(MSG::DEBUG) << "New global DB -- channel: " << citr.first
532 << " ,bec: " << atrlist["bec"].data<int>()
533 << " ,layer: " << atrlist["layer"].data<int>()
534 << " ,sector: " << atrlist["sector"].data<int>()
535 << " ,Tx: " << atrlist["Tx"].data<float>()
536 << " ,Ty: " << atrlist["Ty"].data<float>()
537 << " ,Tz: " << atrlist["Tz"].data<float>()
538 << " ,phi: " << atrlist["phi"].data<float>()
539 << " ,theta: " << atrlist["theta"].data<float>()
540 << " ,psi: " << atrlist["psi"].data<float>() << endmsg;
541
542 // Set the new transform; Will replace existing one with updated transform
544 ident,
545 Amg::CLHEPTransformToEigen(newtransform),
546 frame,
547 alignStore);
548
549 if (!status) {
550 if (msgLvl(MSG::DEBUG)) {
551 msg(MSG::DEBUG) << "Cannot set AlignableTransform for identifier."
552 << getIdHelper()->show_to_string(ident)
553 << " at level " << level << " for new global DB " << endmsg;
554 }
555 }
556
557 alignmentChange = (alignmentChange || status);
558 }
559 }
560 return alignmentChange;
561 }
#define ATH_MSG_WARNING(x)
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
virtual bool setAlignableTransformDelta(int level, const Identifier &id, const Amg::Transform3D &delta, FrameType frame, GeoVAlignmentStore *alignStore) const override
Set alignable transforms: Amg based.
Identifier module_id(int barrel_ec, int phi_module, int layer_or_wheel) const
For an individual module phi sector.
Definition TRT_ID.h:442
Amg::Transform3D CLHEPTransformToEigen(const HepGeom::Transform3D &CLHEPtransf)
Converts a CLHEP-based HepGeom::Transform3D into an Eigen Amg::Transform3D.
@ ident
Definition HitInfo.h:77

◆ 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 }
#define ATH_MSG_VERBOSE(x)
virtual bool processGlobalAlignment(const std::string &key, int level, FrameType frame, const CondAttrListCollection *obj=nullptr, GeoVAlignmentStore *alignStore=nullptr) const
const LevelInfo & getLevel(const std::string &key) const
Retrieve level information.

◆ 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 }
std::vector< AlignTransMember >::const_iterator AlignTransMem_citr
AlignTransMem_citr end() const
AlignTransMem_citr begin() const
virtual bool identifierBelongs(const Identifier &id) const =0
Check identifier is for this detector.
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...

◆ processSpecialAlignment() [1/2]

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

Implements InDetDD::InDetDetectorManager.

Definition at line 479 of file TRT_DetectorManager.cxx.

481 {
482 return false;
483 }

◆ processSpecialAlignment() [2/2]

bool InDetDD::TRT_DetectorManager::processSpecialAlignment ( const std::string & key,
InDetDD::AlignFolderType dummy )
overridevirtual

Implements InDetDD::InDetDetectorManager.

Definition at line 457 of file TRT_DetectorManager.cxx.

458 {
459 if(msgLvl(MSG::DEBUG))
460 msg(MSG::DEBUG) << "Processing TRT fine alignment." << endmsg;
461
462 const TRTCond::StrawDxContainer* container = nullptr;
463 StatusCode sc = StatusCode::FAILURE;
464 if (m_detStore->contains<TRTCond::StrawDxContainer>(key)) {
465 sc = m_detStore->retrieve(container, key);
466 }
467
468 if (sc.isFailure()) {
469 if (msgLvl(MSG::INFO))
470 msg(MSG::INFO) << "Cannot find StrawDxContainer for key "
471 << key << " - no fine alignment " << endmsg;
472 throw std::runtime_error("Unable to apply TRT fine alignment. This is normal for simulation");
473 } else {
474 this->setDxContainer(container);
475 return true; //Elements will need to be invalidated via invalidateAll from the caller
476 }
477 }
static Double_t sc
void setDxContainer(const TRTCond::StrawDxContainer *container)
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ setAlignableTransformAnyFrameDelta()

bool InDetDD::TRT_DetectorManager::setAlignableTransformAnyFrameDelta ( ExtendedAlignableTransform * extXF,
const Amg::Transform3D & delta,
FrameType frame,
GeoVAlignmentStore * alignStore ) const

Set alignable transforms: Amg based.

Definition at line 328 of file TRT_DetectorManager.cxx.

332 {
333 //---------------------
334 // For Local:
335 //---------------------
336 // The geomodel alignable transform delta is already a local delta so we just pass it directly
337
338 //---------------------
339 // For global frame
340 //---------------------
341 // Sets the alignable transform delta when the supplied delta is in the global frame.
342
343 // If the default transform down to the alignable transform is
344 // T = A*B*C
345 // and the alignable transform is C with delta c and the delta in the global frame is g, then
346 // A*B*C*c = g*A*B*C
347 // T*c = g*T
348 // c = T.inverse() * g * T
349
350 // To get default transform up and including the alignable transform,
351 // we assume the next volume down is a fullphys volume and so its
352 // transform is the transform we want (ie T=A*B*C in the above example).
353
354 //---------------------
355 // For Other frame
356 //---------------------
357 // Sets the alignable transform delta when the supplied delta is in the frame of the
358 // volume "frameVol".
359
360 // If the default transform down to the alignable transform is
361 // T = A*B*C
362 // and the alignable transform is C with delta c and the delta g is expressed in the frame A, then
363 // A*B*C*c = A*g*B*C
364 // c = (BC).inverse * g * (BC)
365 // BC = A.inverse() * T
366 // C = T.inverse() * A * g * A.inverse() * T
367
368 // To get default transform up and including the alignable transform,
369 // we assume the next volume down is a fullphys volume and so its
370 // transform is the transform we want (ie T=A*B*C in the above example).
371 // The Transform to the frame is T = A which we get from the fullphys volume frameVol.
372
373 if (!extXF) return false;
374 if (!extXF->alignableTransform()) return false;
375
376 const GeoVFullPhysVol * child = extXF->child();
377 const GeoVFullPhysVol * frameVol = extXF->frame();
378
379 FrameType newFrame = frame;
380 // If frame is other then check if "other" is actually local or global
381 if (frame == InDetDD::other) {
382 if (child && !frameVol) {
383 // frame = 0 indicates to use global frame
384 newFrame = InDetDD::global;
385 } else if (!child || child == frameVol){
386 // if child is 0 or the they are the same volumes then its local
387 newFrame = InDetDD::local;
388 } // else its "other" already.
389 }
390
391 if (newFrame == InDetDD::global) { // Global
392 if (!child) {
393 msg(MSG::ERROR) << "global frame specified, but child == 0" << endmsg;
394 } else {
395 const GeoTrf::Transform3D & childXF = child->getDefAbsoluteTransform(alignStore);
396 extXF->alignableTransform()->setDelta(childXF.inverse() * delta * childXF, alignStore);
397 }
398
399 } else if (frame == InDetDD::local) { // Local
400 // if its a local frame then no transform necessary. We set it directly.
401 extXF->alignableTransform()->setDelta(delta, alignStore);
402
403 } else { // Other frame
404 // if child or frame is zero it will have been set to local or global above
405 if (!child) { // CID 113112
406 // shouldn't be happening, if child is null then something is terribly wrong
407 ATH_MSG_ERROR("Child can't be null if frame is 'other'");
408 return false;
409 } else {
410 const GeoTrf::Transform3D & xfChild = child->getDefAbsoluteTransform(alignStore);
411 const GeoTrf::Transform3D & xfFrame = frameVol->getDefAbsoluteTransform(alignStore);
412 extXF->alignableTransform()->setDelta(xfChild.inverse() * xfFrame * delta * xfFrame.inverse() * xfChild, alignStore);
413 }
414 }
415
416 return true;
417 }

◆ setAlignableTransformDelta()

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

Set alignable transforms: Amg based.

Implements InDetDD::InDetDetectorManager.

Definition at line 304 of file TRT_DetectorManager.cxx.

309 {
310 if (level == 0) {
311 // Nothing implemented. Reserved in case we want alignable straws
312 return false;
313 } else {
314
315 int index = level - FIRST_HIGHER_LEVEL; // level 0 treated separately.
316 if (index >= static_cast<int>(m_alignableTransforms.size())) return false;
317
318 // We retrieve it from a map.
319 AlignableTransformMap::const_iterator iter;
320 iter = m_alignableTransforms[index].find(id);
321 if (iter == m_alignableTransforms[index].end()) return false;
322
323 return setAlignableTransformAnyFrameDelta(iter->second, delta, frame, alignStore);
324
325 }
326 }
bool setAlignableTransformAnyFrameDelta(ExtendedAlignableTransform *extXF, const Amg::Transform3D &delta, FrameType frame, GeoVAlignmentStore *alignStore) const
Set alignable transforms: Amg based.

◆ setBarrelDescriptor()

void InDetDD::TRT_DetectorManager::setBarrelDescriptor ( const TRT_BarrelDescriptor * barrelDescriptor)

Set TRT_Barrel/EndcapDescriptor pointer to the internal sets to delete them in the destructor.

Definition at line 563 of file TRT_DetectorManager.cxx.

564 {
565 m_barrelDescriptors.insert(barrelDescriptor);
566 }

◆ setBarrelTransformField()

void InDetDD::TRT_DetectorManager::setBarrelTransformField ( size_t i,
const GeoXF::Function * field )

Definition at line 192 of file TRT_DetectorManager.cxx.

192 {
193 if (m_barrelXF[i]!=f) delete m_barrelXF[i];
194 m_barrelXF[i] = f;
195 }

◆ setDxContainer()

void InDetDD::TRT_Conditions::setDxContainer ( const TRTCond::StrawDxContainer * container)
protectedinherited

Definition at line 20 of file TRT_Conditions.cxx.

21{
22 m_dxContainer = container;
23}

◆ setEndcapDescriptor()

void InDetDD::TRT_DetectorManager::setEndcapDescriptor ( const TRT_EndcapDescriptor * endcapDescriptor)

Definition at line 568 of file TRT_DetectorManager.cxx.

569 {
570 m_endcapDescriptors.insert(endcapDescriptor);
571 }

◆ setEndcapTransformField()

void InDetDD::TRT_DetectorManager::setEndcapTransformField ( size_t i,
const GeoXF::Function * field )

Definition at line 201 of file TRT_DetectorManager.cxx.

201 {
202 if (m_endcapXF[i]!=f) delete m_endcapXF[i];
203 m_endcapXF[i]=f;
204 }

◆ setGasType()

void InDetDD::TRT_DetectorManager::setGasType ( const ActiveGasType & activeGasType)

Definition at line 216 of file TRT_DetectorManager.cxx.

217 {
218 m_gasType = activeGasType;
219 }

◆ setIdHelper()

void InDetDD::TRT_DetectorManager::setIdHelper ( const TRT_ID * idHelper,
bool owns = true )

Get the ID helper: -----------------------------------------------------—.

Definition at line 137 of file TRT_DetectorManager.cxx.

138 {
139 m_idHelper=idHelper;
140 m_ownsIdHelper=owns;
141 }

◆ 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 }

◆ updateAll()

void InDetDD::TRT_DetectorManager::updateAll ( ) const
overridevirtual

Update all caches.

Implements InDetDD::InDetDetectorManager.

Definition at line 438 of file TRT_DetectorManager.cxx.

439 {
441 element_iter != getDetectorElementEnd();
442 ++element_iter) {
443
444 if (*element_iter) {
445 (*element_iter)->updateAllCaches();
446 }
447 }
448 }
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838

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< AlignableTransformMap > InDetDD::TRT_DetectorManager::m_alignableTransforms
private

Definition at line 261 of file TRT_DetectorManager.h.

◆ m_alignfoldertype

AlignFolderType InDetDD::InDetDetectorManager::m_alignfoldertype
inherited

Definition at line 96 of file InDetDetectorManager.h.

◆ m_barrelDescriptors

std::set<const TRT_BarrelDescriptor*> InDetDD::TRT_DetectorManager::m_barrelDescriptors
private

Definition at line 264 of file TRT_DetectorManager.h.

◆ m_barrelXF

const GeoXF::Function* InDetDD::TRT_DetectorManager::m_barrelXF[3] {}
private

Definition at line 252 of file TRT_DetectorManager.h.

252{}; //

◆ m_detStore

StoreGateSvc* InDetDD::InDetDetectorManager::m_detStore
protectedinherited

Definition at line 99 of file InDetDetectorManager.h.

◆ m_digvers

unsigned int InDetDD::TRT_DetectorManager::m_digvers
private

Definition at line 256 of file TRT_DetectorManager.h.

◆ m_digversname

std::string InDetDD::TRT_DetectorManager::m_digversname
private

Definition at line 257 of file TRT_DetectorManager.h.

◆ m_dxContainer

const TRTCond::StrawDxContainer* InDetDD::TRT_Conditions::m_dxContainer
privateinherited

Definition at line 41 of file TRT_Conditions.h.

◆ m_elementContainer

TRT_DetElementContainer InDetDD::TRT_DetectorManager::m_elementContainer
private

Definition at line 247 of file TRT_DetectorManager.h.

◆ m_endcapDescriptors

std::set<const TRT_EndcapDescriptor*> InDetDD::TRT_DetectorManager::m_endcapDescriptors
private

Definition at line 265 of file TRT_DetectorManager.h.

◆ m_endcapXF

const GeoXF::Function* InDetDD::TRT_DetectorManager::m_endcapXF[3] {}
private

Definition at line 253 of file TRT_DetectorManager.h.

253{}; //

◆ m_folders

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

Definition at line 182 of file InDetDetectorManager.h.

◆ m_gasType

ActiveGasType InDetDD::TRT_DetectorManager::m_gasType
private

Definition at line 255 of file TRT_DetectorManager.h.

◆ m_globalFolders

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

Definition at line 184 of file InDetDetectorManager.h.

◆ m_idHelper

const TRT_ID* InDetDD::TRT_DetectorManager::m_idHelper
private

Definition at line 250 of file TRT_DetectorManager.h.

◆ m_imsg

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

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

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

138{ MSG::NIL };

◆ 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

TRT_Numerology* InDetDD::TRT_DetectorManager::m_numerology
private

Definition at line 249 of file TRT_DetectorManager.h.

◆ m_ownsIdHelper

bool InDetDD::TRT_DetectorManager::m_ownsIdHelper
private

Definition at line 251 of file TRT_DetectorManager.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_version

Version InDetDD::InDetDetectorManager::m_version
privateinherited

Definition at line 180 of file InDetDetectorManager.h.

◆ m_volume

std::vector<PVLink> InDetDD::TRT_DetectorManager::m_volume
private

Definition at line 245 of file TRT_DetectorManager.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: