307 std::vector<std::vector<int>> DEofHC{{100, 103},
315 {500, 501, 502, 503, 504, 514, 515, 516, 517},
316 {505, 506, 507, 508, 509, 510, 511, 512, 513},
317 {600, 601, 602, 603, 604, 614, 615, 616, 617},
318 {605, 606, 607, 608, 609, 610, 611, 612, 613},
319 {700, 701, 702, 703, 704, 705, 706, 720, 721, 722, 723, 724, 725},
320 {707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719},
321 {800, 801, 802, 803, 804, 805, 806, 820, 821, 822, 823, 824, 825},
322 {807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819},
323 {900, 901, 902, 903, 904, 905, 906, 920, 921, 922, 923, 924, 925},
324 {907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919},
325 {1000, 1001, 1002, 1003, 1004, 1005, 1006, 1020, 1021, 1022, 1023, 1024, 1025},
326 {1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019}};
329 for (
int hc = 0; hc < 20; hc++) {
331 TGeoCombiTrans localDeltaTransform = misAlignModule();
334 std::string sname = fmt::format(
"MCH/HC{}", hc);
337 double lPsi, lTheta, lPhi = 0.;
338 if (!isMatrixConvertedToAngles(localDeltaTransform.GetRotationMatrix(), lPsi, lTheta, lPhi)) {
339 LOG(error) <<
"Problem extracting angles!";
342 LOG(
debug) << fmt::format(
"Module {} is {} : {} : Local Delta | X: {:+f} Y: {:+f} Z: {:+f} | pitch: {:+f} roll: {:+f} yaw: {:+f}\n", hc, lAP.
getSymName(), lAP.
getAlignableID(), localDeltaTransform.GetTranslation()[0],
343 localDeltaTransform.GetTranslation()[1], localDeltaTransform.GetTranslation()[2], lPsi, lTheta, lPhi);
345 LOG(error) <<
"Could not set local params for " << sname.c_str();
347 LOG(
debug) << fmt::format(
"Module {} is {} : {} : Global Delta | X: {:+f} Y: {:+f} Z: {:+f} | pitch: {:+f} roll: {:+f} yaw: {:+f}\n", hc, lAP.
getSymName(), lAP.
getAlignableID(), lAP.
getX(),
352 for (
int de = 0;
de < DEofHC[hc].size();
de++) {
354 localDeltaTransform = misAlignDetElem();
356 sname = fmt::format(
"MCH/HC{}/DE{}", hc, DEofHC[hc][
de]);
359 if (!isMatrixConvertedToAngles(localDeltaTransform.GetRotationMatrix(), lPsi, lTheta, lPhi)) {
360 LOG(error) <<
"Problem extracting angles for " << sname.c_str();
362 LOG(
debug) << fmt::format(
"DetElem {} is {} : {} : Local Delta| X: {:+f} Y: {:+f} Z: {:+f} | pitch: {:+f} roll: {:+f} yaw: {:+f}\n",
de, lAP.
getSymName(), lAP.
getAlignableID(), localDeltaTransform.GetTranslation()[0],
363 localDeltaTransform.GetTranslation()[1], localDeltaTransform.GetTranslation()[2], lPsi, lTheta, lPhi);
365 LOG(error) <<
" Could not set local params for " << sname.c_str();
367 LOG(
debug) << fmt::format(
"DetElem {} is {} : {} : Global Delta | X: {:+f} Y: {:+f} Z: {:+f} | pitch: {:+f} roll: {:+f} yaw: {:+f}\n",
de, lAP.
getSymName(), lAP.
getAlignableID(), lAP.
getX(),
374 LOG(info) <<
"MisAligned half chamber " << hc;