174 |
TH1F *calibS4_1 =new TH1F("calibS4_1", "calibS4_1", channels, 0, channels); |
TH1F *calibS4_1 =new TH1F("calibS4_1", "calibS4_1", channels, 0, channels); |
175 |
TH1F *calibS4_2 =new TH1F("calibS4_2", "calibS4_2", channels, 0, channels); |
TH1F *calibS4_2 =new TH1F("calibS4_2", "calibS4_2", channels, 0, channels); |
176 |
TH1F *calibS4_4 =new TH1F("calibS4_4", "calibS4_4", channels, 0, channels); |
TH1F *calibS4_4 =new TH1F("calibS4_4", "calibS4_4", channels, 0, channels); |
177 |
ULong_t lastime, firstime; |
ULong_t lastime, firstime, obt1; |
178 |
double obmin=0.; |
double obmin=0.; |
179 |
double obmax=0.; |
double obmax=0.; |
180 |
|
double limitdown=0; |
181 |
|
double limitup=0; |
182 |
const Int_t size = nevents; |
const Int_t size = nevents; |
183 |
|
|
184 |
headBr->GetEntry(0); |
headBr->GetEntry(0); |
185 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
186 |
firstime = ph->GetOrbitalTime(); |
firstime = ph->GetOrbitalTime(); |
189 |
lastime = ph->GetOrbitalTime(); |
lastime = ph->GetOrbitalTime(); |
190 |
obmin=firstime; |
obmin=firstime; |
191 |
obmax=lastime; |
obmax=lastime; |
192 |
|
if(nevents < 2){ |
193 |
|
limitdown= obmin - 1000000; |
194 |
|
limitup= obmax + 1000000; |
195 |
|
}else{ |
196 |
|
limitdown=obmin; |
197 |
|
limitup=obmax; |
198 |
|
} |
199 |
stringstream oss; |
stringstream oss; |
200 |
oss.str(""); |
oss.str(""); |
201 |
oss << "S4_Calibration_QL: "<< filename.Data(); |
oss << "S4_Calibration_QL: "<< filename.Data(); |
228 |
} |
} |
229 |
} |
} |
230 |
|
|
231 |
obt=ph->GetOrbitalTime(); |
//obt=ph->GetOrbitalTime(); |
232 |
calib_1=calibS4_1->GetMean(1); |
calib_1=calibS4_1->GetMean(1); |
233 |
//calib_1_RMS=calibS4_1->GetRMS(1); |
//calib_1_RMS=calibS4_1->GetRMS(1); |
234 |
calib_2=calibS4_2->GetMean(1); |
calib_2=calibS4_2->GetMean(1); |
235 |
//calib_2_RMS=calibS4_2->GetRMS(1); |
//calib_2_RMS=calibS4_2->GetRMS(1); |
236 |
calib_4=calibS4_4->GetMean(1); |
calib_4=calibS4_4->GetMean(1); |
237 |
//calib_4_RMS=calibS4_4->GetRMS(1); |
//calib_4_RMS=calibS4_4->GetRMS(1); |
238 |
cal1->Fill(obt,calib_1); |
cal1->Fill(ph->GetOrbitalTime(),calib_1); |
239 |
cal2->Fill(obt,calib_2); |
cal2->Fill(ph->GetOrbitalTime(),calib_2); |
240 |
cal4->Fill(obt,calib_4); |
cal4->Fill(ph->GetOrbitalTime(),calib_4); |
241 |
|
|
242 |
//cout<<calib_1_RMS<<"\n"; |
//cout<<calib_1_RMS<<"\n"; |
243 |
//cout<<calib_2_RMS<<"\n"; |
//cout<<calib_2_RMS<<"\n"; |
288 |
cal4->Draw("9psame"); |
cal4->Draw("9psame"); |
289 |
if (IPM1status==0 && IPM2status==1){ ////hot configuration |
if (IPM1status==0 && IPM2status==1){ ////hot configuration |
290 |
TF1 *func1 = new TF1("func1", "1560"); ///valore di riferimento 1300 |
TF1 *func1 = new TF1("func1", "1560"); ///valore di riferimento 1300 |
291 |
func1->SetRange(obmin, obmax); |
//func1->SetRange(obmin, obmax); |
292 |
|
func1->SetRange(limitdown, limitup); |
293 |
func1->SetLineColor(4); |
func1->SetLineColor(4); |
294 |
func1->SetLineStyle(4); |
func1->SetLineStyle(1); |
295 |
func1->SetLineWidth(4); |
func1->SetLineWidth(3); |
296 |
func1->Draw("same"); |
func1->Draw("same"); |
297 |
TF1 *func2 = new TF1("func2", "1040"); ///valore di riferimento 1300 |
TF1 *func2 = new TF1("func2", "1040"); ///valore di riferimento 1300 |
298 |
func2->SetRange(obmin, obmax); |
//func2->SetRange(obmin, obmax); |
299 |
|
func2->SetRange(limitdown, limitup); |
300 |
func2->SetLineColor(4); |
func2->SetLineColor(4); |
301 |
func2->SetLineStyle(4); |
func2->SetLineStyle(1); |
302 |
func2->SetLineWidth(4); |
func2->SetLineWidth(3); |
303 |
func2->Draw("same"); |
func2->Draw("same"); |
304 |
TF1 *func3 = new TF1("func3", "109"); ///valore di riferimento 95 |
TF1 *func3 = new TF1("func3", "109"); ///valore di riferimento 95 |
305 |
func3->SetRange(obmin, obmax); |
//func3->SetRange(obmin, obmax); |
306 |
|
func3->SetRange(limitdown, limitup); |
307 |
func3->SetLineColor(6); |
func3->SetLineColor(6); |
308 |
func3->SetLineStyle(4); |
func3->SetLineStyle(1); |
309 |
func3->SetLineWidth(4); |
func3->SetLineWidth(3); |
310 |
func3->Draw("same"); |
func3->Draw("same"); |
311 |
TF1 *func4 = new TF1("func4", "71"); ///valore di riferimento 95 |
TF1 *func4 = new TF1("func4", "71"); ///valore di riferimento 95 |
312 |
func4->SetRange(obmin, obmax); |
//func4->SetRange(obmin, obmax); |
313 |
|
func4->SetRange(limitdown, limitup); |
314 |
func4->SetLineColor(6); |
func4->SetLineColor(6); |
315 |
func4->SetLineStyle(4); |
func4->SetLineStyle(1); |
316 |
func4->SetLineWidth(4); |
func4->SetLineWidth(3); |
317 |
func4->Draw("same"); |
func4->Draw("same"); |
318 |
TF1 *func5 = new TF1("func5", "38.4"); //valore di riferimento 32 |
TF1 *func5 = new TF1("func5", "38.4"); //valore di riferimento 32 |
319 |
func5->SetRange(obmin, obmax); |
//func5->SetRange(obmin, obmax); |
320 |
func5->SetLineStyle(4); |
func5->SetRange(limitdown, limitup); |
321 |
|
func5->SetLineStyle(1); |
322 |
func5->SetLineColor(3); |
func5->SetLineColor(3); |
323 |
func5->SetLineWidth(4); |
func5->SetLineWidth(3); |
324 |
func5->Draw("same"); |
func5->Draw("same"); |
325 |
TF1 *func6 = new TF1("func6", "25.6"); //valore di riferimento 32 |
TF1 *func6 = new TF1("func6", "25.6"); //valore di riferimento 32 |
326 |
func6->SetRange(obmin, obmax); |
//func6->SetRange(obmin, obmax); |
327 |
func6->SetLineStyle(4); |
func6->SetRange(limitdown, limitup); |
328 |
|
func6->SetLineStyle(1); |
329 |
func6->SetLineColor(3); |
func6->SetLineColor(3); |
330 |
func6->SetLineWidth(4); |
func6->SetLineWidth(3); |
331 |
func6->Draw("same"); |
func6->Draw("same"); |
332 |
} |
} |
333 |
|
|
334 |
if (IPM1status==1 && IPM2status==0){ ////cold configuration |
if (IPM1status==1 && IPM2status==0){ ////cold configuration |
335 |
TF1 *func1 = new TF1("func1", "2400"); |
TF1 *func1 = new TF1("func1", "2400"); |
336 |
func1->SetRange(obmin, obmax); |
//func1->SetRange(obmin, obmax); |
337 |
|
func1->SetRange(limitdown, limitup); |
338 |
func1->SetLineColor(4); |
func1->SetLineColor(4); |
339 |
func1->SetLineStyle(4); |
func1->SetLineStyle(1); |
340 |
func1->SetLineWidth(4); |
func1->SetLineWidth(3); |
341 |
func1->Draw("same"); |
func1->Draw("same"); |
342 |
TF1 *func2 = new TF1("func2", "1600"); ///valore di riferimento 2000 |
TF1 *func2 = new TF1("func2", "1600"); ///valore di riferimento 2000 |
343 |
func2->SetRange(obmin, obmax); |
//func2->SetRange(obmin, obmax); |
344 |
|
func2->SetRange(limitdown, limitup); |
345 |
func2->SetLineColor(4); |
func2->SetLineColor(4); |
346 |
func2->SetLineStyle(4); |
func2->SetLineStyle(1); |
347 |
func2->SetLineWidth(4); |
func2->SetLineWidth(3); |
348 |
func2->Draw("same"); |
func2->Draw("same"); |
349 |
TF1 *func3 = new TF1("func3", "180"); |
TF1 *func3 = new TF1("func3", "180"); |
350 |
func3->SetRange(obmin, obmax); |
//func3->SetRange(obmin, obmax); |
351 |
|
func3->SetRange(limitdown, limitup); |
352 |
func3->SetLineColor(6); |
func3->SetLineColor(6); |
353 |
func3->SetLineStyle(4); |
func3->SetLineStyle(1); |
354 |
func3->SetLineWidth(4); |
func3->SetLineWidth(3); |
355 |
func3->Draw("same"); |
func3->Draw("same"); |
356 |
TF1 *func4 = new TF1("func4", "120"); ///valore di riferimento 150 |
TF1 *func4 = new TF1("func4", "120"); ///valore di riferimento 150 |
357 |
func4->SetRange(obmin, obmax); |
//func4->SetRange(obmin, obmax); |
358 |
|
func4->SetRange(limitdown, limitup); |
359 |
func4->SetLineColor(6); |
func4->SetLineColor(6); |
360 |
func4->SetLineStyle(4); |
func4->SetLineStyle(1); |
361 |
func4->SetLineWidth(4); |
func4->SetLineWidth(3); |
362 |
func4->Draw("same"); |
func4->Draw("same"); |
363 |
TF1 *func5 = new TF1("func5", "38.4"); |
TF1 *func5 = new TF1("func5", "38.4"); |
364 |
func5->SetRange(obmin, obmax); |
//func5->SetRange(obmin, obmax); |
365 |
func5->SetLineStyle(4); |
func5->SetRange(limitdown, limitup); |
366 |
|
func5->SetLineStyle(1); |
367 |
func5->SetLineColor(3); |
func5->SetLineColor(3); |
368 |
func5->SetLineWidth(4); |
func5->SetLineWidth(3); |
369 |
func5->Draw("same"); |
func5->Draw("same"); |
370 |
TF1 *func6 = new TF1("func6", "25.6"); //valore di riferimento 32 |
TF1 *func6 = new TF1("func6", "25.6"); //valore di riferimento 32 |
371 |
func6->SetRange(obmin, obmax); |
//func6->SetRange(obmin, obmax); |
372 |
func6->SetLineStyle(4); |
func6->SetRange(limitdown, limitup); |
373 |
|
func6->SetLineStyle(1); |
374 |
func6->SetLineColor(3); |
func6->SetLineColor(3); |
375 |
func6->SetLineWidth(4); |
func6->SetLineWidth(3); |
376 |
func6->Draw("same"); |
func6->Draw("same"); |
377 |
} |
} |
378 |
|
|
435 |
} |
} |
436 |
} |
} |
437 |
|
|
438 |
/* if (!strcmp(argv[i], "-format")){ |
if (!strcmp(argv[i], "-format")){ |
439 |
if (++i >= argc){ |
if (++i >= argc){ |
440 |
printf( "-format needs arguments. \n"); |
printf( "-format needs arguments. \n"); |
441 |
printf( "Try '--help' for more information. \n"); |
printf( "Try '--help' for more information. \n"); |
445 |
format = argv[i]; |
format = argv[i]; |
446 |
continue; |
continue; |
447 |
} |
} |
448 |
}*/ |
} |
449 |
|
|
450 |
|
|
451 |
} |
} |