18 |
* Fixed bugs: for a large namber of events is not possible to initialize vectors, so all graphs have been converted in histograms |
* Fixed bugs: for a large namber of events is not possible to initialize vectors, so all graphs have been converted in histograms |
19 |
* |
* |
20 |
* Known bugs: it is no possible to choise the figure format |
* Known bugs: it is no possible to choise the figure format |
21 |
|
* |
22 |
|
* Version 1.2 - August 2006 |
23 |
|
* Fixed bugs: is possible to choise figure format; all calibration are drown |
24 |
**************/ |
**************/ |
25 |
|
|
26 |
#include <fstream> |
#include <fstream> |
57 |
|
|
58 |
//--------------- Variables initialization -----------------------------------// |
//--------------- Variables initialization -----------------------------------// |
59 |
const Int_t channels = 4096; |
const Int_t channels = 4096; |
60 |
Double_t calib_1; |
Double_t calib_1_MEAN; |
61 |
Double_t calib_2; |
Double_t calib_2_MEAN; |
62 |
Double_t calib_4; |
Double_t calib_4_MEAN; |
63 |
Double_t calib_1_RMS; |
Double_t calib_1_RMS; |
64 |
Double_t calib_2_RMS; |
Double_t calib_2_RMS; |
65 |
Double_t calib_4_RMS; |
Double_t calib_4_RMS; |
66 |
|
Double_t calib_1=0, calib_2=0, calib_4=0; |
67 |
Double_t obt; |
Double_t obt; |
68 |
TString status; |
TString status; |
69 |
Int_t IPM1status, IPM2status; |
Int_t IPM1status, IPM2status; |
70 |
|
ULong_t lastime, firstime, obt1, utile; |
71 |
|
double obmin=0.; |
72 |
|
double obmax=0.; |
73 |
|
double limitdown=0; |
74 |
|
double limitup=0; |
75 |
|
|
76 |
|
|
77 |
//------------------------- Open data file -------------------------------------// |
//------------------------- Open data file -------------------------------------// |
78 |
TFile *file =new TFile(base.Data()) ; |
TFile *file =new TFile(base.Data()) ; |
79 |
TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString(); |
TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString(); |
141 |
} |
} |
142 |
|
|
143 |
//---------------Look for configuration hot or cold -----------------------// |
//---------------Look for configuration hot or cold -----------------------// |
144 |
Int_t recordstot=0; |
if(neventstmtc!=0){ |
145 |
for (Int_t i = 0; i < neventstmtc; i++){ |
Int_t recordstot=0; |
146 |
tmtcBr->GetEntry(i); |
for (Int_t i = 0; i < neventstmtc; i++){ |
147 |
Long64_t tmpSizetmtc = tme->Records->GetEntries(); |
tmtcBr->GetEntry(i); |
148 |
recordstot=recordstot+tmpSizetmtc; |
Long64_t tmpSizetmtc = tme->Records->GetEntries(); |
149 |
} |
recordstot=recordstot+tmpSizetmtc; |
150 |
const Int_t lungmax=16*recordstot; |
} |
151 |
Double_t xrecordobtcc[lungmax], yccdiagacq[lungmax], xrecordobtcc_1[lungmax], yccdiagacq_1[lungmax]; |
const Int_t lungmax=16*recordstot; |
152 |
recordstot=0; |
Double_t xrecordobtcc[lungmax], yccdiagacq[lungmax], xrecordobtcc_1[lungmax], yccdiagacq_1[lungmax]; |
153 |
for (Int_t i = 0; i < neventstmtc; i++){ |
recordstot=0; |
154 |
tmtcBr->GetEntry(i); |
for (Int_t i = 0; i < neventstmtc; i++){ |
155 |
Long64_t tmpSizetmtc = tme->Records->GetEntries(); |
tmtcBr->GetEntry(i); |
156 |
Int_t size_b = tmpSizetmtc; |
Long64_t tmpSizetmtc = tme->Records->GetEntries(); |
157 |
for (Int_t j = 0; j < size_b; j++){ |
Int_t size_b = tmpSizetmtc; |
158 |
tmr = (pamela::TmtcRecord*)tme->Records->At(j); |
for (Int_t j = 0; j < size_b; j++){ |
159 |
for (Int_t k =0; k <16; k++){ |
tmr = (pamela::TmtcRecord*)tme->Records->At(j); |
160 |
yccdiagacq[16*recordstot+16*j+k] = (((tmr->TM_DIAG_AND_BILEVEL_ACQ)>>(15-k))&0x0001); |
for (Int_t k =0; k <16; k++){ |
161 |
xrecordobtcc[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT; |
yccdiagacq[16*recordstot+16*j+k] = (((tmr->TM_DIAG_AND_BILEVEL_ACQ)>>(15-k))&0x0001); |
162 |
|
xrecordobtcc[16*recordstot+16*j+k] = tmr->TM_RECORD_OBT; |
163 |
|
} |
164 |
} |
} |
165 |
|
recordstot=recordstot+tmpSizetmtc; |
166 |
} |
} |
167 |
recordstot=recordstot+tmpSizetmtc; |
Int_t riftime = recordstot/2; |
168 |
} |
//CC (0=IPM1=hot; 1=IPM2=cold for S4 calibration) |
169 |
Int_t riftime = recordstot/2; |
for (Int_t k =0; k<16; k++){ |
170 |
//CC (0=IPM1=hot; 1=IPM2=cold for S4 calibration) |
for (Int_t i = 0; i < recordstot; i++){ |
171 |
for (Int_t k =0; k<16; k++){ |
yccdiagacq_1[i]= yccdiagacq[16*i+k]; |
172 |
for (Int_t i = 0; i < recordstot; i++){ |
xrecordobtcc_1[i]= xrecordobtcc[16*i+k]; |
173 |
yccdiagacq_1[i]= yccdiagacq[16*i+k]; |
} |
174 |
xrecordobtcc_1[i]= xrecordobtcc[16*i+k]; |
if (k==0) IPM1status=(Int_t)yccdiagacq_1[riftime]; |
175 |
|
if (k==1) IPM2status=(Int_t)yccdiagacq_1[riftime]; |
176 |
} |
} |
177 |
if (k==0) IPM1status=(Int_t)yccdiagacq_1[riftime]; |
if (IPM1status==0 && IPM2status==1){ |
178 |
if (k==1) IPM2status=(Int_t)yccdiagacq_1[riftime]; |
status="CONFIGURATION: HOT"; |
179 |
} |
} |
180 |
if (IPM1status==0 && IPM2status==1){ |
if (IPM1status==1 && IPM2status==0){ |
181 |
status="CONFIGURATION: HOT"; |
status="CONFIGURATION: COLD"; |
182 |
} |
} |
183 |
if (IPM1status==1 && IPM2status==0){ |
}else{ |
184 |
status="CONFIGURATION: COLD"; |
status=" No info about kind of calibration (hot or cold)"; |
185 |
} |
} |
186 |
|
|
187 |
//------------- Create and fill histograms -------------------------------------------// |
//----------- search max and min OBT -----------------------------------------------------// |
|
|
|
|
TH1F *calibS4_1 =new TH1F("calibS4_1", "calibS4_1", channels, 0, channels); |
|
|
TH1F *calibS4_2 =new TH1F("calibS4_2", "calibS4_2", channels, 0, channels); |
|
|
TH1F *calibS4_4 =new TH1F("calibS4_4", "calibS4_4", channels, 0, channels); |
|
|
ULong_t lastime, firstime; |
|
|
double obmin=0.; |
|
|
double obmax=0.; |
|
|
const Int_t size = nevents; |
|
188 |
headBr->GetEntry(0); |
headBr->GetEntry(0); |
189 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
190 |
firstime = ph->GetOrbitalTime(); |
firstime = ph->GetOrbitalTime(); |
193 |
lastime = ph->GetOrbitalTime(); |
lastime = ph->GetOrbitalTime(); |
194 |
obmin=firstime; |
obmin=firstime; |
195 |
obmax=lastime; |
obmax=lastime; |
196 |
|
if(nevents < 2){ |
197 |
|
for(Int_t kk = 0; kk<nevents; kk++){ |
198 |
|
headBr->GetEntry(kk); |
199 |
|
ph = eh->GetPscuHeader(); |
200 |
|
utile=ph->GetOrbitalTime(); |
201 |
|
if(obmin >= utile)obmin=utile; |
202 |
|
if(obmax <= utile)obmax=utile; |
203 |
|
} |
204 |
|
limitdown= obmin - 1000000; |
205 |
|
limitup= obmax + 1000000; |
206 |
|
}else{ |
207 |
|
for(Int_t kk = 0; kk<nevents; kk++){ |
208 |
|
headBr->GetEntry(kk); |
209 |
|
ph = eh->GetPscuHeader(); |
210 |
|
utile=ph->GetOrbitalTime(); |
211 |
|
//cout<<"OrbitalTime()"<<ph->GetOrbitalTime()<<"\n"; |
212 |
|
if(obmin >= utile)obmin=utile; |
213 |
|
if(obmax <= utile)obmax=utile; |
214 |
|
} |
215 |
|
limitdown=obmin; |
216 |
|
limitup=obmax; |
217 |
|
} |
218 |
|
//------------- Create and fill histograms -------------------------------------------// |
219 |
|
stringstream oss1; |
220 |
|
oss1.str(""); |
221 |
|
oss1 << "S4 Calibration: "<< filename.Data(); |
222 |
|
TH1F *calibS4_1 =new TH1F("S4-1", oss1.str().c_str(), channels, 0, channels); |
223 |
|
TH1F *calibS4_2 =new TH1F("S4-2", oss1.str().c_str(), channels, 0, channels); |
224 |
|
TH1F *calibS4_4 =new TH1F("S4-3", oss1.str().c_str(), channels, 0, channels); |
225 |
|
|
226 |
stringstream oss; |
stringstream oss; |
227 |
oss.str(""); |
oss.str(""); |
228 |
oss << "S4_Calibration_QL: "<< filename.Data(); |
oss << "S4_Calibration_QL: "<< filename.Data(); |
229 |
TH1F *cal1 =new TH1F("calibS4_1", oss.str().c_str(), size, obmin, obmax); |
const Int_t size = nevents; |
230 |
TH1F *cal2 =new TH1F("calibS4_2", oss.str().c_str(), size, obmin, obmax); |
//cout<<"size "<<size <<"\n"; |
231 |
TH1F *cal4 =new TH1F("calibS4_4", oss.str().c_str(), size, obmin, obmax); |
TH1F *cal1 =new TH1F("calibS4_1", oss.str().c_str(), size, obmin-1000000, obmax+ 1000000); |
232 |
|
TH1F *cal2 =new TH1F("calibS4_2", oss.str().c_str(), size, obmin-1000000, obmax+ 1000000); |
233 |
|
TH1F *cal4 =new TH1F("calibS4_4", oss.str().c_str(), size, obmin-1000000, obmax+ 1000000); |
234 |
|
|
235 |
for(Int_t k = 0; k<nevents; k++){ |
for(Int_t k = 0; k<nevents; k++){ |
236 |
headBr->GetEntry(k); |
headBr->GetEntry(k); |
243 |
switch (j) { |
switch (j) { |
244 |
case 0 :{ |
case 0 :{ |
245 |
calibS4_1->Fill(s4Record->S4_DATA); |
calibS4_1->Fill(s4Record->S4_DATA); |
246 |
|
calib_1 = calib_1+s4Record->S4_DATA; |
247 |
break; |
break; |
248 |
} |
} |
249 |
case 1 :{ |
case 1 :{ |
250 |
calibS4_2->Fill(s4Record->S4_DATA); |
calibS4_2->Fill(s4Record->S4_DATA); |
251 |
|
calib_2 = calib_2+s4Record->S4_DATA; |
252 |
break; |
break; |
253 |
} |
} |
254 |
case 3 :{ |
case 3 :{ |
255 |
calibS4_4->Fill(s4Record->S4_DATA); |
calibS4_4->Fill(s4Record->S4_DATA); |
256 |
|
calib_4 = calib_4+s4Record->S4_DATA; |
257 |
break; |
break; |
258 |
} |
} |
259 |
} |
} |
260 |
} |
} |
261 |
} |
} |
262 |
|
utile=ph->GetOrbitalTime(); |
263 |
obt=ph->GetOrbitalTime(); |
//obt=ph->GetOrbitalTime(); |
264 |
calib_1=calibS4_1->GetMean(1); |
calib_1_MEAN=calib_1/128; |
265 |
//calib_1_RMS=calibS4_1->GetRMS(1); |
//calib_1_RMS=calibS4_1->GetRMS(1); |
266 |
calib_2=calibS4_2->GetMean(1); |
calib_2_MEAN=calib_2/128; |
267 |
//calib_2_RMS=calibS4_2->GetRMS(1); |
//calib_2_RMS=calibS4_2->GetRMS(1); |
268 |
calib_4=calibS4_4->GetMean(1); |
calib_4_MEAN=calib_4/128; |
269 |
//calib_4_RMS=calibS4_4->GetRMS(1); |
//calib_4_RMS=calibS4_4->GetRMS(1); |
270 |
cal1->Fill(obt,calib_1); |
cal1->Fill(utile,calib_1_MEAN); |
271 |
cal2->Fill(obt,calib_2); |
cal2->Fill(utile,calib_2_MEAN); |
272 |
cal4->Fill(obt,calib_4); |
cal4->Fill(utile,calib_4_MEAN); |
273 |
|
calib_1=calib_2=calib_4=0; |
|
//cout<<calib_1_RMS<<"\n"; |
|
|
//cout<<calib_2_RMS<<"\n"; |
|
|
//cout<<calib_4_RMS<<"\n"; |
|
|
//cout<<k<<" "<<obt<<" \n "<<calib_1<<" "<<calib_2<<" "<<calib_4<<"\n"; |
|
274 |
|
|
275 |
} |
} |
276 |
|
|
277 |
//----------------- Create and draw canvas -----------------------------------------// |
//----------------- Create and draw canvas -----------------------------------------// |
278 |
TCanvas *finalCanv = new TCanvas("S4Calib","Calibration_QL", 1280, 1024); |
TCanvas *finalCanv = new TCanvas("S4Calib","Calibration_QL", 1280, 1024); |
279 |
finalCanv->SetFillColor(10); |
finalCanv->SetFillColor(10); |
280 |
|
finalCanv->Divide(2,2); |
281 |
|
|
282 |
finalCanv->cd(); |
finalCanv->cd(1); |
283 |
gPad->SetLogy(); |
gPad->SetLogy(); |
|
|
|
284 |
cal1->SetStats(kFALSE); |
cal1->SetStats(kFALSE); |
285 |
cal1->SetMarkerSize(.5); |
cal1->SetMarkerSize(.5); |
286 |
cal1->SetMarkerStyle(21); |
cal1->SetMarkerStyle(21); |
316 |
cal4->Draw("9psame"); |
cal4->Draw("9psame"); |
317 |
if (IPM1status==0 && IPM2status==1){ ////hot configuration |
if (IPM1status==0 && IPM2status==1){ ////hot configuration |
318 |
TF1 *func1 = new TF1("func1", "1560"); ///valore di riferimento 1300 |
TF1 *func1 = new TF1("func1", "1560"); ///valore di riferimento 1300 |
319 |
func1->SetRange(obmin, obmax); |
//func1->SetRange(obmin, obmax); |
320 |
|
func1->SetRange(limitdown, limitup); |
321 |
func1->SetLineColor(4); |
func1->SetLineColor(4); |
322 |
func1->SetLineStyle(4); |
func1->SetLineStyle(1); |
323 |
func1->SetLineWidth(4); |
func1->SetLineWidth(3); |
324 |
func1->Draw("same"); |
func1->Draw("same"); |
325 |
TF1 *func2 = new TF1("func2", "1040"); ///valore di riferimento 1300 |
TF1 *func2 = new TF1("func2", "1040"); ///valore di riferimento 1300 |
326 |
func2->SetRange(obmin, obmax); |
//func2->SetRange(obmin, obmax); |
327 |
|
func2->SetRange(limitdown, limitup); |
328 |
func2->SetLineColor(4); |
func2->SetLineColor(4); |
329 |
func2->SetLineStyle(4); |
func2->SetLineStyle(1); |
330 |
func2->SetLineWidth(4); |
func2->SetLineWidth(3); |
331 |
func2->Draw("same"); |
func2->Draw("same"); |
332 |
TF1 *func3 = new TF1("func3", "109"); ///valore di riferimento 95 |
TF1 *func3 = new TF1("func3", "109"); ///valore di riferimento 95 |
333 |
func3->SetRange(obmin, obmax); |
//func3->SetRange(obmin, obmax); |
334 |
|
func3->SetRange(limitdown, limitup); |
335 |
func3->SetLineColor(6); |
func3->SetLineColor(6); |
336 |
func3->SetLineStyle(4); |
func3->SetLineStyle(1); |
337 |
func3->SetLineWidth(4); |
func3->SetLineWidth(3); |
338 |
func3->Draw("same"); |
func3->Draw("same"); |
339 |
TF1 *func4 = new TF1("func4", "71"); ///valore di riferimento 95 |
TF1 *func4 = new TF1("func4", "71"); ///valore di riferimento 95 |
340 |
func4->SetRange(obmin, obmax); |
//func4->SetRange(obmin, obmax); |
341 |
|
func4->SetRange(limitdown, limitup); |
342 |
func4->SetLineColor(6); |
func4->SetLineColor(6); |
343 |
func4->SetLineStyle(4); |
func4->SetLineStyle(1); |
344 |
func4->SetLineWidth(4); |
func4->SetLineWidth(3); |
345 |
func4->Draw("same"); |
func4->Draw("same"); |
346 |
TF1 *func5 = new TF1("func5", "38.4"); //valore di riferimento 32 |
TF1 *func5 = new TF1("func5", "38.4"); //valore di riferimento 32 |
347 |
func5->SetRange(obmin, obmax); |
//func5->SetRange(obmin, obmax); |
348 |
func5->SetLineStyle(4); |
func5->SetRange(limitdown, limitup); |
349 |
|
func5->SetLineStyle(1); |
350 |
func5->SetLineColor(3); |
func5->SetLineColor(3); |
351 |
func5->SetLineWidth(4); |
func5->SetLineWidth(3); |
352 |
func5->Draw("same"); |
func5->Draw("same"); |
353 |
TF1 *func6 = new TF1("func6", "25.6"); //valore di riferimento 32 |
TF1 *func6 = new TF1("func6", "25.6"); //valore di riferimento 32 |
354 |
func6->SetRange(obmin, obmax); |
//func6->SetRange(obmin, obmax); |
355 |
func6->SetLineStyle(4); |
func6->SetRange(limitdown, limitup); |
356 |
|
func6->SetLineStyle(1); |
357 |
func6->SetLineColor(3); |
func6->SetLineColor(3); |
358 |
func6->SetLineWidth(4); |
func6->SetLineWidth(3); |
359 |
func6->Draw("same"); |
func6->Draw("same"); |
360 |
} |
} |
361 |
|
|
362 |
if (IPM1status==1 && IPM2status==0){ ////cold configuration |
if (IPM1status==1 && IPM2status==0){ ////cold configuration |
363 |
TF1 *func1 = new TF1("func1", "2400"); |
TF1 *func1 = new TF1("func1", "2400"); |
364 |
func1->SetRange(obmin, obmax); |
//func1->SetRange(obmin, obmax); |
365 |
|
func1->SetRange(limitdown, limitup); |
366 |
func1->SetLineColor(4); |
func1->SetLineColor(4); |
367 |
func1->SetLineStyle(4); |
func1->SetLineStyle(1); |
368 |
func1->SetLineWidth(4); |
func1->SetLineWidth(3); |
369 |
func1->Draw("same"); |
func1->Draw("same"); |
370 |
TF1 *func2 = new TF1("func2", "1600"); ///valore di riferimento 2000 |
TF1 *func2 = new TF1("func2", "1600"); ///valore di riferimento 2000 |
371 |
func2->SetRange(obmin, obmax); |
//func2->SetRange(obmin, obmax); |
372 |
|
func2->SetRange(limitdown, limitup); |
373 |
func2->SetLineColor(4); |
func2->SetLineColor(4); |
374 |
func2->SetLineStyle(4); |
func2->SetLineStyle(1); |
375 |
func2->SetLineWidth(4); |
func2->SetLineWidth(3); |
376 |
func2->Draw("same"); |
func2->Draw("same"); |
377 |
TF1 *func3 = new TF1("func3", "180"); |
TF1 *func3 = new TF1("func3", "180"); |
378 |
func3->SetRange(obmin, obmax); |
//func3->SetRange(obmin, obmax); |
379 |
|
func3->SetRange(limitdown, limitup); |
380 |
func3->SetLineColor(6); |
func3->SetLineColor(6); |
381 |
func3->SetLineStyle(4); |
func3->SetLineStyle(1); |
382 |
func3->SetLineWidth(4); |
func3->SetLineWidth(3); |
383 |
func3->Draw("same"); |
func3->Draw("same"); |
384 |
TF1 *func4 = new TF1("func4", "120"); ///valore di riferimento 150 |
TF1 *func4 = new TF1("func4", "120"); ///valore di riferimento 150 |
385 |
func4->SetRange(obmin, obmax); |
//func4->SetRange(obmin, obmax); |
386 |
|
func4->SetRange(limitdown, limitup); |
387 |
func4->SetLineColor(6); |
func4->SetLineColor(6); |
388 |
func4->SetLineStyle(4); |
func4->SetLineStyle(1); |
389 |
func4->SetLineWidth(4); |
func4->SetLineWidth(3); |
390 |
func4->Draw("same"); |
func4->Draw("same"); |
391 |
TF1 *func5 = new TF1("func5", "38.4"); |
TF1 *func5 = new TF1("func5", "38.4"); |
392 |
func5->SetRange(obmin, obmax); |
//func5->SetRange(obmin, obmax); |
393 |
func5->SetLineStyle(4); |
func5->SetRange(limitdown, limitup); |
394 |
|
func5->SetLineStyle(1); |
395 |
func5->SetLineColor(3); |
func5->SetLineColor(3); |
396 |
func5->SetLineWidth(4); |
func5->SetLineWidth(3); |
397 |
func5->Draw("same"); |
func5->Draw("same"); |
398 |
TF1 *func6 = new TF1("func6", "25.6"); //valore di riferimento 32 |
TF1 *func6 = new TF1("func6", "25.6"); //valore di riferimento 32 |
399 |
func6->SetRange(obmin, obmax); |
//func6->SetRange(obmin, obmax); |
400 |
func6->SetLineStyle(4); |
func6->SetRange(limitdown, limitup); |
401 |
|
func6->SetLineStyle(1); |
402 |
func6->SetLineColor(3); |
func6->SetLineColor(3); |
403 |
func6->SetLineWidth(4); |
func6->SetLineWidth(3); |
404 |
func6->Draw("same"); |
func6->Draw("same"); |
405 |
} |
} |
406 |
|
|
407 |
TPad *pad = new TPad("pad","pad", .75, .93, .99, .99); |
//TPad *pad = new TPad("pad","pad", .75, .93, .99, .99); |
408 |
|
TPad *pad = new TPad("pad","pad", .58, .85, .92, .94); |
409 |
pad->SetFillColor(10); |
pad->SetFillColor(10); |
410 |
pad->Draw(); |
pad->Draw(); |
411 |
pad->cd(); |
pad->cd(); |
412 |
TLatex *l = new TLatex(); |
TLatex *l = new TLatex(); |
413 |
l->SetTextAlign(12); |
l->SetTextAlign(12); |
414 |
l->SetTextSize(0.35); |
l->SetTextSize(0.4); |
415 |
l->SetTextColor(8); |
l->SetTextColor(kRed); |
416 |
l->DrawLatex(0.05, 0.65, status.Data()); |
l->DrawLatex(0.05, 0.65, status.Data()); |
417 |
|
|
418 |
|
|
419 |
|
finalCanv->cd(2); |
420 |
|
gPad->SetLogy(); |
421 |
|
gStyle->SetOptStat("nemrou"); |
422 |
|
calibS4_1->SetLineColor(kBlack); |
423 |
|
calibS4_1->SetFillColor(kRed); |
424 |
|
calibS4_1->GetYaxis()->SetTitle("Number of events"); |
425 |
|
calibS4_1->GetYaxis()->SetTitleSize(0.03); |
426 |
|
calibS4_1->GetYaxis()->SetTitleOffset(1); |
427 |
|
calibS4_1->GetYaxis()->CenterTitle(); |
428 |
|
calibS4_1->GetYaxis()->SetLabelSize(0.02); |
429 |
|
calibS4_1->GetXaxis()->CenterTitle(); |
430 |
|
calibS4_1->GetXaxis()->SetTitleSize(0.03); |
431 |
|
calibS4_1->GetXaxis()->SetTitleOffset(1); |
432 |
|
calibS4_1->GetXaxis()->SetLabelSize(0.02); |
433 |
|
calibS4_1->GetXaxis()->SetTitle("ADC (ch)"); |
434 |
|
calibS4_1->SetAxisRange(0,200); |
435 |
|
calibS4_1->Draw(); |
436 |
|
|
437 |
|
finalCanv->cd(3); |
438 |
|
gPad->SetLogy(); |
439 |
|
gStyle->SetOptStat("nemrou"); |
440 |
|
calibS4_2->SetLineColor(kBlack); |
441 |
|
calibS4_2->SetFillColor(kRed); |
442 |
|
calibS4_2->GetYaxis()->SetTitle("Number of events"); |
443 |
|
calibS4_2->GetYaxis()->SetTitleSize(0.03); |
444 |
|
calibS4_2->GetYaxis()->SetTitleOffset(1); |
445 |
|
calibS4_2->GetYaxis()->CenterTitle(); |
446 |
|
calibS4_2->GetYaxis()->SetLabelSize(0.02); |
447 |
|
calibS4_2->GetXaxis()->CenterTitle(); |
448 |
|
calibS4_2->GetXaxis()->SetTitleSize(0.03); |
449 |
|
calibS4_2->GetXaxis()->SetTitleOffset(1); |
450 |
|
calibS4_2->GetXaxis()->SetLabelSize(0.02); |
451 |
|
calibS4_2->GetXaxis()->SetTitle("ADC (ch)"); |
452 |
|
calibS4_2->SetAxisRange(50,250); |
453 |
|
calibS4_2->Draw(); |
454 |
|
|
455 |
|
finalCanv->cd(4); |
456 |
|
gPad->SetLogy(); |
457 |
|
gStyle->SetOptStat("nemrou"); |
458 |
|
calibS4_4->SetLineColor(kBlack); |
459 |
|
calibS4_4->SetFillColor(kRed); |
460 |
|
calibS4_4->GetYaxis()->SetTitle("Number of events"); |
461 |
|
calibS4_4->GetYaxis()->SetTitleSize(0.03); |
462 |
|
calibS4_4->GetYaxis()->SetTitleOffset(1); |
463 |
|
calibS4_4->GetYaxis()->CenterTitle(); |
464 |
|
calibS4_4->GetYaxis()->SetLabelSize(0.02); |
465 |
|
calibS4_4->GetXaxis()->CenterTitle(); |
466 |
|
calibS4_4->GetXaxis()->SetTitleSize(0.03); |
467 |
|
calibS4_4->GetXaxis()->SetTitleOffset(1); |
468 |
|
calibS4_4->GetXaxis()->SetLabelSize(0.02); |
469 |
|
calibS4_4->GetXaxis()->SetTitle("ADC (ch)"); |
470 |
|
calibS4_4->SetAxisRange(500,2500); |
471 |
|
calibS4_4->Draw(); |
472 |
|
|
473 |
oss.str(""); |
oss.str(""); |
474 |
if (outDir == "./") { |
if (outDir == "./") { |
475 |
oss << filename.Data() << "_S4_Calibration_QL." << format.Data(); |
oss << filename.Data() << "_S4_Calibration_QL." << format.Data(); |
476 |
} else { |
} else { |
477 |
oss << outDir.Data() << filename.Data() << "_S4_Calibration_QL." << format.Data(); |
oss << outDir.Data() << filename.Data() << "_S4_Calibration_QL." << format.Data(); |
478 |
} |
} |
479 |
finalCanv->SaveAs(oss.str().c_str()); |
finalCanv->SaveAs(oss.str().c_str()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
480 |
} |
} |
481 |
|
|
482 |
int main(int argc, char* argv[]){ |
int main(int argc, char* argv[]){ |
514 |
} |
} |
515 |
} |
} |
516 |
|
|
517 |
/* if (!strcmp(argv[i], "-format")){ |
if (!strcmp(argv[i], "-format")){ |
518 |
if (++i >= argc){ |
if (++i >= argc){ |
519 |
printf( "-format needs arguments. \n"); |
printf( "-format needs arguments. \n"); |
520 |
printf( "Try '--help' for more information. \n"); |
printf( "Try '--help' for more information. \n"); |
524 |
format = argv[i]; |
format = argv[i]; |
525 |
continue; |
continue; |
526 |
} |
} |
527 |
}*/ |
} |
528 |
|
|
529 |
|
|
530 |
} |
} |