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; |
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 |
|
if(obmin >= ph->GetOrbitalTime())obmin=ph->GetOrbitalTime(); |
201 |
|
if(obmax <= ph->GetOrbitalTime())obmax=ph->GetOrbitalTime(); |
202 |
|
} |
203 |
|
limitdown= obmin - 1000000; |
204 |
|
limitup= obmax + 1000000; |
205 |
|
}else{ |
206 |
|
for(Int_t kk = 0; kk<nevents; kk++){ |
207 |
|
headBr->GetEntry(kk); |
208 |
|
ph = eh->GetPscuHeader(); |
209 |
|
//cout<<"OrbitalTime()"<<ph->GetOrbitalTime()<<"\n"; |
210 |
|
if(obmin >= ph->GetOrbitalTime())obmin=ph->GetOrbitalTime(); |
211 |
|
if(obmax <= ph->GetOrbitalTime())obmax=ph->GetOrbitalTime(); |
212 |
|
} |
213 |
|
limitdown=obmin; |
214 |
|
limitup=obmax; |
215 |
|
} |
216 |
|
//------------- Create and fill histograms -------------------------------------------// |
217 |
|
stringstream oss1; |
218 |
|
oss1.str(""); |
219 |
|
oss1 << "S4 Calibration: "<< filename.Data(); |
220 |
|
TH1F *calibS4_1 =new TH1F("S4-1", oss1.str().c_str(), channels, 0, channels); |
221 |
|
TH1F *calibS4_2 =new TH1F("S4-2", oss1.str().c_str(), channels, 0, channels); |
222 |
|
TH1F *calibS4_4 =new TH1F("S4-3", oss1.str().c_str(), channels, 0, channels); |
223 |
|
|
224 |
stringstream oss; |
stringstream oss; |
225 |
oss.str(""); |
oss.str(""); |
226 |
oss << "S4_Calibration_QL: "<< filename.Data(); |
oss << "S4_Calibration_QL: "<< filename.Data(); |
227 |
TH1F *cal1 =new TH1F("calibS4_1", oss.str().c_str(), size, obmin, obmax); |
const Int_t size = nevents; |
228 |
TH1F *cal2 =new TH1F("calibS4_2", oss.str().c_str(), size, obmin, obmax); |
//cout<<"size "<<size <<"\n"; |
229 |
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); |
230 |
|
TH1F *cal2 =new TH1F("calibS4_2", oss.str().c_str(), size, obmin-1000000, obmax+ 1000000); |
231 |
|
TH1F *cal4 =new TH1F("calibS4_4", oss.str().c_str(), size, obmin-1000000, obmax+ 1000000); |
232 |
|
|
233 |
for(Int_t k = 0; k<nevents; k++){ |
for(Int_t k = 0; k<nevents; k++){ |
234 |
headBr->GetEntry(k); |
headBr->GetEntry(k); |
241 |
switch (j) { |
switch (j) { |
242 |
case 0 :{ |
case 0 :{ |
243 |
calibS4_1->Fill(s4Record->S4_DATA); |
calibS4_1->Fill(s4Record->S4_DATA); |
244 |
|
calib_1 = calib_1+s4Record->S4_DATA; |
245 |
break; |
break; |
246 |
} |
} |
247 |
case 1 :{ |
case 1 :{ |
248 |
calibS4_2->Fill(s4Record->S4_DATA); |
calibS4_2->Fill(s4Record->S4_DATA); |
249 |
|
calib_2 = calib_2+s4Record->S4_DATA; |
250 |
break; |
break; |
251 |
} |
} |
252 |
case 3 :{ |
case 3 :{ |
253 |
calibS4_4->Fill(s4Record->S4_DATA); |
calibS4_4->Fill(s4Record->S4_DATA); |
254 |
|
calib_4 = calib_4+s4Record->S4_DATA; |
255 |
break; |
break; |
256 |
} |
} |
257 |
} |
} |
258 |
} |
} |
259 |
} |
} |
260 |
|
|
261 |
obt=ph->GetOrbitalTime(); |
//obt=ph->GetOrbitalTime(); |
262 |
calib_1=calibS4_1->GetMean(1); |
calib_1_MEAN=calib_1/128; |
263 |
//calib_1_RMS=calibS4_1->GetRMS(1); |
//calib_1_RMS=calibS4_1->GetRMS(1); |
264 |
calib_2=calibS4_2->GetMean(1); |
calib_2_MEAN=calib_2/128; |
265 |
//calib_2_RMS=calibS4_2->GetRMS(1); |
//calib_2_RMS=calibS4_2->GetRMS(1); |
266 |
calib_4=calibS4_4->GetMean(1); |
calib_4_MEAN=calib_4/128; |
267 |
//calib_4_RMS=calibS4_4->GetRMS(1); |
//calib_4_RMS=calibS4_4->GetRMS(1); |
268 |
cal1->Fill(obt,calib_1); |
cal1->Fill(ph->GetOrbitalTime(),calib_1_MEAN); |
269 |
cal2->Fill(obt,calib_2); |
cal2->Fill(ph->GetOrbitalTime(),calib_2_MEAN); |
270 |
cal4->Fill(obt,calib_4); |
cal4->Fill(ph->GetOrbitalTime(),calib_4_MEAN); |
271 |
|
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"; |
|
272 |
|
|
273 |
} |
} |
274 |
|
|
275 |
//----------------- Create and draw canvas -----------------------------------------// |
//----------------- Create and draw canvas -----------------------------------------// |
276 |
TCanvas *finalCanv = new TCanvas("S4Calib","Calibration_QL", 1280, 1024); |
TCanvas *finalCanv = new TCanvas("S4Calib","Calibration_QL", 1280, 1024); |
277 |
finalCanv->SetFillColor(10); |
finalCanv->SetFillColor(10); |
278 |
|
finalCanv->Divide(2,2); |
279 |
|
|
280 |
finalCanv->cd(); |
finalCanv->cd(1); |
281 |
gPad->SetLogy(); |
gPad->SetLogy(); |
|
|
|
282 |
cal1->SetStats(kFALSE); |
cal1->SetStats(kFALSE); |
283 |
cal1->SetMarkerSize(.5); |
cal1->SetMarkerSize(.5); |
284 |
cal1->SetMarkerStyle(21); |
cal1->SetMarkerStyle(21); |
314 |
cal4->Draw("9psame"); |
cal4->Draw("9psame"); |
315 |
if (IPM1status==0 && IPM2status==1){ ////hot configuration |
if (IPM1status==0 && IPM2status==1){ ////hot configuration |
316 |
TF1 *func1 = new TF1("func1", "1560"); ///valore di riferimento 1300 |
TF1 *func1 = new TF1("func1", "1560"); ///valore di riferimento 1300 |
317 |
func1->SetRange(obmin, obmax); |
//func1->SetRange(obmin, obmax); |
318 |
|
func1->SetRange(limitdown, limitup); |
319 |
func1->SetLineColor(4); |
func1->SetLineColor(4); |
320 |
func1->SetLineStyle(4); |
func1->SetLineStyle(1); |
321 |
func1->SetLineWidth(4); |
func1->SetLineWidth(3); |
322 |
func1->Draw("same"); |
func1->Draw("same"); |
323 |
TF1 *func2 = new TF1("func2", "1040"); ///valore di riferimento 1300 |
TF1 *func2 = new TF1("func2", "1040"); ///valore di riferimento 1300 |
324 |
func2->SetRange(obmin, obmax); |
//func2->SetRange(obmin, obmax); |
325 |
|
func2->SetRange(limitdown, limitup); |
326 |
func2->SetLineColor(4); |
func2->SetLineColor(4); |
327 |
func2->SetLineStyle(4); |
func2->SetLineStyle(1); |
328 |
func2->SetLineWidth(4); |
func2->SetLineWidth(3); |
329 |
func2->Draw("same"); |
func2->Draw("same"); |
330 |
TF1 *func3 = new TF1("func3", "109"); ///valore di riferimento 95 |
TF1 *func3 = new TF1("func3", "109"); ///valore di riferimento 95 |
331 |
func3->SetRange(obmin, obmax); |
//func3->SetRange(obmin, obmax); |
332 |
|
func3->SetRange(limitdown, limitup); |
333 |
func3->SetLineColor(6); |
func3->SetLineColor(6); |
334 |
func3->SetLineStyle(4); |
func3->SetLineStyle(1); |
335 |
func3->SetLineWidth(4); |
func3->SetLineWidth(3); |
336 |
func3->Draw("same"); |
func3->Draw("same"); |
337 |
TF1 *func4 = new TF1("func4", "71"); ///valore di riferimento 95 |
TF1 *func4 = new TF1("func4", "71"); ///valore di riferimento 95 |
338 |
func4->SetRange(obmin, obmax); |
//func4->SetRange(obmin, obmax); |
339 |
|
func4->SetRange(limitdown, limitup); |
340 |
func4->SetLineColor(6); |
func4->SetLineColor(6); |
341 |
func4->SetLineStyle(4); |
func4->SetLineStyle(1); |
342 |
func4->SetLineWidth(4); |
func4->SetLineWidth(3); |
343 |
func4->Draw("same"); |
func4->Draw("same"); |
344 |
TF1 *func5 = new TF1("func5", "38.4"); //valore di riferimento 32 |
TF1 *func5 = new TF1("func5", "38.4"); //valore di riferimento 32 |
345 |
func5->SetRange(obmin, obmax); |
//func5->SetRange(obmin, obmax); |
346 |
func5->SetLineStyle(4); |
func5->SetRange(limitdown, limitup); |
347 |
|
func5->SetLineStyle(1); |
348 |
func5->SetLineColor(3); |
func5->SetLineColor(3); |
349 |
func5->SetLineWidth(4); |
func5->SetLineWidth(3); |
350 |
func5->Draw("same"); |
func5->Draw("same"); |
351 |
TF1 *func6 = new TF1("func6", "25.6"); //valore di riferimento 32 |
TF1 *func6 = new TF1("func6", "25.6"); //valore di riferimento 32 |
352 |
func6->SetRange(obmin, obmax); |
//func6->SetRange(obmin, obmax); |
353 |
func6->SetLineStyle(4); |
func6->SetRange(limitdown, limitup); |
354 |
|
func6->SetLineStyle(1); |
355 |
func6->SetLineColor(3); |
func6->SetLineColor(3); |
356 |
func6->SetLineWidth(4); |
func6->SetLineWidth(3); |
357 |
func6->Draw("same"); |
func6->Draw("same"); |
358 |
} |
} |
359 |
|
|
360 |
if (IPM1status==1 && IPM2status==0){ ////cold configuration |
if (IPM1status==1 && IPM2status==0){ ////cold configuration |
361 |
TF1 *func1 = new TF1("func1", "2400"); |
TF1 *func1 = new TF1("func1", "2400"); |
362 |
func1->SetRange(obmin, obmax); |
//func1->SetRange(obmin, obmax); |
363 |
|
func1->SetRange(limitdown, limitup); |
364 |
func1->SetLineColor(4); |
func1->SetLineColor(4); |
365 |
func1->SetLineStyle(4); |
func1->SetLineStyle(1); |
366 |
func1->SetLineWidth(4); |
func1->SetLineWidth(3); |
367 |
func1->Draw("same"); |
func1->Draw("same"); |
368 |
TF1 *func2 = new TF1("func2", "1600"); ///valore di riferimento 2000 |
TF1 *func2 = new TF1("func2", "1600"); ///valore di riferimento 2000 |
369 |
func2->SetRange(obmin, obmax); |
//func2->SetRange(obmin, obmax); |
370 |
|
func2->SetRange(limitdown, limitup); |
371 |
func2->SetLineColor(4); |
func2->SetLineColor(4); |
372 |
func2->SetLineStyle(4); |
func2->SetLineStyle(1); |
373 |
func2->SetLineWidth(4); |
func2->SetLineWidth(3); |
374 |
func2->Draw("same"); |
func2->Draw("same"); |
375 |
TF1 *func3 = new TF1("func3", "180"); |
TF1 *func3 = new TF1("func3", "180"); |
376 |
func3->SetRange(obmin, obmax); |
//func3->SetRange(obmin, obmax); |
377 |
|
func3->SetRange(limitdown, limitup); |
378 |
func3->SetLineColor(6); |
func3->SetLineColor(6); |
379 |
func3->SetLineStyle(4); |
func3->SetLineStyle(1); |
380 |
func3->SetLineWidth(4); |
func3->SetLineWidth(3); |
381 |
func3->Draw("same"); |
func3->Draw("same"); |
382 |
TF1 *func4 = new TF1("func4", "120"); ///valore di riferimento 150 |
TF1 *func4 = new TF1("func4", "120"); ///valore di riferimento 150 |
383 |
func4->SetRange(obmin, obmax); |
//func4->SetRange(obmin, obmax); |
384 |
|
func4->SetRange(limitdown, limitup); |
385 |
func4->SetLineColor(6); |
func4->SetLineColor(6); |
386 |
func4->SetLineStyle(4); |
func4->SetLineStyle(1); |
387 |
func4->SetLineWidth(4); |
func4->SetLineWidth(3); |
388 |
func4->Draw("same"); |
func4->Draw("same"); |
389 |
TF1 *func5 = new TF1("func5", "38.4"); |
TF1 *func5 = new TF1("func5", "38.4"); |
390 |
func5->SetRange(obmin, obmax); |
//func5->SetRange(obmin, obmax); |
391 |
func5->SetLineStyle(4); |
func5->SetRange(limitdown, limitup); |
392 |
|
func5->SetLineStyle(1); |
393 |
func5->SetLineColor(3); |
func5->SetLineColor(3); |
394 |
func5->SetLineWidth(4); |
func5->SetLineWidth(3); |
395 |
func5->Draw("same"); |
func5->Draw("same"); |
396 |
TF1 *func6 = new TF1("func6", "25.6"); //valore di riferimento 32 |
TF1 *func6 = new TF1("func6", "25.6"); //valore di riferimento 32 |
397 |
func6->SetRange(obmin, obmax); |
//func6->SetRange(obmin, obmax); |
398 |
func6->SetLineStyle(4); |
func6->SetRange(limitdown, limitup); |
399 |
|
func6->SetLineStyle(1); |
400 |
func6->SetLineColor(3); |
func6->SetLineColor(3); |
401 |
func6->SetLineWidth(4); |
func6->SetLineWidth(3); |
402 |
func6->Draw("same"); |
func6->Draw("same"); |
403 |
} |
} |
404 |
|
|
405 |
TPad *pad = new TPad("pad","pad", .75, .93, .99, .99); |
//TPad *pad = new TPad("pad","pad", .75, .93, .99, .99); |
406 |
|
TPad *pad = new TPad("pad","pad", .58, .85, .92, .94); |
407 |
pad->SetFillColor(10); |
pad->SetFillColor(10); |
408 |
pad->Draw(); |
pad->Draw(); |
409 |
pad->cd(); |
pad->cd(); |
410 |
TLatex *l = new TLatex(); |
TLatex *l = new TLatex(); |
411 |
l->SetTextAlign(12); |
l->SetTextAlign(12); |
412 |
l->SetTextSize(0.35); |
l->SetTextSize(0.4); |
413 |
l->SetTextColor(8); |
l->SetTextColor(kRed); |
414 |
l->DrawLatex(0.05, 0.65, status.Data()); |
l->DrawLatex(0.05, 0.65, status.Data()); |
415 |
|
|
416 |
|
|
417 |
|
finalCanv->cd(2); |
418 |
|
gPad->SetLogy(); |
419 |
|
gStyle->SetOptStat("nemrou"); |
420 |
|
calibS4_1->SetLineColor(kBlack); |
421 |
|
calibS4_1->SetFillColor(kRed); |
422 |
|
calibS4_1->GetYaxis()->SetTitle("Number of events"); |
423 |
|
calibS4_1->GetYaxis()->SetTitleSize(0.03); |
424 |
|
calibS4_1->GetYaxis()->SetTitleOffset(1); |
425 |
|
calibS4_1->GetYaxis()->CenterTitle(); |
426 |
|
calibS4_1->GetYaxis()->SetLabelSize(0.02); |
427 |
|
calibS4_1->GetXaxis()->CenterTitle(); |
428 |
|
calibS4_1->GetXaxis()->SetTitleSize(0.03); |
429 |
|
calibS4_1->GetXaxis()->SetTitleOffset(1); |
430 |
|
calibS4_1->GetXaxis()->SetLabelSize(0.02); |
431 |
|
calibS4_1->GetXaxis()->SetTitle("ADC (ch)"); |
432 |
|
calibS4_1->SetAxisRange(0,200); |
433 |
|
calibS4_1->Draw(); |
434 |
|
|
435 |
|
finalCanv->cd(3); |
436 |
|
gPad->SetLogy(); |
437 |
|
gStyle->SetOptStat("nemrou"); |
438 |
|
calibS4_2->SetLineColor(kBlack); |
439 |
|
calibS4_2->SetFillColor(kRed); |
440 |
|
calibS4_2->GetYaxis()->SetTitle("Number of events"); |
441 |
|
calibS4_2->GetYaxis()->SetTitleSize(0.03); |
442 |
|
calibS4_2->GetYaxis()->SetTitleOffset(1); |
443 |
|
calibS4_2->GetYaxis()->CenterTitle(); |
444 |
|
calibS4_2->GetYaxis()->SetLabelSize(0.02); |
445 |
|
calibS4_2->GetXaxis()->CenterTitle(); |
446 |
|
calibS4_2->GetXaxis()->SetTitleSize(0.03); |
447 |
|
calibS4_2->GetXaxis()->SetTitleOffset(1); |
448 |
|
calibS4_2->GetXaxis()->SetLabelSize(0.02); |
449 |
|
calibS4_2->GetXaxis()->SetTitle("ADC (ch)"); |
450 |
|
calibS4_2->SetAxisRange(50,250); |
451 |
|
calibS4_2->Draw(); |
452 |
|
|
453 |
|
finalCanv->cd(4); |
454 |
|
gPad->SetLogy(); |
455 |
|
gStyle->SetOptStat("nemrou"); |
456 |
|
calibS4_4->SetLineColor(kBlack); |
457 |
|
calibS4_4->SetFillColor(kRed); |
458 |
|
calibS4_4->GetYaxis()->SetTitle("Number of events"); |
459 |
|
calibS4_4->GetYaxis()->SetTitleSize(0.03); |
460 |
|
calibS4_4->GetYaxis()->SetTitleOffset(1); |
461 |
|
calibS4_4->GetYaxis()->CenterTitle(); |
462 |
|
calibS4_4->GetYaxis()->SetLabelSize(0.02); |
463 |
|
calibS4_4->GetXaxis()->CenterTitle(); |
464 |
|
calibS4_4->GetXaxis()->SetTitleSize(0.03); |
465 |
|
calibS4_4->GetXaxis()->SetTitleOffset(1); |
466 |
|
calibS4_4->GetXaxis()->SetLabelSize(0.02); |
467 |
|
calibS4_4->GetXaxis()->SetTitle("ADC (ch)"); |
468 |
|
calibS4_4->SetAxisRange(500,2500); |
469 |
|
calibS4_4->Draw(); |
470 |
|
|
471 |
oss.str(""); |
oss.str(""); |
472 |
if (outDir == "./") { |
if (outDir == "./") { |
473 |
oss << filename.Data() << "_S4_Calibration_QL." << format.Data(); |
oss << filename.Data() << "_S4_Calibration_QL." << format.Data(); |
474 |
} else { |
} else { |
475 |
oss << outDir.Data() << filename.Data() << "_S4_Calibration_QL." << format.Data(); |
oss << outDir.Data() << filename.Data() << "_S4_Calibration_QL." << format.Data(); |
476 |
} |
} |
477 |
finalCanv->SaveAs(oss.str().c_str()); |
finalCanv->SaveAs(oss.str().c_str()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
478 |
} |
} |
479 |
|
|
480 |
int main(int argc, char* argv[]){ |
int main(int argc, char* argv[]){ |
512 |
} |
} |
513 |
} |
} |
514 |
|
|
515 |
/* if (!strcmp(argv[i], "-format")){ |
if (!strcmp(argv[i], "-format")){ |
516 |
if (++i >= argc){ |
if (++i >= argc){ |
517 |
printf( "-format needs arguments. \n"); |
printf( "-format needs arguments. \n"); |
518 |
printf( "Try '--help' for more information. \n"); |
printf( "Try '--help' for more information. \n"); |
522 |
format = argv[i]; |
format = argv[i]; |
523 |
continue; |
continue; |
524 |
} |
} |
525 |
}*/ |
} |
526 |
|
|
527 |
|
|
528 |
} |
} |