Go to the source code of this file.
int create_misalignment_lmd_pixel |
( |
double |
dr = 0 , |
|
|
double |
da = 0 , |
|
|
string |
filename |
|
) |
| |
TEST for one sensor only!
Definition at line 1 of file create_misalignment_lmd_pixel.C.
References dx, dy, dz, i, m, and output.
8 output<<
"#################################################################"<<endl;
9 output<<
"# Alignment parameters for LMD"<<endl;
10 output<<
"# Format:"<<endl;
11 output<<
"# parameter_name:parameter_type(i-integer, d-double) parameter_value"<<endl;
12 output<<
"# PndLmdAlignPar"<<endl;
13 output<<
"# Description of parameters:"<<endl;
14 output<<
"#################################################################"<<endl;
15 output<<
"#################################################################"<<endl;
16 output<<
"# Alignment parameters for Lmd pixel sensors"<<endl;
17 output<<
"#################################################################"<<endl;
18 output<<
"[LMDAlignPar]"<<endl;
19 output<<
"num_halfs:Int_t 2"<<endl;
20 output<<
"num_planes:Int_t 4"<<endl;
21 output<<
"num_modules:Int_t 5"<<endl;
22 output<<
"num_sensors:Int_t 5"<<endl;
23 output<<
"num_sides:Int_t 2"<<endl;
25 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
31 double dalpha[2][4][5];
32 double dbeta[2][4][5];
33 double dgamma[2][4][5];
37 for(Int_t j=0; j<2; ++j){
38 for(Int_t
i=0;
i<4; ++
i){
39 for(Int_t
m=0;
m<5; ++
m){
46 dx[j][
i][
m] = grand.Gaus(0,dr);
49 dy[j][
i][
m] = grand.Gaus(0,dr);
52 dz[j][
i][
m] = grand.Gaus(0,dr);
55 dalpha[j][
i][
m] = grand.Gaus(0,da);
58 dbeta[j][
i][
m] = grand.Gaus(0,da);
61 dgamma[j][
i][
m] = grand.Gaus(0,da);
84 output<<
"shift_x_"<<j<<
"_"<<
i<<
"_"<<
m<<
":Double_t "<<dx[j][
i][
m]<<endl;
85 output<<
"shift_y_"<<j<<
"_"<<
i<<
"_"<<
m<<
":Double_t "<<dy[j][
i][
m]<<endl;
86 output<<
"shift_z_"<<j<<
"_"<<
i<<
"_"<<
m<<
":Double_t "<<dz[j][
i][
m]<<endl;
87 output<<
"rotate_x_"<<j<<
"_"<<
i<<
"_"<<
m<<
":Double_t "<<dalpha[j][
i][
m]<<endl;
88 output<<
"rotate_y_"<<j<<
"_"<<
i<<
"_"<<
m<<
":Double_t "<<dbeta[j][
i][
m]<<endl;
89 output<<
"rotate_z_"<<j<<
"_"<<
i<<
"_"<<
m<<
":Double_t "<<dgamma[j][
i][
m]<<endl;
94 output<<
"#################################################################"<<endl;
FairParRootFileIo * output