37 void laser_2d_pos(
int ftpc,
int lsec,TString a,
char *opt)
44 const Float_t lpos1=11.88;
45 const Float_t lpos2=19.55;
46 const Float_t lpos3=28.56;
47 TH2F *hr1 =
new TH2F(
"hr1",
"Laser I(west,lsec 1): nominal (11.88cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
48 TH2F *hr2 =
new TH2F(
"hr2",
"Laser II(west,lsec 1): nominal (19.55cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
49 TH2F *hr3 =
new TH2F(
"hr3",
"Laser III(west,lsec 1): nominal (28.56cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
50 cout<<
"Initialized for ftpc = "<<ftpc<<
"(west) lsec = "<<lsec<<endl;
54 const Float_t lpos1=11.68;
55 const Float_t lpos2=19.45;
56 const Float_t lpos3=28.51;
57 TH2F *hr1 =
new TH2F(
"hr1",
"Laser I(west,lsec 2): nominal (11.68cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
58 TH2F *hr2 =
new TH2F(
"hr2",
"Laser II(west,lsec 2): nominal (19.45cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
59 TH2F *hr3 =
new TH2F(
"hr3",
"Laser III(west,lsec 2): nominal (28.51cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
60 cout<<
"Initialized for ftpc = "<<ftpc<<
"(west) lsec = "<<lsec<<endl;
64 const Float_t lpos1=11.78;
65 const Float_t lpos2=19.35;
66 const Float_t lpos3=28.41;
67 TH2F *hr1 =
new TH2F(
"hr1",
"Laser I(west,lsec 3): nominal (11.78cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
68 TH2F *hr2 =
new TH2F(
"hr2",
"Laser II(west,lsec 3): nominal (19.35cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
69 TH2F *hr3 =
new TH2F(
"hr3",
"Laser III(west,lsec 3): nominal (28.41cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
70 cout<<
"Initialized for ftpc = "<<ftpc<<
"(west) lsec = "<<lsec<<endl;
73 cout<<
"Invalid lsec for ftpc = "<<ftpc<<
"(west) lsec = "<<lsec<<endl;
82 const Float_t lpos1=11.75;
83 const Float_t lpos2=19.44;
84 const Float_t lpos3=28.41;
85 TH2F *hr1 =
new TH2F(
"hr1",
"Laser I(east,lsec 1): nominal (11.75cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
86 TH2F *hr2 =
new TH2F(
"hr2",
"Laser II(east,lsec 1): nominal (19.44cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
87 TH2F *hr3 =
new TH2F(
"hr3",
"Laser III(east,lsec 1): nominal (28.41cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
88 cout<<
"Initialized for ftpc = "<<ftpc<<
"(east) lsec = "<<lsec<<endl;
92 const Float_t lpos1=11.85;
93 const Float_t lpos2=19.44;
94 const Float_t lpos3=28.41;
95 TH2F *hr1 =
new TH2F(
"hr1",
"Laser I(east,lsec 2): nominal (11.85cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
96 TH2F *hr2 =
new TH2F(
"hr2",
"Laser II(east,lsec 2): nominal (19.44cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
97 TH2F *hr3 =
new TH2F(
"hr3",
"Laser III(east,lsec 2): nominal (28.41cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
98 cout<<
"Initialized for ftpc = "<<ftpc<<
"(east) lsec = "<<lsec<<endl;
100 else if (lsec == 3) {
102 const Float_t lpos1=11.86;
103 const Float_t lpos2=19.45;
104 const Float_t lpos3=28.31;
105 TH2F *hr1 =
new TH2F(
"hr1",
"Laser I(east,lsec 3): nominal (11.86cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
106 TH2F *hr2 =
new TH2F(
"hr2",
"Laser II(east,lsec 3): nominal (19.45cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
107 TH2F *hr3 =
new TH2F(
"hr3",
"Laser III(east,lsec 3): nominal (28.31cm) - reconstructed position",12,-0.55,0.65,12,-0.45,0.75);
108 cout<<
"Initialized for ftpc = "<<ftpc<<
"(east) lsec = "<<lsec<<endl;
111 cout<<
"Invalid lsec for ftpc = "<<ftpc<<
"(east) lsec = "<<lsec<<endl;
116 TCanvas *c1 =
new TCanvas(
"c1",
"ps",200,10,700,500);
118 gStyle->SetPalette(1);
119 gStyle->SetOptStat(0);
120 gStyle->SetOptFit(0);
130 TH2F *hr0 =
new TH2F(
"hr",
"",12,-0.55,0.65,12,-0.45,0.75);
131 hr0->GetYaxis()->SetTitle(
"#Delta Ar [%]");
132 hr0->GetXaxis()->SetTitle(
"#Delta t_{0}");
133 hr1->GetYaxis()->SetTitle(
"#Delta Ar [%]");
134 hr1->GetXaxis()->SetTitle(
"#Delta t_{0}");
135 hr2->GetYaxis()->SetTitle(
"#Delta Ar [%]");
136 hr2->GetXaxis()->SetTitle(
"#Delta t_{0}");
137 hr3->GetYaxis()->SetTitle(
"#Delta Ar [%]");
138 hr3->GetXaxis()->SetTitle(
"#Delta t_{0}");
141 FILE *file1=fopen (
"res.log",
"r");
147 float resx,resy,resrad,resphi, t0, gas, T, c2,rad1,rad11, rad2, rad21, rad3, rad31, err;
152 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0,&gas,&T,&resx,&c2);
153 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0,&gas,&T,&resy,&c2);
154 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0,&gas,&T,&resrad,&c2);
155 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0,&gas,&T,&resphi,&c2);
156 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0,&gas,&T,&rad1,&err);
157 datab1 = fscanf(file1,
"%f %f %f %f",&t0,&gas,&T,&rad11);
158 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0,&gas,&T,&rad2,&err);
159 datab1 = fscanf(file1,
"%f %f %f %f",&t0,&gas,&T,&rad21);
160 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0,&gas,&T,&rad3,&err);
161 datab1 = fscanf(file1,
"%f %f %f %f",&t0,&gas,&T,&rad31);
162 if (feof(file1))
break;
166 hr0->Fill(t0,gas,lpos1-rad1);
170 hr0->Fill(t0,gas,lpos2-rad2);
174 hr0->Fill(t0,gas,lpos3-rad3);
178 hr1->Fill(t0,gas,lpos1-rad1);
179 hr2->Fill(t0,gas,lpos2-rad2);
180 hr3->Fill(t0,gas,lpos3-rad3);
183 {cout<<
"Function not available !"<<endl;
break;}
202 if (fclose(file1) != 0)
203 cout<<
"Error closing input file"<<endl;
205 if(ftpc==1 && lsec==1)c1->SaveAs(
"w_lsec1_2d_Del_g-Del_t0.png");
206 if(ftpc==1 && lsec==1)c1->SaveAs(
"w_lsec1_2d_Del_g-Del_t0.ps");
207 if(ftpc==1 && lsec==2)c1->SaveAs(
"w_lsec2_2d_Del_g-Del_t0.png");
208 if(ftpc==1 && lsec==2)c1->SaveAs(
"w_lsec2_2d_Del_g-Del_t0.ps");
209 if(ftpc==1 && lsec==3)c1->SaveAs(
"w_lsec3_2d_Del_g-Del_t0.png");
210 if(ftpc==1 && lsec==3)c1->SaveAs(
"w_lsec3_2d_Del_g-Del_t0.ps");
211 if(ftpc==2 && lsec==1)c1->SaveAs(
"e_lsec1_2d_Del_g-Del_t0.png");
212 if(ftpc==2 && lsec==1)c1->SaveAs(
"e_lsec1_2d_Del_g-Del_t0.ps");
213 if(ftpc==2 && lsec==2)c1->SaveAs(
"e_lsec2_2d_Del_g-Del_t0.png");
214 if(ftpc==2 && lsec==2)c1->SaveAs(
"e_lsec2_2d_Del_g-Del_t0.ps");
215 if(ftpc==2 && lsec==3)c1->SaveAs(
"e_lsec3_2d_Del_g-Del_t0.png");
216 if(ftpc==2 && lsec==3)c1->SaveAs(
"e_lsec3_2d_Del_g-Del_t0.ps");