ATLAS Offline Software
Loading...
Searching...
No Matches
TRTGeometryManagerTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef INDETALIGNGEOMTOOLS_TRTGEOMETRYMANAGERTOOL_H
6#define INDETALIGNGEOMTOOLS_TRTGEOMETRYMANAGERTOOL_H
7
9
11
14
16#include "Gaudi/Property.h"
17
27
28namespace InDetDD
29{
30 class TRT_DetectorManager;
31}
32
33class TRT_ID;
34
35namespace Trk
36{
37 class AlignPar;
38 class AlignModule;
39}
40
41namespace InDet
42{
43 class TRTGeometryManagerTool : public extends<AthAlgTool, Trk::IGeometryManagerTool>
44 {
45 public:
46 using base_class::base_class;
48
49 StatusCode initialize();
50 StatusCode finalize();
51
56 int ReadGeometry(int solveLevel);
57
58 // the following two methods need to be overloaded but we don't need them (for the moment)
60 void StoreModPositions(std::string) {};
61
63 void buildGeometry();
64
68
70 bool checkAlignLevel();
71
74
77
78 void setAlignLevel(int level);
79
80 private:
81
84 void buildL0();
85
88 void buildL1Barrel();
89
92 void buildL1Endcaps();
93
96 void buildL2Barrel();
97
100 void buildL2Endcaps();
101
104 void buildL2EndcapsOLD();
105
108 void buildL3Barrel();
109
112 void buildL3Endcap();
113
116
119
121 bool moduleSelected(unsigned long long modId);
122
124 bool moduleSelectedBarrel(unsigned int iLayer, unsigned int iPhi);
125
127 bool moduleSelectedEndcap(unsigned int iwheel, unsigned int iphi);
128
130 void dumpGeometry();
131
133
134 const TRT_ID * m_idHelper{nullptr};
135
136 PublicToolHandle<Trk::IAlignModuleTool> m_alignModuleTool{this, "AlignModuleTool", "Trk::AlignModuleTool/AlignModuleTool"};
137
140
141 std::vector<Trk::AlignModuleList*> m_idHashToAlignModuleMaps{std::vector<Trk::AlignModuleList *>(Trk::AlignModule::NDetectorTypes, nullptr)};
142
145
146 Gaudi::Property<bool> m_alignBarrel{this, "AlignBarrel", true};
147 Gaudi::Property<bool> m_alignEndcaps{this, "AlignEndcaps", true};
148
149 Gaudi::Property<bool> m_alignBarrelX{this, "AlignBarrelX", true};
150 Gaudi::Property<bool> m_alignBarrelY{this, "AlignBarrelY", true};
151 Gaudi::Property<bool> m_alignBarrelZ{this, "AlignBarrelZ", false};
152 Gaudi::Property<bool> m_alignBarrelRotX{this, "AlignBarrelRotX", true};
153 Gaudi::Property<bool> m_alignBarrelRotY{this, "AlignBarrelRotY", true};
154 Gaudi::Property<bool> m_alignBarrelRotZ{this, "AlignBarrelRotZ", true};
155
156 Gaudi::Property<bool> m_alignEndcapX{this, "AlignEndcapX", true};
157 Gaudi::Property<bool> m_alignEndcapY{this, "AlignEndcapY", true};
158 Gaudi::Property<bool> m_alignEndcapZ{this, "AlignEndcapZ", true};
159 Gaudi::Property<bool> m_alignEndcapRotX{this, "AlignEndcapRotX", true};
160 Gaudi::Property<bool> m_alignEndcapRotY{this, "AlignEndcapRotY", true};
161 Gaudi::Property<bool> m_alignEndcapRotZ{this, "AlignEndcapRotZ", true};
162
163 Gaudi::Property<double> m_sigmaBarrelX{this, "SetSigmaBarrelX", 1.};
164 Gaudi::Property<double> m_sigmaBarrelY{this, "SetSigmaBarrelY", 1.};
165 Gaudi::Property<double> m_sigmaBarrelZ{this, "SetSigmaBarrelZ", 1.};
166 Gaudi::Property<double> m_sigmaBarrelRotX{this, "SetSigmaBarrelRotX", 0.001};
167 Gaudi::Property<double> m_sigmaBarrelRotY{this, "SetSigmaBarrelRotY", 0.001};
168 Gaudi::Property<double> m_sigmaBarrelRotZ{this, "SetSigmaBarrelRotZ", 0.001};
169
170 Gaudi::Property<double> m_sigmaEndcapX{this, "SetSigmaEndcapX", 1.};
171 Gaudi::Property<double> m_sigmaEndcapY{this, "SetSigmaEndcapY", 1.};
172 Gaudi::Property<double> m_sigmaEndcapZ{this, "SetSigmaEndcapZ", 1.};
173 Gaudi::Property<double> m_sigmaEndcapRotX{this, "SetSigmaEndcapRotX", 0.001};
174 Gaudi::Property<double> m_sigmaEndcapRotY{this, "SetSigmaEndcapRotY", 0.001};
175 Gaudi::Property<double> m_sigmaEndcapRotZ{this, "SetSigmaEndcapRotZ", 0.001};
176
177 Gaudi::Property<double> m_softcutBarrelX{this, "SetSoftCutBarrelX", 1.};
178 Gaudi::Property<double> m_softcutBarrelY{this, "SetSoftCutBarrelY", 1.};
179 Gaudi::Property<double> m_softcutBarrelZ{this, "SetSoftCutBarrelZ", 1.};
180 Gaudi::Property<double> m_softcutBarrelRotX{this, "SetSoftCutBarrelRotX", 1.};
181 Gaudi::Property<double> m_softcutBarrelRotY{this, "SetSoftCutBarrelRotY", 1.};
182 Gaudi::Property<double> m_softcutBarrelRotZ{this, "SetSoftCutBarrelRotZ", 1.};
183
184 Gaudi::Property<double> m_softcutEndcapX{this, "SetSoftCutEndcapX", 1.};
185 Gaudi::Property<double> m_softcutEndcapY{this, "SetSoftCutEndcapY", 1.};
186 Gaudi::Property<double> m_softcutEndcapZ{this, "SetSoftCutEndcapZ", 1.};
187 Gaudi::Property<double> m_softcutEndcapRotX{this, "SetSoftCutEndcapRotX", 1.};
188 Gaudi::Property<double> m_softcutEndcapRotY{this, "SetSoftCutEndcapRotY", 1.};
189 Gaudi::Property<double> m_softcutEndcapRotZ{this, "SetSoftCutEndcapRotZ", 1.};
190
191 Gaudi::Property<std::vector<int>> m_barrelPhiSectors{this, "AlignBarrelPhiSectors", {}};
192 Gaudi::Property<std::vector<int>> m_barrelLayers{this, "AlignBarrelLayers", {}};
193
194 Gaudi::Property<int> m_endcap{this, "AlignSingleEndcap", 0};
195 Gaudi::Property<std::vector<int>> m_endcapPhiSectors{this, "AlignEndcapPhiSectors", {}};
196 Gaudi::Property<std::vector<int>> m_endcapWheels{this, "AlignEndcapWheels", {}};
197
198 Gaudi::Property<int> m_alignLevelProp{this, "AlignmentLevel", 1};
199 Gaudi::Property<int> m_alignLevelBarrelProp{this, "AlignmentLevelBarrel", -1};
200 Gaudi::Property<int> m_alignLevelEndcapsProp{this, "AlignmentLevelEndcaps", -1};
201 Gaudi::Property<bool> m_doModuleSelection{this, "doModuleSelection", false};
202 Gaudi::Property<std::vector<unsigned long long>> m_moduleSelection{this, "ModuleSelection", {}};
203
204 Gaudi::Property<bool> m_dumpGeometry{this, "DumpGeometry", true};
205 }; // end class
206
207} // end namespace
208
209#endif // INDETALIGNGEOMTOOLS_TRTGEOMETRYMANAGERTOOL_H
An STL vector of pointers that by default owns its pointed-to elements.
AlignModule is a grouping of TrkDetElementBase objects, grouped according to the type of alignment,...
AlignPar contains all the information related to an alignment parameter of a particular align module ...
Derived DataVector<T>.
Definition DataVector.h:818
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
Gaudi::Property< bool > m_alignEndcaps
Gaudi::Property< bool > m_dumpGeometry
Gaudi::Property< double > m_sigmaBarrelY
Gaudi::Property< bool > m_doModuleSelection
Gaudi::Property< double > m_softcutBarrelY
void buildL2Endcaps()
builds geometry for L2 TRT Endcapalignment Creates 80 modules - 40 rings per endcap
bool moduleSelected(Trk::AlignModule *mod)
check wheather module is selected for module pointer
Gaudi::Property< double > m_softcutBarrelZ
Gaudi::Property< bool > m_alignEndcapZ
Gaudi::Property< double > m_sigmaEndcapY
Gaudi::Property< double > m_softcutEndcapRotX
Gaudi::Property< bool > m_alignBarrel
Gaudi::Property< double > m_sigmaBarrelX
void setSigmas(Trk::AlignModule *mod, DataVector< Trk::AlignPar > *modPars)
sets sigmas for modules
void buildL2EndcapsOLD()
builds geometry for L2 TRT Endcapalignment Creates 28 modules - 14 wheels per endcap
PublicToolHandle< Trk::IAlignModuleTool > m_alignModuleTool
pointer to AlignModuleTool
bool checkAlignLevelEndcaps()
check whether the Endcap alignment level is correct
std::vector< Trk::AlignModuleList * > m_idHashToAlignModuleMaps
Gaudi::Property< double > m_softcutEndcapZ
Gaudi::Property< bool > m_alignBarrelY
Gaudi::Property< bool > m_alignBarrelZ
void dumpGeometry()
print basic geometry info to screen
Gaudi::Property< bool > m_alignEndcapRotY
void buildL0()
builds geometry for L1 TRT alignment Creates 1 module - the whole TRT
Gaudi::Property< double > m_sigmaBarrelRotX
Gaudi::Property< std::vector< int > > m_endcapWheels
list of endcap wheels to align (if empty, align everything)
Gaudi::Property< bool > m_alignEndcapRotZ
Gaudi::Property< int > m_alignLevelProp
property, copied to m_alignLevel in initialize()
Gaudi::Property< std::vector< int > > m_barrelLayers
list of barrel layers to align (if empty, align everything)
Gaudi::Property< int > m_alignLevelEndcapsProp
property, copied to m_alignLevelEndcaps in initialize()
Gaudi::Property< double > m_softcutEndcapRotZ
Trk::AlignModuleList m_idHashToAlignModuleMap
const InDetDD::TRT_DetectorManager * m_trtDetManager
pointer to TRT detector manager
Gaudi::Property< bool > m_alignBarrelRotY
Gaudi::Property< double > m_sigmaEndcapX
bool moduleSelectedEndcap(unsigned int iwheel, unsigned int iphi)
check wheather we are aligning the different endcaps and sectors
Gaudi::Property< std::vector< int > > m_endcapPhiSectors
list of endcap phi sectors to align (if empty, align everything)
Gaudi::Property< double > m_sigmaEndcapRotY
Gaudi::Property< bool > m_alignEndcapY
Gaudi::Property< double > m_sigmaBarrelZ
void buildGeometry()
builds geometry for TRT alignment
DataVector< DataVector< Trk::AlignPar > > * m_fullAlignParList
Gaudi::Property< double > m_softcutBarrelRotY
void buildL3Barrel()
builds geometry for L3 TRT Barrel alignment Creates many modules - one module per straw
Gaudi::Property< bool > m_alignEndcapX
Gaudi::Property< bool > m_alignBarrelRotZ
Gaudi::Property< double > m_sigmaEndcapRotZ
Gaudi::Property< double > m_sigmaEndcapRotX
Gaudi::Property< bool > m_alignBarrelX
bool moduleSelectedBarrel(unsigned int iLayer, unsigned int iPhi)
check wheather barrel module is selected by layer and phi
Gaudi::Property< double > m_softcutEndcapY
Gaudi::Property< std::vector< int > > m_barrelPhiSectors
list of barrel phi sectors to align (if empty, align everything)
void buildL1Endcaps()
builds geometry for L1 TRT Endcap alignment Creates 2 modules, one for each endcap
Gaudi::Property< double > m_sigmaBarrelRotY
Gaudi::Property< bool > m_alignEndcapRotX
Gaudi::Property< double > m_sigmaEndcapZ
Gaudi::Property< double > m_sigmaBarrelRotZ
void buildL1Barrel()
builds geometry for L1 TRT Barrel alignment Creates single module for barrel
Gaudi::Property< double > m_softcutBarrelRotZ
Gaudi::Property< double > m_softcutEndcapX
void buildL3Endcap()
builds geometry for L3 TRT Endcap alignment Creates many modules - one module per straw
Gaudi::Property< double > m_softcutBarrelX
void buildL2Barrel()
builds geometry for L2 TRT Barrel alignment Creates 96 modules - 3 layers with 32 modules per layer
Gaudi::Property< int > m_endcap
endcap_id of the endcap to align (-2 or 2 for endcap A or C, 0 for both)
Gaudi::Property< std::vector< unsigned long long > > m_moduleSelection
int ReadGeometry(int solveLevel)
read the geometry Method is called from the main AlignAlg to build the geometry based on the requeste...
DataVector< DataVector< Trk::AlignPar > > * m_alignParList
Gaudi::Property< double > m_softcutBarrelRotX
void addModuleParameters(Trk::AlignModule *module, DataVector< DataVector< Trk::AlignPar > > *allFullModPars, DataVector< DataVector< Trk::AlignPar > > *allActiveModPars)
adds alignment parameters for the module checks for active parameters and calls setSigmas()
Gaudi::Property< double > m_softcutEndcapRotY
Gaudi::Property< int > m_alignLevelBarrelProp
property, copied to m_alignLevelBarrel in initialize()
bool checkAlignLevel()
check whether the alignment level is correct
Gaudi::Property< bool > m_alignBarrelRotX
bool checkAlignLevelBarrel()
check whether the Barrel alignment level is correct
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:84
Message Stream Member.
Primary Vertex Finder.
Ensure that the ATLAS eigen extensions are properly loaded.
std::vector< AlignModule * > AlignModuleList