|
ATLAS Offline Software
|
Go to the documentation of this file.
31 , m_trtHelper(nullptr)
32 , m_pixHelper(nullptr)
33 , m_outputAlignFile(
"OutputTRTAlignment.txt")
34 , m_outputStrawAlignFile(
"OutputTRTStrawAlignment.txt")
35 , m_oldAlignFile(
"OldTRTAlignment.txt")
36 , m_oldStrawAlignFile(
"OldTRTStrawAlignment.txt")
37 , m_writeTextFile(true)
38 , m_writeOldConstants(false)
39 , m_updateConstants(true)
40 , m_trtAlignDbSvc(
"TRT_AlignDbSvc",
name)
41 , m_alignModuleTool(
"Trk::AlignModuleTool/AlignModuleTool")
44 , m_trtAlignLevelBarrel(-1)
45 , m_trtAlignLevelEndcaps(-1)
48 declareInterface<ITrkAlignDBTool>(
this);
50 declareProperty(
"OutputTextFile", m_outputAlignFile,
"Text file to write the final alignment constants");
51 declareProperty(
"OutputStrawTextFile", m_outputStrawAlignFile,
"Text file to write the final straw alignment constants");
52 declareProperty(
"WriteTextFile", m_writeTextFile,
"Whether or not to write the final/new alignment constants to text file");
53 declareProperty(
"WriteOldConstants", m_writeOldConstants,
"Whether or not to write the initial/old alignment constants to text file");
54 declareProperty(
"OldAlignFile", m_oldAlignFile,
"Text file to write the initial/old alignment constants");
55 declareProperty(
"OldStrawAlignFile", m_oldStrawAlignFile,
"Text file to write the initial/old straw alignment constants");
56 declareProperty(
"TrtAlignDbSvc", m_trtAlignDbSvc,
"Service for interaction with the TRT alignment DB");
57 declareProperty(
"AlignModuleTool", m_alignModuleTool,
"Tool for handling of align module collections");
58 declareProperty(
"TRTGeometryManager", m_trtGeoManager,
"Tool for handling the TRT alignment geometry");
59 declareProperty(
"UpdateConstants", m_updateConstants,
"Whether or no to update the alignment constants");
61 m_logStream =
nullptr;
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(
"-------------------------------------------------------");
258 ATH_MSG_DEBUG(
"Module with ID: "<<modID<<
" is not a TRT module. Skipping.");
264 if(alignPars->
size() == 0) {
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 <<
")");
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) {
399 ATH_MSG_DEBUG(
" - translation: "<<tr.translation().x()<<
" "<<tr.translation().y()<<
" "<<tr.translation().z());
412 if(!coll || coll->size()==0)
def retrieve(aClass, aKey=None)
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
Identifier barrel_ec_id(int barrel_ec) const
For +/-barrel or +/-endcap id.
bool is_trt(Identifier id) const
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
double par() const
returns final parameter and error
::StatusCode StatusCode
StatusCode definition for legacy code.
Eigen::Affine3d Transform3D
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
std::vector< const TrkDetElementBase * > DetElementCollection
typedefs to contain detector element pointers and transforms
Eigen::Matrix< double, 3, 1 > Vector3D
An STL vector of pointers that by default owns its pointed-to elements.
bool is_barrel(const Identifier &id) const
Test for barrel.
#define ATH_MSG_WARNING(x)
Eigen::Translation< double, 3 > Translation3D
Eigen::AngleAxisd AngleAxis3D
const T * at(size_type n) const
Access an element, as an rvalue.
abstract interface to Service to manage TRT alignment conditions
size_type size() const noexcept
Returns the number of elements in the collection.