ATLAS Offline Software
Loading...
Searching...
No Matches
MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/src/GeoModelMdtTest.cxx
Go to the documentation of this file.
1
2/*
3 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
4*/
5#include "GeoModelMdtTest.h"
11
12#include <fstream>
13
14using namespace ActsTrk;
15
16namespace MuonGMR4{
17
19 ATH_CHECK(m_idHelperSvc.retrieve());
20 ATH_CHECK(m_geoCtxKey.initialize());
21 ATH_CHECK(m_cablingKey.initialize(!m_cablingKey.empty()));
23 ATH_CHECK(m_tree.init(this));
25 ATH_CHECK(m_visualSvc.retrieve());
26 }
27 if (m_visualTubes) {
28 m_clientTokenLayerVis.preFixName="GeoModelMdtTest_Layer";
29 m_clientTokenLayerVis.subDirectory = "MdtLayerPlots";
30 m_clientTokenLayerVis.canvasLimit = -1;
31 m_clientTokenLayerVis.drawSqrtS = false;
33 }
35 m_clientTokenStaggeringVis.preFixName="GeoModelMdtTest_Staggering";
36 m_clientTokenStaggeringVis.subDirectory = "MdtStaggeringPlots";
37 m_clientTokenStaggeringVis.canvasLimit = -1;
38 m_clientTokenLayerVis.drawSqrtS = false;
39 m_clientTokenLayerVis.drawAtlas = false;
41 }
42 const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
43 auto translateTokenList = [this, &idHelper](const std::vector<std::string>& chNames){
44
45 std::set<Identifier> transcriptedIds{};
46 for (const std::string& token : chNames) {
47 if (token.size() != 6) {
48 ATH_MSG_WARNING("Wrong format given for "<<token<<". Expecting 6 characters");
49 continue;
50 }
52 const std::string statName = token.substr(0, 3);
53 const unsigned statEta = std::atoi(token.substr(3, 1).c_str()) * (token[4] == 'A' ? 1 : -1);
54 const unsigned statPhi = std::atoi(token.substr(5, 1).c_str());
55 bool isValid{false};
56 const Identifier eleId = idHelper.elementID(statName, statEta, statPhi, isValid);
57 if (!isValid) {
58 ATH_MSG_WARNING("Failed to deduce a station name for " << token);
59 continue;
60 }
61 transcriptedIds.insert(eleId);
62 const Identifier secMlId = idHelper.multilayerID(eleId, 2, isValid);
63 if (isValid){
64 transcriptedIds.insert(secMlId);
65 }
66 }
67 return transcriptedIds;
68 };
69
70 std::vector <std::string>& selectedSt = m_selectStat.value();
71 const std::vector <std::string>& excludedSt = m_excludeStat.value();
72 selectedSt.erase(std::remove_if(selectedSt.begin(), selectedSt.end(),
73 [&excludedSt](const std::string& token){
74 return std::ranges::find(excludedSt, token) != excludedSt.end();
75 }), selectedSt.end());
76
77 if (selectedSt.size()) {
78 m_testStations = translateTokenList(selectedSt);
79 std::stringstream sstr{};
80 for (const Identifier& id : m_testStations) {
81 sstr<<" *** "<<m_idHelperSvc->toString(id)<<std::endl;
82 }
83 ATH_MSG_INFO("Test only the following stations "<<std::endl<<sstr.str());
84 } else {
85 const std::set<Identifier> excluded = translateTokenList(excludedSt);
87 for(auto itr = idHelper.detectorElement_begin();
88 itr!= idHelper.detectorElement_end();++itr){
89 if (!excluded.count(*itr)) {
90 m_testStations.insert(*itr);
91 }
92 }
94 if (!excluded.empty()) {
95 std::stringstream excluded_report{};
96 for (const Identifier& id : excluded){
97 excluded_report << " *** " << m_idHelperSvc->toStringDetEl(id) << std::endl;
98 }
99 ATH_MSG_INFO("Test all station except the following excluded ones " << std::endl << excluded_report.str());
100 }
101 }
102 ATH_CHECK(detStore()->retrieve(m_detMgr));
103 return StatusCode::SUCCESS;
104}
105void GeoModelMdtTest::visualizeTubeLayer(const EventContext& ctx,
106 const MuonGMR4::MdtReadoutElement& reEle,
107 const unsigned layer) const {
108 if (!m_visualTubes) {
109 return;
110 }
111
112 const double h = reEle.moduleHeight();
113 const double wL = reEle.moduleWidthL();
114 const double wS = reEle.moduleWidthS();
115
116 const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
117 const Identifier detId = reEle.identify();
118 const std::string chName = std::format("{:}{:}{:}{:}M{:}T{:}",
119 m_idHelperSvc->stationNameString(detId),
120 std::abs(m_idHelperSvc->stationEta(detId)),
121 m_idHelperSvc->stationEta(detId) > 0 ? 'A' : 'C',
122 m_idHelperSvc->stationPhi(detId),
123 idHelper.multilayer(detId), layer);
124 auto canvas = m_visualSvc->prepareCanvas(ctx, m_clientTokenLayerVis, chName);
125 canvas->expandPad(-0.5*wL, -0.5*h);
126 canvas->expandPad( 0.5*wL, 0.5*h);
127 canvas->setAxisTitles("x [mm]", "y [mm]");
128 canvas->setRangeScale(1.1);
129 using namespace MuonValR4;
131 canvas->add(drawLine(Amg::Vector3D{0., -0.5*wL, 0.5*h}, Amg::Vector3D{0., 0.5*wL, 0.5*h}, kBlack, kSolid));
132 canvas->add(drawLine(Amg::Vector3D{0., -0.5*wS, -0.5*h}, Amg::Vector3D{0., 0.5*wS, -0.5*h}, kBlack, kSolid));
133 canvas->add(drawLine(Amg::Vector3D{0., -0.5*wL, 0.5*h}, Amg::Vector3D{0., -0.5*wS, -0.5*h}, kBlack, kSolid));
134 canvas->add(drawLine(Amg::Vector3D{0., 0.5*wL, 0.5*h}, Amg::Vector3D{0., 0.5*wS, -0.5*h}, kBlack, kSolid));
135 for (unsigned int tube = 1 ; tube <= reEle.numTubesInLay(); ++ tube) {
136 const IdentifierHash measHash = reEle.measurementHash(layer, tube);
137 if (!reEle.isValid(measHash)) {
138 continue;
139 }
140 canvas->add(drawBox(reEle.localTubePos(measHash), reEle.tubeLength(measHash), reEle.tubeRadius()));
141 }
142 canvas->add(drawLabel(std::format("{:}, layer: {:}", m_idHelperSvc->toStringDetEl(detId), layer), 0.2, 0.05));
143}
144
145StatusCode GeoModelMdtTest::visualizeTubeStaggering(const EventContext& ctx, const ActsTrk::GeometryContext& gctx) const {
146 const MuonMDT_CablingMap* cabling{nullptr};
147 ATH_CHECK(SG::get(cabling, m_cablingKey,ctx));
148 if (!cabling){
149 return StatusCode::SUCCESS;
150 }
151
152 std::unordered_map<Identifier, std::shared_ptr<MuonValR4::IRootVisualizationService::ICanvasObject>> canvases{};
153 const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
154 for (const Identifier& test_me : m_testStations) {
155 Identifier chamberId = idHelper.elementID(test_me);
156 ATH_MSG_DEBUG("Preparing canvases to draw the tube mapping per chamber");
157 const MdtReadoutElement* readEle = m_detMgr->getMdtReadoutElement(test_me);
158 if (!readEle) {
159 ATH_MSG_DEBUG("Detector element does not exist. ");
160 continue;
161 }
162 if(canvases.count(chamberId)) continue;
163 const std::string canName = std::format("{:}{:}{:}{:}",
164 m_idHelperSvc->stationNameString(readEle->identify()),
165 std::abs(m_idHelperSvc->stationEta(readEle->identify())),
166 m_idHelperSvc->stationEta(readEle->identify()) > 0 ? 'A' : 'C',
167 m_idHelperSvc->stationPhi(readEle->identify()));
168 canvases.insert(std::make_pair(chamberId,
169 m_visualSvc->prepareCanvas(ctx, m_clientTokenStaggeringVis, canName)));
170
171 canvases[chamberId] -> add(MuonValR4::drawLabel(m_idHelperSvc->toStringChamber(test_me),0.4,0.85,30));
172
173 }
174
175 for (const Identifier& test_me : m_testStations) {
176 Identifier chamberId = idHelper.elementID(test_me);
177 const MdtReadoutElement* readEle = m_detMgr->getMdtReadoutElement(test_me);
178 if (!readEle) {
179 ATH_MSG_DEBUG("Detector element does not exist. ");
180 continue;
181 }
182 auto canvas = canvases[chamberId];
183 const Chamber* chamber = m_detMgr->getChamber(readEle->identify());
184 const double r = readEle->tubeRadius();
185 for(uint tube = 1 ; tube <= readEle->numTubesInLay(); ++tube){
186 for(uint layer = 1 ; layer <= readEle->numLayers() ; ++ layer){
187 bool is_valid{false};
188 const Identifier tube_id = idHelper.channelID(test_me, readEle->multilayer(),
189 layer, tube, is_valid);
190 const IdentifierHash tube_hash = readEle->measurementHash(tube_id);
191 if (!readEle->isValid(tube_hash)) {
192 continue;
193 }
194
196 MdtCablingData cabling_data{};
197 cabling->convert(tube_id,cabling_data);
199 if (!cabling->getOnlineId(cabling_data, msgStream())) {
200 ATH_MSG_WARNING("Could no retrieve a valid online channel for "<<m_idHelperSvc->toString(tube_id));
201 continue;
202 return StatusCode::FAILURE;
203 }
204
205
206 const Amg::Vector3D tubePos = chamber->globalToLocalTransform(gctx) * readEle->readOutPos(gctx, tube_id);
207 const Amg::Vector3D locDir{Amg::Vector3D::UnitY()};
208
209 if(tube == 1){
210 Identifier tube2 = idHelper.channelID(test_me, readEle->multilayer(), layer, 2);
211 ATH_MSG_VERBOSE("processing tube" << m_idHelperSvc->toString(tube_id)
212 << " " << Amg::toString(tubePos) << " " << Amg::toString(chamber->globalToLocalTransform(gctx) * readEle->readOutPos(gctx, tube2)) << " " <<
213 Amg::toString(chamber->localToGlobalTransform(gctx).linear() * locDir));
214 }
215 if(tube==1 && layer ==1 && idHelper.stationPhi(tube_id)==1){
216 ATH_MSG_VERBOSE(Amg::toString(chamber->localToGlobalTransform(gctx)));
217 }
218
219 // In the chamber coordinate system z points to the next tube layer, x points along the tube and y points to the next tube in the same layer
220 // If one looks from the readout side and the readout side is at positive local x one looks in negative x direction therefore one needs to invert the sign of y coordinate, e.g. the tube staggering flips.
221 const double x{tubePos.y() * -1. * tubePos.x()/std::abs(tubePos.x()) * std::copysign(1.0, idHelper.stationEta(tube_id)) };
222 const double y{tubePos.z()};
223 canvas->expandPad(x -r , y -r);
224 canvas->expandPad(x +r , y +r);
225 if (tube == 1 && layer == 1) {
227 } else {
229 }
230 canvas->add(MuonValR4::drawLabel(std::to_string(cabling_data.channelId), x-1.5 ,y, 3, false));
231 auto label = MuonValR4::drawLabel(std::to_string(static_cast<int>(cabling_data.mezzanine_type)), x-1.5 ,y + 2, 3, false);
232 label->SetTextColor(kBlue);
233 canvas->add(std::move(label));
234 auto label2=MuonValR4::drawLabel(std::to_string(cabling_data.tdcId), x-1.5 ,y-2, 3, false);
235 label2->SetTextColor(kRed);
236 canvas->add(std::move(label2));
237 }
238 }
239
240 }
241 return StatusCode::SUCCESS;
242}
243
245 ATH_CHECK(m_tree.write());
246 return StatusCode::SUCCESS;
247}
249 const EventContext& ctx{Gaudi::Hive::currentContext()};
250
251 const ActsTrk::GeometryContext* geoContextHandle{nullptr};
252 ATH_CHECK(SG::get(geoContextHandle, m_geoCtxKey, ctx));
253
254 const ActsTrk::GeometryContext& gctx{*geoContextHandle};
255
257
258 const MdtIdHelper& id_helper{m_idHelperSvc->mdtIdHelper()};
259 for (const Identifier& test_me : m_testStations) {
260 const int ml = id_helper.multilayer(test_me);
261 const std::string detStr = m_idHelperSvc->toStringDetEl(test_me);
262 ATH_MSG_DEBUG("Test retrieval of Mdt detector element "<<detStr);
263 const MdtReadoutElement* reElement = m_detMgr->getMdtReadoutElement(test_me);
264 if (!reElement) {
265 continue;
266 }
268 if (reElement->identify() != test_me) {
269 ATH_MSG_FATAL("Expected to retrieve "<<detStr<<". But got instead "<<m_idHelperSvc->toStringDetEl(reElement->identify()));
270 return StatusCode::FAILURE;
271 }
272 ATH_CHECK(dumpToTree(ctx,gctx,reElement));
273 const Amg::Transform3D globToLocal{reElement->globalToLocalTransform(gctx)};
274 const Amg::Transform3D& localToGlob{reElement->localToGlobalTransform(gctx)};
276 const Amg::Transform3D transClosure = globToLocal * localToGlob;
277 if (!Amg::doesNotDeform(transClosure)) {
278 ATH_MSG_FATAL("Closure test failed for "<<detStr<<". Ended up with "<< Amg::toString(transClosure) );
279 return StatusCode::FAILURE;
280 }
281 for (unsigned int lay = 1 ; lay <= reElement->numLayers() ; ++lay ) {
282 visualizeTubeLayer(ctx, *reElement, lay);
283 for (unsigned int tube = 1; tube <=reElement->numTubesInLay(); ++tube ){
284 const Identifier tube_id = id_helper.channelID(test_me,ml,lay,tube);
286 const IdentifierHash measHash = reElement->measurementHash(tube_id);
287 const Identifier cnv_tube_id = reElement->measurementId(measHash);
288 if (tube_id != cnv_tube_id) {
289 ATH_MSG_FATAL("Failed to convert "<<m_idHelperSvc->toString(tube_id)<<" back and forth "<<m_idHelperSvc->toString(cnv_tube_id));
290 return StatusCode::FAILURE;
291 }
292 }
293 }
294 }
296 return StatusCode::SUCCESS;
297}
299 if (m_swapRead.empty()) return;
300 std::ofstream swapReadXML{m_swapRead};
301 if (!swapReadXML.good()) {
302 ATH_MSG_ERROR("Failed to create "<<m_swapRead);
303 return;
304 }
305 std::set<Identifier> chamberIDs{};
306 const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
307 swapReadXML<<"<Table name=\"MdtTubeROSides\">"<<std::endl;
308 unsigned int counter{1};
310 itr != idHelper.detectorElement_end();
311 ++itr){
312 const Identifier swap{*itr};
313 const MdtReadoutElement* readoutEle = m_detMgr->getMdtReadoutElement(swap);
314 if(!readoutEle) continue;
315 if (!chamberIDs.insert(idHelper.elementID(swap)).second) continue;
316 const int side = readoutEle->getParameters().readoutSide;
317 swapReadXML<<" <Row ";
318 swapReadXML<<"MDTTUBEROSIDES_DATA_ID=\""<<counter<<"\" ";
319 swapReadXML<<"stationName=\""<<m_idHelperSvc->stationNameString(swap)<<"\" ";
320 swapReadXML<<"stationEta=\""<<m_idHelperSvc->stationEta(swap)<<"\" ";
321 swapReadXML<<"stationPhi=\""<<m_idHelperSvc->stationPhi(swap)<<"\" ";
322 swapReadXML<<"side=\""<<side<<"\" ";
323 swapReadXML<<"/>"<<std::endl;
324 ++counter;
325 }
326 swapReadXML<<"</Table>"<<std::endl;
327
328}
329StatusCode GeoModelMdtTest::dumpToTree(const EventContext& ctx,
330 const ActsTrk::GeometryContext& gctx,
331 const MdtReadoutElement* readoutEle) {
332
333
334 m_stIndex = readoutEle->stationName();
335 m_stEta = readoutEle->stationEta();
336 m_stPhi = readoutEle->stationPhi();
337 m_stML = readoutEle->multilayer();
338 m_chamberDesign = readoutEle->chamberDesign();
339
340 m_numLayers = readoutEle->numLayers();
341 m_numTubes = readoutEle->numTubesInLay();
342
343 m_tubeRad = readoutEle->innerTubeRadius();
344 m_tubePitch = readoutEle->tubePitch();
345
347 const Amg::Transform3D& transform {readoutEle->localToGlobalTransform(gctx)};
348 m_readoutTransform = transform;
349 m_alignableNode = readoutEle->alignableTransform()->getDefTransform();
350
351 const MuonMDT_CablingMap* cabling{nullptr};
352 ATH_CHECK(SG::get(cabling, m_cablingKey, ctx));
354 for (unsigned int lay = 1; lay <= readoutEle->numLayers(); ++lay) {
355 for (unsigned int tube = 1; tube <= readoutEle->numTubesInLay(); ++tube) {
356 const IdentifierHash measHash{readoutEle->measurementHash(lay,tube)};
357 if (!readoutEle->isValid(measHash)) continue;
358 const Amg::Transform3D& tubeTransform{readoutEle->localToGlobalTransform(gctx,measHash)};
359 m_tubeLay.push_back(lay);
360 m_tubeNum.push_back(tube);
361 m_tubeTransform.push_back(tubeTransform);
362 m_tubePosInCh.push_back(readoutEle->msSector()->globalToLocalTransform(gctx) *
363 readoutEle->center(gctx, measHash));
364 m_roPos.push_back(readoutEle->readOutPos(gctx, measHash));
365 m_tubeLength.push_back(readoutEle->tubeLength(measHash));
366 m_activeTubeLength.push_back(readoutEle->activeTubeLength(measHash));
367 m_wireLength.push_back(readoutEle->wireLength(measHash));
368 if (cabling) {
369 MdtCablingData translation{};
370 if (!cabling->convert(readoutEle->measurementId(measHash), translation) ||
371 !cabling->getOnlineId(translation, msgStream())){
372 ATH_MSG_FATAL("Cabling translation failed");
373 return StatusCode::FAILURE;
374 }
375 m_cablingCSM.push_back(translation.csm);
376 m_cablingMROD.push_back(translation.mrod);
377 m_cablingTdcId.push_back(translation.tdcId);
378 m_cablingTdcCh.push_back(translation.channelId);
379 }
380 }
381 }
382
383 return m_tree.fill(ctx) ? StatusCode::SUCCESS : StatusCode::FAILURE;
384}
385
386}
387
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition AtlasPID.h:878
void swap(DataVector< T > &a, DataVector< T > &b)
See DataVector<T, BASE>::swap().
unsigned int uint
void drawLine(std::ostream &os)
Definition PrintMC.cxx:16
#define y
#define x
const ServiceHandle< StoreGateSvc > & detStore() const
This is a "hash" representation of an Identifier.
Identifier multilayerID(const Identifier &channeldID) const
int multilayer(const Identifier &id) const
Access to components of the ID.
Identifier elementID(int stationName, int stationEta, int stationPhi) const
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int tubeLayer, int tube) const
Chamber represent the volume enclosing a muon station.
Definition Chamber.h:28
Gaudi::Property< std::vector< std::string > > m_selectStat
String should be formated like <stationName><stationEta><A/C><stationPhi>
StatusCode visualizeTubeStaggering(const EventContext &ctx, const ActsTrk::GeometryContext &gctx) const
Visualize the tube staggering on a canvas.
Gaudi::Property< bool > m_visualStaggering
@briefGlag toggeling whether the tube staggering shall be visualized
MuonVal::ThreeVectorBranch m_tubePosInCh
Position of the tube in the sector frame.
MuonVal::VectorBranch< unsigned short > & m_tubeLay
Readout each tube specifically.
MuonVal::ThreeVectorBranch m_roPos
Position of the readout.
MuonVal::CoordTransformBranch m_readoutTransform
Transformation of the readout element (Translation, ColX, ColY, ColZ)
StatusCode dumpToTree(const EventContext &ctx, const ActsTrk::GeometryContext &gctx, const MdtReadoutElement *readoutEle)
MuonValR4::IRootVisualizationService::ClientToken m_clientTokenLayerVis
Token to be presented to the visualization service.
void visualizeTubeLayer(const EventContext &ctx, const MuonGMR4::MdtReadoutElement &reEle, const unsigned layer) const
Visualize the tube layer on a Canvas.
MuonVal::CoordSystemsBranch m_tubeTransform
Transformation to each tube.
std::set< Identifier > m_testStations
Set of stations to be tested.
void dumpReadoutSideXML() const
Create a xml indicating on which side of the chamber is the tube-readout card.
MuonVal::ScalarBranch< unsigned short > & m_numTubes
Number of tubes per layer.
MuonVal::VectorBranch< uint8_t > & m_cablingCSM
Cabling information.
MuonVal::ScalarBranch< unsigned short > & m_stIndex
Identifier of the readout element.
Gaudi::Property< bool > m_visualTubes
Flag toggling whether the tubes shall be printed.
ServiceHandle< MuonValR4::IRootVisualizationService > m_visualSvc
Service handle of the visualization service.
MuonValR4::IRootVisualizationService::ClientToken m_clientTokenStaggeringVis
MuonVal::ScalarBranch< unsigned short > & m_numLayers
Number of tubes per layer.
Readout element to describe the Monitored Drift Tube (Mdt) chambers Mdt chambers usually comrpise out...
double moduleWidthL() const
Returns the length of the top edge of the chamber (top width)
Amg::Vector3D localTubePos(const IdentifierHash &hash) const
Returns the tube position in the chamber coordinate frame (Not applying the B-line corrections)
unsigned numLayers() const
Returns how many tube layers are inside the multi layer [1;4].
double tubeRadius() const
Adds the thickness of the tube wall onto the radius.
bool isValid(const IdentifierHash &measHash) const
Checks whether the passed meaurement hash corresponds to a valid tube described by the readout elemen...
Amg::Vector3D readOutPos(const ActsTrk::GeometryContext &ctx, const Identifier &measId) const
Returns the endpoint of the tube where the readout card is mounted in the ATLAS coordinate frame.
const parameterBook & getParameters() const
Get a const reference to the parameter book.
double moduleHeight() const
Returns the height of the chamber (Distance bottom - topWidth)
double innerTubeRadius() const
Returns the inner tube radius.
double moduleWidthS() const
Returns the length of the bottom edge of the chamber (short width)
unsigned numTubesInLay() const
Returns the number of tubes in a layer.
static IdentifierHash measurementHash(unsigned layerNumber, unsigned tubeNumber)
Constructs a Measurement hash from layer && tube number.
Identifier measurementId(const IdentifierHash &measHash) const override final
Back conversion of the measurement hash towards a full identifier Tube & layer number are extracted f...
double tubePitch() const
Returns the pitch between 2 tubes in a layer.
unsigned multilayer() const
Returns the multi layer of the readout element [1;\2].
const Amg::Transform3D & localToGlobalTransform(const ActsTrk::GeometryContext &ctx) const
Returns the transformation from the local coordinate system of the readout element into the global AT...
int stationEta() const
Returns the stationEta (positive A site, negative C site)
Amg::Transform3D globalToLocalTransform(const ActsTrk::GeometryContext &ctx) const
Returns the transformation from the global ATLAS coordinate system into the local coordinate system o...
const SpectrometerSector * msSector() const
Returns the pointer to the envelope volume enclosing all chambers in the sector.
Amg::Vector3D center(const ActsTrk::GeometryContext &ctx) const
Returns the geometrical center point of the readout element.
const std::string & chamberDesign() const
The chamber design refers to the construction parameters of a readout element.
Identifier identify() const override final
Return the ATLAS identifier.
int stationName() const
Returns the stationName (BIS, BOS, etc) encoded into the integer.
int stationPhi() const
Returns the stationPhi (1-8) -> sector (2*phi - (isSmall))
const GeoAlignableTransform * alignableTransform() const
Return the alignable transform node of the readout element.
Amg::Transform3D globalToLocalTransform(const ActsTrk::GeometryContext &gctx) const
Returns the global -> local transformation from the ATLAS global.
std::vector< Identifier >::const_iterator const_id_iterator
int stationEta(const Identifier &id) const
const_id_iterator detectorElement_begin() const
Iterators over full set of ids.
int stationPhi(const Identifier &id) const
const_id_iterator detectorElement_end() const
bool add(const std::string &hname, TKey *tobj)
Definition fastadd.cxx:55
int r
Definition globals.cxx:22
std::string label(const std::string &format, int i)
Definition label.h:19
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
bool doesNotDeform(const Amg::Transform3D &trans)
Checks whether the linear part of the transformation rotates or stetches any of the basis vectors.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a...
constexpr int hollowFilling
Filling codes for hollow / fullFilling / hatched filling.
std::unique_ptr< TEllipse > drawDriftCircle(const Amg::Vector3D &center, const double radius, const int color=kViolet, const int fillStyle=hollowFilling)
Create a TEllipse for drawing a drift circle.
std::unique_ptr< TLatex > drawLabel(const std::string &text, const double xPos, const double yPos, const unsigned int fontSize=18, const bool useNDC=true)
Create a TLatex label,.
constexpr int fullFilling
std::unique_ptr< TBox > drawBox(const Amg::Vector3D &boxCenter, const double boxWidth, const double boxHeight, const int color=kGreen+2, const int fillStyle=hollowFilling, const int view=objViewEta)
Creates a box for drawing, e.g strip measurements.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
DataModel_detail::iterator< DVL > remove_if(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, Predicate pred)
Specialization of remove_if for DataVector/List.
uint8_t tdcId
Mezzanine type.
uint8_t channelId
Identifier of the corresponding tdc.
uint8_t & csm
MROD number.
double readoutSide
Is the readout chip at positive or negative Z in the tube coordinate frame.