1 |
/* |
2 |
* TriggerScanBasic |
3 |
* Author Nagni |
4 |
* Modified by G. De Rosa |
5 |
* Version 1.2 - Modified by G. De Rosa |
6 |
* Date 27 Apr 2006 |
7 |
* Version 1.4 - Modified by G. De Rosa |
8 |
* Date 26 Jun 2006: Inserted dependences on OnBoardTime and modified histogram ranges. |
9 |
* Version 1.5 - Modified by G. De Rosa |
10 |
* Date 9 Mar 2007: To read correctly the OBT changed the type of time variables from signed to unsigned |
11 |
* Version 1.6 - Modified by R. Carbone |
12 |
* Date 22 Mar 2011: Modified ranges on Plane Counters and Trigger Counters graphs, optimized for outside belts region |
13 |
* |
14 |
* Description: |
15 |
* Describe the performance of the Trigger. |
16 |
* |
17 |
* Parameters: |
18 |
* TString base - the path to the root directory for the specific Pamela unpack session |
19 |
* TString outDirectory - the path where to save the output image (Default = base) |
20 |
* TString format - the format which will be used for save the produced images (Default = "ps") |
21 |
*/ |
22 |
|
23 |
#include <TROOT.h> |
24 |
#include <TFile.h> |
25 |
#include <TString.h> |
26 |
#include <TObjString.h> |
27 |
#include <TTree.h> |
28 |
#include <TBranch.h> |
29 |
#include <TGraph.h> |
30 |
#include <TStyle.h> |
31 |
#include <TH1.h> |
32 |
#include <TH1F.h> |
33 |
#include <TH2S.h> |
34 |
#include <TPaveText.h> |
35 |
#include <TCanvas.h> |
36 |
#include <TLatex.h> |
37 |
#include <TGraph.h> |
38 |
#include <physics/trigger/TriggerEvent.h> |
39 |
#include <EventHeader.h> |
40 |
#include <PscuHeader.h> |
41 |
#include <iostream> |
42 |
#include <cstdlib> |
43 |
|
44 |
using namespace std; |
45 |
|
46 |
char bit(int decimal, char pos) |
47 |
{ |
48 |
return( (decimal>>pos)%2 ); |
49 |
} |
50 |
|
51 |
void TriggerScanBasic(TString base, TString outDirectory = "", TString format = ""){ |
52 |
|
53 |
ULong_t lastime, firstime; |
54 |
double obmin=0.; |
55 |
double obmax=0.; |
56 |
stringstream oss, oss1, oss2, oss3, noentries, stringa; |
57 |
std::stringstream sst; |
58 |
if (outDirectory == "") outDirectory = base.Data(); |
59 |
TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString(); |
60 |
|
61 |
TFile *file =new TFile(base.Data()) ; |
62 |
if (!file){ |
63 |
printf("file not Found \n"); |
64 |
return; |
65 |
} |
66 |
|
67 |
TTree *PhysicsTr = (TTree*)file->Get("Physics"); |
68 |
TBranch *TrigBr = PhysicsTr->GetBranch("Trigger"); |
69 |
TBranch *HeadBr = PhysicsTr->GetBranch("Header"); |
70 |
|
71 |
pamela::EventHeader *eh = 0; |
72 |
pamela::PscuHeader *ph = 0; |
73 |
|
74 |
pamela::trigger::TriggerEvent *triggerEvent = 0; |
75 |
|
76 |
PhysicsTr->SetBranchAddress("Trigger", &triggerEvent); |
77 |
PhysicsTr->SetBranchAddress("Header", &eh); |
78 |
|
79 |
Long64_t nevents = TrigBr->GetEntries(); |
80 |
if (nevents <= 0) { |
81 |
printf("nevents = %llu \n", nevents); |
82 |
file->Close(); |
83 |
return; |
84 |
} |
85 |
|
86 |
//-------------- to know the max and min OBT ----------------------------// |
87 |
HeadBr->GetEntry(0); |
88 |
ph = eh->GetPscuHeader(); |
89 |
firstime = ph->GetOrbitalTime(); |
90 |
HeadBr->GetEntry(nevents); |
91 |
ph = eh->GetPscuHeader(); |
92 |
lastime = ph->GetOrbitalTime(); |
93 |
int i =0; |
94 |
while(i < nevents){ |
95 |
HeadBr->GetEntry(i); |
96 |
ph = eh->GetPscuHeader(); |
97 |
if((ULong_t)(ph->GetOrbitalTime()) <= firstime) firstime=ph->GetOrbitalTime(); |
98 |
if((ULong_t)(ph->GetOrbitalTime()) >= lastime) lastime=ph->GetOrbitalTime(); |
99 |
i++; |
100 |
} |
101 |
|
102 |
//------------------------ First histogram -----------------------------------// |
103 |
obmin=firstime; |
104 |
obmax=lastime; |
105 |
Int_t nbin = (lastime-firstime)/60000; // on 1 min |
106 |
gStyle->SetOptStat(0); |
107 |
TH1F *h1 = new TH1F ("histo1", "" , nbin, obmin, obmax); |
108 |
TH1F *h2 = new TH1F ("histo2", "" , nbin, obmin, obmax); |
109 |
TH1F *h5 = new TH1F ("histo5", "" , nbin, obmin, obmax); |
110 |
TH1F *LiveTimeMean = new TH1F("LiveTimeMean", sst.str().c_str(),nbin, obmin, obmax); |
111 |
TH1F *DeadTimeMean = new TH1F("DeadTimeMean", sst.str().c_str(),nbin, obmin, obmax); |
112 |
//============================================================== |
113 |
|
114 |
/* Histo DEF */ |
115 |
|
116 |
/* |
117 |
* S4 and Calorimeter Counters histograms |
118 |
*/ |
119 |
TCanvas *S4CalCanvas = new TCanvas("S4CalCanvas","S4CalCanvas", 1280, 1024); |
120 |
S4CalCanvas->Divide(1,2); |
121 |
//---------- |
122 |
sst.str(""); |
123 |
sst << "S4 Counters based on " << base.Data(); |
124 |
//---------- |
125 |
sst.str(""); |
126 |
sst << "Calorimeter Rate Counters based on " << base.Data(); |
127 |
TH1F *S4Cal2Histo = new TH1F("S4Cal2Histo", sst.str().c_str(), 20, 0, 20); |
128 |
|
129 |
// int i = 0; |
130 |
i = 0; |
131 |
Int_t size = nevents; |
132 |
|
133 |
ULong_t UnsOBT=0; |
134 |
|
135 |
Double_t *time = new Double_t[size]; |
136 |
Double_t *evCounter = new Double_t[size]; |
137 |
Double_t *deadTime = new Double_t[size]; |
138 |
Double_t *liveTime = new Double_t[size]; |
139 |
// |
140 |
Double_t *trigrate0 = new Double_t[size]; |
141 |
Double_t *trigrate1 = new Double_t[size]; |
142 |
Double_t *trigrate2 = new Double_t[size]; |
143 |
Double_t *trigrate3 = new Double_t[size]; |
144 |
Double_t *trigrate4 = new Double_t[size]; |
145 |
Double_t *trigrate5 = new Double_t[size]; |
146 |
// |
147 |
Double_t *pmt1 = new Double_t[size]; |
148 |
Double_t *pmt2 = new Double_t[size]; |
149 |
Double_t *pmt3 = new Double_t[size]; |
150 |
// |
151 |
Double_t *s4rate = new Double_t[size]; |
152 |
// |
153 |
Double_t *pmt1_0 = new Double_t[size]; |
154 |
Double_t *pmt1_1 = new Double_t[size]; |
155 |
Double_t *pmt1_2 = new Double_t[size]; |
156 |
Double_t *pmt1_3 = new Double_t[size]; |
157 |
Double_t *pmt1_4 = new Double_t[size]; |
158 |
Double_t *pmt1_5 = new Double_t[size]; |
159 |
Double_t *pmt1_6 = new Double_t[size]; |
160 |
Double_t *pmt1_7 = new Double_t[size]; |
161 |
Double_t *pmt1_8 = new Double_t[size]; |
162 |
Double_t *pmt1_9 = new Double_t[size]; |
163 |
Double_t *pmt1_10 = new Double_t[size]; |
164 |
Double_t *pmt1_11 = new Double_t[size]; |
165 |
Double_t *pmt1_12 = new Double_t[size]; |
166 |
Double_t *pmt1_13 = new Double_t[size]; |
167 |
Double_t *pmt1_14 = new Double_t[size]; |
168 |
Double_t *pmt1_15 = new Double_t[size]; |
169 |
Double_t *pmt1_16 = new Double_t[size]; |
170 |
Double_t *pmt1_17 = new Double_t[size]; |
171 |
Double_t *pmt1_18 = new Double_t[size]; |
172 |
Double_t *pmt1_19 = new Double_t[size]; |
173 |
Double_t *pmt1_20 = new Double_t[size]; |
174 |
Double_t *pmt1_21 = new Double_t[size]; |
175 |
Double_t *pmt1_22 = new Double_t[size]; |
176 |
Double_t *pmt1_23 = new Double_t[size]; |
177 |
// |
178 |
Double_t *pmt2_0 = new Double_t[size]; |
179 |
Double_t *pmt2_1 = new Double_t[size]; |
180 |
Double_t *pmt2_2 = new Double_t[size]; |
181 |
Double_t *pmt2_3 = new Double_t[size]; |
182 |
Double_t *pmt2_4 = new Double_t[size]; |
183 |
Double_t *pmt2_5 = new Double_t[size]; |
184 |
Double_t *pmt2_6 = new Double_t[size]; |
185 |
Double_t *pmt2_7 = new Double_t[size]; |
186 |
Double_t *pmt2_8 = new Double_t[size]; |
187 |
Double_t *pmt2_9 = new Double_t[size]; |
188 |
Double_t *pmt2_10 = new Double_t[size]; |
189 |
Double_t *pmt2_11 = new Double_t[size]; |
190 |
Double_t *pmt2_12 = new Double_t[size]; |
191 |
Double_t *pmt2_13 = new Double_t[size]; |
192 |
Double_t *pmt2_14 = new Double_t[size]; |
193 |
Double_t *pmt2_15 = new Double_t[size]; |
194 |
Double_t *pmt2_16 = new Double_t[size]; |
195 |
Double_t *pmt2_17 = new Double_t[size]; |
196 |
Double_t *pmt2_18 = new Double_t[size]; |
197 |
Double_t *pmt2_19 = new Double_t[size]; |
198 |
Double_t *pmt2_20 = new Double_t[size]; |
199 |
Double_t *pmt2_21 = new Double_t[size]; |
200 |
Double_t *pmt2_22 = new Double_t[size]; |
201 |
Double_t *pmt2_23 = new Double_t[size]; |
202 |
|
203 |
// |
204 |
while(i < nevents){ |
205 |
HeadBr->GetEntry(i); |
206 |
TrigBr->GetEntry(i); |
207 |
|
208 |
/* time vector fill*/ |
209 |
ph = eh->GetPscuHeader(); |
210 |
UnsOBT = ph->GetOrbitalTime(); |
211 |
|
212 |
time[i] = UnsOBT; |
213 |
|
214 |
|
215 |
/* eventCounter vector fill*/ |
216 |
evCounter[i] = triggerEvent->evcount; |
217 |
|
218 |
if( evCounter[i] > 1 ){ |
219 |
|
220 |
/* live time vector fill*/ |
221 |
liveTime[i] = 0.16 * triggerEvent->dltime[0]; |
222 |
|
223 |
|
224 |
if (liveTime[i]<600) h1->Fill(UnsOBT,liveTime[i]); |
225 |
if (liveTime[i]<600) h2->Fill(UnsOBT); |
226 |
|
227 |
/* dead time vector fill*/ |
228 |
deadTime[i] = 0.01 * triggerEvent->dltime[1]; |
229 |
|
230 |
if (deadTime[i]<600) h5->Fill(UnsOBT,deadTime[i]); |
231 |
} |
232 |
|
233 |
gStyle->SetStatY(0.85); |
234 |
|
235 |
/* PMT Plane Counters */ |
236 |
|
237 |
pmt1[i] = 1.*triggerEvent->pmtpl[0]; |
238 |
pmt2[i] = 1.*triggerEvent->pmtpl[1]; |
239 |
pmt3[i] = 1.*triggerEvent->pmtpl[2]; |
240 |
|
241 |
/* Trigger Rate Counters*/ |
242 |
|
243 |
trigrate0[i] = (1/4.)*triggerEvent->trigrate[0]; |
244 |
trigrate1[i] = (1/4.)*triggerEvent->trigrate[1]; |
245 |
trigrate2[i] = (1/4.)*triggerEvent->trigrate[2]; |
246 |
trigrate3[i] = (1/4.)*triggerEvent->trigrate[3]; |
247 |
trigrate4[i] = (1/4.)*triggerEvent->trigrate[4]; |
248 |
trigrate5[i] = (1/4.)*triggerEvent->trigrate[5]; |
249 |
|
250 |
/* S4 and Calorimeter Counters fill*/ |
251 |
|
252 |
s4rate[i] = triggerEvent->s4calcount[0]; |
253 |
S4Cal2Histo->Fill(triggerEvent->s4calcount[1]); |
254 |
// |
255 |
|
256 |
/* pmtcount1 */ |
257 |
pmt1_0[i] = triggerEvent->pmtcount1[0]; |
258 |
pmt1_1[i] = triggerEvent->pmtcount1[1]; |
259 |
pmt1_2[i] = triggerEvent->pmtcount1[2]; |
260 |
pmt1_3[i] = triggerEvent->pmtcount1[3]; |
261 |
pmt1_4[i] = triggerEvent->pmtcount1[4]; |
262 |
pmt1_5[i] = triggerEvent->pmtcount1[5]; |
263 |
pmt1_6[i] = triggerEvent->pmtcount1[6]; |
264 |
pmt1_7[i] = triggerEvent->pmtcount1[7]; |
265 |
pmt1_8[i] = triggerEvent->pmtcount1[8]; |
266 |
pmt1_9[i] = triggerEvent->pmtcount1[9]; |
267 |
pmt1_10[i] = triggerEvent->pmtcount1[10]; |
268 |
pmt1_11[i] = triggerEvent->pmtcount1[11]; |
269 |
pmt1_12[i] = triggerEvent->pmtcount1[12]; |
270 |
pmt1_13[i] = triggerEvent->pmtcount1[13]; |
271 |
pmt1_14[i] = triggerEvent->pmtcount1[14]; |
272 |
pmt1_15[i] = triggerEvent->pmtcount1[15]; |
273 |
pmt1_16[i] = triggerEvent->pmtcount1[16]; |
274 |
pmt1_17[i] = triggerEvent->pmtcount1[17]; |
275 |
pmt1_18[i] = triggerEvent->pmtcount1[18]; |
276 |
pmt1_19[i] = triggerEvent->pmtcount1[19]; |
277 |
pmt1_20[i] = triggerEvent->pmtcount1[20]; |
278 |
pmt1_21[i] = triggerEvent->pmtcount1[21]; |
279 |
pmt1_22[i] = triggerEvent->pmtcount1[22]; |
280 |
pmt1_23[i] = triggerEvent->pmtcount1[23]; |
281 |
|
282 |
|
283 |
/* pmtcount2 */ |
284 |
|
285 |
pmt2_0[i] = triggerEvent->pmtcount2[0]; |
286 |
pmt2_1[i] = triggerEvent->pmtcount2[1]; |
287 |
pmt2_2[i] = triggerEvent->pmtcount2[2]; |
288 |
pmt2_3[i] = triggerEvent->pmtcount2[3]; |
289 |
pmt2_4[i] = triggerEvent->pmtcount2[4]; |
290 |
pmt2_5[i] = triggerEvent->pmtcount2[5]; |
291 |
pmt2_6[i] = triggerEvent->pmtcount2[6]; |
292 |
pmt2_7[i] = triggerEvent->pmtcount2[7]; |
293 |
pmt2_8[i] = triggerEvent->pmtcount2[8]; |
294 |
pmt2_9[i] = triggerEvent->pmtcount2[9]; |
295 |
pmt2_10[i] = triggerEvent->pmtcount2[10]; |
296 |
pmt2_11[i] = triggerEvent->pmtcount2[11]; |
297 |
pmt2_12[i] = triggerEvent->pmtcount2[12]; |
298 |
pmt2_13[i] = triggerEvent->pmtcount2[13]; |
299 |
pmt2_14[i] = triggerEvent->pmtcount2[14]; |
300 |
pmt2_15[i] = triggerEvent->pmtcount2[15]; |
301 |
pmt2_16[i] = triggerEvent->pmtcount2[16]; |
302 |
pmt2_17[i] = triggerEvent->pmtcount2[17]; |
303 |
pmt2_18[i] = triggerEvent->pmtcount2[18]; |
304 |
pmt2_19[i] = triggerEvent->pmtcount2[19]; |
305 |
pmt2_20[i] = triggerEvent->pmtcount2[20]; |
306 |
pmt2_21[i] = triggerEvent->pmtcount2[21]; |
307 |
pmt2_22[i] = triggerEvent->pmtcount2[22]; |
308 |
pmt2_23[i] = triggerEvent->pmtcount2[23]; |
309 |
// |
310 |
i++; |
311 |
} |
312 |
|
313 |
gStyle->SetOptStat(111111); |
314 |
gStyle->SetStatH(0.15); |
315 |
gStyle->SetStatW(0.15); |
316 |
|
317 |
/* |
318 |
* Event Counter graph |
319 |
*/ |
320 |
TCanvas *EvCounterCanvas = new TCanvas("EvCounterCanvas","EvCounterCanvas", 1280, 1024); |
321 |
//---------- |
322 |
sst.str(""); |
323 |
sst << "Event Counter"; |
324 |
TGraph *evCounterGraph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)evCounter); |
325 |
evCounterGraph->SetTitle(sst.str().c_str()); |
326 |
evCounterGraph->GetXaxis()->SetTitle("OnBoardTime"); |
327 |
evCounterGraph->GetXaxis()->CenterTitle(); |
328 |
evCounterGraph->Draw("APL"); |
329 |
|
330 |
/* |
331 |
* Dead and Live time graphs |
332 |
*/ |
333 |
TCanvas *DeadLiveCanvas = new TCanvas("DeadLiveCanvas","DeadLiveCanvas", 1280, 1024); |
334 |
DeadLiveCanvas->Divide(1,2); |
335 |
//---------- |
336 |
sst.str(""); |
337 |
sst << "Graph of Dead Time vs OBT based on " << base.Data(); |
338 |
TGraph *DeadTimeGraph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)deadTime); |
339 |
DeadLiveCanvas->cd(1); |
340 |
sst.str(""); |
341 |
sst << "Dead Time"; |
342 |
DeadTimeGraph->SetTitle(sst.str().c_str()); |
343 |
DeadTimeGraph->SetFillColor(2); |
344 |
DeadTimeGraph->GetXaxis()->SetTitle("OnBoardTime"); |
345 |
DeadTimeGraph->GetXaxis()->CenterTitle(); |
346 |
DeadTimeGraph->GetYaxis()->SetTitle("DeadTime(ms)"); |
347 |
DeadTimeGraph->GetYaxis()->CenterTitle(); |
348 |
DeadTimeGraph->Draw("AP"); |
349 |
//---------- |
350 |
sst.str(""); |
351 |
sst << "Graph of Live Time vs OBT based on " << base.Data(); |
352 |
TGraph *LiveTimeGraph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)liveTime); |
353 |
DeadLiveCanvas->cd(2); |
354 |
sst.str(""); |
355 |
sst << "Live Time"; |
356 |
LiveTimeGraph->SetTitle(sst.str().c_str()); |
357 |
LiveTimeGraph->SetFillColor(2); |
358 |
LiveTimeGraph->GetXaxis()->SetTitle("OnBoardTime"); |
359 |
LiveTimeGraph->GetXaxis()->CenterTitle(); |
360 |
LiveTimeGraph->GetYaxis()->SetTitle("LiveTime(ms)"); |
361 |
LiveTimeGraph->GetYaxis()->CenterTitle(); |
362 |
LiveTimeGraph->Draw("AP"); |
363 |
|
364 |
/* |
365 |
* Average Dead and Live time graphs |
366 |
*/ |
367 |
TCanvas *MeanLiveDeadCanvas = new TCanvas("MeanLiveDeadCanvas","MeanLiveDeadCanvas", 1280, 1024); |
368 |
MeanLiveDeadCanvas->Divide(1,2); |
369 |
|
370 |
MeanLiveDeadCanvas->cd(1); |
371 |
DeadTimeMean->Divide(h5,h2); |
372 |
sst.str(""); |
373 |
sst << "Average Dead Time"; |
374 |
DeadTimeMean->GetXaxis()->SetTitle("OnBoardTime"); |
375 |
DeadTimeMean->GetXaxis()->CenterTitle(); |
376 |
DeadTimeMean->GetYaxis()->SetTitle("Average Dead Time (over 1min)"); |
377 |
DeadTimeMean->GetYaxis()->CenterTitle(); |
378 |
DeadTimeMean->Draw(); |
379 |
MeanLiveDeadCanvas->cd(2); |
380 |
LiveTimeMean->Divide(h1,h2); |
381 |
sst.str(""); |
382 |
sst << "Average Live Time"; |
383 |
LiveTimeMean->GetXaxis()->SetTitle("OnBoardTime"); |
384 |
LiveTimeMean->GetXaxis()->CenterTitle(); |
385 |
LiveTimeMean->GetYaxis()->SetTitle("Average Live Time (over 1min)"); |
386 |
LiveTimeMean->GetYaxis()->CenterTitle(); |
387 |
LiveTimeMean->Draw(); |
388 |
|
389 |
/* |
390 |
* PMT Plane Counters Graph |
391 |
*/ |
392 |
|
393 |
TCanvas *PMTCanvas = new TCanvas("PMTCanvas","PMTCanvas", 1280, 1024); |
394 |
PMTCanvas->Divide(1,3); |
395 |
//---------- |
396 |
sst.str(""); |
397 |
sst << "Graph of PMT Plane Counters (S11 AND S12) vs OBT based on " << base.Data(); |
398 |
TGraph *PMT1Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1); |
399 |
PMTCanvas->cd(1)->SetGridy(); |
400 |
sst.str(""); |
401 |
sst << "PMT Plane Counters (S11 AND S12)"; |
402 |
PMT1Graph->SetTitle(sst.str().c_str()); |
403 |
PMT1Graph->SetFillColor(2); |
404 |
PMT1Graph->GetXaxis()->SetTitle("OnBoardTime"); |
405 |
PMT1Graph->GetXaxis()->CenterTitle(); |
406 |
PMT1Graph->GetYaxis()->SetTitle("PMT Plane Counters (over 60 ms)"); |
407 |
PMT1Graph->GetYaxis()->CenterTitle(); |
408 |
PMT1Graph->SetMaximum(300); |
409 |
//PMT1Graph->SetMinimum(100); |
410 |
PMT1Graph->Draw("AP"); |
411 |
//---------- |
412 |
sst.str(""); |
413 |
sst << "Graph PMT Plane Counters (S21 AND S22) vs OBT based on " << base.Data(); |
414 |
TGraph *PMT2Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2); |
415 |
PMTCanvas->cd(2)->SetGridy(); |
416 |
sst.str(""); |
417 |
sst << "PMT Plane Counters (S21 AND S22)"; |
418 |
PMT2Graph->SetTitle(sst.str().c_str()); |
419 |
PMT2Graph->SetFillColor(2); |
420 |
PMT2Graph->GetXaxis()->SetTitle("OnBoardTime"); |
421 |
PMT2Graph->GetXaxis()->CenterTitle(); |
422 |
PMT2Graph->GetYaxis()->SetTitle("PMT Plane Counters (over 60 ms)"); |
423 |
PMT2Graph->GetYaxis()->CenterTitle(); |
424 |
PMT2Graph->SetMaximum(80); |
425 |
PMT2Graph->Draw("AP"); |
426 |
//---------- |
427 |
sst.str(""); |
428 |
sst << "Graph PMT Plane Counters (S31 AND S32) vs OBT based on " << base.Data(); |
429 |
TGraph *PMT3Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt3); |
430 |
PMTCanvas->cd(3)->SetGridy(); |
431 |
sst.str(""); |
432 |
sst << "PMT Plane Counters (S31 AND S32)"; |
433 |
PMT3Graph->SetTitle(sst.str().c_str()); |
434 |
PMT3Graph->SetFillColor(2); |
435 |
PMT3Graph->GetXaxis()->SetTitle("OnBoardTime"); |
436 |
PMT3Graph->GetXaxis()->CenterTitle(); |
437 |
PMT3Graph->GetYaxis()->SetTitle("PMT Plane Rate Counters (over 60 ms)"); |
438 |
PMT3Graph->GetYaxis()->CenterTitle(); |
439 |
PMT3Graph->SetMaximum(70); |
440 |
PMT3Graph->Draw("AP"); |
441 |
// |
442 |
//---------- |
443 |
|
444 |
/* |
445 |
* Trigger Rate Counters draw |
446 |
*/ |
447 |
|
448 |
TCanvas *TrigRate1Canvas = new TCanvas("TrigRate1Canvas","TrigRate1Canvas", 1280, 1024); |
449 |
TrigRate1Canvas->Divide(1,3); |
450 |
//---------- |
451 |
sst.str(""); |
452 |
sst << "Graph of Trigger Rate Counters (S11 OR S12) AND (S21 OR S22) AND (S31 OR S32) vs OBT based on " << base.Data(); |
453 |
|
454 |
TGraph *TrigRate0Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate0); |
455 |
TrigRate1Canvas->cd(1)->SetGridy(); |
456 |
sst.str(""); |
457 |
sst << "Trigger Rate Counters (S11 OR S12) AND (S21 OR S22) AND (S31 OR S32)"; |
458 |
TrigRate0Graph->SetTitle(sst.str().c_str()); |
459 |
TrigRate0Graph->SetFillColor(2); |
460 |
TrigRate0Graph->GetXaxis()->SetTitle("OnBoardTime"); |
461 |
TrigRate0Graph->GetXaxis()->CenterTitle(); |
462 |
TrigRate0Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
463 |
TrigRate0Graph->GetYaxis()->CenterTitle(); |
464 |
TrigRate0Graph->SetMaximum(100); |
465 |
TrigRate0Graph->Draw("AP"); |
466 |
//---------- |
467 |
sst.str(""); |
468 |
sst << "Graph Trigger Rate Counters (S11 AND S12) AND (S21 AND S22) AND (S31 AND S32) vs OBT based on " << base.Data(); |
469 |
TGraph *TrigRate1Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate1); |
470 |
TrigRate1Canvas->cd(2)->SetGridy(); |
471 |
sst.str(""); |
472 |
sst << "Trigger Rate Counters (S11 AND S12) AND (S21 AND S22) AND (S31 AND S32)"; |
473 |
TrigRate1Graph->SetTitle(sst.str().c_str()); |
474 |
TrigRate1Graph->SetFillColor(2); |
475 |
TrigRate1Graph->GetXaxis()->SetTitle("OnBoardTime"); |
476 |
TrigRate1Graph->GetXaxis()->CenterTitle(); |
477 |
TrigRate1Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
478 |
TrigRate1Graph->GetYaxis()->CenterTitle(); |
479 |
TrigRate1Graph->SetMaximum(60); |
480 |
TrigRate1Graph->Draw("AP"); |
481 |
//---------- |
482 |
sst.str(""); |
483 |
sst << "Graph Trigger Rate Counters (S21 OR S22) AND (S31 OR S32) vs OBT based on " << base.Data(); |
484 |
TGraph *TrigRate2Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate2); |
485 |
TrigRate1Canvas->cd(3)->SetGridy(); |
486 |
sst.str(""); |
487 |
sst << "Trigger Rate Counters (S21 OR S22) AND (S31 OR S32) "; |
488 |
TrigRate2Graph->SetTitle(sst.str().c_str()); |
489 |
TrigRate2Graph->SetFillColor(2); |
490 |
TrigRate2Graph->GetXaxis()->SetTitle("OnBoardTime"); |
491 |
TrigRate2Graph->GetXaxis()->CenterTitle(); |
492 |
TrigRate2Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
493 |
TrigRate2Graph->GetYaxis()->CenterTitle(); |
494 |
TrigRate2Graph->SetMaximum(140); |
495 |
TrigRate2Graph->Draw("AP"); |
496 |
// |
497 |
//---------- |
498 |
// |
499 |
TCanvas *TrigRate2Canvas = new TCanvas("TrigRate2Canvas","TrigRate2Canvas", 1280, 1024); |
500 |
TrigRate2Canvas->Divide(1,3); |
501 |
//---------- |
502 |
sst.str(""); |
503 |
sst << "Graph of Trigger Rate Counters (S21 AND S22) AND (S31 AND S32) vs OBT based on " << base.Data(); |
504 |
|
505 |
TGraph *TrigRate3Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate3); |
506 |
TrigRate2Canvas->cd(1)->SetGridy(); |
507 |
sst.str(""); |
508 |
sst << "Trigger Rate Counters (S21 AND S22) AND (S31 AND S32)"; |
509 |
TrigRate3Graph->SetTitle(sst.str().c_str()); |
510 |
TrigRate3Graph->SetFillColor(2); |
511 |
TrigRate3Graph->GetXaxis()->SetTitle("OnBoardTime"); |
512 |
TrigRate3Graph->GetXaxis()->CenterTitle(); |
513 |
TrigRate3Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
514 |
TrigRate3Graph->GetYaxis()->CenterTitle(); |
515 |
TrigRate3Graph->SetMaximum(60); |
516 |
TrigRate3Graph->Draw("AP"); |
517 |
//---------- |
518 |
sst.str(""); |
519 |
sst << "Graph Trigger Rate Counters S12 AND (S21 AND S22) vs OBT based on " << base.Data(); |
520 |
TGraph *TrigRate4Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate4); |
521 |
TrigRate2Canvas->cd(2)->SetGridy(); |
522 |
sst.str(""); |
523 |
sst << "Trigger Rate Counters S12 AND (S21 AND S22)"; |
524 |
TrigRate4Graph->SetTitle(sst.str().c_str()); |
525 |
TrigRate4Graph->SetFillColor(2); |
526 |
TrigRate4Graph->GetXaxis()->SetTitle("OnBoardTime"); |
527 |
TrigRate4Graph->GetXaxis()->CenterTitle(); |
528 |
TrigRate4Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
529 |
TrigRate4Graph->GetYaxis()->CenterTitle(); |
530 |
TrigRate4Graph->SetMaximum(400); |
531 |
TrigRate4Graph->Draw("AP"); |
532 |
//---------- |
533 |
sst.str(""); |
534 |
sst << "Graph Trigger Rate Counters (S11 OR S12) AND (S31 OR S32) vs OBT based on " << base.Data(); |
535 |
TGraph *TrigRate5Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate5); |
536 |
TrigRate2Canvas->cd(3)->SetGridy(); |
537 |
sst.str(""); |
538 |
sst << "Trigger Rate Counters (S11 OR S12) AND (S31 OR S32)"; |
539 |
TrigRate5Graph->SetTitle(sst.str().c_str()); |
540 |
TrigRate5Graph->SetFillColor(2); |
541 |
TrigRate5Graph->GetXaxis()->SetTitle("OnBoardTime"); |
542 |
TrigRate5Graph->GetXaxis()->CenterTitle(); |
543 |
TrigRate5Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
544 |
TrigRate5Graph->GetYaxis()->CenterTitle(); |
545 |
TrigRate5Graph->SetMaximum(170); |
546 |
TrigRate5Graph->Draw("AP"); |
547 |
//---------- |
548 |
|
549 |
gStyle->SetOptStat("mr"); |
550 |
|
551 |
/* S4 and Calorimeter Counters draw*/ |
552 |
TGraph *s4RateGraph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)s4rate); |
553 |
S4CalCanvas->cd(1); |
554 |
sst.str(""); |
555 |
sst << "S4 Trigger Rate Counters"; |
556 |
s4RateGraph->SetTitle(sst.str().c_str()); |
557 |
s4RateGraph->SetFillColor(2); |
558 |
s4RateGraph->GetXaxis()->SetTitle("OnBoardTime"); |
559 |
s4RateGraph->GetXaxis()->CenterTitle(); |
560 |
s4RateGraph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
561 |
s4RateGraph->GetYaxis()->CenterTitle(); |
562 |
s4RateGraph->Draw("AP"); |
563 |
//---------- |
564 |
S4CalCanvas->cd(2); |
565 |
gPad->SetLogy(1); |
566 |
S4Cal2Histo->GetXaxis()->SetTitle("Hz"); |
567 |
S4Cal2Histo->Draw(); |
568 |
// |
569 |
// |
570 |
// |
571 |
gStyle->SetOptStat("mr"); |
572 |
gStyle->SetStatH(0.3); |
573 |
gStyle->SetStatW(0.3); |
574 |
|
575 |
|
576 |
//---------- |
577 |
TCanvas *RatePMT1 = new TCanvas("RatePMT1", "Rate PMT S11A", 1); |
578 |
RatePMT1->Divide (3,3); |
579 |
//---------- |
580 |
sst.str(""); |
581 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
582 |
TGraph *PMT1_0Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_0); |
583 |
RatePMT1->cd(1); |
584 |
sst.str(""); |
585 |
sst << "PMT S111A"; |
586 |
PMT1_0Graph->SetTitle(sst.str().c_str()); |
587 |
PMT1_0Graph->SetFillColor(2); |
588 |
PMT1_0Graph->GetXaxis()->SetTitle("OnBoardTime"); |
589 |
PMT1_0Graph->GetXaxis()->CenterTitle(); |
590 |
PMT1_0Graph->GetYaxis()->SetTitle("PMT Counters"); |
591 |
PMT1_0Graph->GetYaxis()->CenterTitle(); |
592 |
PMT1_0Graph->Draw("AP"); |
593 |
//delete PMT1_0Graph; |
594 |
//---------- |
595 |
sst.str(""); |
596 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
597 |
TGraph *PMT1_1Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_1); |
598 |
RatePMT1->cd(2); |
599 |
sst.str(""); |
600 |
sst << "PMT S112A"; |
601 |
PMT1_1Graph->SetTitle(sst.str().c_str()); |
602 |
PMT1_1Graph->SetFillColor(2); |
603 |
PMT1_1Graph->GetXaxis()->SetTitle("OnBoardTime"); |
604 |
PMT1_1Graph->GetXaxis()->CenterTitle(); |
605 |
PMT1_1Graph->GetYaxis()->SetTitle("PMT Counters"); |
606 |
PMT1_1Graph->GetYaxis()->CenterTitle(); |
607 |
PMT1_1Graph->Draw("AP"); |
608 |
//---------- |
609 |
sst.str(""); |
610 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
611 |
TGraph *PMT1_2Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_2); |
612 |
RatePMT1->cd(3); |
613 |
sst.str(""); |
614 |
sst << "PMT S113A"; |
615 |
PMT1_2Graph->SetTitle(sst.str().c_str()); |
616 |
PMT1_2Graph->SetFillColor(2); |
617 |
PMT1_2Graph->GetXaxis()->SetTitle("OnBoardTime"); |
618 |
PMT1_2Graph->GetXaxis()->CenterTitle(); |
619 |
PMT1_2Graph->GetYaxis()->SetTitle("PMT Counters"); |
620 |
PMT1_2Graph->GetYaxis()->CenterTitle(); |
621 |
PMT1_2Graph->Draw("AP"); |
622 |
//---------- |
623 |
sst.str(""); |
624 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
625 |
TGraph *PMT1_3Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_3); |
626 |
RatePMT1->cd(4); |
627 |
sst.str(""); |
628 |
sst << "PMT S114A"; |
629 |
PMT1_3Graph->SetTitle(sst.str().c_str()); |
630 |
PMT1_3Graph->SetFillColor(2); |
631 |
PMT1_3Graph->GetXaxis()->SetTitle("OnBoardTime"); |
632 |
PMT1_3Graph->GetXaxis()->CenterTitle(); |
633 |
PMT1_3Graph->GetYaxis()->SetTitle("PMT Counters"); |
634 |
PMT1_3Graph->GetYaxis()->CenterTitle(); |
635 |
PMT1_3Graph->Draw("AP"); |
636 |
//---------- |
637 |
sst.str(""); |
638 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
639 |
TGraph *PMT1_4Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_4); |
640 |
RatePMT1->cd(5); |
641 |
sst.str(""); |
642 |
sst << "PMT S115A"; |
643 |
PMT1_4Graph->SetTitle(sst.str().c_str()); |
644 |
PMT1_4Graph->SetFillColor(2); |
645 |
PMT1_4Graph->GetXaxis()->SetTitle("OnBoardTime"); |
646 |
PMT1_4Graph->GetXaxis()->CenterTitle(); |
647 |
PMT1_4Graph->GetYaxis()->SetTitle("PMT Counters"); |
648 |
PMT1_4Graph->GetYaxis()->CenterTitle(); |
649 |
PMT1_4Graph->Draw("AP"); |
650 |
//---------- |
651 |
sst.str(""); |
652 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
653 |
TGraph *PMT1_5Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_5); |
654 |
RatePMT1->cd(6); |
655 |
sst.str(""); |
656 |
sst << "PMT S116A"; |
657 |
PMT1_5Graph->SetTitle(sst.str().c_str()); |
658 |
PMT1_5Graph->SetFillColor(2); |
659 |
PMT1_5Graph->GetXaxis()->SetTitle("OnBoardTime"); |
660 |
PMT1_5Graph->GetXaxis()->CenterTitle(); |
661 |
PMT1_5Graph->GetYaxis()->SetTitle("PMT Counters"); |
662 |
PMT1_5Graph->GetYaxis()->CenterTitle(); |
663 |
PMT1_5Graph->Draw("AP"); |
664 |
//---------- |
665 |
sst.str(""); |
666 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
667 |
TGraph *PMT1_6Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_6); |
668 |
RatePMT1->cd(7); |
669 |
sst.str(""); |
670 |
sst << "PMT S117A"; |
671 |
PMT1_6Graph->SetTitle(sst.str().c_str()); |
672 |
PMT1_6Graph->SetFillColor(2); |
673 |
PMT1_6Graph->GetXaxis()->SetTitle("OnBoardTime"); |
674 |
PMT1_6Graph->GetXaxis()->CenterTitle(); |
675 |
PMT1_6Graph->GetYaxis()->SetTitle("PMT Counters"); |
676 |
PMT1_6Graph->GetYaxis()->CenterTitle(); |
677 |
PMT1_6Graph->Draw("AP"); |
678 |
//---------- |
679 |
sst.str(""); |
680 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
681 |
TGraph *PMT1_7Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_7); |
682 |
RatePMT1->cd(8); |
683 |
sst.str(""); |
684 |
sst << "PMT S118A"; |
685 |
PMT1_7Graph->SetTitle(sst.str().c_str()); |
686 |
PMT1_7Graph->SetFillColor(2); |
687 |
PMT1_7Graph->GetXaxis()->SetTitle("OnBoardTime"); |
688 |
PMT1_7Graph->GetXaxis()->CenterTitle(); |
689 |
PMT1_7Graph->GetYaxis()->SetTitle("PMT Counters"); |
690 |
PMT1_7Graph->GetYaxis()->CenterTitle(); |
691 |
PMT1_7Graph->Draw("AP"); |
692 |
|
693 |
//////////////// |
694 |
|
695 |
TCanvas *RatePMT2 = new TCanvas("RatePMT2", "Rate PMT S11B", 1); |
696 |
RatePMT2->Divide (3,3); |
697 |
//---------- |
698 |
sst.str(""); |
699 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
700 |
TGraph *PMT1_8Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_8); |
701 |
RatePMT2->cd(1); |
702 |
sst.str(""); |
703 |
sst << "PMT S111B"; |
704 |
PMT1_8Graph->SetTitle(sst.str().c_str()); |
705 |
PMT1_8Graph->SetFillColor(2); |
706 |
PMT1_8Graph->GetXaxis()->SetTitle("OnBoardTime"); |
707 |
PMT1_8Graph->GetXaxis()->CenterTitle(); |
708 |
PMT1_8Graph->GetYaxis()->SetTitle("PMT Counters"); |
709 |
PMT1_8Graph->GetYaxis()->CenterTitle(); |
710 |
PMT1_8Graph->Draw("AP"); |
711 |
//---------- |
712 |
sst.str(""); |
713 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
714 |
TGraph *PMT1_9Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_9); |
715 |
RatePMT2->cd(2); |
716 |
sst.str(""); |
717 |
sst << "PMT S112B"; |
718 |
PMT1_9Graph->SetTitle(sst.str().c_str()); |
719 |
PMT1_9Graph->SetFillColor(2); |
720 |
PMT1_9Graph->GetXaxis()->SetTitle("OnBoardTime"); |
721 |
PMT1_9Graph->GetXaxis()->CenterTitle(); |
722 |
PMT1_9Graph->GetYaxis()->SetTitle("PMT Counters"); |
723 |
PMT1_9Graph->GetYaxis()->CenterTitle(); |
724 |
PMT1_9Graph->Draw("AP"); |
725 |
//---------- |
726 |
sst.str(""); |
727 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
728 |
TGraph *PMT1_10Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_10); |
729 |
RatePMT2->cd(3); |
730 |
sst.str(""); |
731 |
sst << "PMT S113B"; |
732 |
PMT1_10Graph->SetTitle(sst.str().c_str()); |
733 |
PMT1_10Graph->SetFillColor(2); |
734 |
PMT1_10Graph->GetXaxis()->SetTitle("OnBoardTime"); |
735 |
PMT1_10Graph->GetXaxis()->CenterTitle(); |
736 |
PMT1_10Graph->GetYaxis()->SetTitle("PMT Counters"); |
737 |
PMT1_10Graph->GetYaxis()->CenterTitle(); |
738 |
PMT1_10Graph->Draw("AP"); |
739 |
//---------- |
740 |
sst.str(""); |
741 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
742 |
TGraph *PMT1_11Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_11); |
743 |
RatePMT2->cd(4); |
744 |
sst.str(""); |
745 |
sst << "PMT S114B"; |
746 |
PMT1_11Graph->SetTitle(sst.str().c_str()); |
747 |
PMT1_11Graph->SetFillColor(2); |
748 |
PMT1_11Graph->GetXaxis()->SetTitle("OnBoardTime"); |
749 |
PMT1_11Graph->GetXaxis()->CenterTitle(); |
750 |
PMT1_11Graph->GetYaxis()->SetTitle("PMT Counters"); |
751 |
PMT1_11Graph->GetYaxis()->CenterTitle(); |
752 |
PMT1_11Graph->Draw("AP"); |
753 |
//---------- |
754 |
sst.str(""); |
755 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
756 |
TGraph *PMT1_12Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_12); |
757 |
RatePMT2->cd(5); |
758 |
sst.str(""); |
759 |
sst << "PMT S115B"; |
760 |
PMT1_12Graph->SetTitle(sst.str().c_str()); |
761 |
PMT1_12Graph->SetFillColor(2); |
762 |
PMT1_12Graph->GetXaxis()->SetTitle("OnBoardTime"); |
763 |
PMT1_12Graph->GetXaxis()->CenterTitle(); |
764 |
PMT1_12Graph->GetYaxis()->SetTitle("PMT Counters"); |
765 |
PMT1_12Graph->GetYaxis()->CenterTitle(); |
766 |
PMT1_12Graph->Draw("AP"); |
767 |
//---------- |
768 |
sst.str(""); |
769 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
770 |
TGraph *PMT1_13Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_13); |
771 |
RatePMT2->cd(6); |
772 |
sst.str(""); |
773 |
sst << "PMT S116B"; |
774 |
PMT1_13Graph->SetTitle(sst.str().c_str()); |
775 |
PMT1_13Graph->SetFillColor(2); |
776 |
PMT1_13Graph->GetXaxis()->SetTitle("OnBoardTime"); |
777 |
PMT1_13Graph->GetXaxis()->CenterTitle(); |
778 |
PMT1_13Graph->GetYaxis()->SetTitle("PMT Counters"); |
779 |
PMT1_13Graph->GetYaxis()->CenterTitle(); |
780 |
PMT1_13Graph->Draw("AP"); |
781 |
//---------- |
782 |
sst.str(""); |
783 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
784 |
TGraph *PMT1_14Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_14); |
785 |
RatePMT2->cd(7); |
786 |
sst.str(""); |
787 |
sst << "PMT S117B"; |
788 |
PMT1_14Graph->SetTitle(sst.str().c_str()); |
789 |
PMT1_14Graph->SetFillColor(2); |
790 |
PMT1_14Graph->GetXaxis()->SetTitle("OnBoardTime"); |
791 |
PMT1_14Graph->GetXaxis()->CenterTitle(); |
792 |
PMT1_14Graph->GetYaxis()->SetTitle("PMT Counters"); |
793 |
PMT1_14Graph->GetYaxis()->CenterTitle(); |
794 |
PMT1_14Graph->Draw("AP"); |
795 |
//---------- |
796 |
sst.str(""); |
797 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
798 |
TGraph *PMT1_15Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_15); |
799 |
RatePMT2->cd(8); |
800 |
sst.str(""); |
801 |
sst << "PMT S118B"; |
802 |
PMT1_15Graph->SetTitle(sst.str().c_str()); |
803 |
PMT1_15Graph->SetFillColor(2); |
804 |
PMT1_15Graph->GetXaxis()->SetTitle("OnBoardTime"); |
805 |
PMT1_15Graph->GetXaxis()->CenterTitle(); |
806 |
PMT1_15Graph->GetYaxis()->SetTitle("PMT Counters"); |
807 |
PMT1_15Graph->GetYaxis()->CenterTitle(); |
808 |
PMT1_15Graph->Draw("AP"); |
809 |
|
810 |
/////////////// |
811 |
|
812 |
|
813 |
TCanvas *RatePMT3 = new TCanvas("RatePMT3", "Rate PMT S11B", 1); |
814 |
RatePMT3->Divide (3,4); |
815 |
//---------- |
816 |
sst.str(""); |
817 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
818 |
TGraph *PMT1_16Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_16); |
819 |
RatePMT3->cd(1); |
820 |
sst.str(""); |
821 |
sst << "PMT S121A"; |
822 |
PMT1_16Graph->SetTitle(sst.str().c_str()); |
823 |
PMT1_16Graph->SetFillColor(2); |
824 |
PMT1_16Graph->GetXaxis()->SetTitle("OnBoardTime"); |
825 |
PMT1_16Graph->GetXaxis()->CenterTitle(); |
826 |
PMT1_16Graph->GetYaxis()->SetTitle("PMT Counters"); |
827 |
PMT1_16Graph->GetYaxis()->CenterTitle(); |
828 |
PMT1_16Graph->Draw("AP"); |
829 |
//---------- |
830 |
sst.str(""); |
831 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
832 |
TGraph *PMT1_17Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_17); |
833 |
RatePMT3->cd(2); |
834 |
sst.str(""); |
835 |
sst << "PMT S122A"; |
836 |
PMT1_17Graph->SetTitle(sst.str().c_str()); |
837 |
PMT1_17Graph->SetFillColor(2); |
838 |
PMT1_17Graph->GetXaxis()->SetTitle("OnBoardTime"); |
839 |
PMT1_17Graph->GetXaxis()->CenterTitle(); |
840 |
PMT1_17Graph->GetYaxis()->SetTitle("PMT Counters"); |
841 |
PMT1_17Graph->GetYaxis()->CenterTitle(); |
842 |
PMT1_17Graph->Draw("AP"); |
843 |
//---------- |
844 |
sst.str(""); |
845 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
846 |
TGraph *PMT1_18Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_18); |
847 |
RatePMT3->cd(3); |
848 |
sst.str(""); |
849 |
sst << "PMT S123A"; |
850 |
PMT1_18Graph->SetTitle(sst.str().c_str()); |
851 |
PMT1_18Graph->SetFillColor(2); |
852 |
PMT1_18Graph->GetXaxis()->SetTitle("OnBoardTime"); |
853 |
PMT1_18Graph->GetXaxis()->CenterTitle(); |
854 |
PMT1_18Graph->GetYaxis()->SetTitle("PMT Counters"); |
855 |
PMT1_18Graph->GetYaxis()->CenterTitle(); |
856 |
PMT1_18Graph->Draw("AP"); |
857 |
//---------- |
858 |
sst.str(""); |
859 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
860 |
TGraph *PMT1_19Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_19); |
861 |
RatePMT3->cd(4); |
862 |
sst.str(""); |
863 |
sst << "PMT S124A"; |
864 |
PMT1_19Graph->SetTitle(sst.str().c_str()); |
865 |
PMT1_19Graph->SetFillColor(2); |
866 |
PMT1_19Graph->GetXaxis()->SetTitle("OnBoardTime"); |
867 |
PMT1_19Graph->GetXaxis()->CenterTitle(); |
868 |
PMT1_19Graph->GetYaxis()->SetTitle("PMT Counters"); |
869 |
PMT1_19Graph->GetYaxis()->CenterTitle(); |
870 |
PMT1_19Graph->Draw("AP"); |
871 |
//---------- |
872 |
sst.str(""); |
873 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
874 |
TGraph *PMT1_20Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_20); |
875 |
RatePMT3->cd(5); |
876 |
sst.str(""); |
877 |
sst << "PMT S125A"; |
878 |
PMT1_20Graph->SetTitle(sst.str().c_str()); |
879 |
PMT1_20Graph->SetFillColor(2); |
880 |
PMT1_20Graph->GetXaxis()->SetTitle("OnBoardTime"); |
881 |
PMT1_20Graph->GetXaxis()->CenterTitle(); |
882 |
PMT1_20Graph->GetYaxis()->SetTitle("PMT Counters"); |
883 |
PMT1_20Graph->GetYaxis()->CenterTitle(); |
884 |
PMT1_20Graph->Draw("AP"); |
885 |
//---------- |
886 |
sst.str(""); |
887 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
888 |
TGraph *PMT1_21Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_21); |
889 |
RatePMT3->cd(6); |
890 |
sst.str(""); |
891 |
sst << "PMT S126A"; |
892 |
PMT1_21Graph->SetTitle(sst.str().c_str()); |
893 |
PMT1_21Graph->SetFillColor(2); |
894 |
PMT1_21Graph->GetXaxis()->SetTitle("OnBoardTime"); |
895 |
PMT1_21Graph->GetXaxis()->CenterTitle(); |
896 |
PMT1_21Graph->GetYaxis()->SetTitle("PMT Counters"); |
897 |
PMT1_21Graph->GetYaxis()->CenterTitle(); |
898 |
PMT1_21Graph->Draw("AP"); |
899 |
//---------- |
900 |
sst.str(""); |
901 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
902 |
TGraph *PMT1_22Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_22); |
903 |
RatePMT3->cd(7); |
904 |
sst.str(""); |
905 |
sst << "PMT S121B"; |
906 |
PMT1_22Graph->SetTitle(sst.str().c_str()); |
907 |
PMT1_22Graph->SetFillColor(2); |
908 |
PMT1_22Graph->GetXaxis()->SetTitle("OnBoardTime"); |
909 |
PMT1_22Graph->GetXaxis()->CenterTitle(); |
910 |
PMT1_22Graph->GetYaxis()->SetTitle("PMT Counters"); |
911 |
PMT1_22Graph->GetYaxis()->CenterTitle(); |
912 |
PMT1_22Graph->Draw("AP"); |
913 |
//---------- |
914 |
sst.str(""); |
915 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
916 |
TGraph *PMT1_23Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1_23); |
917 |
RatePMT3->cd(8); |
918 |
sst.str(""); |
919 |
sst << "PMT S122B"; |
920 |
PMT1_23Graph->SetTitle(sst.str().c_str()); |
921 |
PMT1_23Graph->SetFillColor(2); |
922 |
PMT1_23Graph->GetXaxis()->SetTitle("OnBoardTime"); |
923 |
PMT1_23Graph->GetXaxis()->CenterTitle(); |
924 |
PMT1_23Graph->GetYaxis()->SetTitle("PMT Counters"); |
925 |
PMT1_23Graph->GetYaxis()->CenterTitle(); |
926 |
PMT1_23Graph->Draw("AP"); |
927 |
|
928 |
///////////////////////// |
929 |
|
930 |
//---------- |
931 |
sst.str(""); |
932 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
933 |
TGraph *PMT2_0Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_0); |
934 |
RatePMT3->cd(9); |
935 |
sst.str(""); |
936 |
sst << "PMT S123B"; |
937 |
PMT2_0Graph->SetTitle(sst.str().c_str()); |
938 |
PMT2_0Graph->SetFillColor(2); |
939 |
PMT2_0Graph->GetXaxis()->SetTitle("OnBoardTime"); |
940 |
PMT2_0Graph->GetXaxis()->CenterTitle(); |
941 |
PMT2_0Graph->GetYaxis()->SetTitle("PMT Counters"); |
942 |
PMT2_0Graph->GetYaxis()->CenterTitle(); |
943 |
PMT2_0Graph->Draw("AP"); |
944 |
|
945 |
//---------- |
946 |
sst.str(""); |
947 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
948 |
TGraph *PMT2_1Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_1); |
949 |
RatePMT3->cd(10); |
950 |
sst.str(""); |
951 |
sst << "PMT S124B"; |
952 |
PMT2_1Graph->SetTitle(sst.str().c_str()); |
953 |
PMT2_1Graph->SetFillColor(2); |
954 |
PMT2_1Graph->GetXaxis()->SetTitle("OnBoardTime"); |
955 |
PMT2_1Graph->GetXaxis()->CenterTitle(); |
956 |
PMT2_1Graph->GetYaxis()->SetTitle("PMT Counters"); |
957 |
PMT2_1Graph->GetYaxis()->CenterTitle(); |
958 |
PMT2_1Graph->Draw("AP"); |
959 |
|
960 |
//---------- |
961 |
sst.str(""); |
962 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
963 |
TGraph *PMT2_2Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_2); |
964 |
RatePMT3->cd(11); |
965 |
sst.str(""); |
966 |
sst << "PMT S125B"; |
967 |
PMT2_2Graph->SetTitle(sst.str().c_str()); |
968 |
PMT2_2Graph->SetFillColor(2); |
969 |
PMT2_2Graph->GetXaxis()->SetTitle("OnBoardTime"); |
970 |
PMT2_2Graph->GetXaxis()->CenterTitle(); |
971 |
PMT2_2Graph->GetYaxis()->SetTitle("PMT Counters"); |
972 |
PMT2_2Graph->GetYaxis()->CenterTitle(); |
973 |
PMT2_2Graph->Draw("AP"); |
974 |
|
975 |
//---------- |
976 |
sst.str(""); |
977 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
978 |
TGraph *PMT2_3Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_3); |
979 |
RatePMT3->cd(12); |
980 |
sst.str(""); |
981 |
sst << "PMT S126B"; |
982 |
PMT2_3Graph->SetTitle(sst.str().c_str()); |
983 |
PMT2_3Graph->SetFillColor(2); |
984 |
PMT2_3Graph->GetXaxis()->SetTitle("OnBoardTime"); |
985 |
PMT2_3Graph->GetXaxis()->CenterTitle(); |
986 |
PMT2_3Graph->GetYaxis()->SetTitle("PMT Counters"); |
987 |
PMT2_3Graph->GetYaxis()->CenterTitle(); |
988 |
PMT2_3Graph->Draw("AP"); |
989 |
|
990 |
//////////////////// |
991 |
|
992 |
|
993 |
TCanvas *RatePMT4 = new TCanvas("RatePMT4", "Rate PMT S11B", 1); |
994 |
RatePMT4->Divide (3,3); |
995 |
//---------- |
996 |
sst.str(""); |
997 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
998 |
TGraph *PMT2_4Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_4); |
999 |
RatePMT4->cd(1); |
1000 |
sst.str(""); |
1001 |
sst << "PMT S211A"; |
1002 |
PMT2_4Graph->SetTitle(sst.str().c_str()); |
1003 |
PMT2_4Graph->SetFillColor(2); |
1004 |
PMT2_4Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1005 |
PMT2_4Graph->GetXaxis()->CenterTitle(); |
1006 |
PMT2_4Graph->GetYaxis()->SetTitle("PMT Counters"); |
1007 |
PMT2_4Graph->GetYaxis()->CenterTitle(); |
1008 |
PMT2_4Graph->Draw("AP"); |
1009 |
//---------- |
1010 |
sst.str(""); |
1011 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1012 |
TGraph *PMT2_5Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_5); |
1013 |
RatePMT4->cd(2); |
1014 |
sst.str(""); |
1015 |
sst << "PMT S212A"; |
1016 |
PMT2_5Graph->SetTitle(sst.str().c_str()); |
1017 |
PMT2_5Graph->SetFillColor(2); |
1018 |
PMT2_5Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1019 |
PMT2_5Graph->GetXaxis()->CenterTitle(); |
1020 |
PMT2_5Graph->GetYaxis()->SetTitle("PMT Counters"); |
1021 |
PMT2_5Graph->GetYaxis()->CenterTitle(); |
1022 |
PMT2_5Graph->Draw("AP"); |
1023 |
//---------- |
1024 |
sst.str(""); |
1025 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1026 |
TGraph *PMT2_6Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_6); |
1027 |
RatePMT4->cd(3); |
1028 |
sst.str(""); |
1029 |
sst << "PMT S211B"; |
1030 |
PMT2_6Graph->SetTitle(sst.str().c_str()); |
1031 |
PMT2_6Graph->SetFillColor(2); |
1032 |
PMT2_6Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1033 |
PMT2_6Graph->GetXaxis()->CenterTitle(); |
1034 |
PMT2_6Graph->GetYaxis()->SetTitle("PMT Counters"); |
1035 |
PMT2_6Graph->GetYaxis()->CenterTitle(); |
1036 |
PMT2_6Graph->Draw("AP"); |
1037 |
//---------- |
1038 |
sst.str(""); |
1039 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1040 |
TGraph *PMT2_7Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_7); |
1041 |
RatePMT4->cd(4); |
1042 |
sst.str(""); |
1043 |
sst << "PMT S212B"; |
1044 |
PMT2_7Graph->SetTitle(sst.str().c_str()); |
1045 |
PMT2_7Graph->SetFillColor(2); |
1046 |
PMT2_7Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1047 |
PMT2_7Graph->GetXaxis()->CenterTitle(); |
1048 |
PMT2_7Graph->GetYaxis()->SetTitle("PMT Counters"); |
1049 |
PMT2_7Graph->GetYaxis()->CenterTitle(); |
1050 |
PMT2_7Graph->Draw("AP"); |
1051 |
//---------- |
1052 |
sst.str(""); |
1053 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1054 |
TGraph *PMT2_8Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_8); |
1055 |
RatePMT4->cd(5); |
1056 |
sst.str(""); |
1057 |
sst << "PMT S221A"; |
1058 |
PMT2_8Graph->SetTitle(sst.str().c_str()); |
1059 |
PMT2_8Graph->SetFillColor(2); |
1060 |
PMT2_8Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1061 |
PMT2_8Graph->GetXaxis()->CenterTitle(); |
1062 |
PMT2_8Graph->GetYaxis()->SetTitle("PMT Counters"); |
1063 |
PMT2_8Graph->GetYaxis()->CenterTitle(); |
1064 |
PMT2_8Graph->Draw("AP"); |
1065 |
//---------- |
1066 |
sst.str(""); |
1067 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1068 |
TGraph *PMT2_9Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_9); |
1069 |
RatePMT4->cd(6); |
1070 |
sst.str(""); |
1071 |
sst << "PMT S222A"; |
1072 |
PMT2_9Graph->SetTitle(sst.str().c_str()); |
1073 |
PMT2_9Graph->SetFillColor(2); |
1074 |
PMT2_9Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1075 |
PMT2_9Graph->GetXaxis()->CenterTitle(); |
1076 |
PMT2_9Graph->GetYaxis()->SetTitle("PMT Counters"); |
1077 |
PMT2_9Graph->GetYaxis()->CenterTitle(); |
1078 |
PMT2_9Graph->Draw("AP"); |
1079 |
//---------- |
1080 |
sst.str(""); |
1081 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1082 |
TGraph *PMT2_10Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_10); |
1083 |
RatePMT4->cd(7); |
1084 |
sst.str(""); |
1085 |
sst << "PMT S221B"; |
1086 |
PMT2_10Graph->SetTitle(sst.str().c_str()); |
1087 |
PMT2_10Graph->SetFillColor(2); |
1088 |
PMT2_10Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1089 |
PMT2_10Graph->GetXaxis()->CenterTitle(); |
1090 |
PMT2_10Graph->GetYaxis()->SetTitle("PMT Counters"); |
1091 |
PMT2_10Graph->GetYaxis()->CenterTitle(); |
1092 |
PMT2_10Graph->Draw("AP"); |
1093 |
//---------- |
1094 |
sst.str(""); |
1095 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1096 |
TGraph *PMT2_11Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_11); |
1097 |
RatePMT4->cd(8); |
1098 |
sst.str(""); |
1099 |
sst << "PMT S222B "; |
1100 |
PMT2_11Graph->SetTitle(sst.str().c_str()); |
1101 |
PMT2_11Graph->SetFillColor(2); |
1102 |
PMT2_11Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1103 |
PMT2_11Graph->GetXaxis()->CenterTitle(); |
1104 |
PMT2_11Graph->GetYaxis()->SetTitle("PMT Counters"); |
1105 |
PMT2_11Graph->GetYaxis()->CenterTitle(); |
1106 |
PMT2_11Graph->Draw("AP"); |
1107 |
|
1108 |
///////////////////////// |
1109 |
|
1110 |
|
1111 |
TCanvas *RatePMT5 = new TCanvas("RatePMT5", "Rate PMT S311A", 1); |
1112 |
RatePMT5->Divide (3,4); |
1113 |
//---------- |
1114 |
sst.str(""); |
1115 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1116 |
TGraph *PMT2_12Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_12); |
1117 |
RatePMT5->cd(1); |
1118 |
sst.str(""); |
1119 |
sst << "PMT S311A "; |
1120 |
PMT2_12Graph->SetTitle(sst.str().c_str()); |
1121 |
PMT2_12Graph->SetFillColor(2); |
1122 |
PMT2_12Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1123 |
PMT2_12Graph->GetXaxis()->CenterTitle(); |
1124 |
PMT2_12Graph->GetYaxis()->SetTitle("PMT Counters"); |
1125 |
PMT2_12Graph->GetYaxis()->CenterTitle(); |
1126 |
PMT2_12Graph->Draw("AP"); |
1127 |
//---------- |
1128 |
sst.str(""); |
1129 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1130 |
TGraph *PMT2_13Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_13); |
1131 |
RatePMT5->cd(2); |
1132 |
sst.str(""); |
1133 |
sst << "PMT S312A"; |
1134 |
PMT2_13Graph->SetTitle(sst.str().c_str()); |
1135 |
PMT2_13Graph->SetFillColor(2); |
1136 |
PMT2_13Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1137 |
PMT2_13Graph->GetXaxis()->CenterTitle(); |
1138 |
PMT2_13Graph->GetYaxis()->SetTitle("PMT Counters"); |
1139 |
PMT2_13Graph->GetYaxis()->CenterTitle(); |
1140 |
PMT2_13Graph->Draw("AP"); |
1141 |
//---------- |
1142 |
sst.str(""); |
1143 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1144 |
TGraph *PMT2_14Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_14); |
1145 |
RatePMT5->cd(3); |
1146 |
sst.str(""); |
1147 |
sst << "PMT S313A"; |
1148 |
PMT2_14Graph->SetTitle(sst.str().c_str()); |
1149 |
PMT2_14Graph->SetFillColor(2); |
1150 |
PMT2_14Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1151 |
PMT2_14Graph->GetXaxis()->CenterTitle(); |
1152 |
PMT2_14Graph->GetYaxis()->SetTitle("PMT Counters"); |
1153 |
PMT2_14Graph->GetYaxis()->CenterTitle(); |
1154 |
PMT2_14Graph->Draw("AP"); |
1155 |
//---------- |
1156 |
sst.str(""); |
1157 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1158 |
TGraph *PMT2_15Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_15); |
1159 |
RatePMT5->cd(4); |
1160 |
sst.str(""); |
1161 |
sst << "PMT S311B"; |
1162 |
PMT2_15Graph->SetTitle(sst.str().c_str()); |
1163 |
PMT2_15Graph->SetFillColor(2); |
1164 |
PMT2_15Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1165 |
PMT2_15Graph->GetXaxis()->CenterTitle(); |
1166 |
PMT2_15Graph->GetYaxis()->SetTitle("PMT Counters"); |
1167 |
PMT2_15Graph->GetYaxis()->CenterTitle(); |
1168 |
PMT2_15Graph->Draw("AP"); |
1169 |
//---------- |
1170 |
sst.str(""); |
1171 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1172 |
TGraph *PMT2_16Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_16); |
1173 |
RatePMT5->cd(5); |
1174 |
sst.str(""); |
1175 |
sst << "PMT S312B"; |
1176 |
PMT2_16Graph->SetTitle(sst.str().c_str()); |
1177 |
PMT2_16Graph->SetFillColor(2); |
1178 |
PMT2_16Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1179 |
PMT2_16Graph->GetXaxis()->CenterTitle(); |
1180 |
PMT2_16Graph->GetYaxis()->SetTitle("PMT Counters"); |
1181 |
PMT2_16Graph->GetYaxis()->CenterTitle(); |
1182 |
PMT2_16Graph->Draw("AP"); |
1183 |
//---------- |
1184 |
sst.str(""); |
1185 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1186 |
TGraph *PMT2_17Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_17); |
1187 |
RatePMT5->cd(6); |
1188 |
sst.str(""); |
1189 |
sst << "PMT S313B"; |
1190 |
PMT2_17Graph->SetTitle(sst.str().c_str()); |
1191 |
PMT2_17Graph->SetFillColor(2); |
1192 |
PMT2_17Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1193 |
PMT2_17Graph->GetXaxis()->CenterTitle(); |
1194 |
PMT2_17Graph->GetYaxis()->SetTitle("PMT Counters"); |
1195 |
PMT2_17Graph->GetYaxis()->CenterTitle(); |
1196 |
PMT2_17Graph->Draw("AP"); |
1197 |
//---------- |
1198 |
sst.str(""); |
1199 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1200 |
TGraph *PMT2_18Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_18); |
1201 |
RatePMT5->cd(7); |
1202 |
sst.str(""); |
1203 |
sst << "PMT S321A"; |
1204 |
PMT2_18Graph->SetTitle(sst.str().c_str()); |
1205 |
PMT2_18Graph->SetFillColor(2); |
1206 |
PMT2_18Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1207 |
PMT2_18Graph->GetXaxis()->CenterTitle(); |
1208 |
PMT2_18Graph->GetYaxis()->SetTitle("PMT Counters"); |
1209 |
PMT2_18Graph->GetYaxis()->CenterTitle(); |
1210 |
PMT2_18Graph->Draw("AP"); |
1211 |
//---------- |
1212 |
sst.str(""); |
1213 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1214 |
TGraph *PMT2_19Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_19); |
1215 |
RatePMT5->cd(8); |
1216 |
sst.str(""); |
1217 |
sst << "PMT S322A"; |
1218 |
PMT2_19Graph->SetTitle(sst.str().c_str()); |
1219 |
PMT2_19Graph->SetFillColor(2); |
1220 |
PMT2_19Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1221 |
PMT2_19Graph->GetXaxis()->CenterTitle(); |
1222 |
PMT2_19Graph->GetYaxis()->SetTitle("PMT Counters"); |
1223 |
PMT2_19Graph->GetYaxis()->CenterTitle(); |
1224 |
PMT2_19Graph->Draw("AP"); |
1225 |
|
1226 |
///////////////////////// |
1227 |
|
1228 |
//---------- |
1229 |
sst.str(""); |
1230 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1231 |
TGraph *PMT2_20Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_20); |
1232 |
RatePMT5->cd(9); |
1233 |
sst.str(""); |
1234 |
sst << "PMT S323A"; |
1235 |
PMT2_20Graph->SetTitle(sst.str().c_str()); |
1236 |
PMT2_20Graph->SetFillColor(2); |
1237 |
PMT2_20Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1238 |
PMT2_20Graph->GetXaxis()->CenterTitle(); |
1239 |
PMT2_20Graph->GetYaxis()->SetTitle("PMT Counters"); |
1240 |
PMT2_20Graph->GetYaxis()->CenterTitle(); |
1241 |
PMT2_20Graph->Draw("AP"); |
1242 |
|
1243 |
//---------- |
1244 |
sst.str(""); |
1245 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1246 |
TGraph *PMT2_21Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_21); |
1247 |
RatePMT5->cd(10); |
1248 |
sst.str(""); |
1249 |
sst << "PMT S321B"; |
1250 |
PMT2_21Graph->SetTitle(sst.str().c_str()); |
1251 |
PMT2_21Graph->SetFillColor(2); |
1252 |
PMT2_21Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1253 |
PMT2_21Graph->GetXaxis()->CenterTitle(); |
1254 |
PMT2_21Graph->GetYaxis()->SetTitle("PMT Counters"); |
1255 |
PMT2_21Graph->GetYaxis()->CenterTitle(); |
1256 |
PMT2_21Graph->Draw("AP"); |
1257 |
|
1258 |
//---------- |
1259 |
sst.str(""); |
1260 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1261 |
TGraph *PMT2_22Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_22); |
1262 |
RatePMT5->cd(11); |
1263 |
sst.str(""); |
1264 |
sst << "PMT S322B"; |
1265 |
PMT2_22Graph->SetTitle(sst.str().c_str()); |
1266 |
PMT2_22Graph->SetFillColor(2); |
1267 |
PMT2_22Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1268 |
PMT2_22Graph->GetXaxis()->CenterTitle(); |
1269 |
PMT2_22Graph->GetYaxis()->SetTitle("PMT Counters"); |
1270 |
PMT2_22Graph->GetYaxis()->CenterTitle(); |
1271 |
PMT2_22Graph->Draw("AP"); |
1272 |
|
1273 |
//---------- |
1274 |
sst.str(""); |
1275 |
sst << "pmtcount1[0] vs OBT based on " << base.Data(); |
1276 |
TGraph *PMT2_23Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2_23); |
1277 |
RatePMT5->cd(12); |
1278 |
sst.str(""); |
1279 |
sst << "PMT S323B"; |
1280 |
PMT2_23Graph->SetTitle(sst.str().c_str()); |
1281 |
PMT2_23Graph->SetFillColor(2); |
1282 |
PMT2_23Graph->GetXaxis()->SetTitle("OnBoardTime"); |
1283 |
PMT2_23Graph->GetXaxis()->CenterTitle(); |
1284 |
PMT2_23Graph->GetYaxis()->SetTitle("PMT Counters"); |
1285 |
PMT2_23Graph->GetYaxis()->CenterTitle(); |
1286 |
PMT2_23Graph->Draw("AP"); |
1287 |
|
1288 |
|
1289 |
// print the output |
1290 |
const char *saveas = format; |
1291 |
if ( !strcmp(saveas,"ps") ) { |
1292 |
// ------print the ps |
1293 |
|
1294 |
gStyle->SetOptStat(111111); |
1295 |
|
1296 |
sst.str(""); |
1297 |
sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic." << saveas << "("; |
1298 |
EvCounterCanvas->Print(sst.str().c_str()); |
1299 |
DeadLiveCanvas->Print(sst.str().c_str()); |
1300 |
MeanLiveDeadCanvas->Print(sst.str().c_str()); |
1301 |
PMTCanvas->Print(sst.str().c_str()); |
1302 |
TrigRate1Canvas->Print(sst.str().c_str()); |
1303 |
TrigRate2Canvas->Print(sst.str().c_str()); |
1304 |
|
1305 |
gStyle->SetOptStat("mr"); |
1306 |
S4CalCanvas->Print(sst.str().c_str()); |
1307 |
|
1308 |
gStyle->SetOptStat("mr"); |
1309 |
RatePMT1->Print(sst.str().c_str()); |
1310 |
RatePMT2->Print(sst.str().c_str()); |
1311 |
RatePMT3->Print(sst.str().c_str()); |
1312 |
RatePMT4->Print(sst.str().c_str()); |
1313 |
// |
1314 |
sst.str(""); |
1315 |
sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic." << saveas << ")"; |
1316 |
RatePMT5->Print(sst.str().c_str()); |
1317 |
|
1318 |
} else { |
1319 |
|
1320 |
gStyle->SetOptStat(111111); |
1321 |
|
1322 |
sst.str(""); |
1323 |
sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic1." << saveas; |
1324 |
EvCounterCanvas->SaveAs(sst.str().c_str()); |
1325 |
|
1326 |
sst.str(""); |
1327 |
sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic2." << saveas; |
1328 |
DeadLiveCanvas->SaveAs(sst.str().c_str()); |
1329 |
|
1330 |
sst.str(""); |
1331 |
sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic3." << saveas; |
1332 |
MeanLiveDeadCanvas->SaveAs(sst.str().c_str()); |
1333 |
sst.str(""); |
1334 |
sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic4." << saveas; |
1335 |
PMTCanvas->SaveAs(sst.str().c_str()); |
1336 |
|
1337 |
sst.str(""); |
1338 |
sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic5." << saveas; |
1339 |
TrigRate1Canvas->SaveAs(sst.str().c_str()); |
1340 |
|
1341 |
sst.str(""); |
1342 |
sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic6." << saveas; |
1343 |
TrigRate2Canvas->SaveAs(sst.str().c_str()); |
1344 |
|
1345 |
sst.str(""); |
1346 |
sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic7." << saveas; |
1347 |
S4CalCanvas->SaveAs(sst.str().c_str()); |
1348 |
|
1349 |
gStyle->SetOptStat("mr"); |
1350 |
|
1351 |
sst.str(""); |
1352 |
sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic8." << saveas; |
1353 |
RatePMT1->SaveAs(sst.str().c_str()); |
1354 |
|
1355 |
sst.str(""); |
1356 |
sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic9." << saveas; |
1357 |
RatePMT2->SaveAs(sst.str().c_str()); |
1358 |
|
1359 |
sst.str(""); |
1360 |
sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic10." << saveas; |
1361 |
RatePMT3->SaveAs(sst.str().c_str()); |
1362 |
|
1363 |
sst.str(""); |
1364 |
sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic11." << saveas; |
1365 |
RatePMT4->SaveAs(sst.str().c_str()); |
1366 |
|
1367 |
gStyle->SetOptStat("mr"); |
1368 |
|
1369 |
sst.str(""); |
1370 |
sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic12." << saveas; |
1371 |
RatePMT5->SaveAs(sst.str().c_str()); |
1372 |
|
1373 |
} |
1374 |
|
1375 |
} |
1376 |
|
1377 |
|
1378 |
int main(int argc, char* argv[]){ |
1379 |
TString path; |
1380 |
TString outDir ="./"; |
1381 |
TString format ="ps"; |
1382 |
|
1383 |
if (argc < 2){ |
1384 |
printf("You have to insert at least the file to analyze \n"); |
1385 |
printf("Try '--help' for more information. \n"); |
1386 |
exit(1); |
1387 |
} |
1388 |
|
1389 |
if (!strcmp(argv[1], "--help")){ |
1390 |
printf( "Usage: TriggerScanBasic FILE [OPTION] \n"); |
1391 |
printf( "\t --help Print this help and exit \n"); |
1392 |
printf( "\t -outDir[path] Path where to put the output [default ./] \n"); |
1393 |
printf( "\t -format[ps] Format for output files [default 'ps'] \n"); |
1394 |
exit(1); |
1395 |
} |
1396 |
|
1397 |
|
1398 |
path=argv[1]; |
1399 |
|
1400 |
for (int i = 2; i < argc; i++){ |
1401 |
|
1402 |
if (!strcmp(argv[i], "-outDir")){ |
1403 |
if (++i >= argc){ |
1404 |
printf( "-outDir needs arguments. \n"); |
1405 |
printf( "Try '--help' for more information. \n"); |
1406 |
exit(1); |
1407 |
} |
1408 |
else{ |
1409 |
outDir = argv[i]; |
1410 |
continue; |
1411 |
} |
1412 |
} |
1413 |
|
1414 |
|
1415 |
|
1416 |
if (!strcmp(argv[i], "-format")){ |
1417 |
if (++i >= argc){ |
1418 |
printf( "-format needs arguments. \n"); |
1419 |
printf( "Try '--help' for more information. \n"); |
1420 |
exit(1); |
1421 |
} |
1422 |
else{ |
1423 |
format = argv[i]; |
1424 |
continue; |
1425 |
} |
1426 |
} |
1427 |
} |
1428 |
|
1429 |
TriggerScanBasic(argv[1], outDir, format); |
1430 |
|
1431 |
} |