12 for(
int iEP=0; iEP<
NEP; iEP++){
25 for(
int iEP=0; iEP<
NEP; iEP++){
43 ifstream fpar(alignFile.c_str());
44 cout <<
"open file" << endl;
45 if( ! fpar.is_open() ){
46 cout <<
"ERROR: can not open alignment file " << alignFile.c_str() << endl;
52 for(i=0; i<7; i++) fpar >> strtmp;
53 for(
int iEP=0; iEP<
NEP; iEP++){
54 fpar >> strtmp >> m_dx[iEP] >> m_dy[iEP] >> m_dz[iEP]
55 >> m_rx[iEP] >> m_ry[iEP] >> m_rz[iEP];
64 string str[] = {
"Inner_east",
"Step0_east",
"Step1_east",
65 "Step2_east",
"Step3_east",
"Step4_east",
66 "Step5_east",
"Outer_east",
"Inner_west",
67 "Step0_west",
"Step1_west",
"Step2_west",
68 "Step3_west",
"Step4_west",
"Step5_west",
71 string name[] = {
"Elements",
"DeltaX(mm)",
"DeltaY(mm)",
72 "DeltaZ(mm)",
"RX(rad)",
"RY(rad)",
"RZ(rad)"};
74 ofstream fout(
"alignPar_new.txt");
75 fout << setw(14) << name[0];
76 for(i=1; i<7; i++) fout << setw(13) << name[i];
78 for (iEnd=0; iEnd<
NEP; iEnd++){
79 fout << setw(14) << str[iEnd]
80 << setw(13) << m_dx[iEnd] + m_delDx[iEnd]
81 << setw(13) << m_dy[iEnd] + m_delDy[iEnd]
82 << setw(13) << m_dz[iEnd] + m_delDz[iEnd]
83 << setw(13) << m_rx[iEnd] + m_delRx[iEnd]
84 << setw(13) << m_ry[iEnd] + m_delRy[iEnd]
85 << setw(13) << m_rz[iEnd] + m_delRz[iEnd] << endl;
86 if(7 == iEnd) fout << endl;
90 ofstream fdel(
"delAlign_new.txt");
91 fdel << setw(14) << name[0];
92 for(i=1; i<7; i++) fdel << setw(13) << name[i];
94 for (iEnd=0; iEnd<
NEP; iEnd++){
95 fdel << setw(14) << str[iEnd] << setw(13) << m_delDx[iEnd]
96 << setw(13) << m_delDy[iEnd] << setw(13) << m_delDz[iEnd]
97 << setw(13) << m_delRx[iEnd] << setw(13) << m_delRy[iEnd]
98 << setw(13) << m_delRz[iEnd] << endl;
99 if(7 == iEnd) fdel << endl;
102 fdel << endl <<
"Fit error:" << endl;
103 for (iEnd=0; iEnd<
NEP; iEnd++){
104 fdel << setw(14) << str[iEnd] << setw(13) << m_errDx[iEnd]
105 << setw(13) << m_errDy[iEnd] << setw(13) << m_errDz[iEnd]
106 << setw(13) << m_errRx[iEnd] << setw(13) << m_errRy[iEnd]
107 << setw(13) << m_errRz[iEnd] << endl;
108 if(7 == iEnd) fdel << endl;
bool rdAlignPar(std::string alignFile)