ATLAS Offline Software
Loading...
Searching...
No Matches
runRpcGeoComparison.cxx
Go to the documentation of this file.
1
2/*
3 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
4*/
11#include <algorithm>
15#include <GeoModelHelpers/TransformToStringConverter.h>
18#include <GaudiKernel/SystemOfUnits.h>
19
21#include <TFile.h>
22#include <TTreeReader.h>
23
24
25#include "Acts/Utilities/UnitVectors.hpp"
26#include "Acts/Definitions/Units.hpp"
27
28Amg::Vector3D makeDir(const double theta, const double phi) {
29 using namespace Acts::UnitLiterals;
30 return Acts::makeDirectionFromPhiTheta(phi *1._degree, theta* 1._degree);
31}
32
33using namespace MuonGMR4;
34using namespace ActsTrk;
35
36constexpr double tolerance = 0.005*Gaudi::Units::millimeter;
37
41 RpcChamber() = default;
42
46 std::string design{};
47
49 bool operator<(const RpcChamber& other) const {
50 return id < other.id;
51 }
52
53 Amg::Transform3D geoModelTransform{Amg::Transform3D::Identity()};
55 Amg::Transform3D alignableTransform{Amg::Transform3D::Identity()};
56
57
58 float stripPitchEta{0.f};
59 float stripPitchPhi{0.f};
60 float stripWidthEta{0.f};
61 float stripWidthPhi{0.f};
62
63 float stripLengthEta{0.f};
64 float stripLengthPhi{0.f};
65
66 unsigned int numStripsEta{0};
67 unsigned int numStripsPhi{0};
69 unsigned int numLayers{0};
71 unsigned int numGasGapsPhi{0};
73 unsigned int numPhiPanels{0};
74
75 struct RpcStrip{
77 Amg::Vector3D position{Amg::Vector3D::Zero()};
79 Amg::Vector2D locPos{Amg::Vector2D::Zero()};
81 unsigned int strip{0};
83 unsigned int gasGap{0};
85 unsigned int doubletPhi{0};
87 bool measPhi{false};
88
90 bool operator<(const RpcStrip& other) const {
91 if (measPhi != other.measPhi) return !measPhi;
92 if (doubletPhi != other.doubletPhi) return doubletPhi < other.doubletPhi;
93 if (gasGap != other.gasGap) return gasGap < other.gasGap;
94 return strip < other.strip;
95 }
96 };
97
98 struct RpcLayer {
100 unsigned int gasGap{0};
102 unsigned int doubletPhi{0};
104 bool measPhi{false};
106 Amg::Transform3D transform{Amg::Transform3D::Identity()};
108 bool operator<(const RpcLayer& other) const {
109 if (measPhi != other.measPhi) return !measPhi;
110 if (doubletPhi != other.doubletPhi) return doubletPhi < other.doubletPhi;
111 return gasGap < other.gasGap;
112 }
113 };
114 std::set<RpcStrip> strips{};
115 std::set<RpcLayer> layers{};
116
117};
118
121std::ostream& operator<<(std::ostream& ostr, const RpcChamber& chamb) {
122 static const std::map<int, std::string> stationDict{
123 {0, "BIL"}, {1, "BIS"}, {7, "BIR"},
124 {2, "BML"}, {3, "BMS"}, {8, "BMF"}, {53, "BME"}, {54, "BMG"}, {52, "BIM"},
125 {4, "BOL"}, {5, "BOS"}, {9, "BOF"}, {10, "BOG"},
126 {6, "BEE"}, {14, "EEL"}, {15, "EES"},
127 {13, "EIL"},
128 {17, "EML"}, {18, "EMS"},
129 {20, "EOL"}, {21, "EOS"}
130 };
131 ostr<<"Rpc chamber "<<stationDict.at(chamb.id.stationIndex) <<"("<<chamb.design<<") "<<chamb.id;
132 return ostr;
133}
134
135 std::ostream& operator<<(std::ostream& ostr,const RpcChamber::RpcStrip & strip) {
136 ostr<<"strip (gasGap/phiPanel/isPhiStrip/number): ";
137 ostr<<strip.gasGap<<"/"<<strip.doubletPhi<<"/";
138 ostr<<(strip.measPhi ? "si" : "no")<<"/"<<strip.strip<<", ";
139 // ostr<<"position: "<<Amg::toString(strip.position, 2);
140 return ostr;
141}
142 std::ostream& operator<<(std::ostream& ostr,const RpcChamber::RpcLayer & layer) {
143 ostr<<"rpclayer (gasGap/phiPanel/isPhiLayer): ";
144 ostr<<layer.gasGap<<"/"<<layer.doubletPhi<<"/";
145 ostr<<(layer.measPhi ? "si" : "no")<<", ";
146 // ostr<<"transform: "<<Amg::toString(layer.transform);
147 return ostr;
148}
149
150std::set<RpcChamber> readTreeDump(const std::string& inputFile) {
151 std::set<RpcChamber> to_ret{};
152 std::cout<<"Read the Rpc geometry tree dump from "<<inputFile<<std::endl;
153 std::unique_ptr<TFile> inFile{TFile::Open(inputFile.c_str())};
154 if (!inFile || !inFile->IsOpen()) {
155 std::cerr<<__FILE__<<":"<<__LINE__<<" Failed to open "<<inputFile<<std::endl;
156 return to_ret;
157 }
158 TTreeReader treeReader("RpcGeoModelTree", inFile.get());
159 if (treeReader.IsInvalid()){
160 std::cerr<<__FILE__<<":"<<__LINE__<<" The file "<<inputFile<<" does not contain the 'RpcGeoModelTree'"<<std::endl;
161 return to_ret;
162 }
163
164 TTreeReaderValue<unsigned short> stationIndex{treeReader, "stationIndex"};
165 TTreeReaderValue<short> stationEta{treeReader, "stationEta"};
166 TTreeReaderValue<short> stationPhi{treeReader, "stationPhi"};
167 TTreeReaderValue<uint8_t> stationDoubletR{treeReader, "stationDoubletR"};
168 TTreeReaderValue<uint8_t> stationDoubletZ{treeReader,"stationDoubletZ"};
169 TTreeReaderValue<uint8_t> stationDoubletPhi{treeReader,"stationDoubletPhi"};
170 TTreeReaderValue<std::string> chamberDesign{treeReader,"chamberDesign"};
171
172
174 TTreeReaderValue<uint8_t> numStripsEta{treeReader, "numEtaStrips"};
175 TTreeReaderValue<uint8_t> numStripsPhi{treeReader, "numPhiStrips"};
177 // TTreeReaderValue<uint8_t> numGasGapsPhi{treeReader, "numPhiGasGaps"};
178 TTreeReaderValue<uint8_t> numPhiPanels{treeReader, "numPhiPanels"};
179 TTreeReaderValue<uint8_t> numLayers{treeReader, "numRpcLayers"};
180
182 TTreeReaderValue<float> stripEtaPitch{treeReader, "stripEtaPitch"};
183 TTreeReaderValue<float> stripPhiPitch{treeReader, "stripPhiPitch"};
184 TTreeReaderValue<float> stripEtaWidth{treeReader, "stripEtaWidth"};
185 TTreeReaderValue<float> stripPhiWidth{treeReader, "stripPhiWidth"};
186 TTreeReaderValue<float> stripEtaLength{treeReader, "stripEtaLength"};
187 TTreeReaderValue<float> stripPhiLength{treeReader, "stripPhiLength"};
188
190 TTreeReaderValue<std::vector<float>> geoModelTransformX{treeReader, "GeoModelTransformX"};
191 TTreeReaderValue<std::vector<float>> geoModelTransformY{treeReader, "GeoModelTransformY"};
192 TTreeReaderValue<std::vector<float>> geoModelTransformZ{treeReader, "GeoModelTransformZ"};
193
194 TTreeReaderValue<std::vector<float>> alignableNodeX{treeReader, "AlignableNodeX"};
195 TTreeReaderValue<std::vector<float>> alignableNodeY{treeReader, "AlignableNodeY"};
196 TTreeReaderValue<std::vector<float>> alignableNodeZ{treeReader, "AlignableNodeZ"};
197
198
199
200 TTreeReaderValue<std::vector<float>> stripRotTranslationX{treeReader, "stripRotTranslationX"};
201 TTreeReaderValue<std::vector<float>> stripRotTranslationY{treeReader, "stripRotTranslationY"};
202 TTreeReaderValue<std::vector<float>> stripRotTranslationZ{treeReader, "stripRotTranslationZ"};
203
204 TTreeReaderValue<std::vector<float>> stripRotCol0Theta{treeReader, "stripRotLinearCol0Theta"};
205 TTreeReaderValue<std::vector<float>> stripRotCol0Phi{treeReader, "stripRotLinearCol0Phi"};
206
207 TTreeReaderValue<std::vector<float>> stripRotCol1Theta{treeReader, "stripRotLinearCol1Theta"};
208 TTreeReaderValue<std::vector<float>> stripRotCol1Phi{treeReader, "stripRotLinearCol1Phi"};
209
210 TTreeReaderValue<std::vector<float>> stripRotCol2Theta{treeReader, "stripRotLinearCol2Theta"};
211 TTreeReaderValue<std::vector<float>> stripRotCol2Phi{treeReader, "stripRotLinearCol2Phi"};
212
213 TTreeReaderValue<std::vector<uint8_t>> stripRotGasGap{treeReader, "stripRotGasGap"};
214 TTreeReaderValue<std::vector<uint8_t>> stripRotDblPhi{treeReader, "stripRotDoubletPhi"};
215 TTreeReaderValue<std::vector<bool>> stripRotMeasPhi{treeReader, "stripRotMeasPhi"};
216
217 TTreeReaderValue<std::vector<float>> stripPosX{treeReader, "stripPosX"};
218 TTreeReaderValue<std::vector<float>> stripPosY{treeReader, "stripPosY"};
219 TTreeReaderValue<std::vector<float>> stripPosZ{treeReader, "stripPosZ"};
220
221 TTreeReaderValue<std::vector<float>> stripLocPosX{treeReader, "stripLocPosX"};
222 TTreeReaderValue<std::vector<float>> stripLocPosY{treeReader, "stripLocPosY"};
223
224
225 TTreeReaderValue<std::vector<bool>> stripPosMeasPhi{treeReader, "stripPosMeasPhi"};
226 TTreeReaderValue<std::vector<uint8_t>> stripPosGasGap{treeReader, "stripPosGasGap"};
227 TTreeReaderValue<std::vector<uint8_t>> stripPosNum{treeReader, "stripPosNum"};
228 TTreeReaderValue<std::vector<uint8_t>> stripDblPhi{treeReader, "stripPosDoubletPhi"};
229
230 while (treeReader.Next()) {
231 RpcChamber newchamber{};
232
233 newchamber.id.stationIndex = (*stationIndex);
234 newchamber.design = (*chamberDesign);
235 newchamber.id.eta = (*stationEta);
236 newchamber.id.phi = (*stationPhi);
237 newchamber.id.doubletPhi = (*stationDoubletPhi);
238 newchamber.id.doubletR = (*stationDoubletR);
239 newchamber.id.doubletZ = (*stationDoubletZ);
240
241 newchamber.stripPitchEta = (*stripEtaPitch);
242 newchamber.stripPitchPhi = (*stripPhiPitch);
243 newchamber.stripWidthEta = (*stripEtaWidth);
244 newchamber.stripWidthPhi = (*stripPhiWidth);
245 newchamber.stripLengthEta = (*stripEtaLength);
246 newchamber.stripLengthPhi = (*stripPhiLength);
247
248 newchamber.numStripsEta = (*numStripsEta);
249 newchamber.numStripsPhi = (*numStripsPhi);
250 // newchamber.numGasGapsPhi = (*numGasGapsPhi);
251 newchamber.numPhiPanels = (*numPhiPanels);
252 newchamber.numLayers = (*numLayers);
253
254
255 Amg::Vector3D geoTrans{(*geoModelTransformX)[0], (*geoModelTransformY)[0], (*geoModelTransformZ)[0]};
256 Amg::RotationMatrix3D geoRot{Amg::RotationMatrix3D::Identity()};
257 geoRot.col(0) = Amg::Vector3D((*geoModelTransformX)[1], (*geoModelTransformY)[1], (*geoModelTransformZ)[1]);
258 geoRot.col(1) = Amg::Vector3D((*geoModelTransformX)[2], (*geoModelTransformY)[2], (*geoModelTransformZ)[2]);
259 geoRot.col(2) = Amg::Vector3D((*geoModelTransformX)[3], (*geoModelTransformY)[3], (*geoModelTransformZ)[3]);
260 newchamber.geoModelTransform = Amg::getTransformFromRotTransl(std::move(geoRot), std::move(geoTrans));
261
262 geoRot.col(0) = Amg::Vector3D((*alignableNodeX)[1], (*alignableNodeY)[1], (*alignableNodeZ)[1]);
263 geoRot.col(1) = Amg::Vector3D((*alignableNodeX)[2], (*alignableNodeY)[2], (*alignableNodeZ)[2]);
264 geoRot.col(2) = Amg::Vector3D((*alignableNodeX)[3], (*alignableNodeY)[3], (*alignableNodeZ)[3]);
265 geoTrans = Amg::Vector3D{(*alignableNodeX)[0], (*alignableNodeY)[0], (*alignableNodeZ)[0]};
266 newchamber.alignableTransform = Amg::getTransformFromRotTransl(std::move(geoRot), std::move(geoTrans));
267
268 //strips
269 for (size_t s = 0; s < stripPosX->size(); ++s){
270 RpcChamber::RpcStrip newStrip{};
271 newStrip.position = Amg::Vector3D{(*stripPosX)[s], (*stripPosY)[s], (*stripPosZ)[s]};
272 newStrip.locPos = Amg::Vector2D{(*stripLocPosX)[s], (*stripLocPosY)[s]};
273
274 newStrip.gasGap = (*stripPosGasGap)[s];
275 newStrip.doubletPhi = (*stripDblPhi)[s];
276 newStrip.measPhi = (*stripPosMeasPhi)[s];
277 newStrip.strip = (*stripPosNum)[s];
278 newchamber.strips.insert(std::move(newStrip));
279 }
280 for (size_t l = 0; l < stripRotMeasPhi->size(); ++l){
281 RpcChamber::RpcLayer newLayer{};
282 newLayer.measPhi = (*stripRotMeasPhi)[l];
283 newLayer.gasGap = (*stripRotGasGap)[l];
284 newLayer.doubletPhi = (*stripRotDblPhi)[l];
285 Amg::RotationMatrix3D stripRot{Amg::RotationMatrix3D::Identity()};
286 Amg::Vector3D translation{(*stripRotTranslationX)[l],(*stripRotTranslationY)[l],(*stripRotTranslationZ)[l]};
287 stripRot.col(0) = makeDir((*stripRotCol0Theta)[l], (*stripRotCol0Phi)[l]);
288 stripRot.col(1) = makeDir((*stripRotCol1Theta)[l], (*stripRotCol1Phi)[l]);
289 stripRot.col(2) = makeDir((*stripRotCol2Theta)[l], (*stripRotCol2Phi)[l]);
290 newLayer.transform = Amg::getTransformFromRotTransl(std::move(stripRot), std::move(translation));
291 newchamber.layers.insert(std::move(newLayer));
292 }
293
294 auto insert_itr = to_ret.insert(std::move(newchamber));
295 if (!insert_itr.second) {
296 std::stringstream err{};
297 err<<__FILE__<<":"<<__LINE__<<" The chamber "<<(*insert_itr.first).id
298 <<" has already been inserted. "<<std::endl;
299 throw std::runtime_error(err.str());
300 }
301 }
302 std::cout<<"File parsing is finished. Found in total "<<to_ret.size()<<" readout element dumps "<<std::endl;
303 return to_ret;
304}
305
306#define TEST_BASICPROP(attribute, propName) \
307 if (std::abs(1.*test.attribute - 1.*reference.attribute) > tolerance) { \
308 std::cerr<<"RpcGeoModelComparison() "<<__LINE__<<": The chamber "<<test \
309 <<" differs w.r.t "<<propName<<" "<< reference.attribute \
310 <<" (ref) vs. " <<test.attribute << " (test)" << std::endl; \
311 chamberOkay = false; \
312 }
313
314int main1( int argc, char** argv ) {
315 std::string refFile{}, testFile{};
316
317 for (int arg = 1; arg < argc; ++arg) {
318 std::string the_arg{argv[arg]};
319 if (the_arg == "--refFile" && arg +1 < argc) {
320 refFile = std::string{argv[arg+1]};
321 ++arg;
322 } else if (the_arg == "--testFile" && arg + 1 < argc) {
323 testFile = std::string{argv[arg+1]};
324 ++arg;
325 }
326 }
327 if (refFile.empty()) {
328 std::cerr<<"Please parse the path of the reference file via --refFile "<<std::endl;
329 return EXIT_FAILURE;
330 }
331 if (testFile.empty()) {
332 std::cerr<<"Please parse the path of the test file via --testFile "<<std::endl;
333 return EXIT_FAILURE;
334 }
336 if (!refFile.starts_with( "root://")) refFile = PathResolver::FindCalibFile(refFile);
337 if (!testFile.starts_with( "root://")) testFile = PathResolver::FindCalibFile(testFile);
339 std::set<RpcChamber> refChambers = readTreeDump(refFile);
340 if (refChambers.empty()) {
341 std::cerr<<"The file "<<refFile<<" should contain at least one chamber "<<std::endl;
342 return EXIT_FAILURE;
343 }
344 std::set<RpcChamber> testChambers = readTreeDump(testFile);
345 if (testChambers.empty()) {
346 std::cerr<<"The file "<<testFile<<" should contain at least one chamber "<<std::endl;
347 return EXIT_FAILURE;
348 }
349 std::cout<<"Read "<<refChambers.size()<<" chambers from reference: "<<refFile
350 <<" & "<<testChambers.size()<<" from "<<testFile<<std::endl;
351 int return_code = EXIT_SUCCESS;
352 unsigned int goodChambers{0};
354 for (const RpcChamber& reference : refChambers) {
355 std::set<RpcChamber>::const_iterator test_itr = testChambers.find(reference);
356
357 if (test_itr == testChambers.end()) {
358 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": The chamber "<<reference<<" is not part of the testing "<<std::endl;
359 return_code = EXIT_FAILURE;
360 continue;
361 }
362 bool chamberOkay = true;
363 const RpcChamber& test = {*test_itr};
364
365 TEST_BASICPROP(numLayers, "number of rpc singlets");
366 TEST_BASICPROP(numGasGapsPhi, "number of phi gas gaps");
367 TEST_BASICPROP(numPhiPanels, "number of phi readout panels");
368
369
370 TEST_BASICPROP(numStripsEta, "number of eta strips");
371 TEST_BASICPROP(numStripsPhi, "number of phi strips");
372
373 TEST_BASICPROP(stripPitchEta, "eta strip pitch");
374 TEST_BASICPROP(stripPitchPhi, "phi strip pitch");
375
376 TEST_BASICPROP(stripWidthEta, "eta strip width");
377 TEST_BASICPROP(stripWidthPhi, "phi strip width");
378
379 TEST_BASICPROP(stripLengthEta, "eta strip length");
380 TEST_BASICPROP(stripLengthPhi, "phi strip length");
381 if (!chamberOkay) continue;
382
383 Amg::Transform3D moduleDiff = reference.geoModelTransform.inverse() *
384 test.geoModelTransform;
385
386 if (false && !Amg::doesNotDeform(moduleDiff)){
387 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": "<<test<<" is displaced by "
388 <<Amg::toString(moduleDiff)<<std::endl;
389 continue;
390 }
391
392
393 using RpcLayer = RpcChamber::RpcLayer;
394 for (const RpcLayer& refLayer : reference.layers) {
395 break;
396 std::set<RpcLayer>::const_iterator lay_itr = test.layers.find(refLayer);
397 if (lay_itr == test.layers.end()) {
398 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": "<<test<<" "
399 <<refLayer<<" is not found. "<<std::endl;
400 chamberOkay = false;
401 continue;
402 }
403 // break;
404 const RpcLayer& testLayer{*lay_itr};
405 const Amg::Transform3D layAlignment = testLayer.transform.inverse() *
406 refLayer.transform;
407 if (layAlignment.translation().mag() > tolerance) {
408 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": "<<test<<" "
409 <<"the layer "<<testLayer<<" is misplaced w.r.t. reference by "
410 <<Amg::toString(testLayer.transform.translation())<<" vs. "
411 <<Amg::toString(refLayer.transform.translation()) <<" delta : "
412 <<Amg::toString(layAlignment.translation())
413 <<", perp: "<<layAlignment.translation().perp()
414 <<", mag: "<<layAlignment.translation().mag()<<std::endl;
415 chamberOkay = false;
416 }
417 if (!Amg::doesNotDeform(layAlignment) &&
418 !Amg::doesNotDeform(layAlignment * Amg::getRotateX3D(180*Gaudi::Units::deg)) &&
419 !Amg::doesNotDeform(layAlignment * Amg::getRotateZ3D(180*Gaudi::Units::deg))) {
420 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": "<<test<<" "
421 <<"the layer "<<testLayer<<" is misaligned w.r.t. reference by "
422 <<GeoTrf::toString(layAlignment, true)<<std::endl;
423 chamberOkay = false;
424 }
425 }
426 using RpcStrip = RpcChamber::RpcStrip;
427 if (!chamberOkay) continue;
428 unsigned int failedEta{0}, failedPhi{0};
429 for (const RpcStrip& refStrip : reference.strips) {
430 std::set<RpcStrip>::const_iterator strip_itr = test.strips.find(refStrip);
431 if (strip_itr == test.strips.end()) {
432 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": "<<test<<" "
433 <<refStrip<<" is not found. "<<std::endl;
434 chamberOkay = false;
435 continue;
436 }
437 const RpcStrip& testStrip{*strip_itr};
438 const Amg::Vector3D diffStrip{testStrip.position - refStrip.position};
439 if (diffStrip.mag() > tolerance) {
440 constexpr unsigned int maxFail = 3;
441 if ( (!refStrip.measPhi && ( (++failedEta) <= maxFail || refStrip.strip <= 3)) ||
442 (refStrip.measPhi && ( (++failedPhi) <= maxFail || refStrip.strip <= 3)) ) {
443 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": "<<test<<" "
444 <<testStrip<<" should be located at "<<Amg::toString(refStrip.position, 2)
445 <<" displacement: "<<Amg::toString(diffStrip,2)<<", perp: "
446 <<diffStrip.perp()<<", mag: "<<diffStrip.mag()<<std::endl;
447 } else if (failedEta > maxFail && failedPhi > maxFail) {
448 break;
449 }
450 chamberOkay = false;
451 }
452 continue;
453 const Amg::Vector2D diffLocStrip{testStrip.locPos - refStrip.locPos};
454 if (diffStrip.mag() > tolerance) {
455 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": "<<test<<" "
456 <<testStrip<<" should be located at "<<Amg::toString(refStrip.locPos, 2)
457 <<" displacement: "<<Amg::toString(diffLocStrip,2)<<", mag: "<<diffLocStrip.mag()<<std::endl;
458 chamberOkay = false;
459 }
460 }
461 if (!chamberOkay) {
462 return_code = EXIT_FAILURE;
463 continue;
464 }
465
466 const Amg::Transform3D alignableDistort = test.alignableTransform.inverse()*(reference.alignableTransform );
467 if (!Amg::doesNotDeform(alignableDistort) || alignableDistort.translation().mag() > tolerance) {
468 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": The alignable nodes are at differnt places for "
469 <<test<<". " <<Amg::toString(alignableDistort, true)<<std::endl;
470 return_code = EXIT_FAILURE;
471 } else {
472 ++goodChambers;
473 }
474
475 }
476 for (const RpcChamber& test : testChambers){
477 if (refChambers.find(test) == refChambers.end()) {
478 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": The chamber "<<test<<" is not in the references."<<std::endl;
479 return_code = EXIT_FAILURE;
480 }
481 }
482 std::cout<<"runRpcGeoComparison() "<<__LINE__<<": "<<
483 goodChambers<<"/"<<refChambers.size()<<" chambers are in complete agreement. "<<std::endl;
484 return return_code;
485
486}
487
488
489int main (int argc, char** argv )
490{
491 int ret = 1;
492 try {
493 ret = main1 (argc, argv);
494 }
495 catch (const std::exception& e) {
496 std::cerr << e.what() << "\n";
497 }
498 return ret;
499}
Scalar phi() const
phi method
Scalar theta() const
theta method
static std::string FindCalibFile(const std::string &logical_file_name)
int main()
Definition hello.cxx:18
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Amg::Transform3D getRotateX3D(double angle)
get a rotation transformation around X-axis
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
bool doesNotDeform(const Amg::Transform3D &trans)
Checks whether the linear part of the transformation rotates or stetches any of the basis vectors.
Amg::Transform3D getTransformFromRotTransl(Amg::RotationMatrix3D rot, Amg::Vector3D transl_vec)
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
#define TEST_BASICPROP(attribute, propName)
std::set< RpcChamber > readTreeDump(const std::string &inputFile)
std::ostream & operator<<(std::ostream &ostr, const RpcChamber &chamb)
Translation of the station Index -> station Name.
Amg::Vector3D makeDir(const double theta, const double phi)
Helper macro to compare the output from the readout geometry dumps: python -m MuonGeoModelTest....
Struct to represent the offline identifier of the Rpc measurement decomposed into the particular fiel...
int8_t & phi
Eta index of the RPC station.
int8_t & eta
Station of the chamber (i.e, BIL,BIS,etc.).
int8_t & doubletZ
doublet Phi -> 1,2
int8_t & doubletPhi
doublet R -> 1,2
int8_t & doubletR
Station phi of the RPC station.
Helper struct to assess that the layers are properly oriented.
unsigned int gasGap
Gas gap of the strip.
bool operator<(const RpcLayer &other) const
Odering operator to use the strip with set.
Amg::Transform3D transform
@ transformation
bool measPhi
flag whether the strip measures phi
unsigned int doubletPhi
Phi panel of the strip.
unsigned int strip
Strip number.
bool operator<(const RpcStrip &other) const
Odering operator to use the strip with set.
unsigned int gasGap
Gas gap of the strip.
bool measPhi
flag whether the strip measures phi
Amg::Vector3D position
global position of the strip
Amg::Vector2D locPos
local position w.r.t tracking plane
unsigned int doubletPhi
Phi panel of the strip.
Helper struct to represent a full Rpc chamber.
unsigned int numStripsEta
unsigned int numGasGapsPhi
Number of rpc gasGaps along the phi direction.
std::set< RpcStrip > strips
RpcChamber()=default
Default constructor.
unsigned int numPhiPanels
Number of rpc readout panels along the phi direction.
std::set< RpcLayer > layers
Muon::RpcCablingOfflineID chamberIdentifier
Identifier of the Rpc chamber.
unsigned int numLayers
Number of rpc singlets along the radial direction.
Amg::Transform3D alignableTransform
Transformation of the underlying Alignable node.
bool operator<(const RpcChamber &other) const
Sorting operator to insert the object into std::set.
unsigned int numStripsPhi
Amg::Transform3D geoModelTransform
Transformation of the underlying GeoModel element.
chamberIdentifier id
int main1()
Definition testRead.cxx:68