ATLAS Offline Software
Loading...
Searching...
No Matches
runRpcGeoComparison.cxx
Go to the documentation of this file.
1
2/*
3 Copyright (C) 2002-2024 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
24using namespace MuonGMR4;
25using namespace ActsTrk;
26
27
28constexpr double tolerance = 0.005*Gaudi::Units::millimeter;
29
33 RpcChamber() = default;
34
38 std::string design{};
39
41 bool operator<(const RpcChamber& other) const {
42 return id < other.id;
43 }
44
45 Amg::Transform3D geoModelTransform{Amg::Transform3D::Identity()};
47 Amg::Transform3D alignableTransform{Amg::Transform3D::Identity()};
48
49
50 float stripPitchEta{0.f};
51 float stripPitchPhi{0.f};
52 float stripWidthEta{0.f};
53 float stripWidthPhi{0.f};
54
55 float stripLengthEta{0.f};
56 float stripLengthPhi{0.f};
57
58 unsigned int numStripsEta{0};
59 unsigned int numStripsPhi{0};
61 unsigned int numLayers{0};
63 unsigned int numGasGapsPhi{0};
65 unsigned int numPhiPanels{0};
66
67 struct RpcStrip{
69 Amg::Vector3D position{Amg::Vector3D::Zero()};
71 Amg::Vector2D locPos{Amg::Vector2D::Zero()};
73 unsigned int strip{0};
75 unsigned int gasGap{0};
77 unsigned int doubletPhi{0};
79 bool measPhi{false};
80
82 bool operator<(const RpcStrip& other) const {
83 if (measPhi != other.measPhi) return !measPhi;
84 if (doubletPhi != other.doubletPhi) return doubletPhi < other.doubletPhi;
85 if (gasGap != other.gasGap) return gasGap < other.gasGap;
86 return strip < other.strip;
87 }
88 };
89
90 struct RpcLayer {
92 unsigned int gasGap{0};
94 unsigned int doubletPhi{0};
96 bool measPhi{false};
98 Amg::Transform3D transform{Amg::Transform3D::Identity()};
100 bool operator<(const RpcLayer& other) const {
101 if (measPhi != other.measPhi) return !measPhi;
102 if (doubletPhi != other.doubletPhi) return doubletPhi < other.doubletPhi;
103 return gasGap < other.gasGap;
104 }
105 };
106 std::set<RpcStrip> strips{};
107 std::set<RpcLayer> layers{};
108
109};
110
113std::ostream& operator<<(std::ostream& ostr, const RpcChamber& chamb) {
114 static const std::map<int, std::string> stationDict{
115 {0, "BIL"}, {1, "BIS"}, {7, "BIR"},
116 {2, "BML"}, {3, "BMS"}, {8, "BMF"}, {53, "BME"}, {54, "BMG"}, {52, "BIM"},
117 {4, "BOL"}, {5, "BOS"}, {9, "BOF"}, {10, "BOG"},
118 {6, "BEE"}, {14, "EEL"}, {15, "EES"},
119 {13, "EIL"},
120 {17, "EML"}, {18, "EMS"},
121 {20, "EOL"}, {21, "EOS"}
122 };
123 ostr<<"Rpc chamber "<<stationDict.at(chamb.id.stationIndex) <<"("<<chamb.design<<") "<<chamb.id;
124 return ostr;
125}
126
127 std::ostream& operator<<(std::ostream& ostr,const RpcChamber::RpcStrip & strip) {
128 ostr<<"strip (gasGap/phiPanel/isPhiStrip/number): ";
129 ostr<<strip.gasGap<<"/"<<strip.doubletPhi<<"/";
130 ostr<<(strip.measPhi ? "si" : "no")<<"/"<<strip.strip<<", ";
131 // ostr<<"position: "<<Amg::toString(strip.position, 2);
132 return ostr;
133}
134 std::ostream& operator<<(std::ostream& ostr,const RpcChamber::RpcLayer & layer) {
135 ostr<<"rpclayer (gasGap/phiPanel/isPhiLayer): ";
136 ostr<<layer.gasGap<<"/"<<layer.doubletPhi<<"/";
137 ostr<<(layer.measPhi ? "si" : "no")<<", ";
138 // ostr<<"transform: "<<Amg::toString(layer.transform);
139 return ostr;
140}
141
142std::set<RpcChamber> readTreeDump(const std::string& inputFile) {
143 std::set<RpcChamber> to_ret{};
144 std::cout<<"Read the Rpc geometry tree dump from "<<inputFile<<std::endl;
145 std::unique_ptr<TFile> inFile{TFile::Open(inputFile.c_str())};
146 if (!inFile || !inFile->IsOpen()) {
147 std::cerr<<__FILE__<<":"<<__LINE__<<" Failed to open "<<inputFile<<std::endl;
148 return to_ret;
149 }
150 TTreeReader treeReader("RpcGeoModelTree", inFile.get());
151 if (treeReader.IsInvalid()){
152 std::cerr<<__FILE__<<":"<<__LINE__<<" The file "<<inputFile<<" does not contain the 'RpcGeoModelTree'"<<std::endl;
153 return to_ret;
154 }
155
156 TTreeReaderValue<unsigned short> stationIndex{treeReader, "stationIndex"};
157 TTreeReaderValue<short> stationEta{treeReader, "stationEta"};
158 TTreeReaderValue<short> stationPhi{treeReader, "stationPhi"};
159 TTreeReaderValue<uint8_t> stationDoubletR{treeReader, "stationDoubletR"};
160 TTreeReaderValue<uint8_t> stationDoubletZ{treeReader,"stationDoubletZ"};
161 TTreeReaderValue<uint8_t> stationDoubletPhi{treeReader,"stationDoubletPhi"};
162 TTreeReaderValue<std::string> chamberDesign{treeReader,"chamberDesign"};
163
164
166 TTreeReaderValue<uint8_t> numStripsEta{treeReader, "numEtaStrips"};
167 TTreeReaderValue<uint8_t> numStripsPhi{treeReader, "numPhiStrips"};
169 // TTreeReaderValue<uint8_t> numGasGapsPhi{treeReader, "numPhiGasGaps"};
170 TTreeReaderValue<uint8_t> numPhiPanels{treeReader, "numPhiPanels"};
171 TTreeReaderValue<uint8_t> numLayers{treeReader, "numRpcLayers"};
172
174 TTreeReaderValue<float> stripEtaPitch{treeReader, "stripEtaPitch"};
175 TTreeReaderValue<float> stripPhiPitch{treeReader, "stripPhiPitch"};
176 TTreeReaderValue<float> stripEtaWidth{treeReader, "stripEtaWidth"};
177 TTreeReaderValue<float> stripPhiWidth{treeReader, "stripPhiWidth"};
178 TTreeReaderValue<float> stripEtaLength{treeReader, "stripEtaLength"};
179 TTreeReaderValue<float> stripPhiLength{treeReader, "stripPhiLength"};
180
182 TTreeReaderValue<std::vector<float>> geoModelTransformX{treeReader, "GeoModelTransformX"};
183 TTreeReaderValue<std::vector<float>> geoModelTransformY{treeReader, "GeoModelTransformY"};
184 TTreeReaderValue<std::vector<float>> geoModelTransformZ{treeReader, "GeoModelTransformZ"};
185
186 TTreeReaderValue<std::vector<float>> alignableNodeX{treeReader, "AlignableNodeX"};
187 TTreeReaderValue<std::vector<float>> alignableNodeY{treeReader, "AlignableNodeY"};
188 TTreeReaderValue<std::vector<float>> alignableNodeZ{treeReader, "AlignableNodeZ"};
189
190
191
192 TTreeReaderValue<std::vector<float>> stripRotTranslationX{treeReader, "stripRotTranslationX"};
193 TTreeReaderValue<std::vector<float>> stripRotTranslationY{treeReader, "stripRotTranslationY"};
194 TTreeReaderValue<std::vector<float>> stripRotTranslationZ{treeReader, "stripRotTranslationZ"};
195
196
197 TTreeReaderValue<std::vector<float>> stripRotCol1X{treeReader, "stripRotLinearCol1X"};
198 TTreeReaderValue<std::vector<float>> stripRotCol1Y{treeReader, "stripRotLinearCol1Y"};
199 TTreeReaderValue<std::vector<float>> stripRotCol1Z{treeReader, "stripRotLinearCol1Z"};
200
201 TTreeReaderValue<std::vector<float>> stripRotCol2X{treeReader, "stripRotLinearCol2X"};
202 TTreeReaderValue<std::vector<float>> stripRotCol2Y{treeReader, "stripRotLinearCol2Y"};
203 TTreeReaderValue<std::vector<float>> stripRotCol2Z{treeReader, "stripRotLinearCol2Z"};
204
205 TTreeReaderValue<std::vector<float>> stripRotCol3X{treeReader, "stripRotLinearCol3X"};
206 TTreeReaderValue<std::vector<float>> stripRotCol3Y{treeReader, "stripRotLinearCol3Y"};
207 TTreeReaderValue<std::vector<float>> stripRotCol3Z{treeReader, "stripRotLinearCol3Z"};
208
209 TTreeReaderValue<std::vector<uint8_t>> stripRotGasGap{treeReader, "stripRotGasGap"};
210 TTreeReaderValue<std::vector<uint8_t>> stripRotDblPhi{treeReader, "stripRotDoubletPhi"};
211 TTreeReaderValue<std::vector<bool>> stripRotMeasPhi{treeReader, "stripRotMeasPhi"};
212
213 TTreeReaderValue<std::vector<float>> stripPosX{treeReader, "stripPosX"};
214 TTreeReaderValue<std::vector<float>> stripPosY{treeReader, "stripPosY"};
215 TTreeReaderValue<std::vector<float>> stripPosZ{treeReader, "stripPosZ"};
216
217 TTreeReaderValue<std::vector<float>> stripLocPosX{treeReader, "stripLocPosX"};
218 TTreeReaderValue<std::vector<float>> stripLocPosY{treeReader, "stripLocPosY"};
219
220
221 TTreeReaderValue<std::vector<bool>> stripPosMeasPhi{treeReader, "stripPosMeasPhi"};
222 TTreeReaderValue<std::vector<uint8_t>> stripPosGasGap{treeReader, "stripPosGasGap"};
223 TTreeReaderValue<std::vector<uint8_t>> stripPosNum{treeReader, "stripPosNum"};
224 TTreeReaderValue<std::vector<uint8_t>> stripDblPhi{treeReader, "stripPosDoubletPhi"};
225
226 while (treeReader.Next()) {
227 RpcChamber newchamber{};
228
229 newchamber.id.stationIndex = (*stationIndex);
230 newchamber.design = (*chamberDesign);
231 newchamber.id.eta = (*stationEta);
232 newchamber.id.phi = (*stationPhi);
233 newchamber.id.doubletPhi = (*stationDoubletPhi);
234 newchamber.id.doubletR = (*stationDoubletR);
235 newchamber.id.doubletZ = (*stationDoubletZ);
236
237 newchamber.stripPitchEta = (*stripEtaPitch);
238 newchamber.stripPitchPhi = (*stripPhiPitch);
239 newchamber.stripWidthEta = (*stripEtaWidth);
240 newchamber.stripWidthPhi = (*stripPhiWidth);
241 newchamber.stripLengthEta = (*stripEtaLength);
242 newchamber.stripLengthPhi = (*stripPhiLength);
243
244 newchamber.numStripsEta = (*numStripsEta);
245 newchamber.numStripsPhi = (*numStripsPhi);
246 // newchamber.numGasGapsPhi = (*numGasGapsPhi);
247 newchamber.numPhiPanels = (*numPhiPanels);
248 newchamber.numLayers = (*numLayers);
249
250
251 Amg::Vector3D geoTrans{(*geoModelTransformX)[0], (*geoModelTransformY)[0], (*geoModelTransformZ)[0]};
252 Amg::RotationMatrix3D geoRot{Amg::RotationMatrix3D::Identity()};
253 geoRot.col(0) = Amg::Vector3D((*geoModelTransformX)[1], (*geoModelTransformY)[1], (*geoModelTransformZ)[1]);
254 geoRot.col(1) = Amg::Vector3D((*geoModelTransformX)[2], (*geoModelTransformY)[2], (*geoModelTransformZ)[2]);
255 geoRot.col(2) = Amg::Vector3D((*geoModelTransformX)[3], (*geoModelTransformY)[3], (*geoModelTransformZ)[3]);
256 newchamber.geoModelTransform = Amg::getTransformFromRotTransl(std::move(geoRot), std::move(geoTrans));
257
258 geoRot.col(0) = Amg::Vector3D((*alignableNodeX)[1], (*alignableNodeY)[1], (*alignableNodeZ)[1]);
259 geoRot.col(1) = Amg::Vector3D((*alignableNodeX)[2], (*alignableNodeY)[2], (*alignableNodeZ)[2]);
260 geoRot.col(2) = Amg::Vector3D((*alignableNodeX)[3], (*alignableNodeY)[3], (*alignableNodeZ)[3]);
261 geoTrans = Amg::Vector3D{(*alignableNodeX)[0], (*alignableNodeY)[0], (*alignableNodeZ)[0]};
262 newchamber.alignableTransform = Amg::getTransformFromRotTransl(std::move(geoRot), std::move(geoTrans));
263
264 //strips
265 for (size_t s = 0; s < stripPosX->size(); ++s){
266 RpcChamber::RpcStrip newStrip{};
267 newStrip.position = Amg::Vector3D{(*stripPosX)[s], (*stripPosY)[s], (*stripPosZ)[s]};
268 newStrip.locPos = Amg::Vector2D{(*stripLocPosX)[s], (*stripLocPosY)[s]};
269
270 newStrip.gasGap = (*stripPosGasGap)[s];
271 newStrip.doubletPhi = (*stripDblPhi)[s];
272 newStrip.measPhi = (*stripPosMeasPhi)[s];
273 newStrip.strip = (*stripPosNum)[s];
274 newchamber.strips.insert(std::move(newStrip));
275 }
276 for (size_t l = 0; l < stripRotMeasPhi->size(); ++l){
277 RpcChamber::RpcLayer newLayer{};
278 newLayer.measPhi = (*stripRotMeasPhi)[l];
279 newLayer.gasGap = (*stripRotGasGap)[l];
280 newLayer.doubletPhi = (*stripRotDblPhi)[l];
281 Amg::RotationMatrix3D stripRot{Amg::RotationMatrix3D::Identity()};
282 Amg::Vector3D translation{(*stripRotTranslationX)[l],(*stripRotTranslationY)[l],(*stripRotTranslationZ)[l]};
283 stripRot.col(0) = Amg::Vector3D((*stripRotCol1X)[l],(*stripRotCol1Y)[l], (*stripRotCol1Z)[l]);
284 stripRot.col(1) = Amg::Vector3D((*stripRotCol2X)[l],(*stripRotCol2Y)[l], (*stripRotCol2Z)[l]);
285 stripRot.col(2) = Amg::Vector3D((*stripRotCol3X)[l],(*stripRotCol3Y)[l], (*stripRotCol3Z)[l]);
286 newLayer.transform = Amg::getTransformFromRotTransl(std::move(stripRot), std::move(translation));
287 newchamber.layers.insert(std::move(newLayer));
288 }
289
290 auto insert_itr = to_ret.insert(std::move(newchamber));
291 if (!insert_itr.second) {
292 std::stringstream err{};
293 err<<__FILE__<<":"<<__LINE__<<" The chamber "<<(*insert_itr.first).id
294 <<" has already been inserted. "<<std::endl;
295 throw std::runtime_error(err.str());
296 }
297 }
298 std::cout<<"File parsing is finished. Found in total "<<to_ret.size()<<" readout element dumps "<<std::endl;
299 return to_ret;
300}
301
302#define TEST_BASICPROP(attribute, propName) \
303 if (std::abs(1.*test.attribute - 1.*reference.attribute) > tolerance) { \
304 std::cerr<<"RpcGeoModelComparison() "<<__LINE__<<": The chamber "<<test \
305 <<" differs w.r.t "<<propName<<" "<< reference.attribute \
306 <<" (ref) vs. " <<test.attribute << " (test)" << std::endl; \
307 chamberOkay = false; \
308 }
309
310int main( int argc, char** argv ) {
311 std::string refFile{}, testFile{};
312
313 for (int arg = 1; arg < argc; ++arg) {
314 std::string the_arg{argv[arg]};
315 if (the_arg == "--refFile" && arg +1 < argc) {
316 refFile = std::string{argv[arg+1]};
317 ++arg;
318 } else if (the_arg == "--testFile" && arg + 1 < argc) {
319 testFile = std::string{argv[arg+1]};
320 ++arg;
321 }
322 }
323 if (refFile.empty()) {
324 std::cerr<<"Please parse the path of the reference file via --refFile "<<std::endl;
325 return EXIT_FAILURE;
326 }
327 if (testFile.empty()) {
328 std::cerr<<"Please parse the path of the test file via --testFile "<<std::endl;
329 return EXIT_FAILURE;
330 }
332 if (!refFile.starts_with( "root://")) refFile = PathResolver::FindCalibFile(refFile);
333 if (!testFile.starts_with( "root://")) testFile = PathResolver::FindCalibFile(testFile);
335 std::set<RpcChamber> refChambers = readTreeDump(refFile);
336 if (refChambers.empty()) {
337 std::cerr<<"The file "<<refFile<<" should contain at least one chamber "<<std::endl;
338 return EXIT_FAILURE;
339 }
340 std::set<RpcChamber> testChambers = readTreeDump(testFile);
341 if (testChambers.empty()) {
342 std::cerr<<"The file "<<testFile<<" should contain at least one chamber "<<std::endl;
343 return EXIT_FAILURE;
344 }
345 std::cout<<"Read "<<refChambers.size()<<" chambers from reference: "<<refFile
346 <<" & "<<testChambers.size()<<" from "<<testFile<<std::endl;
347 int return_code = EXIT_SUCCESS;
348 unsigned int goodChambers{0};
350 for (const RpcChamber& reference : refChambers) {
351 std::set<RpcChamber>::const_iterator test_itr = testChambers.find(reference);
352
353 if (test_itr == testChambers.end()) {
354 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": The chamber "<<reference<<" is not part of the testing "<<std::endl;
355 return_code = EXIT_FAILURE;
356 continue;
357 }
358 bool chamberOkay = true;
359 const RpcChamber& test = {*test_itr};
360
361 TEST_BASICPROP(numLayers, "number of rpc singlets");
362 TEST_BASICPROP(numGasGapsPhi, "number of phi gas gaps");
363 TEST_BASICPROP(numPhiPanels, "number of phi readout panels");
364
365
366 TEST_BASICPROP(numStripsEta, "number of eta strips");
367 TEST_BASICPROP(numStripsPhi, "number of phi strips");
368
369 TEST_BASICPROP(stripPitchEta, "eta strip pitch");
370 TEST_BASICPROP(stripPitchPhi, "phi strip pitch");
371
372 TEST_BASICPROP(stripWidthEta, "eta strip width");
373 TEST_BASICPROP(stripWidthPhi, "phi strip width");
374
375 TEST_BASICPROP(stripLengthEta, "eta strip length");
376 TEST_BASICPROP(stripLengthPhi, "phi strip length");
377 if (!chamberOkay) continue;
378
379 Amg::Transform3D moduleDiff = reference.geoModelTransform.inverse() *
380 test.geoModelTransform;
381
382 if (false && !Amg::doesNotDeform(moduleDiff)){
383 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": "<<test<<" is displaced by "
384 <<Amg::toString(moduleDiff)<<std::endl;
385 continue;
386 }
387
388
389 using RpcLayer = RpcChamber::RpcLayer;
390 for (const RpcLayer& refLayer : reference.layers) {
391 break;
392 std::set<RpcLayer>::const_iterator lay_itr = test.layers.find(refLayer);
393 if (lay_itr == test.layers.end()) {
394 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": "<<test<<" "
395 <<refLayer<<" is not found. "<<std::endl;
396 chamberOkay = false;
397 continue;
398 }
399 // break;
400 const RpcLayer& testLayer{*lay_itr};
401 const Amg::Transform3D layAlignment = testLayer.transform.inverse() *
402 refLayer.transform;
403 if (layAlignment.translation().mag() > tolerance) {
404 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": "<<test<<" "
405 <<"the layer "<<testLayer<<" is misplaced w.r.t. reference by "
406 <<Amg::toString(testLayer.transform.translation())<<" vs. "
407 <<Amg::toString(refLayer.transform.translation()) <<" delta : "
408 <<Amg::toString(layAlignment.translation())
409 <<", perp: "<<layAlignment.translation().perp()
410 <<", mag: "<<layAlignment.translation().mag()<<std::endl;
411 chamberOkay = false;
412 }
413 if (!Amg::doesNotDeform(layAlignment) &&
414 !Amg::doesNotDeform(layAlignment * Amg::getRotateX3D(180*Gaudi::Units::deg)) &&
415 !Amg::doesNotDeform(layAlignment * Amg::getRotateZ3D(180*Gaudi::Units::deg))) {
416 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": "<<test<<" "
417 <<"the layer "<<testLayer<<" is misaligned w.r.t. reference by "
418 <<GeoTrf::toString(layAlignment, true)<<std::endl;
419 chamberOkay = false;
420 }
421 }
422 using RpcStrip = RpcChamber::RpcStrip;
423 if (!chamberOkay) continue;
424 unsigned int failedEta{0}, failedPhi{0};
425 for (const RpcStrip& refStrip : reference.strips) {
426 std::set<RpcStrip>::const_iterator strip_itr = test.strips.find(refStrip);
427 if (strip_itr == test.strips.end()) {
428 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": "<<test<<" "
429 <<refStrip<<" is not found. "<<std::endl;
430 chamberOkay = false;
431 continue;
432 }
433 const RpcStrip& testStrip{*strip_itr};
434 const Amg::Vector3D diffStrip{testStrip.position - refStrip.position};
435 if (diffStrip.mag() > tolerance) {
436 constexpr unsigned int maxFail = 3;
437 if ( (!refStrip.measPhi && ( (++failedEta) <= maxFail || refStrip.strip <= 3)) ||
438 (refStrip.measPhi && ( (++failedPhi) <= maxFail || refStrip.strip <= 3)) ) {
439 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": "<<test<<" "
440 <<testStrip<<" should be located at "<<Amg::toString(refStrip.position, 2)
441 <<" displacement: "<<Amg::toString(diffStrip,2)<<", perp: "
442 <<diffStrip.perp()<<", mag: "<<diffStrip.mag()<<std::endl;
443 } else if (failedEta > maxFail && failedPhi > maxFail) {
444 break;
445 }
446 chamberOkay = false;
447 }
448 continue;
449 const Amg::Vector2D diffLocStrip{testStrip.locPos - refStrip.locPos};
450 if (diffStrip.mag() > tolerance) {
451 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": "<<test<<" "
452 <<testStrip<<" should be located at "<<Amg::toString(refStrip.locPos, 2)
453 <<" displacement: "<<Amg::toString(diffLocStrip,2)<<", mag: "<<diffLocStrip.mag()<<std::endl;
454 chamberOkay = false;
455 }
456 }
457 if (!chamberOkay) {
458 return_code = EXIT_FAILURE;
459 continue;
460 }
461
462 const Amg::Transform3D alignableDistort = test.alignableTransform.inverse()*(reference.alignableTransform );
463 if (!Amg::doesNotDeform(alignableDistort) || alignableDistort.translation().mag() > tolerance) {
464 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": The alignable nodes are at differnt places for "
465 <<test<<". " <<Amg::toString(alignableDistort, true)<<std::endl;
466 return_code = EXIT_FAILURE;
467 } else {
468 ++goodChambers;
469 }
470
471 }
472 for (const RpcChamber& test : testChambers){
473 if (refChambers.find(test) == refChambers.end()) {
474 std::cerr<<"runRpcGeoComparison() "<<__LINE__<<": The chamber "<<test<<" is not in the references."<<std::endl;
475 return_code = EXIT_FAILURE;
476 }
477 }
478 std::cout<<"runRpcGeoComparison() "<<__LINE__<<": "<<
479 goodChambers<<"/"<<refChambers.size()<<" chambers are in complete agreement. "<<std::endl;
480 return return_code;
481
482}
483
484
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.
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