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-2025 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;
32 }
34 m_clientTokenStaggeringVis.preFixName="GeoModelMdtTest_Staggering";
35 m_clientTokenStaggeringVis.subDirectory = "MdtStaggeringPlots";
36 m_clientTokenStaggeringVis.canvasLimit = -1;
38 }
39 const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
40 auto translateTokenList = [this, &idHelper](const std::vector<std::string>& chNames){
41
42 std::set<Identifier> transcriptedIds{};
43 for (const std::string& token : chNames) {
44 if (token.size() != 6) {
45 ATH_MSG_WARNING("Wrong format given for "<<token<<". Expecting 6 characters");
46 continue;
47 }
49 const std::string statName = token.substr(0, 3);
50 const unsigned statEta = std::atoi(token.substr(3, 1).c_str()) * (token[4] == 'A' ? 1 : -1);
51 const unsigned statPhi = std::atoi(token.substr(5, 1).c_str());
52 bool isValid{false};
53 const Identifier eleId = idHelper.elementID(statName, statEta, statPhi, isValid);
54 if (!isValid) {
55 ATH_MSG_WARNING("Failed to deduce a station name for " << token);
56 continue;
57 }
58 transcriptedIds.insert(eleId);
59 const Identifier secMlId = idHelper.multilayerID(eleId, 2, isValid);
60 if (isValid){
61 transcriptedIds.insert(secMlId);
62 }
63 }
64 return transcriptedIds;
65 };
66
67 std::vector <std::string>& selectedSt = m_selectStat.value();
68 const std::vector <std::string>& excludedSt = m_excludeStat.value();
69 selectedSt.erase(std::remove_if(selectedSt.begin(), selectedSt.end(),
70 [&excludedSt](const std::string& token){
71 return std::ranges::find(excludedSt, token) != excludedSt.end();
72 }), selectedSt.end());
73
74 if (selectedSt.size()) {
75 m_testStations = translateTokenList(selectedSt);
76 std::stringstream sstr{};
77 for (const Identifier& id : m_testStations) {
78 sstr<<" *** "<<m_idHelperSvc->toString(id)<<std::endl;
79 }
80 ATH_MSG_INFO("Test only the following stations "<<std::endl<<sstr.str());
81 } else {
82 const std::set<Identifier> excluded = translateTokenList(excludedSt);
84 for(auto itr = idHelper.detectorElement_begin();
85 itr!= idHelper.detectorElement_end();++itr){
86 if (!excluded.count(*itr)) {
87 m_testStations.insert(*itr);
88 }
89 }
91 if (!excluded.empty()) {
92 std::stringstream excluded_report{};
93 for (const Identifier& id : excluded){
94 excluded_report << " *** " << m_idHelperSvc->toStringDetEl(id) << std::endl;
95 }
96 ATH_MSG_INFO("Test all station except the following excluded ones " << std::endl << excluded_report.str());
97 }
98 }
99 ATH_CHECK(detStore()->retrieve(m_detMgr));
100 return StatusCode::SUCCESS;
101}
102void GeoModelMdtTest::visualizeTubeLayer(const EventContext& ctx,
103 const MuonGMR4::MdtReadoutElement& reEle,
104 const unsigned layer) const {
105 if (!m_visualTubes) {
106 return;
107 }
108
109 const double h = reEle.moduleHeight();
110 const double wL = reEle.moduleWidthL();
111 const double wS = reEle.moduleWidthS();
112
113 const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
114 const Identifier detId = reEle.identify();
115 const std::string chName = std::format("{:}{:}{:}{:}M{:}T{:}",
116 m_idHelperSvc->stationNameString(detId),
117 std::abs(m_idHelperSvc->stationEta(detId)),
118 m_idHelperSvc->stationEta(detId) > 0 ? 'A' : 'C',
119 m_idHelperSvc->stationPhi(detId),
120 idHelper.multilayer(detId), layer);
121 auto canvas = m_visualSvc->prepareCanvas(ctx, m_clientTokenLayerVis, chName);
122 canvas->expandPad(-0.5*wL, -0.5*h);
123 canvas->expandPad( 0.5*wL, 0.5*h);
124 canvas->setAxisTitles("x [mm]", "y [mm]");
125 canvas->setRangeScale(1.1);
126 using namespace MuonValR4;
128 canvas->add(drawLine(Amg::Vector3D{0., -0.5*wL, 0.5*h}, Amg::Vector3D{0., 0.5*wL, 0.5*h}, kBlack, kSolid));
129 canvas->add(drawLine(Amg::Vector3D{0., -0.5*wS, -0.5*h}, Amg::Vector3D{0., 0.5*wS, -0.5*h}, kBlack, kSolid));
130 canvas->add(drawLine(Amg::Vector3D{0., -0.5*wL, 0.5*h}, Amg::Vector3D{0., -0.5*wS, -0.5*h}, kBlack, kSolid));
131 canvas->add(drawLine(Amg::Vector3D{0., 0.5*wL, 0.5*h}, Amg::Vector3D{0., 0.5*wS, -0.5*h}, kBlack, kSolid));
132 for (unsigned int tube = 1 ; tube <= reEle.numTubesInLay(); ++ tube) {
133 const IdentifierHash measHash = reEle.measurementHash(layer, tube);
134 if (!reEle.isValid(measHash)) {
135 continue;
136 }
137 canvas->add(drawBox(reEle.localTubePos(measHash), reEle.tubeLength(measHash), reEle.tubeRadius()));
138 }
139 canvas->add(drawLabel(std::format("{:}, layer: {:}", m_idHelperSvc->toStringDetEl(detId), layer), 0.2, 0.05));
140}
141
142StatusCode GeoModelMdtTest::visualizeTubeStaggering(const EventContext& ctx, const ActsTrk::GeometryContext& gctx) const {
143 const MuonMDT_CablingMap* cabling{nullptr};
144 ATH_CHECK(SG::get(cabling, m_cablingKey,ctx));
145 if (!cabling){
146 return StatusCode::SUCCESS;
147 }
148
149 std::unordered_map<Identifier, std::shared_ptr<MuonValR4::IRootVisualizationService::ICanvasObject>> canvases{};
150 const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
151 for (const Identifier& test_me : m_testStations) {
152 Identifier chamberId = idHelper.elementID(test_me);
153 ATH_MSG_DEBUG("Preparing canvases to draw the tube mapping per chamber");
154 const MdtReadoutElement* readEle = m_detMgr->getMdtReadoutElement(test_me);
155 if (!readEle) {
156 ATH_MSG_DEBUG("Detector element does not exist. ");
157 continue;
158 }
159 if(canvases.count(chamberId)) continue;
160 const std::string canName = std::format("{:}{:}{:}{:}",
161 m_idHelperSvc->stationNameString(readEle->identify()),
162 std::abs(m_idHelperSvc->stationEta(readEle->identify())),
163 m_idHelperSvc->stationEta(readEle->identify()) > 0 ? 'A' : 'C',
164 m_idHelperSvc->stationPhi(readEle->identify()));
165 canvases.insert(std::make_pair(chamberId,
166 m_visualSvc->prepareCanvas(ctx, m_clientTokenStaggeringVis, canName)));
167
168 canvases[chamberId] -> add(MuonValR4::drawLabelNDC(m_idHelperSvc->toStringChamber(test_me),0.4,0.85,30));
169
170 }
171
172 for (const Identifier& test_me : m_testStations) {
173 Identifier chamberId = idHelper.elementID(test_me);
174 const MdtReadoutElement* readEle = m_detMgr->getMdtReadoutElement(test_me);
175 if (!readEle) {
176 ATH_MSG_DEBUG("Detector element does not exist. ");
177 continue;
178 }
179 auto canvas = canvases[chamberId];
180 const Chamber* chamber = m_detMgr->getChamber(readEle->identify());
181 const double r = readEle->tubeRadius();
182 for(uint tube = 1 ; tube <= readEle->numTubesInLay(); ++tube){
183 for(uint layer = 1 ; layer <= readEle->numLayers() ; ++ layer){
184 bool is_valid{false};
185 const Identifier tube_id = idHelper.channelID(test_me, readEle->multilayer(),
186 layer, tube, is_valid);
187 const IdentifierHash tube_hash = readEle->measurementHash(tube_id);
188 if (!readEle->isValid(tube_hash)) {
189 continue;
190 }
191
193 MdtCablingData cabling_data{};
194 cabling->convert(tube_id,cabling_data);
196 if (!cabling->getOnlineId(cabling_data, msgStream())) {
197 // to be uncommented once BIS1 has the correct number of tubes
198 //ATH_MSG_WARNING("Could no retrieve a valid online channel for "<<m_idHelperSvc->toString(tube_id));
199 continue;
200 return StatusCode::FAILURE;
201 }
202
203
204 const Amg::Vector3D tubePos = chamber->globalToLocalTrans(gctx) * readEle->readOutPos(gctx, tube_id);
205 const Amg::Vector3D locDir{Amg::Vector3D::UnitY()};
206
207 if(tube == 1){
208 Identifier tube2 = idHelper.channelID(test_me, readEle->multilayer(), layer, 2);
209 ATH_MSG_VERBOSE("processing tube" << m_idHelperSvc->toString(tube_id)
210 << " " << Amg::toString(tubePos) << " " << Amg::toString(chamber->globalToLocalTrans(gctx) * readEle->readOutPos(gctx, tube2)) << " " <<
211 Amg::toString(chamber->localToGlobalTrans(gctx).linear() * locDir));
212 }
213 if(tube==1 && layer ==1 && idHelper.stationPhi(tube_id)==1){
214 ATH_MSG_VERBOSE(Amg::toString(chamber->localToGlobalTrans(gctx)));
215 }
216
217 // 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
218 // 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.
219 const double x{tubePos.y() * -1. * tubePos.x()/std::abs(tubePos.x()) * std::copysign(1.0, idHelper.stationEta(tube_id)) };
220 const double y{tubePos.z()};
221 canvas->expandPad(x -r , y -r);
222 canvas->expandPad(x +r , y +r);
223 if (tube == 1 && layer == 1) {
225 } else {
227 }
228 canvas->add(MuonValR4::drawLabel(std::to_string(cabling_data.channelId),x ,y, 3));
229 }
230 }
231
232 }
233 return StatusCode::SUCCESS;
234}
235
237 ATH_CHECK(m_tree.write());
238 return StatusCode::SUCCESS;
239}
241 const EventContext& ctx{Gaudi::Hive::currentContext()};
242
243 const ActsTrk::GeometryContext* geoContextHandle{nullptr};
244 ATH_CHECK(SG::get(geoContextHandle, m_geoCtxKey, ctx));
245
246 const ActsTrk::GeometryContext& gctx{*geoContextHandle};
247
249
250 const MdtIdHelper& id_helper{m_idHelperSvc->mdtIdHelper()};
251 for (const Identifier& test_me : m_testStations) {
252 const int ml = id_helper.multilayer(test_me);
253 const std::string detStr = m_idHelperSvc->toStringDetEl(test_me);
254 ATH_MSG_DEBUG("Test retrieval of Mdt detector element "<<detStr);
255 const MdtReadoutElement* reElement = m_detMgr->getMdtReadoutElement(test_me);
256 if (!reElement) {
257 continue;
258 }
260 if (reElement->identify() != test_me) {
261 ATH_MSG_FATAL("Expected to retrieve "<<detStr<<". But got instead "<<m_idHelperSvc->toStringDetEl(reElement->identify()));
262 return StatusCode::FAILURE;
263 }
264 ATH_CHECK(dumpToTree(ctx,gctx,reElement));
265 const Amg::Transform3D globToLocal{reElement->globalToLocalTrans(gctx)};
266 const Amg::Transform3D& localToGlob{reElement->localToGlobalTrans(gctx)};
268 const Amg::Transform3D transClosure = globToLocal * localToGlob;
269 if (!Amg::doesNotDeform(transClosure)) {
270 ATH_MSG_FATAL("Closure test failed for "<<detStr<<". Ended up with "<< Amg::toString(transClosure) );
271 return StatusCode::FAILURE;
272 }
273 for (unsigned int lay = 1 ; lay <= reElement->numLayers() ; ++lay ) {
274 visualizeTubeLayer(ctx, *reElement, lay);
275 for (unsigned int tube = 1; tube <=reElement->numTubesInLay(); ++tube ){
276 const Identifier tube_id = id_helper.channelID(test_me,ml,lay,tube);
278 const IdentifierHash measHash = reElement->measurementHash(tube_id);
279 const Identifier cnv_tube_id = reElement->measurementId(measHash);
280 if (tube_id != cnv_tube_id) {
281 ATH_MSG_FATAL("Failed to convert "<<m_idHelperSvc->toString(tube_id)<<" back and forth "<<m_idHelperSvc->toString(cnv_tube_id));
282 return StatusCode::FAILURE;
283 }
284 }
285 }
286 }
288 return StatusCode::SUCCESS;
289}
291 if (m_swapRead.empty()) return;
292 std::ofstream swapReadXML{m_swapRead};
293 if (!swapReadXML.good()) {
294 ATH_MSG_ERROR("Failed to create "<<m_swapRead);
295 return;
296 }
297 std::set<Identifier> chamberIDs{};
298 const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
299 swapReadXML<<"<Table name=\"MdtTubeROSides\">"<<std::endl;
300 unsigned int counter{1};
302 itr != idHelper.detectorElement_end();
303 ++itr){
304 const Identifier swap{*itr};
305 const MdtReadoutElement* readoutEle = m_detMgr->getMdtReadoutElement(swap);
306 if(!readoutEle) continue;
307 if (!chamberIDs.insert(idHelper.elementID(swap)).second) continue;
308 const int side = readoutEle->getParameters().readoutSide;
309 swapReadXML<<" <Row ";
310 swapReadXML<<"MDTTUBEROSIDES_DATA_ID=\""<<counter<<"\" ";
311 swapReadXML<<"stationName=\""<<m_idHelperSvc->stationNameString(swap)<<"\" ";
312 swapReadXML<<"stationEta=\""<<m_idHelperSvc->stationEta(swap)<<"\" ";
313 swapReadXML<<"stationPhi=\""<<m_idHelperSvc->stationPhi(swap)<<"\" ";
314 swapReadXML<<"side=\""<<side<<"\" ";
315 swapReadXML<<"/>"<<std::endl;
316 ++counter;
317 }
318 swapReadXML<<"</Table>"<<std::endl;
319
320}
321StatusCode GeoModelMdtTest::dumpToTree(const EventContext& ctx,
322 const ActsTrk::GeometryContext& gctx,
323 const MdtReadoutElement* readoutEle) {
324
325
326 m_stIndex = readoutEle->stationName();
327 m_stEta = readoutEle->stationEta();
328 m_stPhi = readoutEle->stationPhi();
329 m_stML = readoutEle->multilayer();
330 m_chamberDesign = readoutEle->chamberDesign();
331
332 m_numLayers = readoutEle->numLayers();
333 m_numTubes = readoutEle->numTubesInLay();
334
335 m_tubeRad = readoutEle->innerTubeRadius();
336 m_tubePitch = readoutEle->tubePitch();
337
339 const Amg::Transform3D& transform {readoutEle->localToGlobalTrans(gctx)};
340 m_readoutTransform = transform;
341 m_alignableNode = readoutEle->alignableTransform()->getDefTransform();
342
343 const MuonMDT_CablingMap* cabling{nullptr};
344 ATH_CHECK(SG::get(cabling, m_cablingKey, ctx));
346 for (unsigned int lay = 1; lay <= readoutEle->numLayers(); ++lay) {
347 for (unsigned int tube = 1; tube <= readoutEle->numTubesInLay(); ++tube) {
348 const IdentifierHash measHash{readoutEle->measurementHash(lay,tube)};
349 if (!readoutEle->isValid(measHash)) continue;
350 const Amg::Transform3D& tubeTransform{readoutEle->localToGlobalTrans(gctx,measHash)};
351 m_tubeLay.push_back(lay);
352 m_tubeNum.push_back(tube);
353 m_tubeTransform.push_back(tubeTransform);
354 m_tubePosInCh.push_back(readoutEle->msSector()->globalToLocalTrans(gctx) *
355 readoutEle->center(gctx, measHash));
356 m_roPos.push_back(readoutEle->readOutPos(gctx, measHash));
357 m_tubeLength.push_back(readoutEle->tubeLength(measHash));
358 m_activeTubeLength.push_back(readoutEle->activeTubeLength(measHash));
359 m_wireLength.push_back(readoutEle->wireLength(measHash));
360 if (cabling) {
361 MdtCablingData translation{};
362 if (!cabling->convert(readoutEle->measurementId(measHash), translation) ||
363 !cabling->getOnlineId(translation, msgStream())){
364 ATH_MSG_FATAL("Cabling translation failed");
365 return StatusCode::FAILURE;
366 }
367 m_cablingCSM.push_back(translation.csm);
368 m_cablingMROD.push_back(translation.mrod);
369 m_cablingTdcId.push_back(translation.tdcId);
370 m_cablingTdcCh.push_back(translation.channelId);
371 }
372 }
373 }
374
375 return m_tree.fill(ctx) ? StatusCode::SUCCESS : StatusCode::FAILURE;
376}
377
378}
379
#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
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.
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)
static IdentifierHash measurementHash(unsigned int layerNumber, unsigned int tubeNumber)
Transform the layer and tube number to the measurementHash.
double tubeRadius() const
Adds the thickness of the tube wall onto the radius.
bool isValid(const IdentifierHash &measHash) const
Amg::Vector3D readOutPos(const ActsTrk::GeometryContext &ctx, const Identifier &measId) const
Returns the global position of the readout card.
double moduleHeight() const
Returns the height of the chamber (Distance bottom - topWidth)
unsigned int numTubesInLay() const
Returns the number of tubes per layer.
double innerTubeRadius() const
Returns the inner tube radius.
double moduleWidthS() const
Returns the length of the bottom edge of the chamber (short width)
unsigned int multilayer() const
Returns the multi layer of the MdtReadoutElement.
Identifier measurementId(const IdentifierHash &measHash) const override final
Converts the measurement hash back to the full Identifier.
double tubePitch() const
Returns the pitch between 2 tubes in a layer.
unsigned int numLayers() const
Returns the number of tube layer.
int stationEta() const
Returns the stationEta (positive A site, negative O site)
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 detector center (Which is the same as the detector center of the first measurement layer)
const Amg::Transform3D & localToGlobalTrans(const ActsTrk::GeometryContext &ctx) const
Returns the local to global transformation into the ATLAS coordinate system.
const std::string & chamberDesign() const
The chamber design refers to the construction parameters of a readout element.
Identifier identify() const override final
Return the athena 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
Returnsthe alignable transform of the readout element.
Amg::Transform3D globalToLocalTrans(const ActsTrk::GeometryContext &ctx) const
Transformations to translate between local <-> global coordinates.
Amg::Transform3D globalToLocalTrans(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
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.
constexpr int fullFilling
std::unique_ptr< TLatex > drawLabel(const std::string &text, const double xPos, const double yPos, const unsigned int fontSize=18)
Create a TLatex label,.
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.
std::unique_ptr< TLatex > drawLabelNDC(const std::string &text, const double xPos, const double yPos, const unsigned int fontSize=18)
Create a TLatex label,.
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.