|
ATLAS Offline Software
|
Go to the documentation of this file.
14 #include "GeoModelKernel/GeoXF.h"
15 #include "GeoModelKernel/GeoAlignableTransform.h"
33 m_ownsIdHelper(false),
36 m_digversname(
"ERROR:DIGVERSNOTSET!")
69 delete barrelDescriptor;
72 delete endcapDescriptor;
104 ,
unsigned int moduleIndex
106 ,
unsigned int strawLayerIndex)
const
112 ,
unsigned int moduleIndex
114 ,
unsigned int strawLayerIndex)
120 ,
unsigned int wheelIndex
121 ,
unsigned int strawLayerIndex
128 ,
unsigned int wheelIndex
129 ,
unsigned int strawLayerIndex
154 if (hashId>=elements->size())
return nullptr;
155 return (*elements)[hashId];
161 if (
id>=elements->size())
return nullptr;
162 return (*elements)[
id];
241 ATH_MSG_ERROR(
"Cannot register callback with DetectorStore");
254 const GeoVPhysVol * child,
255 const GeoVPhysVol * frameVol)
260 const GeoVFullPhysVol * childFPV =
nullptr;
262 childFPV =
dynamic_cast<const GeoVFullPhysVol *
>(child);
264 const GeoVFullPhysVol * frameFPV =
nullptr;
266 frameFPV =
dynamic_cast<const GeoVFullPhysVol *
>(frameVol);
268 if (child && !childFPV) {
270 <<
"Child of alignable transform is not a full physical volume"
272 }
else if (frameVol && !frameFPV) {
274 <<
"Frame for alignable transform is not a full physical volume"
285 const GeoVFullPhysVol *child,
286 const GeoVFullPhysVol *frameVol)
296 if (child && !frameVol) {
298 }
else if (!child || child == frameVol ) {
317 GeoVAlignmentStore* alignStore)
const
328 AlignableTransformMap::const_iterator iter;
340 GeoVAlignmentStore* alignStore)
const
382 if (!extXF)
return false;
385 const GeoVFullPhysVol * child = extXF->
child();
386 const GeoVFullPhysVol * frameVol = extXF->
frame();
391 if (child && !frameVol) {
394 }
else if (!child || child == frameVol){
402 msg(MSG::ERROR) <<
"global frame specified, but child == 0" <<
endmsg;
421 extXF->
alignableTransform()->setDelta(xfChild.inverse() * xfFrame * delta * xfFrame.inverse() * xfChild);
443 (*element_iter)->invalidate();
455 (*element_iter)->updateAllCaches();
478 if (
sc.isFailure()) {
480 msg(MSG::INFO) <<
"Cannot find StrawDxContainer for key "
481 <<
key <<
" - no fine alignment " <<
endmsg;
482 throw std::runtime_error(
"Unable to apply TRT fine alignment. This is normal for simulation");
504 GeoVAlignmentStore* )
const {
519 bool alignmentChange =
false;
521 ATH_MSG_INFO(
"Processing new global alignment containers with key " <<
key <<
" in the " << frame <<
" frame at level " <<
level);
530 <<
key <<
" - no new global alignment");
531 return alignmentChange;
536 return alignmentChange;
541 for (
const auto & citr : *atrlistcol) {
545 atrlist[
"layer"].data<int>(),
546 atrlist[
"sector"].data<int>());
549 CLHEP::Hep3Vector newtranslation(atrlist[
"Tx"].data<float>(),atrlist[
"Ty"].data<float>(),atrlist[
"Tz"].data<float>());
550 CLHEP::HepRotation newrotation;
551 newrotation.set(atrlist[
"phi"].data<float>(),atrlist[
"theta"].data<float>(),atrlist[
"psi"].data<float>());
554 msg(
MSG::DEBUG) <<
"New global DB -- channel: " << citr.first
555 <<
" ,bec: " << atrlist[
"bec"].data<
int>()
556 <<
" ,layer: " << atrlist[
"layer"].data<int>()
557 <<
" ,sector: " << atrlist[
"sector"].data<
int>()
558 <<
" ,Tx: " << atrlist[
"Tx"].data<float>()
559 <<
" ,Ty: " << atrlist[
"Ty"].data<
float>()
560 <<
" ,Tz: " << atrlist[
"Tz"].data<float>()
561 <<
" ,phi: " << atrlist[
"phi"].data<
float>()
562 <<
" ,theta: " << atrlist[
"theta"].data<float>()
563 <<
" ,psi: " << atrlist[
"psi"].data<
float>() <<
endmsg;
574 msg(
MSG::DEBUG) <<
"Cannot set AlignableTransform for identifier."
576 <<
" at level " <<
level <<
" for new global DB " <<
endmsg;
580 alignmentChange = (alignmentChange ||
status);
583 return alignmentChange;
void manageBarrelElement(TRT_BarrelElement *barrel)
const TRT_Conditions * conditions() const
Conditions interface (mostly for internal use):-------------------------—.
Identifier layer_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
For an individual straw layer.
bool contains(const TKEY &key) const
Look up a keyed object in TDS (compare also tryRetrieve) returns false if object not available in TDS...
void addAlignableTransform(int level, const Identifier &id, GeoAlignableTransform *transform, const GeoVFullPhysVol *child=0, const GeoVFullPhysVol *frameVol=0)
Add alignable transforms: GeoModel/CLHEP based.
const TRT_DetElementCollection * getDetectorElementCollection() const
Access to Whole Collection of Elements ---------------------------------—.
void setEndcapDescriptor(const TRT_EndcapDescriptor *endcapDescriptor)
void manageEndcapElement(TRT_EndcapElement *endcap, const TRT_ID *idHelper)
const TRT_ID * m_idHelper
virtual void invalidateAll() const override
Invalidate cache for all detector elements.
Class to hold different TRT detector elements structures.
const TRT_BarrelElement * getBarrelElement(unsigned int positive, unsigned int moduleIndex, unsigned int phiIndex, unsigned int strawLayerIndex) const
Access Barrel Elements:---------------—(Fast)-------------------------—.
void setBarrelTransformField(size_t i, const GeoXF::Function *field)
const GeoXF::Function * m_barrelXF[3]
std::string m_digversname
bool processSpecialAlignment(const std::string &key, InDetDD::AlignFolderType dummy) const override
virtual bool setAlignableTransformDelta(int level, const Identifier &id, const Amg::Transform3D &delta, FrameType frame, GeoVAlignmentStore *alignStore) const override
Set alignable transforms: Amg based.
std::set< const TRT_EndcapDescriptor * > m_endcapDescriptors
#define IOVSVC_CALLBACK_ARGS_P(I, K)
short hand for IOVSvc call back argument list, to be used when access to formal arguments is needed,...
bool is_trt(Identifier id) const
const GeoXF::Function * barrelTransformField(size_t i) const
This class is a collection of AttributeLists where each one is associated with a channel number....
TRT_DetectorManager(StoreGateSvc *detStore)
virtual const TRT_ID * getIdHelper() const override
void manageBarrelElement(TRT_BarrelElement *barrel, const TRT_ID *idHelper)
class TRT_EndcapDescriptor
void addTreeTop(const PVLink &)
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
void manageEndcapElement(TRT_EndcapElement *endcap)
void setNumerology(const TRT_Numerology *mynum)
The Athena Transient Store API.
virtual PVConstLink getTreeTop(unsigned int i) const override
TRT_Numerology * getNumerology()
Access Numerological information:---------------------------------------—.
const GeoXF::Function * m_endcapXF[3]
bool msgLvl(const MSG::Level lvl) const
Test the output level.
const GeoXF::Function * endcapTransformField(size_t i) const
virtual unsigned int getNumTreeTops() const override
Access Raw Geometry:----------------------------------------------------—.
::StatusCode StatusCode
StatusCode definition for legacy code.
Eigen::Affine3d Transform3D
std::vector< AlignableTransformMap > m_alignableTransforms
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
const int FIRST_HIGHER_LEVEL
std::vector< PVLink > m_volume
TRT_Numerology * m_numerology
bool setAlignableTransformAnyFrameDelta(ExtendedAlignableTransform *extXF, const Amg::Transform3D &delta, FrameType frame, GeoVAlignmentStore *alignStore) const
Set alignable transforms: Amg based.
StoreGateSvc * m_detStore
MsgStream & msg() const
The standard message stream.
TRT_DetElementContainer m_elementContainer
StatusCode alignmentCallback(IOVSVC_CALLBACK_ARGS)
Call back for alignment updates, DEPRECATED.
TRT_DetElementCollection::const_iterator getDetectorElementBegin() const
TRT_DetElementCollection::const_iterator getDetectorElementEnd() const
const TRT_EndcapElement * getEndcapElement(unsigned int positive, unsigned int wheelIndex, unsigned int strawLayerIndex, unsigned int phiIndex) const
Access Endcap Elements:---------------—(Fast)--------------------------—.
void TRT_DetectorManager::addKey ATLAS_NOT_THREAD_SAFE(const std::string &key, int level)
virtual bool identifierBelongs(const Identifier &id) const override
Check identifier is for this detector.
const TRT_BarrelElement * getBarrelDetElement(unsigned int positive, unsigned int moduleIndex, unsigned int phiIndex, unsigned int strawLayerIndex) const
void setGasType(const ActiveGasType &)
StatusCode align(IOVSVC_CALLBACK_ARGS) const
const TRT_BaseElement * getElement(Identifier id) const
Access Elements Generically---------------------------------------------—.
const std::string & digitizationVersionName() const
an iterator over instances of a given type in StoreGateSvc. It d-casts and caches locally the pointed...
std::set< const TRT_BarrelDescriptor * > m_barrelDescriptors
void invalidate()
Invalidate cache.
void setIdHelper(const TRT_ID *idHelper, bool owns=true)
Get the ID helper: -----------------------------------------------------—.
const TRT_DetElementContainer * getDetectorElementContainer() const
Access the element container -------------------------------------------—.
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
void addKey(const std::string &key, int level, FrameType frame)
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
#define ATH_MSG_WARNING(x)
Amg::Transform3D CLHEPTransformToEigen(const HepGeom::Transform3D &CLHEPtransf)
Converts a CLHEP-based HepGeom::Transform3D into an Eigen Amg::Transform3D.
ActiveGasType gasType() const
unsigned int digitizationVersion() const
Get and set information about digitization version ---------------------—.
void setEndcapTransformField(size_t i, const GeoXF::Function *field)
virtual void updateAll() const override
Update all caches.
void setDigitizationVersion(const unsigned int &, const std::string &name)
const TRT_DetElementCollection * getElements() const
void setDxContainer(const TRTCond::StrawDxContainer *container) const
Class to hold collection of TRT detector elements.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
void addChannel(const std::string &key, int level, FrameType frame)
Alignment access.
const TRT_EndcapElement * getEndcapDetElement(unsigned int positive, unsigned int wheelIndex, unsigned int strawLayerIndex, unsigned int phiIndex) const
Class for storing/accessing trt endpoint corrections data.
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.
IdentifierHash straw_layer_hash(Identifier straw_layer_id) const
straw_layer hash from id - optimized
void setBarrelDescriptor(const TRT_BarrelDescriptor *barrelDescriptor)
Set TRT_Barrel/EndcapDescriptor pointer to the internal sets to delete them in the destructor.
Identifier module_id(int barrel_ec, int phi_module, int layer_or_wheel) const
For an individual module phi sector.