|
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");
415 ATH_MSG_INFO(
"Preparing the TRT Barrelgeometry for L1: whole barrel");
427 unsigned int maxHash = 0;
462 for (
int iSide = 0; iSide < 2; iSide++) {
475 ATH_MSG_DEBUG(
"No TRT_BarrelElement with side-layer-phi-strawLayer:" <<iSide<<
"-"<<iLayer<<
"-"<<iPhiModule<<
"-"<<iStrawLayer);
490 ATH_MSG_INFO(
"Preparing the TRT Endcap geometry for L1: 2 endcaps");
502 unsigned int maxHash = 0;
523 for (
int iSide=0;iSide<2;iSide++) {
528 trtEndCap[iSide]->setName(
"TRT EndCap C");
530 trtEndCap[iSide]->setName(
"TRT EndCap A");
532 int idSide = iSide ? 2 : -2;
555 ATH_MSG_DEBUG(
"No TRT_EndcapElement with side-wheel-strawLayer-phi:" <<iSide<<
"-"<<iWheel<<
"-"<<iStrawLayer<<
"-"<<
iPhi);
560 Amg::Transform3D localtoglobal = translation * Amg::RotationMatrix3D::Identity();
561 trtEndCap[iSide]->setGlobalFrameToAlignFrameTransform(localtoglobal.inverse());
576 ATH_MSG_INFO(
"Preparing the TRT Barrel geometry for L2: 3 layers with 32 modules each (96 modules)");
593 unsigned int maxHash = 0;
627 std::stringstream
name;
628 name<<
"TRT/Barrel/Module_-1_"<<iPhiModule<<
"_"<<iLayer;
640 std::vector<const Trk::TrkDetElementBase *> centralLayers;
644 for (
int iStrawLayer = 0; iStrawLayer < maxstrawlayer; iStrawLayer++) {
646 for (
int iSide = 0; iSide < 2; iSide++) {
668 if( iStrawLayer == maxstrawlayer/2 ) {
670 centralLayers.push_back(element);
674 ATH_MSG_DEBUG(
"No TRT_BarrelElement with side-layer-phi-strawLayer:" <<iSide<<
"-"<<iLayer<<
"-"<<iPhiModule<<
"-"<<iStrawLayer);
695 std::vector<std::vector<const Trk::TrkDetElementBase *> *> centralLayersVec;
696 centralLayersVec.push_back(¢ralLayers);
701 centralLayers.front()->transform().rotation() : centralLayers.back()->transform().rotation();
707 ATH_MSG_DEBUG(
"Prepared local to global transform : "<<std::setprecision(12)<<localToGlobal.translation()<<
" "<<localToGlobal.rotation());
709 mod->setGlobalFrameToAlignFrameTransform(localToGlobal.inverse());
726 ATH_MSG_INFO(
"Preparing the TRT Endcap geometry for L2: 2 x 40 rings");
743 unsigned int maxHash = 0;
754 for (
int iSide = 0; iSide < 2; iSide++) {
755 int idSide = iSide ? 2 : -2;
769 if(iStrawLayer%4==0) {
779 Amg::Transform3D localToGlobal = translation * Amg::RotationMatrix3D::Identity();
781 mod->setGlobalFrameToAlignFrameTransform(localToGlobal.inverse());
796 int strawLayerForRing = (iStrawLayer/4) * 4;
799 std::stringstream
name;
800 name<<
"TRT/Endcap/Module_"<<(iSide ? 2:-2)<<
"_"<<iRing;
827 ATH_MSG_DEBUG(
"No TRT_EndcapElement with side-wheel-strawLayer-phi:" <<iSide<<
"-"<<iWheel<<
"-"<<iStrawLayer<<
"-"<<
iPhi);
832 if (!
mod)
throw std::logic_error(
"No AlignmentModule");
841 Amg::Transform3D localToGlobal = translation * Amg::RotationMatrix3D::Identity();
843 mod->setGlobalFrameToAlignFrameTransform(localToGlobal.inverse());
862 ATH_MSG_INFO(
"Preparing the _OLD_ TRT Endcap geometry for L2: 2 x 14 wheels");
879 unsigned int maxHash = 0;
890 for (
int iSide = 0; iSide < 2; iSide++) {
891 int idSide = iSide ? 2 : -2;
904 std::stringstream
name;
905 name<<
"TRT/Endcap/Module_"<<idSide<<
"_"<<iWheel;
931 ATH_MSG_DEBUG(
"No TRT_EndcapElement with side-wheel-strawLayer-phi:" <<iSide<<
"-"<<iWheel<<
"-"<<iStrawLayer<<
"-"<<
iPhi);
937 Amg::Transform3D localtoglobal = translation * Amg::RotationMatrix3D::Identity();
939 mod->setGlobalFrameToAlignFrameTransform(localtoglobal.inverse());
956 ATH_MSG_INFO(
"Preparing the TRT Barrel geometry for L3");
985 ATH_MSG_INFO(
"Skipping barrel layer "<<iLayer<<
" phi sector "<<iPhiModule);
991 for (
int iSide = 0; iSide < 2; iSide++) {
993 int idSide = iSide ? 1 : -1;
997 for (
unsigned int iStraw = 0; iStraw< element->
nStraws(); iStraw++)
1005 mod->setIdentifier(moduleId);
1007 std::stringstream
name;
1008 name<<
"TRT/Barrel/Straw_"<<idSide<<
"_"<<iPhiModule<<
"_"<<iLayer<<
"_"<<iStrawLayer<<
"_"<<iStraw;
1029 ATH_MSG_DEBUG(
"Prepared local to global transform : "<<std::setprecision(12)
1030 <<localToGlobal.translation()<<
" "<<localToGlobal.rotation());
1031 ATH_MSG_DEBUG(
" rotation = (" << lgrot(2,1) <<
"," << lgrot(0,2) <<
"," << lgrot(1,0) <<
")");
1033 mod->setGlobalFrameToAlignFrameTransform(localToGlobal.inverse());
1038 ATH_MSG_DEBUG(
"Straw layer transform : "<<std::setprecision(12)
1039 <<aatr.translation()<<
" "<<aatr.rotation());
1040 ATH_MSG_DEBUG(
" rotation = (" << aarot(2,1) <<
"," << aarot(0,2) <<
"," << aarot(1,0) <<
")");
1047 ATH_MSG_DEBUG(
"No TRT_BarrelElement with side-layer-phi-strawLayer:" <<iSide<<
"-"<<iLayer<<
"-"<<iPhiModule<<
"-"<<iStrawLayer);
1062 ATH_MSG_INFO(
"Preparing the TRT Endcap geometry for L3");
1086 for (
int iSide = 0; iSide < 2; iSide++) {
1087 int idSide = iSide ? 2 : -2;
1104 ATH_MSG_INFO(
"Skipping endcap wheel "<<iWheel<<
" phi sector "<<iPhiModule);
1114 for (
unsigned int iStraw = 0; iStraw< element->
nStraws(); iStraw++) {
1121 mod->setIdentifier(moduleId);
1123 std::stringstream
name;
1124 name<<
"TRT/Endcap/Straw_"<<idSide<<
"_"<<iPhiModule<<
"_"<<iWheel<<
"_"<<iStrawLayer<<
"_"<<iStraw;
1146 ATH_MSG_DEBUG(
"Prepared local to global transform : "<<std::setprecision(12)
1147 <<localToGlobal.translation()<<
" "<<localToGlobal.rotation());
1149 ATH_MSG_DEBUG(
" rotation = (" << lgrot(2,1) <<
"," << lgrot(0,2) <<
"," << lgrot(1,0) <<
")");
1151 mod->setGlobalFrameToAlignFrameTransform(localToGlobal.inverse());
1156 ATH_MSG_DEBUG(
"Straw layer transform : "<<std::setprecision(12)
1157 <<aatr.translation()<<
" "<<aatr.rotation());
1158 ATH_MSG_DEBUG(
" rotation = (" << aarot(2,1) <<
"," << aarot(0,2) <<
"," << aarot(1,0) <<
")");
1165 ATH_MSG_DEBUG(
"No TRT_EndcapElement with endcap-wheel-strawLayer-phi:" <<iSide<<
"-"<<iWheel<<
"-"<<iStrawLayer<<
"-"<<iPhiModule);
1191 for(
unsigned int ipar=0;ipar<fullModPars->
size();++ipar) {
1226 allFullModPars->push_back(fullModPars);
1227 allActiveModPars->push_back(activeModPars);
1234 for(
unsigned int ipar=0;ipar<modPars->
size();++ipar) {
1306 for(
int i=0;
i<nsel;++
i)
1385 ATH_MSG_INFO(
"---------------------------------------------------");
1397 ATH_MSG_DEBUG(
" - local to global : "<<std::setprecision(12)<<localtoglobal.translation()<<
" "<<localtoglobal.rotation());
1400 int npars =
pars->size();
1401 ATH_MSG_DEBUG(
" - number of active transform parameters: "<<npars);
1402 for(
int j=0;j<npars;j++)
1405 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
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const TRT_BarrelElement * getBarrelElement(unsigned int positive, unsigned int moduleIndex, unsigned int phiIndex, unsigned int strawLayerIndex) const
Access Barrel Elements:---------------—(Fast)-------------------------—.
size_type straw_layer_hash_max(void) const
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
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.
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.
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.
size_type straw_hash_max(void) const
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.
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.