 |
ATLAS Offline Software
|
Go to the documentation of this file.
30 TRTGeometryManagerTool::TRTGeometryManagerTool(
const std::string&
type,
31 const std::string&
name,
34 , m_trtDetManager(nullptr)
36 , m_alignModuleTool(
"Trk::AlignModuleTool/AlignModuleTool")
38 , m_alignParList(nullptr)
39 , m_fullAlignParList(nullptr)
41 declareInterface<IGeometryManagerTool>(
this);
130 return StatusCode::FAILURE;
138 return StatusCode::FAILURE;
146 return StatusCode::FAILURE;
160 return StatusCode::FAILURE;
162 return StatusCode::SUCCESS;
170 return StatusCode::SUCCESS;
216 case 1:
case 2:
case 3:
233 case 1:
case 2:
case 200:
case 3:
259 std::vector<Trk::AlignModule *>::const_iterator imod =
m_alignModuleList.begin();
260 std::vector<Trk::AlignModule *>::const_iterator imod_end =
m_alignModuleList.end();
261 for( ; imod!=imod_end; ++imod)
279 ATH_MSG_INFO(
"Total number of degrees of freedom: "<<nDoF);
333 ATH_MSG_INFO(
"Preparing the TRT geometry for L0: whole TRT");
373 IdentifierHash idHash =
index;
395 (*trtIdHashMap)[idHash] = trt;
404 ATH_MSG_DEBUG(
"TRT L0 module successfully added to the list");
413 ATH_MSG_INFO(
"Preparing the TRT Barrelgeometry for L1: whole barrel");
425 unsigned int maxHash = 0;
460 for (
int iSide = 0; iSide < 2; iSide++) {
473 ATH_MSG_DEBUG(
"No TRT_BarrelElement with side-layer-phi-strawLayer:" <<iSide<<
"-"<<iLayer<<
"-"<<iPhiModule<<
"-"<<iStrawLayer);
488 ATH_MSG_INFO(
"Preparing the TRT Endcap geometry for L1: 2 endcaps");
500 unsigned int maxHash = 0;
521 for (
int iSide=0;iSide<2;iSide++) {
526 trtEndCap[iSide]->setName(
"TRT EndCap C");
528 trtEndCap[iSide]->setName(
"TRT EndCap A");
530 int idSide = iSide ? 2 : -2;
553 ATH_MSG_DEBUG(
"No TRT_EndcapElement with side-wheel-strawLayer-phi:" <<iSide<<
"-"<<iWheel<<
"-"<<iStrawLayer<<
"-"<<
iPhi);
558 Amg::Transform3D localtoglobal = translation * Amg::RotationMatrix3D::Identity();
559 trtEndCap[iSide]->setGlobalFrameToAlignFrameTransform(localtoglobal.inverse());
574 ATH_MSG_INFO(
"Preparing the TRT Barrel geometry for L2: 3 layers with 32 modules each (96 modules)");
591 unsigned int maxHash = 0;
625 std::stringstream
name;
626 name<<
"TRT/Barrel/Module_-1_"<<iPhiModule<<
"_"<<iLayer;
638 std::vector<const Trk::TrkDetElementBase *> centralLayers;
642 for (
int iStrawLayer = 0; iStrawLayer < maxstrawlayer; iStrawLayer++) {
644 for (
int iSide = 0; iSide < 2; iSide++) {
666 if( iStrawLayer == maxstrawlayer/2 ) {
668 centralLayers.push_back(element);
672 ATH_MSG_DEBUG(
"No TRT_BarrelElement with side-layer-phi-strawLayer:" <<iSide<<
"-"<<iLayer<<
"-"<<iPhiModule<<
"-"<<iStrawLayer);
693 std::vector<std::vector<const Trk::TrkDetElementBase *> *> centralLayersVec;
694 centralLayersVec.push_back(¢ralLayers);
699 centralLayers.front()->transform().rotation() : centralLayers.back()->transform().rotation();
705 ATH_MSG_DEBUG(
"Prepared local to global transform : "<<std::setprecision(12)<<localToGlobal.translation()<<
" "<<localToGlobal.rotation());
707 mod->setGlobalFrameToAlignFrameTransform(localToGlobal.inverse());
723 ATH_MSG_INFO(
"Preparing the TRT Endcap geometry for L2: 2 x 40 rings");
740 unsigned int maxHash = 0;
751 for (
int iSide = 0; iSide < 2; iSide++) {
752 int idSide = iSide ? 2 : -2;
766 if(iStrawLayer%4==0) {
776 Amg::Transform3D localToGlobal = translation * Amg::RotationMatrix3D::Identity();
778 mod->setGlobalFrameToAlignFrameTransform(localToGlobal.inverse());
793 int strawLayerForRing = (iStrawLayer/4) * 4;
796 std::stringstream
name;
797 name<<
"TRT/Endcap/Module_"<<(iSide ? 2:-2)<<
"_"<<iRing;
824 ATH_MSG_DEBUG(
"No TRT_EndcapElement with side-wheel-strawLayer-phi:" <<iSide<<
"-"<<iWheel<<
"-"<<iStrawLayer<<
"-"<<
iPhi);
829 if (!
mod)
throw std::logic_error(
"No AlignmentModule");
838 Amg::Transform3D localToGlobal = translation * Amg::RotationMatrix3D::Identity();
840 mod->setGlobalFrameToAlignFrameTransform(localToGlobal.inverse());
859 ATH_MSG_INFO(
"Preparing the _OLD_ TRT Endcap geometry for L2: 2 x 14 wheels");
876 unsigned int maxHash = 0;
887 for (
int iSide = 0; iSide < 2; iSide++) {
888 int idSide = iSide ? 2 : -2;
901 std::stringstream
name;
902 name<<
"TRT/Endcap/Module_"<<idSide<<
"_"<<iWheel;
928 ATH_MSG_DEBUG(
"No TRT_EndcapElement with side-wheel-strawLayer-phi:" <<iSide<<
"-"<<iWheel<<
"-"<<iStrawLayer<<
"-"<<
iPhi);
934 Amg::Transform3D localtoglobal = translation * Amg::RotationMatrix3D::Identity();
936 mod->setGlobalFrameToAlignFrameTransform(localtoglobal.inverse());
952 ATH_MSG_INFO(
"Preparing the TRT Barrel geometry for L3");
981 ATH_MSG_INFO(
"Skipping barrel layer "<<iLayer<<
" phi sector "<<iPhiModule);
987 for (
int iSide = 0; iSide < 2; iSide++) {
989 int idSide = iSide ? 1 : -1;
993 for (
unsigned int iStraw = 0; iStraw< element->
nStraws(); iStraw++)
1001 mod->setIdentifier(moduleId);
1003 std::stringstream
name;
1004 name<<
"TRT/Barrel/Straw_"<<idSide<<
"_"<<iPhiModule<<
"_"<<iLayer<<
"_"<<iStrawLayer<<
"_"<<iStraw;
1025 ATH_MSG_DEBUG(
"Prepared local to global transform : "<<std::setprecision(12)
1026 <<localToGlobal.translation()<<
" "<<localToGlobal.rotation());
1027 ATH_MSG_DEBUG(
" rotation = (" << lgrot(2,1) <<
"," << lgrot(0,2) <<
"," << lgrot(1,0) <<
")");
1029 mod->setGlobalFrameToAlignFrameTransform(localToGlobal.inverse());
1034 ATH_MSG_DEBUG(
"Straw layer transform : "<<std::setprecision(12)
1035 <<aatr.translation()<<
" "<<aatr.rotation());
1036 ATH_MSG_DEBUG(
" rotation = (" << aarot(2,1) <<
"," << aarot(0,2) <<
"," << aarot(1,0) <<
")");
1043 ATH_MSG_DEBUG(
"No TRT_BarrelElement with side-layer-phi-strawLayer:" <<iSide<<
"-"<<iLayer<<
"-"<<iPhiModule<<
"-"<<iStrawLayer);
1057 ATH_MSG_INFO(
"Preparing the TRT Endcap geometry for L3");
1081 for (
int iSide = 0; iSide < 2; iSide++) {
1082 int idSide = iSide ? 2 : -2;
1099 ATH_MSG_INFO(
"Skipping endcap wheel "<<iWheel<<
" phi sector "<<iPhiModule);
1109 for (
unsigned int iStraw = 0; iStraw< element->
nStraws(); iStraw++) {
1116 mod->setIdentifier(moduleId);
1118 std::stringstream
name;
1119 name<<
"TRT/Endcap/Straw_"<<idSide<<
"_"<<iPhiModule<<
"_"<<iWheel<<
"_"<<iStrawLayer<<
"_"<<iStraw;
1141 ATH_MSG_DEBUG(
"Prepared local to global transform : "<<std::setprecision(12)
1142 <<localToGlobal.translation()<<
" "<<localToGlobal.rotation());
1144 ATH_MSG_DEBUG(
" rotation = (" << lgrot(2,1) <<
"," << lgrot(0,2) <<
"," << lgrot(1,0) <<
")");
1146 mod->setGlobalFrameToAlignFrameTransform(localToGlobal.inverse());
1151 ATH_MSG_DEBUG(
"Straw layer transform : "<<std::setprecision(12)
1152 <<aatr.translation()<<
" "<<aatr.rotation());
1153 ATH_MSG_DEBUG(
" rotation = (" << aarot(2,1) <<
"," << aarot(0,2) <<
"," << aarot(1,0) <<
")");
1160 ATH_MSG_DEBUG(
"No TRT_EndcapElement with endcap-wheel-strawLayer-phi:" <<iSide<<
"-"<<iWheel<<
"-"<<iStrawLayer<<
"-"<<iPhiModule);
1185 for(
unsigned int ipar=0;ipar<fullModPars->
size();++ipar) {
1220 allFullModPars->push_back(fullModPars);
1221 allActiveModPars->push_back(activeModPars);
1228 for(
unsigned int ipar=0;ipar<modPars->
size();++ipar) {
1300 for(
int i=0;
i<nsel;++
i)
1379 ATH_MSG_INFO(
"---------------------------------------------------");
1391 ATH_MSG_DEBUG(
" - local to global : "<<std::setprecision(12)<<localtoglobal.translation()<<
" "<<localtoglobal.rotation());
1394 int npars =
pars->size();
1395 ATH_MSG_DEBUG(
" - number of active transform parameters: "<<npars);
1396 for(
int j=0;j<npars;j++)
1399 ATH_MSG_INFO(
"---------------------------------------------------");
def retrieve(aClass, aKey=None)
Identifier layer_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
For an individual straw layer.
IdentifierHash straw_hash(Identifier straw_id) const
straw hash from id - optimized
std::vector< AlignModule * > AlignModuleList
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
const TRT_BarrelElement * getBarrelElement(unsigned int positive, unsigned int moduleIndex, unsigned int phiIndex, unsigned int strawLayerIndex) const
Access Barrel Elements:---------------—(Fast)-------------------------—.
unsigned int nStraws() const
Number of straws in the element.
void addDetElement(AlignModule::DetectorType detType, const TrkDetElementBase *det, const Amg::Transform3D &transform, Identifier id=Identifier())
used to add a detector element to the align module with a align frame to detector element local frame...
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
bool msgLvl(const MSG::Level lvl) const
Amg::Vector3D centerOfGravity() const
Identifier barrel_ec_id(int barrel_ec) const
For +/-barrel or +/-endcap id.
AlignModule::TransformParameters paramType() const
returns the type of parameter (i.e.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
AlignModule is a grouping of TrkDetElementBase objects, grouped according to the type of alignment,...
TRT_Numerology * getNumerology()
Access Numerological information:---------------------------------------—.
void setSigma(double sigma)
sets sigma
void setName(const std::string &name)
Set and return name of align module (i.e.
void setIdentifier(Identifier identifier)
Set and return identifier of module.
@ OWN_ELEMENTS
this data object owns its elements
::StatusCode StatusCode
StatusCode definition for legacy code.
CalibratedSpacePoint::Covariance_t inverse(const CalibratedSpacePoint::Covariance_t &mat)
Inverts the parsed matrix.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Eigen::Affine3d Transform3D
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
virtual Identifier identify() const override final
identifier of this detector element:
unsigned int getNBarrelLayers(unsigned int iMod) const
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int straw_layer(const Identifier &id) const
virtual IdentifierHash identifyHash() const override final
identifier hash
const std::string & name() const
const TRT_EndcapElement * getEndcapElement(unsigned int positive, unsigned int wheelIndex, unsigned int strawLayerIndex, unsigned int phiIndex) const
Access Endcap Elements:---------------—(Fast)--------------------------—.
Ensure that the ATLAS eigen extensions are properly loaded.
const TRT_BaseElement * getElement(Identifier id) const
Access Elements Generically---------------------------------------------—.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
size_type straw_hash_max() const
void setIdHash(IdentifierHash id)
An STL vector of pointers that by default owns its pointed-to elements.
const Amg::Transform3D & strawTransform(unsigned int straw) const
Straw transform - fast access in array, in Tracking frame: Amg.
bool is_barrel(const Identifier &id) const
Test for barrel.
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Eigen::Translation< double, 3 > Translation3D
void setSoftCut(double softCut)
sets soft-mode-cut
const T * at(size_type n) const
Access an element, as an rvalue.
size_type straw_layer_hash_max() const
void select(const xAOD::IParticle *particle, const float coneSize, const xAOD::CaloClusterContainer *clusters, std::vector< bool > &mask)
size_type size() const noexcept
Returns the number of elements in the collection.
Identifier module_id(int barrel_ec, int phi_module, int layer_or_wheel) const
For an individual module phi sector.
Identifier straw_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Three ways of getting id for a single straw:
virtual const Amg::Transform3D & transform() const override final
Element Surface: Get Transform of element in Tracking frame: Amg.