#include <MdcAlignPar.h>
Public Member Functions | |
void | initAlignPar () |
void | initAlignPar () |
void | initAlignPar () |
MdcAlignPar () | |
MdcAlignPar () | |
MdcAlignPar () | |
bool | rdAlignPar (std::string alignFile) |
bool | rdAlignPar (std::string alignFile) |
bool | rdAlignPar (std::string alignFile) |
void | setDelDx (int iEP, double val) |
void | setDelDx (int iEP, double val) |
void | setDelDx (int iEP, double val) |
void | setDelDy (int iEP, double val) |
void | setDelDy (int iEP, double val) |
void | setDelDy (int iEP, double val) |
void | setDelDz (int iEP, double val) |
void | setDelDz (int iEP, double val) |
void | setDelDz (int iEP, double val) |
void | setDelRx (int iEP, double val) |
void | setDelRx (int iEP, double val) |
void | setDelRx (int iEP, double val) |
void | setDelRy (int iEP, double val) |
void | setDelRy (int iEP, double val) |
void | setDelRy (int iEP, double val) |
void | setDelRz (int iEP, double val) |
void | setDelRz (int iEP, double val) |
void | setDelRz (int iEP, double val) |
void | setDx (int iEP, double val) |
void | setDx (int iEP, double val) |
void | setDx (int iEP, double val) |
void | setDy (int iEP, double val) |
void | setDy (int iEP, double val) |
void | setDy (int iEP, double val) |
void | setDz (int iEP, double val) |
void | setDz (int iEP, double val) |
void | setDz (int iEP, double val) |
void | setErrDx (int iEP, double val) |
void | setErrDx (int iEP, double val) |
void | setErrDx (int iEP, double val) |
void | setErrDy (int iEP, double val) |
void | setErrDy (int iEP, double val) |
void | setErrDy (int iEP, double val) |
void | setErrDz (int iEP, double val) |
void | setErrDz (int iEP, double val) |
void | setErrDz (int iEP, double val) |
void | setErrRx (int iEP, double val) |
void | setErrRx (int iEP, double val) |
void | setErrRx (int iEP, double val) |
void | setErrRy (int iEP, double val) |
void | setErrRy (int iEP, double val) |
void | setErrRy (int iEP, double val) |
void | setErrRz (int iEP, double val) |
void | setErrRz (int iEP, double val) |
void | setErrRz (int iEP, double val) |
void | setRx (int iEP, double val) |
void | setRx (int iEP, double val) |
void | setRx (int iEP, double val) |
void | setRy (int iEP, double val) |
void | setRy (int iEP, double val) |
void | setRy (int iEP, double val) |
void | setRz (int iEP, double val) |
void | setRz (int iEP, double val) |
void | setRz (int iEP, double val) |
void | wrtAlignPar () |
void | wrtAlignPar () |
void | wrtAlignPar () |
~MdcAlignPar () | |
~MdcAlignPar () | |
~MdcAlignPar () | |
Private Attributes | |
double | m_delDx [NEP] |
double | m_delDy [NEP] |
double | m_delDz [NEP] |
double | m_delRx [NEP] |
double | m_delRy [NEP] |
double | m_delRz [NEP] |
double | m_dx [NEP] |
double | m_dy [NEP] |
double | m_dz [NEP] |
double | m_errDx [NEP] |
double | m_errDy [NEP] |
double | m_errDz [NEP] |
double | m_errRx [NEP] |
double | m_errRy [NEP] |
double | m_errRz [NEP] |
double | m_rx [NEP] |
double | m_ry [NEP] |
double | m_rz [NEP] |
|
00011 { 00012 for(int iEP=0; iEP<NEP; iEP++){ 00013 m_delDx[iEP] = 0.0; 00014 m_delDy[iEP] = 0.0; 00015 m_delDz[iEP] = 0.0; 00016 m_delRx[iEP] = 0.0; 00017 m_delRy[iEP] = 0.0; 00018 m_delRz[iEP] = 0.0; 00019 } 00020 }
|
|
00022 { 00023 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
00024 { 00025 for(int iEP=0; iEP<NEP; iEP++){ 00026 m_dx[iEP] = 0.0; 00027 m_dy[iEP] = 0.0; 00028 m_dz[iEP] = 0.0; 00029 m_rx[iEP] = 0.0; 00030 m_ry[iEP] = 0.0; 00031 m_rz[iEP] = 0.0; 00032 00033 m_errDx[iEP] = 0.0; 00034 m_errDy[iEP] = 0.0; 00035 m_errDz[iEP] = 0.0; 00036 m_errRx[iEP] = 0.0; 00037 m_errRy[iEP] = 0.0; 00038 m_errRz[iEP] = 0.0; 00039 } 00040 }
|
|
|
|
|
|
00042 { 00043 ifstream fpar(alignFile.c_str()); 00044 cout << "open file" << endl; 00045 if( ! fpar.is_open() ){ 00046 cout << "ERROR: can not open alignment file " << alignFile.c_str() << endl; 00047 return false; 00048 } 00049 00050 int i; 00051 string strtmp; 00052 for(i=0; i<7; i++) fpar >> strtmp; 00053 for(int iEP=0; iEP<NEP; iEP++){ 00054 fpar >> strtmp >> m_dx[iEP] >> m_dy[iEP] >> m_dz[iEP] 00055 >> m_rx[iEP] >> m_ry[iEP] >> m_rz[iEP]; 00056 } 00057 fpar.close(); 00058 return true; 00059 }
|
|
00026 { m_delDx[iEP] = val; }
|
|
00028 { m_delDx[iEP] = val; }
|
|
00028 { m_delDx[iEP] = val; }
|
|
00027 { m_delDy[iEP] = val; }
|
|
00029 { m_delDy[iEP] = val; }
|
|
00029 { m_delDy[iEP] = val; }
|
|
00028 { m_delDz[iEP] = val; }
|
|
00030 { m_delDz[iEP] = val; }
|
|
00030 { m_delDz[iEP] = val; }
|
|
00029 { m_delRx[iEP] = val; }
|
|
00031 { m_delRx[iEP] = val; }
|
|
00031 { m_delRx[iEP] = val; }
|
|
00030 { m_delRy[iEP] = val; }
|
|
00032 { m_delRy[iEP] = val; }
|
|
00032 { m_delRy[iEP] = val; }
|
|
00031 { m_delRz[iEP] = val; }
|
|
00033 { m_delRz[iEP] = val; }
|
|
00033 { m_delRz[iEP] = val; }
|
|
00019 { m_dx[iEP] = val; }
|
|
00021 { m_dx[iEP] = val; }
|
|
00021 { m_dx[iEP] = val; }
|
|
00020 { m_dy[iEP] = val; }
|
|
00022 { m_dy[iEP] = val; }
|
|
00022 { m_dy[iEP] = val; }
|
|
00021 { m_dz[iEP] = val; }
|
|
00023 { m_dz[iEP] = val; }
|
|
00023 { m_dz[iEP] = val; }
|
|
00033 { m_errDx[iEP] = val; }
|
|
00035 { m_errDx[iEP] = val; }
|
|
00035 { m_errDx[iEP] = val; }
|
|
00034 { m_errDy[iEP] = val; }
|
|
00036 { m_errDy[iEP] = val; }
|
|
00036 { m_errDy[iEP] = val; }
|
|
00035 { m_errDz[iEP] = val; }
|
|
00037 { m_errDz[iEP] = val; }
|
|
00037 { m_errDz[iEP] = val; }
|
|
00036 { m_errRx[iEP] = val; }
|
|
00038 { m_errRx[iEP] = val; }
|
|
00038 { m_errRx[iEP] = val; }
|
|
00037 { m_errRy[iEP] = val; }
|
|
00039 { m_errRy[iEP] = val; }
|
|
00039 { m_errRy[iEP] = val; }
|
|
00038 { m_errRz[iEP] = val; }
|
|
00040 { m_errRz[iEP] = val; }
|
|
00040 { m_errRz[iEP] = val; }
|
|
00022 { m_rx[iEP] = val; }
|
|
00024 { m_rx[iEP] = val; }
|
|
00024 { m_rx[iEP] = val; }
|
|
00023 { m_ry[iEP] = val; }
|
|
00025 { m_ry[iEP] = val; }
|
|
00025 { m_ry[iEP] = val; }
|
|
00024 { m_rz[iEP] = val; }
|
|
00026 { m_rz[iEP] = val; }
|
|
00026 { m_rz[iEP] = val; }
|
|
|
|
|
|
00061 { 00062 int i; 00063 int iEnd; 00064 string str[] = {"Inner_east", "Step0_east", "Step1_east", 00065 "Step2_east", "Step3_east", "Step4_east", 00066 "Step5_east", "Outer_east", "Inner_west", 00067 "Step0_west", "Step1_west", "Step2_west", 00068 "Step3_west", "Step4_west", "Step5_west", 00069 "Outer_west"}; 00070 00071 string name[] = {"Elements", "DeltaX(mm)", "DeltaY(mm)", 00072 "DeltaZ(mm)", "RX(rad)", "RY(rad)", "RZ(rad)"}; 00073 00074 ofstream fout("alignPar_new.txt"); 00075 fout << setw(14) << name[0]; 00076 for(i=1; i<7; i++) fout << setw(13) << name[i]; 00077 fout << endl; 00078 for (iEnd=0; iEnd<NEP; iEnd++){ 00079 fout << setw(14) << str[iEnd] 00080 << setw(13) << m_dx[iEnd] + m_delDx[iEnd] 00081 << setw(13) << m_dy[iEnd] + m_delDy[iEnd] 00082 << setw(13) << m_dz[iEnd] + m_delDz[iEnd] 00083 << setw(13) << m_rx[iEnd] + m_delRx[iEnd] 00084 << setw(13) << m_ry[iEnd] + m_delRy[iEnd] 00085 << setw(13) << m_rz[iEnd] + m_delRz[iEnd] << endl; 00086 if(7 == iEnd) fout << endl; 00087 } 00088 fout.close(); 00089 00090 ofstream fdel("delAlign_new.txt"); 00091 fdel << setw(14) << name[0]; 00092 for(i=1; i<7; i++) fdel << setw(13) << name[i]; 00093 fdel << endl; 00094 for (iEnd=0; iEnd<NEP; iEnd++){ 00095 fdel << setw(14) << str[iEnd] << setw(13) << m_delDx[iEnd] 00096 << setw(13) << m_delDy[iEnd] << setw(13) << m_delDz[iEnd] 00097 << setw(13) << m_delRx[iEnd] << setw(13) << m_delRy[iEnd] 00098 << setw(13) << m_delRz[iEnd] << endl; 00099 if(7 == iEnd) fdel << endl; 00100 } 00101 00102 fdel << endl << "Fit error:" << endl; 00103 for (iEnd=0; iEnd<NEP; iEnd++){ 00104 fdel << setw(14) << str[iEnd] << setw(13) << m_errDx[iEnd] 00105 << setw(13) << m_errDy[iEnd] << setw(13) << m_errDz[iEnd] 00106 << setw(13) << m_errRx[iEnd] << setw(13) << m_errRy[iEnd] 00107 << setw(13) << m_errRz[iEnd] << endl; 00108 if(7 == iEnd) fdel << endl; 00109 } 00110 fdel.close(); 00111 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|