7 #include "CLHEP/Units/SystemOfUnits.h"
16 #include "Identifier/Identifier.h"
70 return StatusCode::SUCCESS;
76 const bool useConditionStore = (
m_managerName ==
"SCT" and (not accessDuringInitialization));
82 if (useConditionStore) {
86 if (elements==
nullptr) {
96 cout << element->getIdHelper()->show_to_string(element->identify());
102 Amg::Vector3D globalShift = elementXF * zeroPoint - elementDefXF * zeroPoint;
103 double alphaL,betaL,gammaL;
107 cout <<
" NO SHIFT" << endl;
110 double alphaG,betaG,gammaG;
113 cout <<
" Local Shift" << endl;
114 cout <<
" delta trans " << localDelta * zeroPoint <<
" Rot: {" << alphaL <<
"," << betaL <<
"," << gammaL <<
"}" <<endl;
115 cout <<
" phiAxis " << phiAxis <<
" -> " << localDelta * phiAxis << endl;
116 cout <<
" etaAxis " << etaAxis <<
" -> " << localDelta * etaAxis << endl;
117 cout <<
" depAxis " << depAxis <<
" -> " << localDelta * depAxis << endl;
118 cout <<
" Global Shift" << endl;
119 cout <<
" shift " << globalShift << endl;
120 cout <<
" delta trans " << globalDelta * zeroPoint <<
" Rot: {" << alphaG <<
"," << betaG <<
"," << gammaG <<
"}" <<endl;
121 cout <<
" center " << elementDefXF * zeroPoint <<
" -> " << elementXF * zeroPoint << endl;
122 cout <<
" phiAxis " << elementDefXF * phiAxis <<
" -> " << elementXF * phiAxis << endl;
123 cout <<
" etaAxis " << elementDefXF * etaAxis <<
" -> " << elementXF * etaAxis << endl;
124 cout <<
" depAxis " << elementDefXF * depAxis <<
" -> " << elementXF * depAxis << endl;
126 cout <<
" Global shift: " << globalShift <<
" Local shift/Rot: " << localDelta * zeroPoint <<
" Rot: {"
127 << alphaL <<
"," << betaL <<
"," << gammaL <<
"}" <<endl;
131 cout <<
"Missing element!!!!!!!!!!!" << endl;
144 for (
int i=0;
i < 3;
i++){
145 for (
int j=0; j < 3; j++){
147 if (
diff > errRot)
return false;
152 for (
int ii = 0; ii < 3; ii++){
153 double diff = abs(
t1(ii,3) -
t2(ii,3));
154 if (
diff > errTrans)
return false;
160 double siny = trans(0,2);
165 if ((trans(1,2) == 0) && (trans(2,2) == 0)) {
169 alpha = atan2(trans(1,1),trans(2,1));
171 alpha = atan2(-trans(1,2),trans(2,2));
172 gamma = atan2(-trans(0,1),trans(0,0));
173 if (alpha == 0) alpha = 0;
182 return StatusCode::SUCCESS;
188 return StatusCode::SUCCESS;