48 declareInterface<ITrkAlignDBTool>(
this);
75 return StatusCode::SUCCESS;
97 ATH_MSG_WARNING(
"Requested update of TRT Endcap constants for the old scheme.");
98 ATH_MSG_WARNING(
"This will only work with \'alignString = \"ALold\"\' option of TRT_AlignDbSvc.");
113 ATH_MSG_FATAL(
" No geometry manager available or alignment level not given. " );
118 return StatusCode::SUCCESS;
126 return StatusCode::SUCCESS;
140 case 1:
case 2:
case 3:
151 case 1:
case 2:
case 3:
225 ATH_MSG_ERROR(
" No geometry manager available or alignment level not given.");
230 ATH_MSG_INFO(
"-------------------------------------------------------");
241 std::vector<Trk::AlignModule *>::const_iterator imod =
m_alignModuleTool->getAlignModuleCollection()->begin();
242 std::vector<Trk::AlignModule *>::const_iterator imod_end =
m_alignModuleTool->getAlignModuleCollection()->end();
243 for( ; imod != imod_end; ++imod ) {
247 ATH_MSG_DEBUG(
"-------------------------------------------------------");
248 ATH_MSG_DEBUG(
"Alignment corrections for module: "<<module->name());
258 ATH_MSG_DEBUG(
"Module with ID: "<<modID<<
" is not a TRT module. Skipping.");
264 if(alignPars->
size() == 0) {
265 ATH_MSG_INFO(
"Alignment for module "<<module->name()<<
" not available.");
280 Amg::Transform3D transform = translation * Amg::RotationMatrix3D::Identity();
307 ATH_MSG_DEBUG(
"updating level "<<level<<
" constants for module "<<module->name()<<
" with ID "<<modID);
317 dbtransform = dbFrameToAlignFrame.inverse() * transform * dbFrameToAlignFrame;
329 ATH_MSG_DEBUG(
"L3 module in TRT end-cap A so we apply additional rotation about global Z (" <<
M_PI <<
")");
332 dbtransform = newtransform * transform;
336 dbtransform = transform;
352 if(
m_trtAlignDbSvc->tweakAlignTransform(modID,dbtransform,level).isFailure())
353 ATH_MSG_ERROR(
"Error setting constants for module \'"<<module->name()<<
"\'");
355 ATH_MSG_DEBUG(
"Module \'"<<module->name()<<
"\': Level "<<level<<
" constants updated.");
357 ATH_MSG_INFO(
"-------------------------------------------------------");
370 ATH_MSG_ERROR(
"wrong identifier for L0 TRT in updateL0asL1() : "<<idL0);
379 ATH_MSG_INFO(
"Splitting TRT into L1 modules and updating in the DB");
381 std::vector<Identifier> ids;
387 for(
unsigned int i=0; i<ids.size(); ++i) {
389 if(
m_trtAlignDbSvc->tweakAlignTransform(ids[i],transform,1).isFailure())
392 ATH_MSG_INFO(
"Module "<<i<<
". - id "<<ids[i]<<
": Constants updated.");
399 ATH_MSG_DEBUG(
" - translation: "<<tr.translation().x()<<
" "<<tr.translation().y()<<
" "<<tr.translation().z());
412 if(!coll || coll->size()==0)
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
An STL vector of pointers that by default owns its pointed-to elements.
abstract interface to Service to manage TRT alignment conditions
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the TRT subdetector.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
const T * at(size_type n) const
Access an element, as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.
std::vector< const TrkDetElementBase * > DetElementCollection
typedefs to contain detector element pointers and transforms
Eigen::AngleAxisd AngleAxis3D
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Eigen::Translation< double, 3 > Translation3D