Fixes to DD4hep alignment code
The 2 main directions being :
- proper handling of units, ROOT and LHCb ones being different
- proper cleanup of cached data when changing geometry
Goes along with LHCb!2998 (merged), Rec!239 (merged), Alignment!168 (merged) and AlignmentOnline!49 (closed).
Edited by Miroslav Saur
Merge request reports
Activity
added lhcb-dd4hep label
mentioned in merge request LHCb!2998 (merged)
mentioned in merge request Rec!2396 (merged)
mentioned in merge request Alignment!168 (merged)
- [2021-04-09 17:00] Automatic merge failed in lhcb-master-mr#2168
- [2021-04-10 00:05] Validation started with lhcb-dd4hep#797
- [2021-04-12 10:55] Automatic merge failed in lhcb-master-mr#2175
- [2021-04-13 00:04] Validation started with lhcb-dd4hep#798
- [2021-04-13 12:06] Automatic merge failed in lhcb-master-mr#2188
- [2021-04-14 00:06] Validation started with lhcb-dd4hep#799
- [2021-04-15 00:04] Validation started with lhcb-dd4hep#800
- [2021-04-16 00:08] Validation started with lhcb-dd4hep#801
- [2021-04-16 01:28] Validation started with lhcb-dd4hep#801
Edited by Software for LHCbmentioned in issue Moore#265 (closed)
150 153 const auto side3 = vp3.right(); 151 154 auto sidepos3 = side3.toGlobal( ROOT::Math::XYZPoint{0, 0, 0} ); 152 155 print_position( slice3_id, "Right Side", sidepos3 ); 153 auto diff3 = sidepos3 - ROOT::Math::XYZPoint{0.6, 0.6, 0.6}; 154 if ( diff3.Mag2() > 0.001 ) { ::exit( EINVAL ); } 156 auto diff3 = sidepos3 - ROOT::Math::XYZPoint{6, 6, 6}; // LHCb units, so in mm 157 if ( diff3.Mag2() > 0.001 ) { 158 std::cout << "position of the right side of the VP wrong : " << sidepos3 << " - expected {6, 6, 6}\n"; It would be nice to use explicit units:
156 auto diff3 = sidepos3 - ROOT::Math::XYZPoint{6, 6, 6}; // LHCb units, so in mm 157 if ( diff3.Mag2() > 0.001 ) { 158 std::cout << "position of the right side of the VP wrong : " << sidepos3 << " - expected {6, 6, 6}\n"; 156 auto diff3 = sidepos3 - ROOT::Math::XYZPoint{6 * Gaudi::Units::mm, 6 * Gaudi::Units::mm, 6 * Gaudi::Units::mm}; 157 if ( diff3.Mag2() > 0.001 * Gaudi::Units::mm2 ) { 158 std::cout << "position of the right side of the VP wrong : " << sidepos3 << " - expected {6 mm, 6 mm, 6 mm}\n"; but of course the problem is that Gaudi is not a dependency. So can we copy just the
SystemOfUnits.h
header (not for this MR) and avoid magic constants and "bare" numbers? Of course not for this MR.
mentioned in issue #10
Please register or sign in to reply