 |
ATLAS Offline Software
|
Go to the documentation of this file.
30 SCTGeometryManagerTool::SCTGeometryManagerTool(
const std::string&
type,
31 const std::string&
name,
34 , m_detManager(nullptr)
36 , m_alignModuleTool(
"Trk::AlignModuleTool/AlignModuleTool")
38 , m_alignParList(nullptr)
39 , m_fullAlignParList(nullptr)
41 declareInterface<IGeometryManagerTool>(
this);
127 return StatusCode::FAILURE;
135 return StatusCode::FAILURE;
143 return StatusCode::FAILURE;
157 return StatusCode::FAILURE;
159 return StatusCode::SUCCESS;
167 return StatusCode::SUCCESS;
186 ATH_MSG_INFO(
"Setting up OLD L2 alignment level for SCT");
216 case 1:
case 2:
case 27:
case 3:
233 case 1:
case 2:
case 25:
case 3:
260 std::vector<Trk::AlignModule *>::const_iterator imod =
m_alignModuleList.begin();
261 std::vector<Trk::AlignModule *>::const_iterator imod_end =
m_alignModuleList.end();
262 for( ; imod!=imod_end ; ++imod)
280 ATH_MSG_INFO(
"Total number of degrees of freedom: "<<nDoF);
338 ATH_MSG_INFO(
"Preparing the SCT geometry for L0: the whole SCT");
368 IdentifierHash idHash =
index;
388 (*sctIdHashMap)[idHash] = sct;
397 ATH_MSG_DEBUG(
"SCT L0 module successfully added to the geometry");
406 ATH_MSG_INFO(
"Preparing the SCT Barrel geometry for L1: barrel + 2 endcaps");
423 mod->setName(
"SCT Barrel");
451 for (
int is = 0; is < 2; is++) {
472 ATH_MSG_DEBUG(
"SCT Barrel successfully added to the geometry");
481 ATH_MSG_INFO(
"Preparing the SCT Endcap geometry for L1: 2 endcaps");
500 if(iEndcapIndex == 0)
501 mod->setName(
"SCT EndCap A");
503 mod->setName(
"SCT EndCap C");
523 for(
int is=0; is<2; is++) {
544 ATH_MSG_DEBUG(
"Endcap:" << iSide <<
" , CoG (" << translation.x() <<
" , " << translation.y() <<
" , " << translation.z() <<
" ) " );
545 Amg::Transform3D localtoglobal = translation * Amg::RotationMatrix3D::Identity();
547 mod->setGlobalFrameToAlignFrameTransform(localtoglobal.inverse());
552 ATH_MSG_DEBUG(
"SCT End-caps successfully added to the geometry");
560 ATH_MSG_INFO(
"Preparing the SCT Barrel geometry for L2: 4 layers");
584 std::stringstream
name;
585 name <<
"SCT/Barrel/Layer_"<<iLayer;
603 for (
int is = 0; is < 2; is++) {
630 ATH_MSG_INFO(
"Preparing the SCT Barrel geometry for L27: 176 staves (ladders)");
664 std::stringstream
name;
665 name <<
"SCT/Barrel/Layer_"<<iLayer<<
"/PhiStave_"<<
iPhi;
684 for (
int is = 0; is < 2; is++) {
713 ATH_MSG_DEBUG(
" - translation: "<<localToGlobal.translation().x()<<
" "<<localToGlobal.translation().y()<<
" "<<localToGlobal.translation().z());
715 ATH_MSG_DEBUG(
" "<<localToGlobal.rotation()(0,0)<<
" "<<localToGlobal.rotation()(0,1)<<
" "<<localToGlobal.rotation()(0,2));
716 ATH_MSG_DEBUG(
" "<<localToGlobal.rotation()(1,0)<<
" "<<localToGlobal.rotation()(1,1)<<
" "<<localToGlobal.rotation()(1,2));
717 ATH_MSG_DEBUG(
" "<<localToGlobal.rotation()(2,0)<<
" "<<localToGlobal.rotation()(2,1)<<
" "<<localToGlobal.rotation()(2,2));
719 mod->setGlobalFrameToAlignFrameTransform(localToGlobal.inverse());
731 ATH_MSG_INFO(
"Preparing the SCT Endcap geometry for L2: 2 x 9 disks");
756 std::stringstream
name;
757 if(iEndcapIndex == 0)
758 name <<
"SCT/EndcapA/Disk_" << iWheel;
760 name <<
"SCT/EndcapC/Disk_" << iWheel;
775 for(
int is=0; is<2; is++) {
795 ATH_MSG_DEBUG(
"Endcap:" << iSide <<
" , disk: " << iWheel <<
" , CoG (" << translation.x() <<
" , " << translation.y() <<
" , " << translation.z() <<
" ) " );
796 Amg::Transform3D localtoglobal = translation * Amg::RotationMatrix3D::Identity();
797 mod->setGlobalFrameToAlignFrameTransform(localtoglobal.inverse());
809 ATH_MSG_INFO(
"Preparing the SCT Endcap geometry for L25: 2 x 22 rings");
841 std::stringstream
name;
842 if(iEndcapIndex == 0)
843 name <<
"SCT/EndcapA/Disk_"<<iWheel<<
"/Ring_"<<
iEta;
845 name <<
"SCT/EndcapC/Disk_"<<iWheel<<
"/Ring_"<<
iEta;
858 for(
int is=0; is<2; is++) {
880 ATH_MSG_DEBUG(
"Endcap:" << iSide <<
" , disk: " << iWheel <<
" , CoG (" << translation.x() <<
" , " << translation.y() <<
" , " << translation.z() <<
" ) " );
881 Amg::Transform3D localtoglobal = translation * Amg::RotationMatrix3D::Identity();
882 mod->setGlobalFrameToAlignFrameTransform(localtoglobal.inverse());
893 ATH_MSG_INFO(
"Preparing the old SCT Barrel geometry for L2: 4 barrel layers + 2 x 9 endcap disks");
905 int iEndcapIndex = 1;
915 std::stringstream
name;
916 name <<
"SCT/EndcapC/Disk_" << iWheel;
931 for(
int is=0; is<2; is++) {
950 ATH_MSG_DEBUG(
"Endcap:" << iSide <<
" , disk: " << iWheel <<
" , CoG (" << translation.x() <<
" , " << translation.y() <<
" , " << translation.z() <<
" ) " );
951 Amg::Transform3D localtoglobal = translation * Amg::RotationMatrix3D::Identity();
952 mod->setGlobalFrameToAlignFrameTransform(localtoglobal.inverse());
967 std::stringstream
name;
968 name <<
"SCT/Barrel/Layer_"<<iLayer;
986 for (
int is = 0; is < 2; is++) {
1018 std::stringstream
name;
1019 name <<
"SCT/EndcapA/Disk_" << iWheel;
1034 for(
int is=0; is<2; is++) {
1053 ATH_MSG_DEBUG(
"Endcap:" << iSide <<
" , disk: " << iWheel <<
" , CoG (" << translation.x() <<
" , " << translation.y() <<
" , " << translation.z() <<
" ) " );
1055 Amg::Transform3D localtoglobal = translation * Amg::RotationMatrix3D::Identity();
1057 mod->setGlobalFrameToAlignFrameTransform(localtoglobal.inverse());
1068 ATH_MSG_INFO(
"Preparing the SCT Barrel geometry for L3: module (bi-wafer) level");
1097 std::stringstream
name;
1098 name <<
"SCT/Barrel/Layer_"<<iLayer<<
"/Phi_"<<
iPhi<<
"/Eta_"<<
iEta;
1109 for(
int is=0;is<2;is++) {
1152 ATH_MSG_INFO(
"Preparing the SCT Endcap geometry for L3: module (bi-wafer) level");
1179 std::stringstream
name;
1180 if(iEndcapIndex == 0)
1181 name<<
"SCT/EndcapA";
1183 name<<
"SCT/EndcapC";
1195 for(
int is=0; is<2; is++) {
1250 for(
unsigned int ipar=0;ipar<fullModPars->
size();++ipar) {
1286 allFullModPars->push_back(fullModPars);
1287 allActiveModPars->push_back(activeModPars);
1293 for(
unsigned int ipar=0;ipar<modPars->
size();++ipar) {
1364 for(
int i=0;
i<nsel;++
i)
1380 ATH_MSG_INFO(
"---------------------------------------------------");
1390 ATH_MSG_DEBUG(
" - local to global : "<<std::setprecision(12)<<localtoglobal.translation()<<
" "<<localtoglobal.rotation());
1393 int npars =
pars->size();
1394 ATH_MSG_DEBUG(
" - number of active transform parameters: "<<npars);
1395 for(
int j=0;j<npars;j++)
1398 ATH_MSG_INFO(
"---------------------------------------------------");
def retrieve(aClass, aKey=None)
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
const SiNumerology & numerology() const
Access Numerology.
std::vector< AlignModule * > AlignModuleList
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
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...
bool useLayer(int layer) const
Check if layer exists.
bool msgLvl(const MSG::Level lvl) const
AlignModule::TransformParameters paramType() const
returns the type of parameter (i.e.
virtual const SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements via Identifier
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
bool skipEtaZeroForLayer(int layer) const
Check if eta_module=0 exists.
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,...
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.
size_type wafer_hash_max() const
const Amg::Transform3D & moduleTransform() const
Module to global frame transform.
@ OWN_ELEMENTS
this data object owns its elements
IdentifierHash identifyHash() const
Set and return index of module, used by alignment classes to keep track of order of align module.
::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.
int endcapId(int index) const
Barrel/endcap identifier for each endcap.
bool useDisk(int disk) const
Check if disk exists.
const std::string & name() const
Ensure that the ATLAS eigen extensions are properly loaded.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
constexpr unsigned int numLayers()
void setIdHash(IdentifierHash id)
An STL vector of pointers that by default owns its pointed-to elements.
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
int beginEtaModuleForLayer(int layer) const
First eta_module number for a layer.
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.
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
bool isStereo() const
Check if it is the stereo side (useful for SCT)
setScale setgFexType iEta
size_type size() const noexcept
Returns the number of elements in the collection.
Identifier identify() const
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be sct id, otherwise answer is not accurate. Use SiliconID for gen...