13 if(t_prd ==
"Day")
std::cout <<
"\n\nMaking FD Ana/Nearline Day plots...\n\n";
14 if(t_prd ==
"Week")
std::cout <<
"\n\nMaking FD Ana/Nearline Week plots...\n\n";
15 if(t_prd ==
"Month")
std::cout <<
"\n\nMaking FD Ana/Nearline Month plots...\n\n";
16 if(t_prd ==
"6Months")
std::cout <<
"\n\nMaking FD Ana/Nearline 6-Months plots...\n\n";
17 if(t_prd ==
"Year")
std::cout <<
"\n\nMaking FD Ana/Nearline Year plots...\n\n";
24 int XNowGMT =
TNowGMT->Convert(kTRUE);
25 int XNow =
TNow ->Convert(kFALSE);
32 int XDayAgo = XNow - 60*60*24;
33 int XWeekAgo = XNow - 60*60*24*7;
34 int XMonthAgo = XNow - 60*60*24*30;
35 int XSixMonthsAgo = XNow - 60*60*24*26*7;
36 int XYearAgo = XNow - 60*60*24*52*7;
46 unsigned int N_diblock = 0;
47 unsigned int N_dcms = 0;
67 else if(t_prd ==
"Week"){
71 else if(t_prd ==
"Month"){
75 else if(t_prd ==
"6Months"){
77 time_ago = XSixMonthsAgo;
79 else if(t_prd ==
"Year"){
94 if (trigger ==
"t00"){
98 else if(trigger ==
"DDActivity1"){
100 trigname =
"DDActivity";
102 else if(trigger ==
"t02"){
110 else if(t_prd ==
"Week"){
114 else if(t_prd ==
"Month"){
116 time_ago = XMonthAgo;
118 else if(t_prd ==
"6Months"){
120 time_ago = XSixMonthsAgo;
122 else if(t_prd ==
"Year"){
135 if (trigger ==
"Beamline"){
137 trigname =
"Beamline";
139 else if(trigger ==
"DDActivity1"){
140 trig =
"DDActivity1";
141 trigname =
"DDActivity";
143 else if(trigger ==
"t02"){
147 else if(trigger ==
"Spill"){
149 trigname =
"Full Spill";
155 else if(t_prd ==
"Week"){
159 else if(t_prd ==
"Month"){
161 time_ago = XMonthAgo;
163 else if(t_prd ==
"6Months"){
165 time_ago = XSixMonthsAgo;
167 else if(t_prd ==
"Year"){
175 unsigned int year = 0;
176 unsigned int month = 0;
177 unsigned int day = 0;
192 for(
int i=0;
i<5;
i++){
197 unsigned int yearEnd = 0;
198 unsigned int monthEnd = 0;
199 unsigned int dayEnd = 0;
200 double HourEnd = 0.0;
204 gSystem->Setenv(
"TZ",
"UTC");
205 gStyle->SetTimeOffset(0);
213 if(t_prd ==
"Day") t_n = 1;
214 if(t_prd ==
"Week") t_n = 7;
215 if(t_prd ==
"Month") t_n = 30;
216 if(t_prd ==
"6Months") t_n = 7*26;
217 if(t_prd ==
"Year") t_n = 7*52;
219 const unsigned int Npoint = 1440 * t_n;
231 inFile.open(
"FDAnaDayFileList_t02.txt");
233 else if(t_prd ==
"Week"){
236 inFile.open(
"FDAnaWeekFileList_t02.txt");
238 else if(t_prd ==
"Month"){
241 inFile.open(
"FDAnaMonthFileList_t02.txt");
243 else if(t_prd ==
"6Months"){
244 inFile.open(
"FDAna6MonthsFileList_t02.txt");
246 else if(t_prd ==
"Year"){
247 inFile.open(
"FDAnaYearFileList_t02.txt");
255 inFile.open(
"NDAnaDayFileList_t00.txt");
257 inFile.open(
"NDAnaDayFileList_t02.txt");
258 else if(trig ==
"DDActivity1")
259 inFile.open(
"NDAnaDayFileList_DDActivity1.txt");
261 else if(t_prd ==
"Week"){
264 inFile.open(
"NDAnaWeekFileList_t00.txt");
266 inFile.open(
"NDAnaWeekFileList_t02.txt");
267 else if(trig ==
"DDActivity1")
268 inFile.open(
"NDAnaWeekFileList_DDActivity1.txt");
270 else if(t_prd ==
"Month"){
273 inFile.open(
"NDAnaMonthFileList_t00.txt");
275 inFile.open(
"NDAnaMonthFileList_t02.txt");
276 else if(trig ==
"DDActivity1")
277 inFile.open(
"NDAnaMonthFileList_DDActivity1.txt");
279 else if(t_prd ==
"6Months"){
281 inFile.open(
"NDAna6MonthsFileList_t00.txt");
283 inFile.open(
"NDAna6MonthsFileList_t02.txt");
284 else if(trig ==
"DDActivity1")
285 inFile.open(
"NDAna6MonthsFileList_DDActivity1.txt");
287 else if(t_prd ==
"Year"){
289 inFile.open(
"NDAnaYearFileList_t00.txt");
291 inFile.open(
"NDAnaYearFileList_t02.txt");
292 else if(trig ==
"DDActivity1")
293 inFile.open(
"NDAnaYearFileList_DDActivity1.txt");
299 if(trig==
"Beamline")
300 inFile.open(
"TBAnaDayFileList_Beamline.txt");
301 else if(trig==
"t02")
302 inFile.open(
"TBAnaDayFileList_t02.txt");
303 else if(trig ==
"DDActivity1")
304 inFile.open(
"TBAnaDayFileList_DDActivity1.txt");
305 else if(trig ==
"Spill")
306 inFile.open(
"TBAnaDayFileList_Spill.txt");
308 else if(t_prd ==
"Week"){
309 if(trig==
"Beamline")
310 inFile.open(
"TBAnaWeekFileList_Beamline.txt");
311 else if(trig==
"t02")
312 inFile.open(
"TBAnaWeekFileList_t02.txt");
313 else if(trig ==
"DDActivity1")
314 inFile.open(
"TBAnaWeekFileList_DDActivity1.txt");
315 else if(trig ==
"Spill")
316 inFile.open(
"TBAnaWeekFileList_Spill.txt");
318 else if(t_prd ==
"Month"){
319 if(trig==
"Beamline")
320 inFile.open(
"TBAnaMonthFileList_Beamline.txt");
321 else if(trig==
"t02")
322 inFile.open(
"TBAnaMonthFileList_t02.txt");
323 else if(trig ==
"DDActivity1")
324 inFile.open(
"TBAnaMonthFileList_DDActivity1.txt");
325 else if(trig ==
"Spill")
326 inFile.open(
"TBAnaMonthFileList_Spill.txt");
328 else if(t_prd ==
"6Months"){
329 if(trig==
"Beamline")
330 inFile.open(
"TBAna6MonthsFileList_Beamline.txt");
331 else if(trig==
"t02")
332 inFile.open(
"TBAna6MonthsFileList_t02.txt");
333 else if(trig ==
"DDActivity1")
334 inFile.open(
"TBAna6MonthsFileList_DDActivity1.txt");
335 else if(trig ==
"Spill")
336 inFile.open(
"TBAna6MonthsFileList_Spill.txt");
338 else if(t_prd ==
"Year"){
339 if(trig==
"Beamline")
340 inFile.open(
"TBAnaYearFileList_Beamline.txt");
341 else if(trig==
"t02")
342 inFile.open(
"TBAnaYearFileList_t02.txt");
343 else if(trig ==
"DDActivity1")
344 inFile.open(
"TBAnaYearFileList_DDActivity1.txt");
345 else if(trig ==
"Spill")
346 inFile.open(
"TBAnaYearFileList_Spill.txt");
351 if(trigger ==
"DDActivity1")
361 TH1F* hNSliceDay[
Npar];
362 TH1F* hNNonNoiseSliceHitDay[
Npar];
363 TH1F* hNNoiseSliceHitDay[
Npar];
364 TH1F* hNonNoiseSlicePEDay[
Npar];
365 TH1F* hNoiseSlicePEDay[
Npar];
366 TH1F* hTrackPEDay[
Npar];
368 TH1F* hTrackLenDay[
Npar];
369 TH1F* hnTrackDay[
Npar];
370 TH1F* hCosNumiDay[
Npar];
372 TH2F* hPCXaveDay[
Npar];
373 TH2F* hPCYaveDay[
Npar];
375 TH1F* hnTrackAll3DDay[
Npar];
376 TH2F* hTrackStartXZAll3DDay[
Npar];
377 TH2F* hTrackStartYZAll3DDay[
Npar];
378 TH2F* hTrackStopXZAll3DDay[
Npar];
379 TH2F* hTrackStopYZAll3DDay[
Npar];
380 TH1F* hTrackLenAll3DDay[
Npar];
382 TH1F* hnTrackCont3DDay[
Npar];
383 TH2F* hTrackStartXZCont3DDay[
Npar];
384 TH2F* hTrackStartYZCont3DDay[
Npar];
385 TH2F* hTrackStopXZCont3DDay[
Npar];
386 TH2F* hTrackStopYZCont3DDay[
Npar];
387 TH1F* hTrackLenCont3DDay[
Npar];
390 TH1F* hDeltaSliceTrackDay[
Npar];
391 TH1F* hSliceTrackRatioDay[
Npar];
392 TH1F* hSliceTrackNHitRatioDay[
Npar];
395 TH2F* g3DRateEvo[
Npar];
396 TH1F* hNormalization[
Npar];
399 TH1F* hTimeDiffNanoSecDay[
Npar];
400 TH1F* hPOTSumDay[
Npar];
401 TH1F* hspillPOTDay[
Npar];
402 TH1F* hHornCurrentDay[
Npar];
403 TH1F* hXPositionDay[
Npar];
404 TH1F* hYPositionDay[
Npar];
405 TH1F* hXWidthDay[
Npar];
406 TH1F* hYWidthDay[
Npar];
407 TH1F* hGoodBeamDay[
Npar];
408 TH1F* hBadSpillsDay[
Npar];
414 float *NTimeDiffNanoSecDay[
Npar];
415 float *NTimeDiffNanoSectimeDay[
Npar];
416 float *NPOTSumDay[
Npar];
417 float *NPOTSumtimeDay[
Npar];
418 float *NspillPOTDay[
Npar];
419 float *NspillPOTtimeDay[
Npar];
420 float *NHornCurrentDay[
Npar];
421 float *NHornCurrenttimeDay[
Npar];
422 float *NXPositionDay[
Npar];
423 float *NXPositiontimeDay[
Npar];
424 float *NYPositionDay[
Npar];
425 float *NYPositiontimeDay[
Npar];
426 float *NXWidthDay[
Npar];
427 float *NXWidthtimeDay[
Npar];
428 float *NYWidthDay[
Npar];
429 float *NYWidthtimeDay[
Npar];
430 float *NGoodBeamDay[
Npar];
431 float *NGoodBeamtimeDay[
Npar];
433 float *NSliceDay[
Npar];
434 float *NSlicetimeDay[
Npar];
435 int NSliceDayCount[
Npar];
438 int NTimeDiffDayCount[
Npar];
439 int NHornCurrentDayCount[
Npar];
440 int NPOTSumDayCount[
Npar];
441 int NspillPOTDayCount[
Npar];
442 int NXPositionDayCount[
Npar];
443 int NYPositionDayCount[
Npar];
444 int NXWidthDayCount[
Npar];
445 int NYWidthDayCount[
Npar];
446 int NGoodBeamDayCount[
Npar];
448 float *NNonNoiseSliceHitDay[
Npar];
449 float *NNonNoiseSliceHittimeDay[
Npar];
450 float *NNoiseSliceHitDay[
Npar];
451 float *NNoiseSliceHittimeDay[
Npar];
452 float *NTrackDay[
Npar];
453 float *NTracktimeDay[
Npar];
454 float *NTrackLenDay[
Npar];
455 float *NTrackLentimeDay[
Npar];
456 float *NTsdDay[
Npar];
457 float *NTsdtimeDay[
Npar];
458 int NNonNoiseSliceHitDayCount[
Npar];
459 int NNoiseSliceHitDayCount[
Npar];
460 int NTrackDayCount[
Npar];
461 int NTrackLenDayCount[
Npar];
463 int NTrackLenAll3DDayCount[
Npar];
464 int NTsdDayCount[
Npar];
467 float *TrackFracAll3DDay[
Npar];
468 float *TrackFracAll2DDay[
Npar];
469 float *TrackFracCont3DDay[
Npar];
470 float *TrackFracAll3DtimeDay[
Npar];
471 float *TrackFracAll2DtimeDay[
Npar];
472 float *TrackFracCont3DtimeDay[
Npar];
473 int TrackFracDayCount[
Npar];
484 if(t_prd ==
"Day") t_nn = 1;
485 if(t_prd ==
"Week") t_nn = 7;
486 if(t_prd ==
"Month") t_nn = 30;
487 if(t_prd ==
"6Months") t_nn = 7*26;
488 if(t_prd ==
"Year") t_nn = 7*52;
490 const unsigned int tbins = 144 * t_nn;
499 int fullyinstrdib[
Npar];
500 int diblocklast[
Npar];
501 float evoindex, tr3devo, ptime;
502 float lowratemin = 35000.0;
508 float *sum2dtrk_col[
Npar];
509 float *sum3dtrk_col[
Npar];
516 float sum_hits_col[15];
524 for(
unsigned int i =0;
i <
Npar;
i++){
525 xtime[
i] =
new float[Npoint];
526 minDCM[
i] =
new float[Npoint];
528 sum2dtrk_col[
i] =
new float[Npoint];
529 sum3dtrk_col[
i] =
new float[Npoint];
545 NTimeDiffNanoSecDay[
i] =
new float[Npoint];
546 NTimeDiffNanoSectimeDay[
i] =
new float[Npoint];
547 NPOTSumDay[
i] =
new float[Npoint];
548 NPOTSumtimeDay[
i] =
new float[Npoint];
549 NspillPOTDay[
i] =
new float[Npoint];
550 NspillPOTtimeDay[
i] =
new float[Npoint];
551 NHornCurrentDay[
i] =
new float[Npoint];
552 NHornCurrenttimeDay[
i] =
new float[Npoint];
553 NXPositionDay[
i] =
new float[Npoint];
554 NXPositiontimeDay[
i] =
new float[Npoint];
555 NYPositionDay[
i] =
new float[Npoint];
556 NYPositiontimeDay[
i] =
new float[Npoint];
557 NXWidthDay[
i] =
new float[Npoint];
558 NXWidthtimeDay[
i] =
new float[Npoint];
559 NYWidthDay[
i] =
new float[Npoint];
560 NYWidthtimeDay[
i] =
new float[Npoint];
561 NGoodBeamDay[
i] =
new float[Npoint];
562 NGoodBeamtimeDay[
i] =
new float[Npoint];
564 NSliceDay[
i] =
new float[Npoint];
565 NSlicetimeDay[
i] =
new float[Npoint];
566 NNonNoiseSliceHitDay[
i] =
new float[Npoint];
567 NNonNoiseSliceHittimeDay[
i] =
new float[Npoint];
568 NNoiseSliceHitDay[
i] =
new float[Npoint];
569 NNoiseSliceHittimeDay[
i] =
new float[Npoint];
570 NTrackDay[
i] =
new float[Npoint];
571 NTracktimeDay[
i] =
new float[Npoint];
572 NTrackLenDay[
i] =
new float[Npoint];
573 NTrackLentimeDay[
i] =
new float[Npoint];
574 NTsdDay[
i] =
new float[Npoint];
575 NTsdtimeDay[
i] =
new float[Npoint];
577 TrackFracAll3DDay[
i] =
new float[Npoint];
578 TrackFracAll2DDay[
i] =
new float[Npoint];
579 TrackFracCont3DDay[
i] =
new float[Npoint];
580 TrackFracAll3DtimeDay[
i] =
new float[Npoint];
581 TrackFracAll2DtimeDay[
i] =
new float[Npoint];
582 TrackFracCont3DtimeDay[
i] =
new float[Npoint];
587 if(period ==
"Day") time =
"past 24 hrs.";
588 if(period ==
"Week") time =
"past 7 days";
589 if(period ==
"Month") time =
"past 30 days";
590 if(period ==
"6Months") time =
"past 26 week";
591 if(period ==
"Year") time =
"past 52 weeks";
594 for(
unsigned int p = 0;
p <
Npar; ++
p) {
597 char histotitle[128];
600 sprintf(histoname,
"3DRateEvolution%.1u",
p);
601 sprintf(histotitle,
"%s Rate of Hits from 3D Tracks per DCM vs Time (%s) - partition %.1u; (central time);",trigname.c_str(),time.c_str(),
p);
602 g3DRateEvo[
p] =
new TH2F(histoname,histotitle,tbins,time_ago,XNow,168,0,167);
604 sprintf(histoname,
"hNormalizationVsTime2Hours%.1u",
p);
605 sprintf(histotitle,
"%s Temporal Normalization (%s) - partition %.1u",trigname.c_str(),time.c_str(),
p);
606 hNormalization[
p] =
new TH1F(histoname,histotitle,tbins,time_ago,XNow);
610 sprintf(histoname,
"TimeDiffNanoSecc%.1u",
p);
611 sprintf(histotitle,
"%s Time Difference(%s) - partition %.1u;Time difference (sec)",trigname.c_str(),time.c_str(),
p);
612 hTimeDiffNanoSecDay[
p] =
new TH1F(histoname,histotitle,500,-0.1,0.6);
614 sprintf(histoname,
"POTSum%.1u",
p);
615 sprintf(histotitle,
"%s Sum POT(%s) - partition %.1u;Sum POT",trigname.c_str(),time.c_str(),
p);
616 hPOTSumDay[
p] =
new TH1F(histoname,histotitle,2,0,1);
618 sprintf(histoname,
"SpillPOT%.1u",
p);
619 sprintf(histotitle,
"%s Spill POT(%s) - partition %.1u;Spill POT",trigname.c_str(),time.c_str(),
p);
620 hspillPOTDay[
p] =
new TH1F(histoname,histotitle,200,0,90e12);
622 sprintf(histoname,
"HornCurrent%.1u",
p);
623 sprintf(histotitle,
"%sHorn Current (%s) - partition %.1u; Horn Current (kA);",trigname.c_str(),time.c_str(),
p);
624 hHornCurrentDay[
p] =
new TH1F(histoname,histotitle,100,-203,-197);
626 sprintf(histoname,
"XPosition%.1u",
p);
627 sprintf(histotitle,
"%s Horizontal Beam Position (mm)(%s) - partition %.1u;Position(mm)",trigname.c_str(),time.c_str(),
p);
628 hXPositionDay[
p] =
new TH1F(histoname,histotitle,240,-2.1,2.1);
630 sprintf(histoname,
"YPosition%.1u",
p);
631 sprintf(histotitle,
"%s Vertical Beam Position (mm)(%s) - partition %.1u;Position(mm)",trigname.c_str(),time.c_str(),
p);
632 hYPositionDay[
p] =
new TH1F(histoname,histotitle,400,-5,2);
634 sprintf(histoname,
"XWidth%.1u",
p);
635 sprintf(histotitle,
"%s Horizontal Beam Width (mm)(%s) - partition %.1u;Width(mm)",trigname.c_str(),time.c_str(),
p);
636 hXWidthDay[
p] =
new TH1F(histoname,histotitle,150,0.5,2.0);
638 sprintf(histoname,
"YWidth%.1u",
p);
639 sprintf(histotitle,
"%s Vertical Beam Width (mm)(%s) - partition %.1u;Width(mm)",trigname.c_str(),time.c_str(),
p);
640 hYWidthDay[
p] =
new TH1F(histoname,histotitle,150,0.5,2.0);
642 sprintf(histoname,
"GoodBeam%.1u",
p);
643 sprintf(histotitle,
"%s Good Beam(%s) - partition %.1u;",trigname.c_str(),time.c_str(),
p);
644 hGoodBeamDay[
p] =
new TH1F(histoname,histotitle,2,0,2);
646 sprintf(histoname,
"BadSpills%.1u",
p);
647 sprintf(histotitle,
"%s Failure Mode for Bad Spills(%s) - partition %.1u;count",trigname.c_str(),time.c_str(),
p);
648 hBadSpillsDay[
p] =
new TH1F(histoname,histotitle,8,1,9);
649 TAxis *badspillsxaxis = hBadSpillsDay[
p]->GetXaxis();
650 badspillsxaxis->SetBinLabel(1,
"delta t");
651 badspillsxaxis->SetBinLabel(2,
"POT");
652 badspillsxaxis->SetBinLabel(3,
"horn I");
653 badspillsxaxis->SetBinLabel(4,
"x position");
654 badspillsxaxis->SetBinLabel(5,
"y position");
655 badspillsxaxis->SetBinLabel(6,
"x width");
656 badspillsxaxis->SetBinLabel(7,
"y width");
657 badspillsxaxis->SetBinLabel(8,
"Total Bad Spills");
660 sprintf(histoname,
"hNNonNoiseSlice%sP%.1u",period.c_str(),
p);
661 sprintf(histotitle,
"%s # Non-Noise Slices (%s) - partition %.1u;N Slices;",trigname.c_str(),time.c_str(),
p);
662 hNSliceDay[
p] =
new TH1F(histoname,histotitle,501,-0.5,500.5);
664 sprintf(histoname,
"hNNonNoiseSliceHit%sP%.1u",period.c_str(),
p);
665 sprintf(histotitle,
"%s # Non-Noise Slice Hits (%s) - partition %.1u;N Hits;",trigname.c_str(),time.c_str(),
p);
666 hNNonNoiseSliceHitDay[
p] =
new TH1F(histoname,histotitle,1000,0,5000);
668 sprintf(histoname,
"hNNoiseSliceHit%sP%.1u",period.c_str(),
p);
669 sprintf(histotitle,
"%s # Noise Slice Hits (%s) - partition %.1u;N Hits;",trigname.c_str(),time.c_str(),
p);
670 hNNoiseSliceHitDay[
p] =
new TH1F(histoname,histotitle,8000,0,40000);
672 sprintf(histoname,
"hNonNoisePE%sP%.1u",period.c_str(),
p);
673 sprintf(histotitle,
"%s Non-Noise Slice PE (%s) - partition %.1u;PE;",trigname.c_str(),time.c_str(),
p);
674 hNonNoiseSlicePEDay[
p] =
new TH1F(histoname,histotitle,1862,0,4096);
676 sprintf(histoname,
"hNoiseSlicePE%sP%.1u",period.c_str(),
p);
677 sprintf(histotitle,
"%s Noise Slice PE (%s) - partition %.1u;PE;",trigname.c_str(),time.c_str(),
p);
678 hNoiseSlicePEDay[
p] =
new TH1F(histoname,histotitle,1862,0,4096);
680 sprintf(histoname,
"hTrackPE%sP%.1u",period.c_str(),
p);
681 sprintf(histotitle,
"%s Track PE (%s) - partition %.1u;PE;",trigname.c_str(),time.c_str(),
p);
682 hTrackPEDay[
p] =
new TH1F(histoname,histotitle,1862,0,4096);
684 sprintf(histoname,
"hTsd%sP%.1u",period.c_str(),
p);
685 sprintf(histotitle,
"%s Slice Time Standard Dev. (%s) - partition %.1u;time [ns];",trigname.c_str(),time.c_str(),
p);
686 hTsdDay[
p] =
new TH1F(histoname,histotitle,500000,0,500000);
688 sprintf(histoname,
"hTrackLen%sP%.1u",period.c_str(),
p);
689 sprintf(histotitle,
"%s Track Length (%s) - partition %.1u;length [cm]",trigname.c_str(),time.c_str(),
p);
690 hTrackLenDay[
p] =
new TH1F(histoname,histotitle,650,0,6500);
692 sprintf(histoname,
"hnTrack%sP%.1u",period.c_str(),
p);
693 sprintf(histotitle,
"%s # Tracks (%s) - partition %.1u;N Tracks;",trigname.c_str(),time.c_str(),
p);
694 hnTrackDay[
p] =
new TH1F(histoname,histotitle,301,-0.5,300.5);
696 sprintf(histoname,
"hCosNumi%sP%.1u",period.c_str(),
p);
697 sprintf(histotitle,
"%s Cos(#theta_{NuMI}) (%s) - partition %.1u",trigname.c_str(),time.c_str(),
p);
698 hCosNumiDay[
p] =
new TH1F(histoname,histotitle,202,-1.01,1.01);
700 sprintf(histoname,
"hPCXave%sP%.1u",period.c_str(),
p);
701 sprintf(histotitle,
"%s Average Plane/Cell Hit per Non-Noise Slice XZ-view (%s) - partition %.1u;Plane;Cell",trigname.c_str(),time.c_str(),
p);
702 hPCXaveDay[
p] =
new TH2F(histoname,histotitle,660,-1300.0,20.0,255,-500.0,10.0);
704 sprintf(histoname,
"hPCYave%sP%.1u",period.c_str(),
p);
705 sprintf(histotitle,
"%s Average Plane/Cell Hit per Non-Noise Slice YZ-view (%s) - partition %.1u;Plane;Cell",trigname.c_str(),time.c_str(),
p);
706 hPCYaveDay[
p] =
new TH2F(histoname,histotitle,660,-1300.0,20.0,255,-10.0,500.0);
708 sprintf(histoname,
"hnTrackAll3D%sP%.1u",period.c_str(),
p);
709 sprintf(histotitle,
"%s # 3D Tracks (%s) - partition %.1u;N Tracks;",trigname.c_str(),time.c_str(),
p);
710 hnTrackAll3DDay[
p] =
new TH1F(histoname,histotitle,301,-0.5,300.5);
712 sprintf(histoname,
"hTrackStartXZAll3D%sP%.1u",period.c_str(),
p);
713 sprintf(histotitle,
"%s 3D Track Start Position XZ-view (%s) - partition %.1u;Z [cm];X [cm]",trigname.c_str(),time.c_str(),
p);
714 hTrackStartXZAll3DDay[
p] =
new TH2F(histoname,histotitle,630,-6300.,0.0,160,-800.0,800.0);
716 sprintf(histoname,
"hTrackStartYZAll3D%sP%.1u",period.c_str(),
p);
717 sprintf(histotitle,
"%s 3D Track Start Position YZ-view (%s) - partition %.1u;Z [cm];Y [cm]",trigname.c_str(),time.c_str(),
p);
718 hTrackStartYZAll3DDay[
p] =
new TH2F(histoname,histotitle,630,-6300.0,0.0,160,-800.0,800.0);
720 sprintf(histoname,
"hTrackStopXZAll3D%sP%.1u",period.c_str(),
p);
721 sprintf(histotitle,
"%s 3D Track Stop Position XZ-view (%s) - partition %.1u;Z [cm];X [cm]",trigname.c_str(),time.c_str(),
p);
722 hTrackStopXZAll3DDay[
p] =
new TH2F(histoname,histotitle,630,-6300.0,0.0,160,-800.0,800.0);
724 sprintf(histoname,
"hTrackStopYZAll3D%sP%.1u",period.c_str(),
p);
725 sprintf(histotitle,
"%s 3D Track Stop Position YZ-view (%s) - partition %.1u;Z [cm];Y [cm]",trigname.c_str(),time.c_str(),
p);
726 hTrackStopYZAll3DDay[
p] =
new TH2F(histoname,histotitle,630,-6300.0,0.0,160,-800.0,800.0);
728 sprintf(histoname,
"hTrackLenAll3D%sP%.1u",period.c_str(),
p);
729 sprintf(histotitle,
"%s 3D Track Length (%s) - partition %.1u;length [cm]",trigname.c_str(),time.c_str(),
p);
730 hTrackLenAll3DDay[
p] =
new TH1F(histoname,histotitle,650,0,6500);
732 sprintf(histoname,
"hnTrackCont3D%sP%.1u",period.c_str(),
p);
733 sprintf(histotitle,
"%s # Contained 3D Tracks (%s) - partition %.1u;N Tracks;",trigname.c_str(),time.c_str(),
p);
734 hnTrackCont3DDay[
p] =
new TH1F(histoname,histotitle,301,-0.5,300.5);
736 sprintf(histoname,
"hTrackStartXZCont3D%sP%.1u",period.c_str(),
p);
737 sprintf(histotitle,
"%s Contained 3D Track Start Position XZ-view (%s) - partition %.1u;Z [cm];X [cm]",trigname.c_str(),time.c_str(),
p);
738 hTrackStartXZCont3DDay[
p] =
new TH2F(histoname,histotitle,630,-6300.0,0.0,160,-800.0,800.0);
740 sprintf(histoname,
"hTrackStartYZCont3D%sP%.1u",period.c_str(),
p);
741 sprintf(histotitle,
"%s Contained 3D Track Start Position YZ-view (%s) - partition %.1u;Z [cm];Y [cm]",trigname.c_str(),time.c_str(),
p);
742 hTrackStartYZCont3DDay[
p] =
new TH2F(histoname,histotitle,630,-6300.0,0.0,160,-800.0,800.0);
744 sprintf(histoname,
"hTrackStopXZCont3D%sP%.1u",period.c_str(),
p);
745 sprintf(histotitle,
"%s Contained 3D Track Stop Position XZ-view (%s) - partition %.1u;Z [cm];X [cm]",trigname.c_str(),time.c_str(),
p);
746 hTrackStopXZCont3DDay[
p] =
new TH2F(histoname,histotitle,630,-6300.0,0.0,160,-800.0,800.0);
748 sprintf(histoname,
"hTrackStopYZCont3D%sP%.1u",period.c_str(),
p);
749 sprintf(histotitle,
"%s Contained 3D Track Stop Position YZ-view (%s) - partition %.1u;Z [cm];Y [cm]",trigname.c_str(),time.c_str(),
p);
750 hTrackStopYZCont3DDay[
p] =
new TH2F(histoname,histotitle,630,-6300.0,0.0,160,-800.0,800.0);
752 sprintf(histoname,
"hTrackLenCont3D%sP%.1u",period.c_str(),
p);
753 sprintf(histotitle,
"%s Contained 3D Track Length (%s) - partition %.1u;length [cm]",trigname.c_str(),time.c_str(),
p);
754 hTrackLenCont3DDay[
p] =
new TH1F(histoname,histotitle,650,0,6500);
757 sprintf(histoname,
"hDeltaSliceTrack%sP%.1u",period.c_str(),
p);
758 sprintf(histotitle,
"%s N-slices minus N-3D-tracks per Trigger (%s) - partition %.1u;(N-Sl) - (N-3D-Trk)",trigname.c_str(),time.c_str(),
p);
759 hDeltaSliceTrackDay[
p] =
new TH1F(histoname,histotitle,201,-100.5,100.5);
761 sprintf(histoname,
"hSliceTrackRatio%sP%.1u",period.c_str(),
p);
762 sprintf(histotitle,
"%s Ratio of N-3D-tracks to N-slices per Trigger (%s) - partition %.1u;(N-3D-Tracks)/(N-Slices)",trigname.c_str(),time.c_str(),
p);
763 hSliceTrackRatioDay[
p] =
new TH1F(histoname,histotitle,2000,0.0,20.0);
765 sprintf(histoname,
"hSliceTrackNHitRatio%sP%.1u",period.c_str(),
p);
766 sprintf(histotitle,
"%s NHit Ratio from 3D-tracks to Nhits from Slice per Slice (%s) - partition %.1u;(NHit 3D-Tracks)/(NHit slice)",trigname.c_str(),time.c_str(),
p);
767 hSliceTrackNHitRatioDay[
p] =
new TH1F(histoname,histotitle,101,0.0,1.01);
770 sprintf(histoname,
"hHitsVwcell%sP%.1u",period.c_str(),
p);
771 sprintf(histotitle,
"%s Number of Hits vs W (%s) - partition %.1u;",trigname.c_str(),time.c_str(),
p);
772 hHitsVwcellDay[
p] =
new TH2F(histoname,histotitle,344065,-0.5,344064.5,32,-800,800);
774 sprintf(histoname,
"hCellsVwcell%sP%.1u",period.c_str(),
p);
775 sprintf(histotitle,
"%s Number of Cells vs W (%s) - partition %.1u;",trigname.c_str(),time.c_str(),
p);
776 hCellsVwcellDay[
p] =
new TH2F(histoname,histotitle,344065,-0.5,344064.5,32,-800,800);
778 NSliceDayCount[
p] = 0;
780 NTimeDiffDayCount[
p] = 0;
781 NHornCurrentDayCount[
p] = 0;
782 NPOTSumDayCount[
p] = 0;
783 NspillPOTDayCount[
p] = 0;
784 NXPositionDayCount[
p] = 0;
785 NYPositionDayCount[
p] = 0;
786 NXWidthDayCount[
p] = 0;
787 NYWidthDayCount[
p] = 0;
788 NGoodBeamDayCount[
p] = 0;
790 NNonNoiseSliceHitDayCount[
p] = 0;
791 NNoiseSliceHitDayCount[
p] = 0;
792 NTrackDayCount[
p] = 0;
793 NTrackLenDayCount[
p] = 0;
794 NTrackLenAll3DDayCount[
p] = 0;
798 TrackFracDayCount[
p] = 0;
808 if(!
inFile.good())
continue;
810 TFile fileD(filenameD);
811 fileD.cd(
"nearlineana");
812 TTree *
header = (TTree *)fileD.FindObjectAny(
"Header");
824 header->SetBranchAddress(
"StartYear", &year);
825 header->SetBranchAddress(
"StartMonth", &month);
826 header->SetBranchAddress(
"StartDay", &day);
827 header->SetBranchAddress(
"StartHour", &Hour);
828 header->SetBranchAddress(
"EndYear", &yearEnd);
829 header->SetBranchAddress(
"EndMonth", &monthEnd);
830 header->SetBranchAddress(
"EndDay", &dayEnd);
831 header->SetBranchAddress(
"EndHour", &HourEnd);
832 header->SetBranchAddress(
"Run", &
run);
833 header->SetBranchAddress(
"Subrun", &
subrun);
834 header->SetBranchAddress(
"Partition", &
par);
835 header->SetBranchAddress(
"LiveTime", &livetime);
836 header->SetBranchAddress(
"Nevents", &nevents);
840 Min = (Hour-
hour)*60.0;
841 min = (Hour-
hour)*60.0;
842 sec = (Min-
min)*60.0;
845 SRtime->Set(year,month,day,hour,min,sec);
847 std::cout <<
"Datetime: " << year <<
"-" << month <<
"-" << day <<
" " << Hour <<
std::endl;
849 Min = (HourEnd-
hour)*60.0;
850 min = (HourEnd-
hour)*60.0;
851 sec = (Min-
min)*60.0;
854 SRtime->Set(yearEnd,monthEnd,dayEnd,hour,min,sec);
856 if(Xsrtime < time_ago)
continue;
896 TH2F *
hit = (TH2F*)fileD.FindObjectAny(
"H3DHitOnTrack");
897 TH2F *instr = (TH2F*)fileD.FindObjectAny(
"instrumented");
899 TH2F *trk3 = (TH2F*)fileD.FindObjectAny(
"H3DTrackNum");
900 TH2F *trk2 = (TH2F*)fileD.FindObjectAny(
"H2DTrackNum");
903 fullyinstrdib[
par] = 0;
904 diblocklast[
par] = 0;
917 for(
unsigned int xdiblock =1; xdiblock <=14; xdiblock++){
918 sum_hits_col[xdiblock]=0.;
920 for(
unsigned int yldc =1; yldc <=N_dcms; yldc++){
921 sum_hits_col[xdiblock] += hit->GetBinContent(xdiblock,yldc);
923 if(sum_hits_col[xdiblock] > 0){
924 ++fullyinstrdib[
par];
925 diblocklast[
par] = xdiblock;
936 if(livetime == 0) livetime = 550000*1.0
E-9*
nevents;
938 int init_dib = diblocklast[
par] - fullyinstrdib[
par] +1;
946 bool noInstr =
false;
948 if((!instr) || instr->GetEntries() == 0){
963 if(isND && (instr->GetEntries() > 14)) noInstr =
true;
967 for(
int xbin= init_dib; xbin <= diblocklast[
par]; xbin++){
969 sum3dtrk_col[
par][xbin]=0.;
970 sum2dtrk_col[
par][xbin]=0.;
975 for(
unsigned int ybin=1; ybin<=N_dcms; ++ybin){
982 if((xbin==4 && ybin==3) ||(xbin ==4 && ybin ==4))
continue;
984 evoindex=
float(N_dcms)*(xbin-1.)+ybin-1.;
987 sum3dtrk_col[
par][xbin] += trk3->GetBinContent(xbin,ybin);
988 sum2dtrk_col[
par][xbin] += trk2->GetBinContent(xbin,ybin);
990 if((hit->GetBinContent(xbin, ybin))/(livetime) < MinDCM){
991 MinDCM = (hit->GetBinContent(xbin, ybin))/(livetime);
999 hNormalization[
par]->Fill(Xsrtime);
1000 tr3devo = hit->GetBinContent(hit->FindBin(xbin,ybin))/(livetime);
1002 if(tr3devo < lowratemin ){
1003 g3DRateEvo[
par]->Fill(Xsrtime,evoindex,tr3devo);
1009 evoindex=
float(N_dcms)*(xbin-1.)+ybin-1.;
1011 sum3dtrk_col[
par][xbin] += trk3->GetBinContent(xbin,ybin);
1012 sum2dtrk_col[
par][xbin] += trk2->GetBinContent(xbin,ybin);
1014 if((hit->GetBinContent(xbin, ybin))/(livetime) < MinDCM){
1016 MinDCM = (hit->GetBinContent(xbin, ybin))/(livetime);
1024 hNormalization[
par]->Fill(Xsrtime);
1025 tr3devo = hit->GetBinContent(hit->FindBin(xbin,ybin))/(livetime);
1028 if(tr3devo < lowratemin ){
1029 g3DRateEvo[
par]->Fill(Xsrtime,evoindex,tr3devo);
1037 else if(instr-> GetBinContent(xbin,ybin) > 0){
1039 evoindex=
float(N_dcms)*(xbin-1.)+ybin-1.;
1041 sum3dtrk_col[
par][xbin] += trk3->GetBinContent(xbin,ybin);
1042 sum2dtrk_col[
par][xbin] += trk2->GetBinContent(xbin,ybin);
1052 hNormalization[
par]->Fill(Xsrtime);
1053 tr3devo = hit->GetBinContent(hit->FindBin(xbin,ybin))/(livetime);
1056 if(tr3devo < lowratemin ){
1057 g3DRateEvo[
par]->Fill(Xsrtime,evoindex,tr3devo);
1062 if((hit->GetBinContent(xbin, ybin))/(livetime) < MinDCM){
1064 MinDCM = (hit->GetBinContent(xbin, ybin))/(livetime);
1077 minDCM[
par][count[
par]] = MinDCM;
1078 xtime[
par][count[
par]] = Xsrtime;
1083 TH1F *hnSlicetemp = (TH1F*)fileD.FindObjectAny(
"fNumSlices");
1084 if(hnSlicetemp != 0){
1085 hNSliceDay[
par]->Add(hnSlicetemp,1.0);
1087 if(hnSlicetemp != 0 && header !=0) {
1088 NSlicetimeDay[
par][NSliceDayCount[
par]] = Xsrtime;
1089 NSliceDay [
par][NSliceDayCount[
par]] = hnSlicetemp->GetMean(1);
1090 NSliceDayCount[
par]++;
1093 TH1F *hTimeDifftemp = (TH1F*)fileD.FindObjectAny(
"fTimeDiffNanoSec");
1094 if(hTimeDifftemp != 0){
1095 hTimeDiffNanoSecDay[
par]->Add(hTimeDifftemp,1.0);
1097 if(hTimeDifftemp != 0 && header !=0) {
1098 NTimeDiffNanoSectimeDay[
par][NTimeDiffDayCount[
par]] = Xsrtime;
1099 NTimeDiffNanoSecDay [
par][NTimeDiffDayCount[
par]] = hTimeDifftemp->GetMean(1);
1100 NTimeDiffDayCount[
par]++;
1103 TH1F *hPOTSumtemp = (TH1F*)fileD.FindObjectAny(
"fPOTSum");
1104 if(hPOTSumtemp != 0){
1105 hPOTSumDay[
par]->Add(hPOTSumtemp,1.0);
1107 if(hPOTSumtemp != 0 && header !=0) {
1108 NPOTSumtimeDay[
par][NPOTSumDayCount[
par]] = Xsrtime;
1109 NPOTSumDay [
par][NPOTSumDayCount[
par]] = hPOTSumtemp->GetBinContent(1);
1110 NPOTSumDayCount[
par]++;
1113 TH1F *hspillPOTtemp = (TH1F*)fileD.FindObjectAny(
"fspillPOT");
1114 if(hspillPOTtemp != 0){
1115 hspillPOTDay[
par]->Add(hspillPOTtemp,1.0);
1117 if(hspillPOTtemp != 0 && header !=0) {
1118 NspillPOTtimeDay[
par][NspillPOTDayCount[
par]] = Xsrtime;
1119 NspillPOTDay [
par][NspillPOTDayCount[
par]] = hspillPOTtemp->GetMean(1);
1120 NspillPOTDayCount[
par]++;
1123 TH1F *hXPositiontemp = (TH1F*)fileD.FindObjectAny(
"fXPosition");
1124 if(hXPositiontemp != 0){
1125 hXPositionDay[
par]->Add(hXPositiontemp,1.0);
1127 if(hXPositiontemp != 0 && header !=0) {
1128 NXPositiontimeDay[
par][NXPositionDayCount[
par]] = Xsrtime;
1129 NXPositionDay [
par][NXPositionDayCount[
par]] = hXPositiontemp->GetMean(1);
1130 NXPositionDayCount[
par]++;
1133 TH1F *hYPositiontemp = (TH1F*)fileD.FindObjectAny(
"fYPosition");
1134 if(hYPositiontemp != 0){
1135 hYPositionDay[
par]->Add(hYPositiontemp,1.0);
1137 if(hYPositiontemp != 0 && header !=0) {
1138 NYPositiontimeDay[
par][NYPositionDayCount[
par]] = Xsrtime;
1139 NYPositionDay [
par][NYPositionDayCount[
par]] = hYPositiontemp->GetMean(1);
1140 NYPositionDayCount[
par]++;
1143 TH1F *hXWidthtemp = (TH1F*)fileD.FindObjectAny(
"fXWidth");
1144 if(hXWidthtemp != 0){
1145 hXWidthDay[
par]->Add(hXWidthtemp,1.0);
1147 if(hXWidthtemp != 0 && header !=0) {
1148 NXWidthtimeDay[
par][NXWidthDayCount[
par]] = Xsrtime;
1149 NXWidthDay [
par][NXWidthDayCount[
par]] = hXWidthtemp->GetMean(1);
1150 NXWidthDayCount[
par]++;
1153 TH1F *hYWidthtemp = (TH1F*)fileD.FindObjectAny(
"fYWidth");
1154 if(hYWidthtemp != 0){
1155 hYWidthDay[
par]->Add(hYWidthtemp,1.0);
1157 if(hYWidthtemp != 0 && header !=0) {
1158 NYWidthtimeDay[
par][NYWidthDayCount[
par]] = Xsrtime;
1159 NYWidthDay [
par][NYWidthDayCount[
par]] = hYWidthtemp->GetMean(1);
1160 NYWidthDayCount[
par]++;
1164 TH1F *hGoodBeamtemp = (TH1F*)fileD.FindObjectAny(
"fGoodBeam");
1165 if(hGoodBeamtemp != 0){
1166 hGoodBeamDay[
par]->Add(hGoodBeamtemp,1.0);
1168 if(hGoodBeamtemp != 0 && header !=0) {
1169 NGoodBeamtimeDay[
par][NGoodBeamDayCount[
par]] = Xsrtime;
1170 NGoodBeamDay [
par][NGoodBeamDayCount[
par]] = hGoodBeamtemp->GetMean(1);
1171 NGoodBeamDayCount[
par]++;
1174 TH1F *hBadSpillstemp = (TH1F*)fileD.FindObjectAny(
"fBadSpills");
1175 if(hBadSpillstemp != 0){
1176 hBadSpillsDay[
par]->Add(hBadSpillstemp,1.0);
1179 TH1F *hHornCurrenttemp = (TH1F*)fileD.FindObjectAny(
"fHornCurrent");
1180 if(hHornCurrenttemp != 0){
1181 hHornCurrentDay[
par]->Add(hHornCurrenttemp,1.0);
1183 if(hHornCurrenttemp != 0 && header !=0) {
1184 NHornCurrenttimeDay[
par][NHornCurrentDayCount[
par]] = Xsrtime;
1185 NHornCurrentDay [
par][NHornCurrentDayCount[
par]] = hHornCurrenttemp->GetMean(1);
1186 NHornCurrentDayCount[
par]++;
1190 TH1F *hnSliceHittemp = (TH1F*)fileD.FindObjectAny(
"fNumHits");
1191 if(hnSliceHittemp != 0){
1192 hNNonNoiseSliceHitDay[
par]->Add(hnSliceHittemp,1.0);
1194 if(hnSliceHittemp != 0 && header !=0) {
1195 NNonNoiseSliceHittimeDay[
par][NNonNoiseSliceHitDayCount[
par]] = Xsrtime;
1196 NNonNoiseSliceHitDay [
par][NNonNoiseSliceHitDayCount[
par]] = hnSliceHittemp->GetMean(1);
1197 NNonNoiseSliceHitDayCount[
par]++;
1200 TH1F *hnNoiseSliceHittemp = (TH1F*)fileD.FindObjectAny(
"fNumHitsNoise");
1201 if(hnNoiseSliceHittemp != 0){
1202 hNNoiseSliceHitDay[
par]->Add(hnNoiseSliceHittemp,1.0);
1204 if(hnNoiseSliceHittemp != 0 && header !=0) {
1205 NNoiseSliceHittimeDay[
par][NNoiseSliceHitDayCount[
par]] = Xsrtime;
1206 NNoiseSliceHitDay [
par][NNoiseSliceHitDayCount[
par]] = hnNoiseSliceHittemp->GetMean(1);
1207 NNoiseSliceHitDayCount[
par]++;
1211 TH1F *hNonNoiseSlicePEtemp = (TH1F*)fileD.FindObjectAny(
"fPENonNoiseHits");
1212 if(hNonNoiseSlicePEtemp != 0){
1213 hNonNoiseSlicePEDay[
par]->Add(hNonNoiseSlicePEtemp,1.0);
1217 TH1F *hNoiseSlicePEtemp = (TH1F*)fileD.FindObjectAny(
"fPENoiseHits");
1218 if(hNoiseSlicePEtemp != 0){
1219 hNoiseSlicePEDay[
par]->Add(hNoiseSlicePEtemp,1.0);
1222 TH1F *hTrackPEtemp = (TH1F*)fileD.FindObjectAny(
"fPETrackHitsAll3D");
1223 if(hTrackPEtemp != 0){
1224 hTrackPEDay[
par]->Add(hTrackPEtemp,1.0);
1227 TH1F *hTsdtemp = (TH1F*)fileD.FindObjectAny(
"fTsd");
1229 hTsdDay[
par]->Add(hTsdtemp,1.0);
1231 if(hTsdtemp != 0 && header !=0) {
1232 NTsdtimeDay[
par][NTsdDayCount[
par]] = Xsrtime;
1233 NTsdDay [
par][NTsdDayCount[
par]] = hTsdtemp->GetMean(1);
1234 NTsdDayCount[
par]++;
1237 TH1F *hnTracktemp = (TH1F*)fileD.FindObjectAny(
"fNumTracksAll3D");
1238 if(hnTracktemp != 0){
1239 hnTrackDay[
par]->Add(hnTracktemp,1.0);
1241 if(hnTracktemp != 0 && header !=0) {
1242 NTracktimeDay[
par][NTrackDayCount[
par]] = Xsrtime;
1243 NTrackDay [
par][NTrackDayCount[
par]] = hnTracktemp->GetMean(1);
1244 NTrackDayCount[
par]++;
1247 TH1F *hTrackLentemp = (TH1F*)fileD.FindObjectAny(
"fTrackLengthAll3D");
1248 if(hTrackLentemp != 0){
1249 hTrackLenDay[
par]->Add(hTrackLentemp,1.0);
1251 if(hTrackLentemp != 0 && header !=0) {
1252 NTrackLentimeDay[
par][NTrackLenDayCount[
par]] = Xsrtime;
1253 NTrackLenDay [
par][NTrackLenDayCount[
par]] = hTrackLentemp->GetMean(1);
1254 NTrackLenDayCount[
par]++;
1257 TH1F *hCosNumitemp = (TH1F*)fileD.FindObjectAny(
"fTrackCosNumiAll3D");
1258 if(hCosNumitemp != 0){
1259 hCosNumiDay[
par]->Add(hCosNumitemp,1.0);
1262 TH2F *hPCXavetemp = (TH2F*)fileD.FindObjectAny(
"fPCXaveCR");
1263 if(hPCXavetemp != 0) {
1264 hPCXaveDay[
par]->Add(hPCXavetemp,1.0);
1267 TH2F *hPCYavetemp = (TH2F*)fileD.FindObjectAny(
"fPCYaveCR");
1268 if(hPCYavetemp != 0) {
1269 hPCYaveDay[
par]->Add(hPCYavetemp,1.0);
1272 TH1F *hnTrackAll3Dtemp = (TH1F*)fileD.FindObjectAny(
"fNumTracksAll3D");
1273 if(hnTrackAll3Dtemp != 0){
1274 hnTrackAll3DDay[
par]->Add(hnTrackAll3Dtemp,1.0);
1277 TH2F *hTrackStartXZAll3Dtemp = (TH2F*)fileD.FindObjectAny(
"fStartPointTrackXZCRAll3D");
1278 if(hTrackStartXZAll3Dtemp != 0) {
1279 hTrackStartXZAll3DDay[
par]->Add(hTrackStartXZAll3Dtemp,1.0);
1282 TH2F *hTrackStartYZAll3Dtemp = (TH2F*)fileD.FindObjectAny(
"fStartPointTrackYZCRAll3D");
1283 if(hTrackStartYZAll3Dtemp != 0) {
1284 hTrackStartYZAll3DDay[
par]->Add(hTrackStartYZAll3Dtemp,1.0);
1287 TH2F *hTrackStopXZAll3Dtemp = (TH2F*)fileD.FindObjectAny(
"fStopPointTrackXZCRAll3D");
1288 if(hTrackStopXZAll3Dtemp != 0) {
1289 hTrackStopXZAll3DDay[
par]->Add(hTrackStopXZAll3Dtemp,1.0);
1292 TH2F *hTrackStopYZAll3Dtemp = (TH2F*)fileD.FindObjectAny(
"fStopPointTrackYZCRAll3D");
1293 if(hTrackStopYZAll3Dtemp != 0) {
1294 hTrackStopYZAll3DDay[
par]->Add(hTrackStopYZAll3Dtemp,1.0);
1297 TH1F *hTrackLengthAll3Dtemp = (TH1F*)fileD.FindObjectAny(
"fTrackLengthAll3D");
1298 if(hTrackLengthAll3Dtemp != 0){
1299 hTrackLenAll3DDay[
par]->Add(hTrackLengthAll3Dtemp,1.0);
1302 TH1F *hnTrackCont3Dtemp = (TH1F*)fileD.FindObjectAny(
"fNumTracksCont3D");
1303 if(hnTrackCont3Dtemp != 0){
1304 hnTrackCont3DDay[
par]->Add(hnTrackCont3Dtemp,1.0);
1307 TH2F *hTrackStartXZCont3Dtemp = (TH2F*)fileD.FindObjectAny(
"fStartPointTrackXZCRCont3D");
1308 if(hTrackStartXZCont3Dtemp != 0) {
1309 hTrackStartXZCont3DDay[
par]->Add(hTrackStartXZCont3Dtemp,1.0);
1312 TH2F *hTrackStartYZCont3Dtemp = (TH2F*)fileD.FindObjectAny(
"fStartPointTrackYZCRCont3D");
1313 if(hTrackStartYZCont3Dtemp != 0) {
1314 hTrackStartYZCont3DDay[
par]->Add(hTrackStartYZCont3Dtemp,1.0);
1317 TH2F *hTrackStopXZCont3Dtemp = (TH2F*)fileD.FindObjectAny(
"fStopPointTrackXZCRCont3D");
1318 if(hTrackStopXZCont3Dtemp != 0) {
1319 hTrackStopXZCont3DDay[
par]->Add(hTrackStopXZCont3Dtemp,1.0);
1322 TH2F *hTrackStopYZCont3Dtemp = (TH2F*)fileD.FindObjectAny(
"fStopPointTrackYZCRCont3D");
1323 if(hTrackStopYZCont3Dtemp != 0) {
1324 hTrackStopYZCont3DDay[
par]->Add(hTrackStopYZCont3Dtemp,1.0);
1327 TH1F *hTrackLengthCont3Dtemp = (TH1F*)fileD.FindObjectAny(
"fTrackLengthCont3D");
1328 if(hTrackLengthCont3Dtemp != 0){
1329 hTrackLenCont3DDay[
par]->Add(hTrackLengthCont3Dtemp,1.0);
1339 TH1F *hDSlTrktemp = (TH1F*)fileD.FindObjectAny(
"fDeltaSliceTrack");
1340 if(hDSlTrktemp != 0) {
1341 hDeltaSliceTrackDay[
par]->Add(hDSlTrktemp,1.0);
1344 TH1F *hSlTrkRtemp = (TH1F*)fileD.FindObjectAny(
"fSliceTrackRatio");
1345 if(hSlTrkRtemp != 0) {
1346 hSliceTrackRatioDay[
par]->Add(hSlTrkRtemp,1.0);
1349 TH1F *hSlTrkNHRtemp = (TH1F*)fileD.FindObjectAny(
"fSliceTrackNHitRatio");
1350 if(hSlTrkNHRtemp != 0) {
1351 hSliceTrackNHitRatioDay[
par]->Add(hSlTrkNHRtemp,1.0);
1354 TH1F *hTrackFracAll3Dtemp = (TH1F*)fileD.FindObjectAny(
"fTrackFractionAll3D");
1355 TH1F *hTrackFracAll2Dtemp = (TH1F*)fileD.FindObjectAny(
"fTrackFractionAll2D");
1356 TH1F *hTrackFracCont3Dtemp = (TH1F*)fileD.FindObjectAny(
"fTrackFractionCont3D");
1357 if(hTrackFracAll3Dtemp != 0 && hTrackFracAll2Dtemp != 0 &&
1358 hTrackFracCont3Dtemp != 0 && header !=0) {
1359 TrackFracAll3DtimeDay[
par][TrackFracDayCount[
par]] = Xsrtime;
1360 TrackFracAll3DDay [
par][TrackFracDayCount[
par]] = hTrackFracAll3Dtemp->GetMean(1);
1364 TrackFracAll2DtimeDay[
par][TrackFracDayCount[
par]] = Xsrtime;
1365 TrackFracAll2DDay [
par][TrackFracDayCount[
par]] = hTrackFracAll2Dtemp->GetMean(1);
1367 TrackFracCont3DtimeDay[
par][TrackFracDayCount[
par]] = Xsrtime;
1368 TrackFracCont3DDay [
par][TrackFracDayCount[
par]] = hTrackFracCont3Dtemp->GetMean(1);
1370 TrackFracDayCount[
par]++;
1373 fileD.cd(
"hitefficiencyana");
1374 TH2F *hHitsVwcelltemp = (TH2F*)fileD.FindObjectAny(
"hitsVwcell");
1375 if(hHitsVwcelltemp != 0){
1376 hHitsVwcellDay[
par]->Add(hHitsVwcelltemp,1.0);
1379 TH2F *hCellsVwcelltemp = (TH2F*)fileD.FindObjectAny(
"cellsVwcell");
1380 if(hCellsVwcelltemp != 0){
1390 for(
unsigned int p=0;
p <
Npar; ++
p){
1391 for(
int i = 0;
i < g3DRateEvo[
p]->GetNbinsX(); ++
i){
1392 double norma = hNormalization[
p]->GetBinContent(hNormalization[
p]->GetBin(
i));
1393 for(
int j =0;
j< g3DRateEvo[
p]->GetNbinsY(); ++
j){
1394 double content = 0.0;
1395 if(norma > 0.0) content = (g3DRateEvo[
p]->GetBinContent(g3DRateEvo[
p]->GetBin(
i,
j)))/(norma);
1396 g3DRateEvo[
p]->SetBinContent(g3DRateEvo[
p]->GetBin(
i,
j),content);
1408 TDatime *Ttemp =
new TDatime;
1409 int Xfin = Ttemp->Convert() -
GMToffset;
1410 TDatime *Tfinish =
new TDatime(Xfin);
1425 TPaveText *StatusText =
new TPaveText(0.1, 0.1, 0.9, 0.9,
"NDC");
1426 StatusText->SetLineColor(1);
1427 StatusText->SetFillColor(0);
1428 StatusText->SetBorderSize(1);
1430 StatusText->AddText(buff1);
1431 StatusText->AddText(buff2);
1433 TCanvas *cStatus =
new TCanvas(
"cStatus",
"FD Status",800,200);
1437 cStatus->Print(
"/nusoft/app/web/htdoc/nova/datacheck/nearline/plots/FarDetAnaStatus.png");
1443 double max = 0.0, ave = 0.0;
1444 TPaveText *LastPoint =
new TPaveText(0.3,0.88,0.93,0.93,
"NDC");
1445 LastPoint->SetLineColor(1);
1446 LastPoint->SetFillColor(0);
1447 LastPoint->SetBorderSize(1);
1470 string taxis_labels;
1471 if(period ==
"Day"){
1472 taxis_labels =
"%H:%M";
1475 taxis_labels =
"%m/%d";
1490 L1x =
new TLine(0,0,0,-96);
1491 L2x =
new TLine(0,-96,-214,-96);
1492 L3x =
new TLine(0,0,-214,0);
1493 L4x =
new TLine(-214,0,-214,-96);
1494 L1y =
new TLine(0,0,0,96);
1495 L2y =
new TLine(0,96,-214,96);
1496 L3y =
new TLine(0,0,-214,0);
1497 L4y =
new TLine(-214,0,-214,96);
1500 L1x =
new TLine(0,0,0,-64);
1501 L2x =
new TLine(0,-64,-63,-64);
1502 L3x =
new TLine(0,0,-63,0);
1503 L4x =
new TLine(-63,0,-63,-64);
1504 L1y =
new TLine(0,0,0,64);
1505 L2y =
new TLine(0,64,-63,64);
1506 L3y =
new TLine(0,0,-63,0);
1507 L4y =
new TLine(-63,0,-63,64);
1510 L1x =
new TLine(0,0,0,-384);
1511 L2x =
new TLine(0,-384,-896,-384);
1512 L3x =
new TLine(0,0,-896,0);
1513 L4x =
new TLine(-896,0,-896,-384);
1514 L1y =
new TLine(0,0,0,384);
1515 L2y =
new TLine(0,384,-896,384);
1516 L3y =
new TLine(0,0,-896,0);
1517 L4y =
new TLine(-896,0,-896,384);
1519 L1x->SetLineWidth(2);
1520 L2x->SetLineWidth(2);
1521 L3x->SetLineWidth(2);
1522 L4x->SetLineWidth(2);
1523 L1y->SetLineWidth(2);
1524 L2y->SetLineWidth(2);
1525 L3y->SetLineWidth(2);
1526 L4y->SetLineWidth(2);
1529 for(
unsigned int p = 0;
p <
Npar; ++
p) {
1533 TPaveText *
UpdateText =
new TPaveText(0.1, 0.0, 0.5, 0.05,
"NDC");
1534 UpdateText->SetLineColor(0);
1535 UpdateText->SetFillColor(0);
1536 UpdateText->SetBorderSize(1);
1537 UpdateText->SetMargin(0.0);
1538 UpdateText->SetTextAlign(11);
1541 sprintf(buff3,
"Last updated on: %s (central time)", Tfinish->AsString());
1542 UpdateText->AddText(buff3);
1548 UpdateText->AddText(buff4);
1557 for(
int s = 0;
s < count[
p]; ++
s) {
1558 ave += (double)minDCM[
p][
s];
1559 if(minDCM[
p][
s] > maxtime) {
1560 maxtime = xtime[
p][
s];
1564 if(count[
p] > 0) ave = ave/(double)count[
p];
1565 sprintf(lptext,
"Last Point = %.f / Average = %f",max,ave);
1567 LastPoint->AddText(lptext);
1571 TCanvas *cMin3D =
new TCanvas(
"cMin3D",
"Minimum of the Rate of Hits on 3D Tracks",1000,700);
1575 TGraph *gmin =
new TGraph(count[
p],xtime[p],minDCM[p]);
1576 sprintf(title,
"%s Minimum of the Rate of Hits on 3D Tracks vs Time (DCM Sync) %s - partition %2.2d",trigname.c_str(),time.c_str(),
p);
1577 gmin->SetTitle(title);
1578 gmin->GetXaxis()->SetTimeDisplay(1);
1579 gmin->GetXaxis()->SetLabelSize(0.03);
1580 gmin->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
1581 gmin->GetXaxis()->SetLimits(time_ago,XNow);
1582 gmin->SetMarkerStyle(7);
1584 gmin->GetYaxis()->SetTitle(
"MinHit3D [Hz]");
1585 gmin->GetYaxis()->SetTitleOffset(1.45);
1587 gmin->GetXaxis()->SetTitle(
"(central time)");
1588 gmin->GetXaxis()->SetLabelOffset(0.015);
1589 gmin->GetXaxis()->SetTitleOffset(1.25);
1590 gmin->SetMarkerColor(4);
1596 sprintf(filename,
"%s/%s-%s-P%.1uMin_rate_3DTrks_%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1597 cMin3D->Print(filename);
1604 TCanvas *cRate3Devo =
new TCanvas(
"cRate3Devo",
"Rate of Hits from 3D Tracks per DCM vs Time",1100,700);
1606 cRate3Devo->SetLogz();
1610 g3DRateEvo[
p]->GetXaxis()->SetTimeDisplay(1);
1611 g3DRateEvo[
p]->GetXaxis()->SetLabelSize(0.03);
1612 g3DRateEvo[
p]->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
1613 g3DRateEvo[
p]->GetXaxis()->SetLimits(time_ago,XNow);
1614 g3DRateEvo[
p]->GetXaxis()->SetLabelOffset(0.015);
1616 g3DRateEvo[
p]->GetXaxis()->SetTitleOffset(1.25);
1617 g3DRateEvo[
p]->GetYaxis()->SetTitleOffset(1.05);
1619 g3DRateEvo[
p]->GetYaxis()->SetTickLength(0);
1620 g3DRateEvo[
p]->GetYaxis()->SetLabelColor(0);
1622 g3DRateEvo[
p]->SetStats(kFALSE);
1624 g3DRateEvo[
p]->Draw(
"colz");
1628 for(
int i=1;
i<14; ++
i){
1630 l =
new TLine(time_ago,
i*12.,XNow,
i*12.);
1631 l->SetLineColor(kBlack);
1633 l->SetBit(kCannotPick);
1637 for (
int i=0;
i<14; ++
i) {
1638 sprintf(buff,
"DB%.2d",
i+1);
1641 t =
new TText(time_ago-10000.,12*(
i+0.5),buff);
1642 t->SetTextAlign(32);
1643 t->SetTextSize(0.03);
1644 t->SetBit(kCannotPick);
1649 sprintf(filename,
"%s/%s-%s-P%.1u3DHitTrackRateEvolution%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1650 cRate3Devo->Print(filename);
1655 TCanvas *cTimeDiffday =
new TCanvas(
"cTimeDiffday",
"Time Difference Day",1200,800);
1657 gStyle->SetOptStat(111111);
1658 hTimeDiffNanoSecDay[
p]->SetLineWidth(2);
1659 hTimeDiffNanoSecDay[
p]->Draw();
1660 cTimeDiffday->Update();
1661 double lmax=gPad->GetUymax();
1662 TLine* lTimeDiff=
new TLine(0.5,0,0.5,lmax);
1663 lTimeDiff->SetLineColor(
kRed);
1664 lTimeDiff->SetLineWidth(3);
1665 lTimeDiff->SetLineStyle(9);
1667 hTimeDiffNanoSecDay[
p]->Draw(
"same");
1669 sprintf(filename,
"%s/%s-%s-P%.1uTimeDiffDBBeamSpill%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1670 cTimeDiffday->Print(filename);
1671 delete cTimeDiffday;
1674 TCanvas *cPOTSumday =
new TCanvas(
"cPOTSumday",
"POT Sum Day",1200,800);
1676 gStyle->SetOptStat(111111);
1677 hPOTSumDay[
p]->SetAxisRange(0.0,0.25,
"X");
1678 hPOTSumDay[
p]->SetLineWidth(2);
1679 hPOTSumDay[
p]->GetYaxis()->SetTitle(
"(POT)");
1680 hPOTSumDay[
p]->GetXaxis()->SetTitle(
"");
1681 hPOTSumDay[
p]->Draw();
1683 sprintf(filename,
"%s/%s-%s-P%.1uPOTSum%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1684 cPOTSumday->Print(filename);
1688 TCanvas *cspillPOTday =
new TCanvas(
"cspillPOTday",
"spill POT Day",1200,800);
1690 gStyle->SetOptStat(111111);
1691 hspillPOTDay[
p]->SetLineWidth(2);
1692 hspillPOTDay[
p]->Draw();
1694 cspillPOTday->Update();
1695 lmax=gPad->GetUymax();
1696 TLine* lspillPOT=
new TLine(2e12,0,2e12,lmax);
1697 lspillPOT->SetLineColor(
kRed);
1698 lspillPOT->SetLineWidth(3);
1699 lspillPOT->SetLineStyle(9);
1701 hspillPOTDay[
p]->Draw(
"same");
1702 sprintf(filename,
"%s/%s-%s-P%.1uspillPOT%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1703 cspillPOTday->Print(filename);
1704 delete cspillPOTday;
1707 TCanvas *cHornCurrentday =
new TCanvas(
"cHornCurrentday",
"Time Difference Day",1200,800);
1708 cHornCurrentday->cd();
1709 gStyle->SetOptStat(111111);
1710 hHornCurrentDay[
p]->SetAxisRange(-202.5,-197.5,
"X");
1711 hHornCurrentDay[
p]->SetLineWidth(2);
1712 hHornCurrentDay[
p]->Draw();
1713 cHornCurrentday->Update();
1714 lmax=gPad->GetUymax();
1715 TLine* lHornCurrent=
new TLine(-202,0,-202,lmax);
1716 TLine* l2HornCurrent=
new TLine(-198,0,-198,lmax);
1717 lHornCurrent->SetLineColor(
kRed);
1718 lHornCurrent->SetLineWidth(3);
1719 lHornCurrent->SetLineStyle(9);
1720 lHornCurrent->Draw();
1721 l2HornCurrent->SetLineColor(
kRed);
1722 l2HornCurrent->SetLineWidth(3);
1723 l2HornCurrent->SetLineStyle(9);
1724 lHornCurrent->Draw();
1725 l2HornCurrent->Draw();
1726 hHornCurrentDay[
p]->Draw(
"same");
1728 sprintf(filename,
"%s/%s-%s-P%.1uHornCurrent%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1729 cHornCurrentday->Print(filename);
1730 delete cHornCurrentday;
1731 cHornCurrentday = 0;
1733 TCanvas *cXPositionday =
new TCanvas(
"cXPositionday",
"X Position Day",1200,800);
1734 cXPositionday->cd();
1735 gStyle->SetOptStat(111111);
1736 hXPositionDay[
p]->SetLineWidth(2);
1737 hXPositionDay[
p]->Draw();
1739 cXPositionday->Update();
1740 lmax=gPad->GetUymax();
1741 TLine* lXPosition=
new TLine(2,0,2,lmax);
1742 TLine* l2XPosition=
new TLine(-2,0,-2,lmax);
1743 lXPosition->SetLineColor(
kRed);
1744 lXPosition->SetLineWidth(3);
1745 lXPosition->SetLineStyle(9);
1747 l2XPosition->SetLineColor(
kRed);
1748 l2XPosition->SetLineWidth(3);
1749 l2XPosition->SetLineStyle(9);
1750 l2XPosition->Draw();
1751 hXPositionDay[
p]->Draw(
"same");
1752 sprintf(filename,
"%s/%s-%s-P%.1uXPosition%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1753 cXPositionday->Print(filename);
1754 delete cXPositionday;
1757 TCanvas *cYPositionday =
new TCanvas(
"cYPositionday",
"Y Position Day",1200,800);
1758 cYPositionday->cd();
1759 gStyle->SetOptStat(111111);
1760 hYPositionDay[
p]->SetLineWidth(2);
1761 hYPositionDay[
p]->Draw();
1763 cYPositionday->Update();
1764 lmax=gPad->GetUymax();
1768 TLine* lYPosition=
new TLine(0,0,0,lmax);
1769 TLine* l2YPosition=
new TLine(-4.5,0,-4.5,lmax);
1770 lYPosition->SetLineColor(
kRed);
1771 lYPosition->SetLineWidth(3);
1772 lYPosition->SetLineStyle(9);
1774 l2YPosition->SetLineColor(
kRed);
1775 l2YPosition->SetLineWidth(3);
1776 l2YPosition->SetLineStyle(9);
1777 l2YPosition->Draw();
1778 hYPositionDay[
p]->Draw(
"same");
1779 sprintf(filename,
"%s/%s-%s-P%.1uYPosition%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1780 cYPositionday->Print(filename);
1781 delete cYPositionday;
1784 TCanvas *cXWidthday =
new TCanvas(
"cXWidthday",
"X Width Day",1200,800);
1786 gStyle->SetOptStat(111111);
1787 hXWidthDay[
p]->SetLineWidth(2);
1788 hXWidthDay[
p]->Draw();
1790 cXWidthday->Update();
1791 lmax=gPad->GetUymax();
1792 TLine* lXWidth=
new TLine(0.57,0,0.57,lmax);
1793 TLine* l2XWidth=
new TLine(1.88,0,1.88,lmax);
1794 lXWidth->SetLineColor(
kRed);
1795 lXWidth->SetLineWidth(3);
1796 lXWidth->SetLineStyle(9);
1798 l2XWidth->SetLineColor(
kRed);
1799 l2XWidth->SetLineWidth(3);
1800 l2XWidth->SetLineStyle(9);
1802 hXWidthDay[
p]->Draw(
"same");
1803 sprintf(filename,
"%s/%s-%s-P%.1uXWidth%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1804 cXWidthday->Print(filename);
1808 TCanvas *cYWidthday =
new TCanvas(
"cYWidthday",
"Y Width Day",1200,800);
1810 gStyle->SetOptStat(111111);
1811 hYWidthDay[
p]->SetLineWidth(2);
1812 hYWidthDay[
p]->Draw();
1814 cYWidthday->Update();
1815 lmax=gPad->GetUymax();
1816 TLine* lYWidth=
new TLine(0.57,0,0.57,lmax);
1817 TLine* l2YWidth=
new TLine(1.58,0,1.58,lmax);
1818 lYWidth->SetLineColor(
kRed);
1819 lYWidth->SetLineWidth(3);
1820 lYWidth->SetLineStyle(9);
1822 l2YWidth->SetLineColor(
kRed);
1823 l2YWidth->SetLineWidth(3);
1824 l2YWidth->SetLineStyle(9);
1826 hYWidthDay[
p]->Draw(
"same");
1827 sprintf(filename,
"%s/%s-%s-P%.1uYWidth%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1828 cYWidthday->Print(filename);
1832 TCanvas *cGoodBeamday =
new TCanvas(
"cGoodBeamday",
"Y Good Beam Day",1200,800);
1834 gStyle->SetOptStat(111111);
1835 hGoodBeamDay[
p]->SetLineWidth(2);
1836 hGoodBeamDay[
p]->Draw();
1837 TAxis *GoodBeamaxis = hGoodBeamDay[
p]->GetXaxis();
1838 GoodBeamaxis->SetBinLabel(1,
"bad beam");
1839 GoodBeamaxis->SetBinLabel(2,
"good beam");
1841 sprintf(filename,
"%s/%s-%s-P%.1uGoodBeam%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1842 cGoodBeamday->Print(filename);
1843 delete cGoodBeamday;
1846 TCanvas *cBadSpillsday =
new TCanvas(
"cBadSpillsday",
"Y Bad Spills Day",1200,800);
1847 cBadSpillsday->cd();
1848 cBadSpillsday->SetLogy();
1849 hBadSpillsDay[
p]->SetLineWidth(2);
1850 gStyle->SetOptStat(0);
1851 hBadSpillsDay[
p]->Draw();
1853 sprintf(filename,
"%s/%s-%s-P%.1uBadSpills%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1854 cBadSpillsday->Print(filename);
1855 delete cBadSpillsday;
1859 TCanvas *cnSliceday =
new TCanvas(
"cnSliceday",
"# Slice Day",1200,800);
1861 cnSliceday->SetLogy();
1862 gStyle->SetOptStat(111111);
1863 if(
det_type==
"NearDet") hNSliceDay[
p]->SetAxisRange(0.0,50.0,
"X");
1864 else if(
det_type==
"TestBeam") hNSliceDay[
p]->SetAxisRange(0.0,200.0,
"X");
1865 else hNSliceDay[
p]->SetAxisRange(0.0,200.0,
"X");
1866 hNSliceDay[
p]->SetLineWidth(2);
1867 hNSliceDay[
p]->SetLineColor(
kRed);
1868 hNSliceDay[
p]->Draw();
1871 sprintf(filename,
"%s/%s-%s-P%.1uNSlice%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1872 cnSliceday->Print(filename);
1876 TCanvas *cnSliceHitday =
new TCanvas(
"cnSliceHitday",
"# Non-Noise Slice Hits Day",1200,800);
1877 cnSliceHitday->cd();
1878 cnSliceHitday->SetLogy();
1879 gStyle->SetOptStat(111111);
1882 hNNonNoiseSliceHitDay[
p]->SetAxisRange(0.0,3000.0,
"X");
1883 hNNonNoiseSliceHitDay[
p]->SetLineWidth(2);
1884 hNNonNoiseSliceHitDay[
p]->SetLineColor(
kRed);
1885 hNNonNoiseSliceHitDay[
p]->Draw();
1887 sprintf(filename,
"%s/%s-%s-P%.1uNSliceHit%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1888 cnSliceHitday->Print(filename);
1889 delete cnSliceHitday;
1892 TCanvas *cNNoiseSliceHitday =
new TCanvas(
"cNNoiseSliceHitday",
"# Noise Slice Hits Day",1200,800);
1893 cNNoiseSliceHitday->cd();
1894 cNNoiseSliceHitday->SetLogy();
1895 gStyle->SetOptStat(111111);
1896 if(
det_type==
"NearDet") hNNoiseSliceHitDay[
p]->SetAxisRange(0.0,2000.0,
"X");
1897 else if(
det_type==
"TestBeam") hNNoiseSliceHitDay[
p]->SetAxisRange(0.0,1500.0,
"X");
1899 hNNoiseSliceHitDay[
p]->SetLineWidth(2);
1900 hNNoiseSliceHitDay[
p]->SetLineColor(
kRed);
1901 hNNoiseSliceHitDay[
p]->Draw();
1903 sprintf(filename,
"%s/%s-%s-P%.1uNNoiseSliceHit%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1904 cNNoiseSliceHitday->Print(filename);
1905 delete cNNoiseSliceHitday;
1906 cNNoiseSliceHitday = 0;
1908 TCanvas *cPEday =
new TCanvas(
"cPEday",
"PE distributions by Day",1200,800);
1910 gStyle->SetOptStat(0);
1913 hNoiseSlicePEDay[
p]->GetXaxis()->SetRange(2,5000);
1914 sprintf(filename,
"%s PE Distribution (%s) - partition %.1u",trigname.c_str(),time.c_str(),
p);
1915 hNoiseSlicePEDay[
p]->SetTitle(filename);
1916 hNonNoiseSlicePEDay[
p]->SetTitle(filename);
1917 hTrackPEDay[
p]->SetTitle(filename);
1918 hNoiseSlicePEDay[
p]->SetLineWidth(2);
1919 hNoiseSlicePEDay[
p]->SetLineColor(kBlack);
1920 hNoiseSlicePEDay[
p]->Draw();
1921 hNonNoiseSlicePEDay[
p]->SetLineWidth(2);
1922 hNonNoiseSlicePEDay[
p]->SetLineColor(
kRed);
1923 hNonNoiseSlicePEDay[
p]->Draw(
"sames");
1924 hTrackPEDay[
p]->SetLineWidth(2);
1925 hTrackPEDay[
p]->SetLineColor(
kBlue);
1926 hTrackPEDay[
p]->Draw(
"sames");
1928 TLegend *
legend =
new TLegend(0.6,0.6,0.85,0.85);
1929 legend->AddEntry(hNoiseSlicePEDay[
p],
"Hits in Noise Slice",
"l");
1930 legend->AddEntry(hNonNoiseSlicePEDay[p],
"Hits in Non-Noise Slices",
"l");
1931 legend->AddEntry(hTrackPEDay[p],
"Hits on Tracks",
"l");
1932 legend->SetFillStyle(4000);
1933 legend->SetLineColor(0);
1934 legend->SetFillColor(0);
1936 sprintf(filename,
"%s/%s-%s-P%.1uPE%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1937 cPEday->Print(filename);
1943 TCanvas *cTsdday =
new TCanvas(
"cTsdday",
"Slice Time Standard Dev.",1200,800);
1946 gStyle->SetOptStat(111111);
1947 if(
det_type==
"NearDet") hTsdDay[
p]->SetAxisRange(0.0,600.0,
"X");
1948 else if(
det_type==
"TestBeam") hTsdDay[
p]->SetAxisRange(0.0,500.0,
"X");
1949 else hTsdDay[
p]->SetAxisRange(0.0,1000.0,
"X");
1950 hTsdDay[
p]->SetLineWidth(2);
1951 hTsdDay[
p]->SetLineColor(
kRed);
1954 sprintf(filename,
"%s/%s-%s-P%.1uTsd%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1955 cTsdday->Print(filename);
1959 TCanvas *cnTrackday =
new TCanvas(
"cnTrackday",
" # Cosmic Tracks",1200,800);
1961 cnTrackday->SetLogy();
1962 gStyle->SetOptStat(111111);
1963 hnTrackDay[
p]->SetAxisRange(0.0,300.0,
"X");
1964 hnTrackDay[
p]->SetLineWidth(2);
1965 hnTrackDay[
p]->SetLineColor(
kRed);
1966 hnTrackDay[
p]->Draw();
1968 sprintf(filename,
"%s/%s-%s-P%.1unTrackAll3D%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1969 cnTrackday->Print(filename);
1973 TCanvas *cTrackLenday =
new TCanvas(
"cTrackLenday",
"Cosmic Track Length",1200,800);
1975 cTrackLenday->SetLogy();
1976 gStyle->SetOptStat(111111);
1977 hTrackLenDay[
p]->SetAxisRange(0.0,6000.0,
"X");
1978 hTrackLenDay[
p]->SetLineWidth(2);
1979 hTrackLenDay[
p]->SetLineColor(
kRed);
1980 hTrackLenDay[
p]->Draw();
1982 sprintf(filename,
"%s/%s-%s-P%.1uTrackLenAll3D%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1983 cTrackLenday->Print(filename);
1984 delete cTrackLenday;
1987 TCanvas *cCosNumiday =
new TCanvas(
"cCosNumiday",
"Cos Theta(numi)",1200,800);
1989 gStyle->SetOptStat(111111);
1990 hCosNumiDay[
p]->SetAxisRange(-1.0,1.0,
"X");
1991 hCosNumiDay[
p]->SetLineWidth(2);
1992 hCosNumiDay[
p]->SetLineColor(
kRed);
1993 hCosNumiDay[
p]->Draw();
1995 sprintf(filename,
"%s/%s-%s-P%.1uCosNumiAll3D%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
1996 cCosNumiday->Print(filename);
2000 TCanvas *cPCaveday =
new TCanvas(
"cPCaveday",
"PCave day",1200,1200);
2001 cPCaveday->Divide(1,2);
2003 gStyle->SetOptStat(0);
2004 gStyle->SetPalette(1);
2007 hPCXaveDay[
p]->SetAxisRange(-225.0,20.0,
"X");
2008 hPCXaveDay[
p]->SetAxisRange(-110.0,10.0,
"Y");
2011 hPCXaveDay[
p]->SetAxisRange(-68.0,5.0,
"X");
2012 hPCXaveDay[
p]->SetAxisRange(-70.0,5.0,
"Y");
2015 hPCXaveDay[
p]->SetAxisRange(-920.0,20.0,
"X");
2016 hPCXaveDay[
p]->SetAxisRange(-400.0,10.0,
"Y");
2018 hPCXaveDay[
p]->Draw(
"colz");
2024 gStyle->SetOptStat(0);
2027 hPCYaveDay[
p]->SetAxisRange(-225.0,20.0,
"X");
2028 hPCYaveDay[
p]->SetAxisRange(-10.0,110.0,
"Y");
2031 hPCYaveDay[
p]->SetAxisRange(-68.0,5.0,
"X");
2032 hPCYaveDay[
p]->SetAxisRange(-5.0,70.0,
"Y");
2035 hPCYaveDay[
p]->SetAxisRange(-920.0,20.0,
"X");
2036 hPCYaveDay[
p]->SetAxisRange(-10.0,400.0,
"Y");
2038 hPCYaveDay[
p]->Draw(
"colz");
2044 sprintf(filename,
"%s/%s-%s-P%.1uPCave%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2045 cPCaveday->Print(filename);
2049 TCanvas *cnTrackAll3Dday =
new TCanvas(
"cnTrackday",
" # 3D Cosmic Tracks",1200,800);
2050 cnTrackAll3Dday->cd();
2051 cnTrackAll3Dday->SetLogy();
2052 gStyle->SetOptStat(111111);
2053 if(
det_type==
"NearDet") hnTrackAll3DDay[
p]->SetAxisRange(0.0,50.0,
"X");
2054 else if(
det_type==
"TestBeam" && trigger==
"Spill") hnTrackAll3DDay[
p]->SetAxisRange(0.0,300.0,
"X");
2055 else hnTrackAll3DDay[
p]->SetAxisRange(0.0,300.0,
"X");
2056 hnTrackAll3DDay[
p]->SetLineWidth(2);
2057 hnTrackAll3DDay[
p]->SetLineColor(
kRed);
2058 hnTrackAll3DDay[
p]->Draw();
2060 sprintf(filename,
"%s/%s-%s-P%.1unTrackAll3D%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2061 cnTrackAll3Dday->Print(filename);
2062 delete cnTrackAll3Dday;
2063 cnTrackAll3Dday = 0;
2065 TCanvas *cTrackStartAll3Dday =
new TCanvas(
"cTrackStartAll3Dday",
"All 3D Track Start day",1200,1200);
2066 cTrackStartAll3Dday->Divide(1,2);
2067 cTrackStartAll3Dday->cd(1);
2068 gStyle->SetOptStat(0);
2071 hTrackStartXZAll3DDay[
p]->SetAxisRange(-1750.0,0.0,
"X");
2072 hTrackStartXZAll3DDay[
p]->SetAxisRange(-250.0,250.0,
"Y");
2075 hTrackStartXZAll3DDay[
p]->SetAxisRange(-440.0,0.0,
"X");
2076 hTrackStartXZAll3DDay[
p]->SetAxisRange(-140.0,140.0,
"Y");
2078 hTrackStartXZAll3DDay[
p]->Draw(
"colz");
2079 cTrackStartAll3Dday->cd(2);
2080 gStyle->SetOptStat(0);
2083 hTrackStartYZAll3DDay[
p]->SetAxisRange(-1750.0,0.0,
"X");
2084 hTrackStartYZAll3DDay[
p]->SetAxisRange(-250.0,250.0,
"Y");
2087 hTrackStartYZAll3DDay[
p]->SetAxisRange(-440.0,0.0,
"X");
2088 hTrackStartYZAll3DDay[
p]->SetAxisRange(-140.0,140.0,
"Y");
2090 hTrackStartYZAll3DDay[
p]->Draw(
"colz");
2092 sprintf(filename,
"%s/%s-%s-P%.1uTrackStartAll3D%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2093 cTrackStartAll3Dday->Print(filename);
2094 delete cTrackStartAll3Dday;
2095 cTrackStartAll3Dday = 0;
2097 TCanvas *cTrackStopAll3Dday =
new TCanvas(
"cTrackStopAll3Dday",
"All 3D Track Stop day",1200,1200);
2098 cTrackStopAll3Dday->Divide(1,2);
2099 cTrackStopAll3Dday->cd(1);
2100 gStyle->SetOptStat(0);
2103 hTrackStopXZAll3DDay[
p]->SetAxisRange(-1750.0,0.0,
"X");
2104 hTrackStopXZAll3DDay[
p]->SetAxisRange(-250.0,250.0,
"Y");
2107 hTrackStopXZAll3DDay[
p]->SetAxisRange(-440.0,0.0,
"X");
2108 hTrackStopXZAll3DDay[
p]->SetAxisRange(-140.0,140.0,
"Y");
2110 hTrackStopXZAll3DDay[
p]->Draw(
"colz");
2111 cTrackStopAll3Dday->cd(2);
2112 gStyle->SetOptStat(0);
2115 hTrackStopYZAll3DDay[
p]->SetAxisRange(-1750.0,0.0,
"X");
2116 hTrackStopYZAll3DDay[
p]->SetAxisRange(-250.0,250.0,
"Y");
2119 hTrackStopYZAll3DDay[
p]->SetAxisRange(-440.0,0.0,
"X");
2120 hTrackStopYZAll3DDay[
p]->SetAxisRange(-140.0,140.0,
"Y");
2122 hTrackStopYZAll3DDay[
p]->Draw(
"colz");
2124 sprintf(filename,
"%s/%s-%s-P%.1uTrackStopAll3D%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2125 cTrackStopAll3Dday->Print(filename);
2126 delete cTrackStopAll3Dday;
2127 cTrackStopAll3Dday = 0;
2129 TCanvas *cTrackLenAll3Dday =
new TCanvas(
"cTrackLenAll3Dday",
" 3D Cosmic Track Length",1200,800);
2130 cTrackLenAll3Dday->cd();
2131 cTrackLenAll3Dday->SetLogy();
2132 gStyle->SetOptStat(111111);
2133 if(
det_type==
"NearDet") hTrackLenAll3DDay[
p]->SetAxisRange(0.0,2000.0,
"X");
2134 else if(
det_type==
"TestBeam") hTrackLenAll3DDay[
p]->SetAxisRange(0.0,450.0,
"X");
2135 else hTrackLenAll3DDay[
p]->SetAxisRange(0.0,6000.0,
"X");
2137 hTrackLenAll3DDay[
p]->SetLineWidth(2);
2138 hTrackLenAll3DDay[
p]->SetLineColor(
kRed);
2139 hTrackLenAll3DDay[
p]->Draw();
2141 sprintf(filename,
"%s/%s-%s-P%.1uTrackLenAll3D%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2142 cTrackLenAll3Dday->Print(filename);
2143 delete cTrackLenAll3Dday;
2144 cTrackLenAll3Dday = 0;
2146 TCanvas *cnTrackCont3Dday =
new TCanvas(
"cnTrackCont3Dday",
" # Contained 3D Cosmic Tracks",1200,800);
2147 cnTrackCont3Dday->cd();
2148 cnTrackCont3Dday->SetLogy();
2149 gStyle->SetOptStat(111111);
2150 hnTrackCont3DDay[
p]->SetAxisRange(0.0,300.0,
"X");
2151 hnTrackCont3DDay[
p]->SetLineWidth(2);
2152 hnTrackCont3DDay[
p]->SetLineColor(
kRed);
2153 hnTrackCont3DDay[
p]->Draw();
2155 sprintf(filename,
"%s/%s-%s-P%.1unTrackCont3D%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2156 cnTrackCont3Dday->Print(filename);
2157 delete cnTrackCont3Dday;
2158 cnTrackCont3Dday = 0;
2160 TCanvas *cTrackStartCont3Dday =
new TCanvas(
"cTrackStartCont3Dday",
"Cont 3D Track Start day",1200,1200);
2161 cTrackStartCont3Dday->Divide(1,2);
2162 cTrackStartCont3Dday->cd(1);
2163 gStyle->SetOptStat(0);
2166 hTrackStartXZCont3DDay[
p]->SetAxisRange(-1750.0,0.0,
"X");
2167 hTrackStartXZCont3DDay[
p]->SetAxisRange(-250.0,250.0,
"Y");
2170 hTrackStartXZCont3DDay[
p]->SetAxisRange(-440.0,0.0,
"X");
2171 hTrackStartXZCont3DDay[
p]->SetAxisRange(-140.0,140.0,
"Y");
2173 hTrackStartXZCont3DDay[
p]->Draw(
"colz");
2174 cTrackStartCont3Dday->cd(2);
2175 gStyle->SetOptStat(0);
2178 hTrackStartYZCont3DDay[
p]->SetAxisRange(-1750.0,0.0,
"X");
2179 hTrackStartYZCont3DDay[
p]->SetAxisRange(-250.0,250.0,
"Y");
2182 hTrackStartYZCont3DDay[
p]->SetAxisRange(-440.0,0.0,
"X");
2183 hTrackStartYZCont3DDay[
p]->SetAxisRange(-140.0,140.0,
"Y");
2185 hTrackStartYZCont3DDay[
p]->Draw(
"colz");
2187 sprintf(filename,
"%s/%s-%s-P%.1uTrackStartCont3D%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2188 cTrackStartCont3Dday->Print(filename);
2189 delete cTrackStartCont3Dday;
2190 cTrackStartCont3Dday = 0;
2192 TCanvas *cTrackStopCont3Dday =
new TCanvas(
"cTrackStopCont3Dday",
"Cont 3D Track Stop day",1200,1200);
2193 cTrackStopCont3Dday->Divide(1,2);
2194 cTrackStopCont3Dday->cd(1);
2195 gStyle->SetOptStat(0);
2198 hTrackStopXZCont3DDay[
p]->SetAxisRange(-1750.0,0.0,
"X");
2199 hTrackStopXZCont3DDay[
p]->SetAxisRange(-250.0,250.0,
"Y");
2202 hTrackStopXZCont3DDay[
p]->SetAxisRange(-440.0,0.0,
"X");
2203 hTrackStopXZCont3DDay[
p]->SetAxisRange(-140.0,140.0,
"Y");
2205 hTrackStopXZCont3DDay[
p]->Draw(
"colz");
2206 cTrackStopCont3Dday->cd(2);
2207 gStyle->SetOptStat(0);
2210 hTrackStopYZCont3DDay[
p]->SetAxisRange(-1750.0,0.0,
"X");
2211 hTrackStopYZCont3DDay[
p]->SetAxisRange(-250.0,250.0,
"Y");
2214 hTrackStopYZCont3DDay[
p]->SetAxisRange(-440.0,0.0,
"X");
2215 hTrackStopYZCont3DDay[
p]->SetAxisRange(-140.0,140.0,
"Y");
2217 hTrackStopYZCont3DDay[
p]->Draw(
"colz");
2219 sprintf(filename,
"%s/%s-%s-P%.1uTrackStopCont3D%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2220 cTrackStopCont3Dday->Print(filename);
2221 delete cTrackStopCont3Dday;
2222 cTrackStopCont3Dday = 0;
2224 TCanvas *cTrackLenCont3Dday =
new TCanvas(
"cTrackLenCont3Dday",
" 3D Cosmic Track Length",1200,800);
2225 cTrackLenCont3Dday->cd();
2226 cTrackLenCont3Dday->SetLogy();
2227 gStyle->SetOptStat(111111);
2228 hTrackLenCont3DDay[
p]->SetAxisRange(0.0,6000.0,
"X");
2230 hTrackLenCont3DDay[
p]->SetLineWidth(2);
2231 hTrackLenCont3DDay[
p]->SetLineColor(
kRed);
2232 hTrackLenCont3DDay[
p]->Draw();
2234 sprintf(filename,
"%s/%s-%s-P%.1uTrackLenCont3D%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2235 cTrackLenCont3Dday->Print(filename);
2236 delete cTrackLenCont3Dday;
2237 cTrackLenCont3Dday = 0;
2240 TCanvas *cDeltaSliceTrackday =
new TCanvas(
"cDeltaSliceTrackday",
"Delta Slice/Track",1200,800);
2241 cDeltaSliceTrackday->cd();
2242 cDeltaSliceTrackday->SetLogy();
2243 gStyle->SetOptStat(111111);
2244 hDeltaSliceTrackDay[
p]->SetAxisRange(-15.0,15.0,
"X");
2245 hDeltaSliceTrackDay[
p]->SetLineWidth(2);
2246 hDeltaSliceTrackDay[
p]->SetLineColor(
kRed);
2247 hDeltaSliceTrackDay[
p]->Draw();
2249 sprintf(filename,
"%s/%s-%s-P%.1uDeltaSliceTrack%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2250 cDeltaSliceTrackday->Print(filename);
2251 delete cDeltaSliceTrackday;
2252 cDeltaSliceTrackday = 0;
2254 TCanvas *cSliceTrackRatioday =
new TCanvas(
"cSliceTrackRatioday",
"Slice/Track Ratio",1200,800);
2255 cSliceTrackRatioday->cd();
2256 cSliceTrackRatioday->SetLogy();
2257 gStyle->SetOptStat(111111);
2258 hSliceTrackRatioDay[
p]->SetAxisRange(0.0,1.0,
"X");
2259 hSliceTrackRatioDay[
p]->SetLineWidth(2);
2260 hSliceTrackRatioDay[
p]->SetLineColor(
kRed);
2261 hSliceTrackRatioDay[
p]->Draw();
2263 sprintf(filename,
"%s/%s-%s-P%.1uSliceTrackRatio%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2264 cSliceTrackRatioday->Print(filename);
2265 delete cSliceTrackRatioday;
2266 cSliceTrackRatioday = 0;
2268 TCanvas *cSliceTrackNHitRatioday =
new TCanvas(
"cSliceTrackNHitRatioday",
"Slice/Track NHit Ratio",1200,800);
2269 cSliceTrackNHitRatioday->cd();
2270 cSliceTrackNHitRatioday->SetLogy();
2271 gStyle->SetOptStat(111111);
2272 hSliceTrackNHitRatioDay[
p]->SetLineWidth(2);
2273 hSliceTrackNHitRatioDay[
p]->SetLineColor(
kRed);
2274 hSliceTrackNHitRatioDay[
p]->Draw();
2276 sprintf(filename,
"%s/%s-%s-P%.1uSliceTrackNHitRatio%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2277 cSliceTrackNHitRatioday->Print(filename);
2278 delete cSliceTrackNHitRatioday;
2279 cSliceTrackNHitRatioday = 0;
2286 for(
int i = 0;
i < NTimeDiffDayCount[
p]; ++
i) {
2287 ave += (double)NTimeDiffNanoSecDay[p][
i];
2288 if(NTimeDiffNanoSectimeDay[p][
i] > maxtime) {
2289 maxtime = NTimeDiffNanoSectimeDay[
p][
i];
2290 max = NTimeDiffNanoSecDay[
p][
i];
2293 if(NTimeDiffDayCount[p] > 0) ave = ave/(double)NTimeDiffDayCount[p];
2294 sprintf(lptext,
"Last Point = %f / Average = %f",max,ave);
2296 LastPoint->AddText(lptext);
2297 TCanvas *ctnTimeDiffday =
new TCanvas(
"cnTimeDiffday",
"Time Difference (spill and IFDB) day",1200,800);
2298 ctnTimeDiffday->cd();
2300 TGraph *gnTimeDiffday =
new TGraph(NTimeDiffDayCount[p],NTimeDiffNanoSectimeDay[p],NTimeDiffNanoSecDay[p]);
2301 sprintf(title,
"%s Time Difference (spill and IFDB) - partition %.1u",trigname.c_str(),
p);
2302 gnTimeDiffday->SetTitle(title);
2303 gnTimeDiffday->SetMarkerColor(
kBlue);
2304 gnTimeDiffday->GetXaxis()->SetTimeDisplay(1);
2305 gnTimeDiffday->GetXaxis()->SetLabelSize(0.03);
2306 gnTimeDiffday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2307 gnTimeDiffday->GetXaxis()->SetLimits(time_ago,XNow);
2308 gnTimeDiffday->GetXaxis()->SetTitle(
"(central time)");
2309 gnTimeDiffday->GetYaxis()->SetTitle(
"(sec)");
2310 gnTimeDiffday->GetYaxis()->SetRangeUser(-0.1,0.6);
2311 gnTimeDiffday->Draw(
"A*");
2312 TLine* l2TimeDiff=
new TLine(time_ago,0.5,XNow,0.5);
2313 l2TimeDiff->SetLineColor(
kRed);
2314 l2TimeDiff->SetLineWidth(3);
2315 l2TimeDiff->SetLineStyle(9);
2319 sprintf(filename,
"%s/%s-%s-P%.1unTimeDiff%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2320 ctnTimeDiffday->Print(filename);
2321 delete ctnTimeDiffday;
2325 TCanvas *ctnTimeDiff_zoom =
new TCanvas(
"cnTimeDiff_zoom",
"Time Difference (sill and IFDB) day",1200,800);
2326 ctnTimeDiff_zoom->cd();
2328 TGraph *gnTimeDiff_zoom =
new TGraph(NTimeDiffDayCount[p],NTimeDiffNanoSectimeDay[p],NTimeDiffNanoSecDay[p]);
2329 sprintf(title,
"%s Time Difference (spill and IFDB) - partition %.1u",trigname.c_str(),
p);
2330 gnTimeDiff_zoom->SetTitle(title);
2331 gnTimeDiff_zoom->SetMarkerColor(
kBlue);
2332 gnTimeDiff_zoom->GetXaxis()->SetTimeDisplay(1);
2333 gnTimeDiff_zoom->GetXaxis()->SetLabelSize(0.03);
2334 gnTimeDiff_zoom->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2335 gnTimeDiff_zoom->GetXaxis()->SetLimits(time_ago,XNow);
2336 gnTimeDiff_zoom->GetXaxis()->SetTitle(
"(central time)");
2337 gnTimeDiff_zoom->GetYaxis()->SetTitle(
"(sec)");
2338 gnTimeDiff_zoom->GetYaxis()->SetRangeUser((gnTimeDiff_zoom->GetMean(2)-3.*gnTimeDiff_zoom->GetRMS(2)),(gnTimeDiff_zoom->GetMean(2)+3.*gnTimeDiff_zoom->GetRMS(2)));
2339 gnTimeDiff_zoom->Draw(
"A*");
2342 sprintf(filename,
"%s/%s-%s-P%.1unTimeDiffzoom%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2343 ctnTimeDiff_zoom->Print(filename);
2344 delete ctnTimeDiff_zoom;
2345 ctnTimeDiff_zoom = 0;
2350 for(
int i = 0;
i < NPOTSumDayCount[
p]; ++
i) {
2351 ave += (double)NPOTSumDay[p][
i];
2352 if(NPOTSumtimeDay[p][
i] > maxtime) {
2353 maxtime = NPOTSumtimeDay[
p][
i];
2354 max = NPOTSumDay[
p][
i];
2357 if(NPOTSumDayCount[p] > 0) ave = ave/(double)NPOTSumDayCount[p];
2358 sprintf(lptext,
"Last Point = %f / Average = %f",max,ave);
2360 LastPoint->AddText(lptext);
2361 TCanvas *ctnPOTSumday =
new TCanvas(
"cnPOTSumday",
"POT Sum day",1200,800);
2364 TGraph *gnPOTSumday =
new TGraph(NPOTSumDayCount[p],NPOTSumtimeDay[p],NPOTSumDay[p]);
2365 sprintf(title,
"%s POT per Subrun - partition %.1u",trigname.c_str(),
p);
2366 gnPOTSumday->SetTitle(title);
2367 gnPOTSumday->SetMarkerColor(
kBlue);
2368 gnPOTSumday->GetXaxis()->SetTimeDisplay(1);
2369 gnPOTSumday->GetXaxis()->SetLabelSize(0.03);
2370 gnPOTSumday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2371 gnPOTSumday->GetXaxis()->SetLimits(time_ago,XNow);
2372 gnPOTSumday->GetYaxis()->SetLabelSize(0.03);
2373 gnPOTSumday->GetYaxis()->SetTitle(
"(POT)");
2374 gnPOTSumday->GetXaxis()->SetTitle(
"(central time)");
2375 gnPOTSumday->GetYaxis()->SetRangeUser(25E15,150E15);
2376 gnPOTSumday->Draw(
"A*");
2379 sprintf(filename,
"%s/%s-%s-P%.1unPOTSumperSR%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2380 ctnPOTSumday->Print(filename);
2381 delete ctnPOTSumday;
2385 TCanvas *ctnPOTSumday_zoom =
new TCanvas(
"cnPOTSumday_zoom",
"POT Sum day",1200,800);
2386 ctnPOTSumday_zoom->cd();
2388 TGraph *gnPOTSumday_zoom =
new TGraph(NPOTSumDayCount[p],NPOTSumtimeDay[p],NPOTSumDay[p]);
2389 sprintf(title,
"%s POT per subrun - partition %.1u",trigname.c_str(),
p);
2390 gnPOTSumday_zoom->SetTitle(title);
2391 gnPOTSumday_zoom->SetMarkerColor(
kBlue);
2392 gnPOTSumday_zoom->GetXaxis()->SetTimeDisplay(1);
2393 gnPOTSumday_zoom->GetXaxis()->SetLabelSize(0.03);
2394 gnPOTSumday_zoom->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2395 gnPOTSumday_zoom->GetXaxis()->SetLimits(time_ago,XNow);
2396 gnPOTSumday_zoom->GetYaxis()->SetLabelSize(0.03);
2397 gnPOTSumday_zoom->GetYaxis()->SetTitle(
"(POT)");
2398 gnPOTSumday_zoom->GetXaxis()->SetTitle(
"(central time)");
2399 gnPOTSumday_zoom->GetYaxis()->SetRangeUser((gnPOTSumday_zoom->GetMean(2)-3.*gnPOTSumday_zoom->GetRMS(2)),(gnPOTSumday_zoom->GetMean(2)+3.*gnPOTSumday_zoom->GetRMS(2)));
2400 gnPOTSumday_zoom->Draw(
"A*");
2403 sprintf(filename,
"%s/%s-%s-P%.1unPOTSumperSRzoom%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2404 ctnPOTSumday_zoom->Print(filename);
2405 delete ctnPOTSumday_zoom;
2406 ctnPOTSumday_zoom = 0;
2411 for(
int i = 0;
i < NspillPOTDayCount[
p]; ++
i) {
2412 ave += (double)NspillPOTDay[p][
i];
2413 if(NspillPOTtimeDay[p][
i] > maxtime) {
2414 maxtime = NspillPOTtimeDay[
p][
i];
2415 max = NspillPOTDay[
p][
i];
2418 if(NspillPOTDayCount[p] > 0) ave = ave/(double)NspillPOTDayCount[p];
2419 sprintf(lptext,
"Last Point = %f / Average = %f",max,ave);
2421 LastPoint->AddText(lptext);
2422 TCanvas *ctnspillPOTday =
new TCanvas(
"cnspillPOTday",
"POT Sum day",1200,800);
2423 ctnspillPOTday->cd();
2425 TGraph *gnspillPOTday =
new TGraph(NspillPOTDayCount[p],NspillPOTtimeDay[p],NspillPOTDay[p]);
2426 sprintf(title,
"%s Spill POT per Subrun - partition %.1u",trigname.c_str(),
p);
2427 gnspillPOTday->SetTitle(title);
2428 gnspillPOTday->SetMarkerColor(
kBlue);
2429 gnspillPOTday->GetXaxis()->SetTimeDisplay(1);
2430 gnspillPOTday->GetXaxis()->SetLabelSize(0.03);
2431 gnspillPOTday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2432 gnspillPOTday->GetXaxis()->SetLimits(time_ago,XNow);
2433 gnspillPOTday->GetYaxis()->SetLabelSize(0.03);
2434 gnspillPOTday->GetXaxis()->SetTitle(
"(central time)");
2435 gnspillPOTday->GetYaxis()->SetRangeUser(0,60e12);
2436 gnspillPOTday->Draw(
"A*");
2437 TLine* l2SpillPOT=
new TLine(time_ago,2e12,XNow,2e12);
2438 l2SpillPOT->SetLineColor(
kRed);
2439 l2SpillPOT->SetLineWidth(3);
2440 l2SpillPOT->SetLineStyle(9);
2444 sprintf(filename,
"%s/%s-%s-P%.1unspillPOTperSR%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2445 ctnspillPOTday->Print(filename);
2446 delete ctnspillPOTday;
2450 TCanvas *ctnspillPOTday_zoom =
new TCanvas(
"cnspillPOTday_zoom",
"POT Sum day",1200,800);
2451 ctnspillPOTday_zoom->cd();
2453 TGraph *gnspillPOTday_zoom =
new TGraph(NspillPOTDayCount[p],NspillPOTtimeDay[p],NspillPOTDay[p]);
2454 sprintf(title,
"%s Spill POT per subrun - partition %.1u",trigname.c_str(),
p);
2455 gnspillPOTday_zoom->SetTitle(title);
2456 gnspillPOTday_zoom->SetMarkerColor(
kBlue);
2457 gnspillPOTday_zoom->GetXaxis()->SetTimeDisplay(1);
2458 gnspillPOTday_zoom->GetXaxis()->SetLabelSize(0.03);
2459 gnspillPOTday_zoom->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2460 gnspillPOTday_zoom->GetXaxis()->SetLimits(time_ago,XNow);
2461 gnspillPOTday_zoom->GetYaxis()->SetLabelSize(0.03);
2462 gnspillPOTday_zoom->GetXaxis()->SetTitle(
"(central time)");
2463 gnspillPOTday_zoom->GetYaxis()->SetRangeUser((gnspillPOTday_zoom->GetMean(2)-3.*gnspillPOTday_zoom->GetRMS(2)),(gnspillPOTday_zoom->GetMean(2)+3.*gnspillPOTday_zoom->GetRMS(2)));
2464 gnspillPOTday_zoom->Draw(
"A*");
2467 sprintf(filename,
"%s/%s-%s-P%.1unspillPOTperSRzoom%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2468 ctnspillPOTday_zoom->Print(filename);
2469 delete ctnspillPOTday_zoom;
2470 ctnspillPOTday_zoom = 0;
2476 for(
int i = 0;
i < NHornCurrentDayCount[
p]; ++
i) {
2477 ave += (double)NHornCurrentDay[p][
i];
2478 if(NHornCurrenttimeDay[p][
i] > maxtime) {
2479 maxtime = NHornCurrenttimeDay[
p][
i];
2480 max = NHornCurrentDay[
p][
i];
2483 if(NHornCurrentDayCount[p] > 0) ave = ave/(double)NHornCurrentDayCount[p];
2484 sprintf(lptext,
"Last Point = %f / Average = %f",max,ave);
2486 LastPoint->AddText(lptext);
2487 TCanvas *ctnHornCurrentday =
new TCanvas(
"cnHornCurrentday",
"Horn Current day",1200,800);
2488 ctnHornCurrentday->cd();
2490 TGraph *gnHornCurrentday =
new TGraph(NHornCurrentDayCount[p],NHornCurrenttimeDay[p],NHornCurrentDay[p]);
2491 sprintf(title,
"%s Horn Current per Subrun - partition %.1u",trigname.c_str(),
p);
2492 gnHornCurrentday->SetTitle(title);
2493 gnHornCurrentday->SetMarkerColor(
kBlue);
2494 gnHornCurrentday->GetXaxis()->SetTimeDisplay(1);
2495 gnHornCurrentday->GetXaxis()->SetLabelSize(0.03);
2496 gnHornCurrentday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2497 gnHornCurrentday->GetXaxis()->SetLimits(time_ago,XNow);
2498 gnHornCurrentday->GetXaxis()->SetTitle(
"(central time)");
2499 gnHornCurrentday->GetYaxis()->SetTitle(
"(kA)");
2500 gnHornCurrentday->GetYaxis()->SetRangeUser(-203,-197);
2501 gnHornCurrentday->Draw(
"A*");
2502 TLine* l2cHornCurrent=
new TLine(time_ago,-202,XNow,-202);
2503 l2cHornCurrent->SetLineColor(
kRed);
2504 l2cHornCurrent->SetLineWidth(3);
2505 l2cHornCurrent->SetLineStyle(9);
2506 l2cHornCurrent->Draw();
2507 TLine* l2bHornCurrent=
new TLine(time_ago,-198,XNow,-198);
2508 l2bHornCurrent->SetLineColor(
kRed);
2509 l2bHornCurrent->SetLineWidth(3);
2510 l2bHornCurrent->SetLineStyle(9);
2511 l2bHornCurrent->Draw();
2516 sprintf(filename,
"%s/%s-%s-P%.1unHornCurrentperSR%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2517 ctnHornCurrentday->Print(filename);
2518 delete ctnHornCurrentday;
2519 ctnHornCurrentday = 0;
2522 TCanvas *ctnHornCurrentday_zoom =
new TCanvas(
"cnHornCurrentday_zoom",
"Horn Current day",1200,800);
2523 ctnHornCurrentday_zoom->cd();
2525 TGraph *gnHornCurrentday_zoom =
new TGraph(NHornCurrentDayCount[p],NHornCurrenttimeDay[p],NHornCurrentDay[p]);
2526 sprintf(title,
"%s Horn Current per subrun - partition %.1u",trigname.c_str(),
p);
2527 gnHornCurrentday_zoom->SetTitle(title);
2528 gnHornCurrentday_zoom->SetMarkerColor(
kBlue);
2529 gnHornCurrentday_zoom->GetXaxis()->SetTimeDisplay(1);
2530 gnHornCurrentday_zoom->GetXaxis()->SetLabelSize(0.03);
2531 gnHornCurrentday_zoom->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2532 gnHornCurrentday_zoom->GetXaxis()->SetLimits(time_ago,XNow);
2533 gnHornCurrentday_zoom->GetXaxis()->SetTitle(
"(central time)");
2534 gnHornCurrentday_zoom->GetYaxis()->SetTitle(
"(kA)");
2535 gnHornCurrentday_zoom->GetYaxis()->SetRangeUser((gnHornCurrentday_zoom->GetMean(2)-3.*gnHornCurrentday_zoom->GetRMS(2)),(gnHornCurrentday_zoom->GetMean(2)+3.*gnHornCurrentday_zoom->GetRMS(2)));
2536 gnHornCurrentday_zoom->Draw(
"A*");
2539 sprintf(filename,
"%s/%s-%s-P%.1unHornCurrentperSRzoom%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2540 ctnHornCurrentday_zoom->Print(filename);
2541 delete ctnHornCurrentday_zoom;
2542 ctnHornCurrentday_zoom = 0;
2547 for(
int i = 0;
i < NXPositionDayCount[
p]; ++
i) {
2548 ave += (double)NXPositionDay[p][
i];
2549 if(NXPositiontimeDay[p][
i] > maxtime) {
2550 maxtime = NXPositiontimeDay[
p][
i];
2551 max = NXPositionDay[
p][
i];
2554 if(NXPositionDayCount[p] > 0) ave = ave/(double)NXPositionDayCount[p];
2555 sprintf(lptext,
"Last Point = %f / Average = %f",max,ave);
2557 LastPoint->AddText(lptext);
2558 TCanvas *ctnXPositionday =
new TCanvas(
"cnXPositionday",
"X Position day",1200,800);
2559 ctnXPositionday->cd();
2561 TGraph *gnXPositionday =
new TGraph(NXPositionDayCount[p],NXPositiontimeDay[p],NXPositionDay[p]);
2562 sprintf(title,
"%s X Position per Subrun - partition %.1u",trigname.c_str(),
p);
2563 gnXPositionday->SetTitle(title);
2564 gnXPositionday->SetMarkerColor(
kBlue);
2565 gnXPositionday->GetXaxis()->SetTimeDisplay(1);
2566 gnXPositionday->GetXaxis()->SetLabelSize(0.03);
2567 gnXPositionday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2568 gnXPositionday->GetXaxis()->SetLimits(time_ago,XNow);
2569 gnXPositionday->GetXaxis()->SetTitle(
"(central time)");
2570 gnXPositionday->GetYaxis()->SetTitle(
"(mm)");
2571 gnXPositionday->GetYaxis()->SetRangeUser(-2.1,2.1);
2572 gnXPositionday->Draw(
"A*");
2573 TLine* l2cXPosition=
new TLine(time_ago,-2.0,XNow,-2.0);
2574 l2cXPosition->SetLineColor(
kRed);
2575 l2cXPosition->SetLineWidth(3);
2576 l2cXPosition->SetLineStyle(9);
2577 l2cXPosition->Draw();
2578 TLine* l2bXPosition=
new TLine(time_ago,2.0,XNow,2.0);
2579 l2bXPosition->SetLineColor(
kRed);
2580 l2bXPosition->SetLineWidth(3);
2581 l2bXPosition->SetLineStyle(9);
2582 l2bXPosition->Draw();
2585 sprintf(filename,
"%s/%s-%s-P%.1unXPositionperSR%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2586 ctnXPositionday->Print(filename);
2587 delete ctnXPositionday;
2588 ctnXPositionday = 0;
2591 TCanvas *ctnXPositionday_zoom =
new TCanvas(
"cnXPositionday_zoom",
"X Position day",1200,800);
2592 ctnXPositionday_zoom->cd();
2594 TGraph *gnXPositionday_zoom =
new TGraph(NXPositionDayCount[p],NXPositiontimeDay[p],NXPositionDay[p]);
2595 sprintf(title,
"%s X Position per subrun - partition %.1u",trigname.c_str(),
p);
2596 gnXPositionday_zoom->SetTitle(title);
2597 gnXPositionday_zoom->SetMarkerColor(
kBlue);
2598 gnXPositionday_zoom->GetXaxis()->SetTimeDisplay(1);
2599 gnXPositionday_zoom->GetXaxis()->SetLabelSize(0.03);
2600 gnXPositionday_zoom->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2601 gnXPositionday_zoom->GetXaxis()->SetLimits(time_ago,XNow);
2602 gnXPositionday_zoom->GetXaxis()->SetTitle(
"(central time)");
2603 gnXPositionday_zoom->GetYaxis()->SetTitle(
"(mm)");
2604 gnXPositionday_zoom->GetYaxis()->SetRangeUser((gnXPositionday_zoom->GetMean(2)-3.*gnXPositionday_zoom->GetRMS(2)),(gnXPositionday_zoom->GetMean(2)+3.*gnXPositionday_zoom->GetRMS(2)));
2605 gnXPositionday_zoom->Draw(
"A*");
2608 sprintf(filename,
"%s/%s-%s-P%.1unXPositionperSRzoom%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2609 ctnXPositionday_zoom->Print(filename);
2610 delete ctnXPositionday_zoom;
2611 ctnXPositionday_zoom = 0;
2616 for(
int i = 0;
i < NYPositionDayCount[
p]; ++
i) {
2617 ave += (double)NYPositionDay[p][
i];
2618 if(NYPositionDay[p][
i] > maxtime) {
2619 maxtime = NYPositiontimeDay[
p][
i];
2620 max = NYPositionDay[
p][
i];
2623 if(NYPositionDayCount[p] > 0) ave = ave/(double)NYPositionDayCount[p];
2624 sprintf(lptext,
"Last Point = %f / Average = %f",max,ave);
2626 LastPoint->AddText(lptext);
2627 TCanvas *ctnYPositionday =
new TCanvas(
"cnYPositionday",
"Y Position day",1200,800);
2628 ctnYPositionday->cd();
2630 TGraph *gnYPositionday =
new TGraph(NYPositionDayCount[p],NYPositiontimeDay[p],NYPositionDay[p]);
2631 sprintf(title,
"%s Y Position per Subrun - partition %.1u",trigname.c_str(),
p);
2632 gnYPositionday->SetTitle(title);
2633 gnYPositionday->SetMarkerColor(
kBlue);
2634 gnYPositionday->GetXaxis()->SetTimeDisplay(1);
2635 gnYPositionday->GetXaxis()->SetLabelSize(0.03);
2636 gnYPositionday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2637 gnYPositionday->GetXaxis()->SetLimits(time_ago,XNow);
2638 gnYPositionday->GetXaxis()->SetTitle(
"(central time)");
2639 gnYPositionday->GetYaxis()->SetTitle(
"(mm)");
2641 gnYPositionday->GetYaxis()->SetRangeUser(-5, 2);
2642 gnYPositionday->Draw(
"A*");
2643 TLine* l2cYPosition=
new TLine(time_ago,-4.5,XNow,-4.5);
2644 l2cYPosition->SetLineColor(
kRed);
2645 l2cYPosition->SetLineWidth(3);
2646 l2cYPosition->SetLineStyle(9);
2647 l2cYPosition->Draw();
2648 TLine* l2bYPosition=
new TLine(time_ago,0,XNow,0);
2649 l2bYPosition->SetLineColor(
kRed);
2650 l2bYPosition->SetLineWidth(3);
2651 l2bYPosition->SetLineStyle(9);
2652 l2bYPosition->Draw();
2655 sprintf(filename,
"%s/%s-%s-P%.1unYPositionperSR%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2656 ctnYPositionday->Print(filename);
2657 delete ctnYPositionday;
2658 ctnYPositionday = 0;
2661 TCanvas *ctnYPositionday_zoom =
new TCanvas(
"cnYPositionday_zoom",
"Y Position day",1200,800);
2662 ctnYPositionday_zoom->cd();
2664 TGraph *gnYPositionday_zoom =
new TGraph(NYPositionDayCount[p],NYPositiontimeDay[p],NYPositionDay[p]);
2665 sprintf(title,
"%s Y Position per subrun - partition %.1u",trigname.c_str(),
p);
2666 gnYPositionday_zoom->SetTitle(title);
2667 gnYPositionday_zoom->SetMarkerColor(
kBlue);
2668 gnYPositionday_zoom->GetXaxis()->SetTimeDisplay(1);
2669 gnYPositionday_zoom->GetXaxis()->SetLabelSize(0.03);
2670 gnYPositionday_zoom->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2671 gnYPositionday_zoom->GetXaxis()->SetLimits(time_ago,XNow);
2672 gnYPositionday_zoom->GetXaxis()->SetTitle(
"(central time)");
2673 gnYPositionday_zoom->GetYaxis()->SetTitle(
"(mm)");
2674 gnYPositionday_zoom->GetYaxis()->SetRangeUser((gnYPositionday_zoom->GetMean(2)-3.*gnYPositionday_zoom->GetRMS(2)),(gnYPositionday_zoom->GetMean(2)+3.*gnYPositionday_zoom->GetRMS(2)));
2675 gnYPositionday_zoom->Draw(
"A*");
2678 sprintf(filename,
"%s/%s-%s-P%.1unYPositionperSRzoom%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2679 ctnYPositionday_zoom->Print(filename);
2680 delete ctnYPositionday_zoom;
2681 ctnYPositionday_zoom = 0;
2686 for(
int i = 0;
i < NXWidthDayCount[
p]; ++
i) {
2687 ave += (double)NXWidthDay[p][
i];
2688 if(NXWidthtimeDay[p][
i] > maxtime) {
2689 maxtime = NXWidthtimeDay[
p][
i];
2690 max = NXWidthDay[
p][
i];
2693 if(NXWidthDayCount[p] > 0) ave = ave/(double)NXWidthDayCount[p];
2694 sprintf(lptext,
"Last Point = %f / Average = %f",max,ave);
2696 LastPoint->AddText(lptext);
2697 TCanvas *ctnXWidthday =
new TCanvas(
"cnXWidthday",
"X Width day",1200,800);
2700 TGraph *gnXWidthday =
new TGraph(NXWidthDayCount[p],NXWidthtimeDay[p],NXWidthDay[p]);
2701 sprintf(title,
"%s X Width per Subrun - partition %.1u",trigname.c_str(),
p);
2702 gnXWidthday->SetTitle(title);
2703 gnXWidthday->SetMarkerColor(
kBlue);
2704 gnXWidthday->GetXaxis()->SetTimeDisplay(1);
2705 gnXWidthday->GetXaxis()->SetLabelSize(0.03);
2706 gnXWidthday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2707 gnXWidthday->GetXaxis()->SetLimits(time_ago,XNow);
2708 gnXWidthday->GetXaxis()->SetTitle(
"(central time)");
2709 gnXWidthday->GetYaxis()->SetTitle(
"(mm)");
2710 gnXWidthday->GetYaxis()->SetRangeUser(0.5,2.0);
2711 gnXWidthday->Draw(
"A*");
2712 TLine* l2cXWidth=
new TLine(time_ago,0.57,XNow,0.57);
2713 l2cXWidth->SetLineColor(
kRed);
2714 l2cXWidth->SetLineWidth(3);
2715 l2cXWidth->SetLineStyle(9);
2717 TLine* l2bXWidth=
new TLine(time_ago,1.88,XNow,1.88);
2718 l2bXWidth->SetLineColor(
kRed);
2719 l2bXWidth->SetLineWidth(3);
2720 l2bXWidth->SetLineStyle(9);
2724 sprintf(filename,
"%s/%s-%s-P%.1unXWidthperSR%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2725 ctnXWidthday->Print(filename);
2726 delete ctnXWidthday;
2730 TCanvas *ctnXWidthday_zoom =
new TCanvas(
"cnXWidthday_zoom",
"X Width day",1200,800);
2731 ctnXWidthday_zoom->cd();
2733 TGraph *gnXWidthday_zoom =
new TGraph(NXWidthDayCount[p],NXWidthtimeDay[p],NXWidthDay[p]);
2734 sprintf(title,
"%s X Width per subrun - partition %.1u",trigname.c_str(),
p);
2735 gnXWidthday_zoom->SetTitle(title);
2736 gnXWidthday_zoom->SetMarkerColor(
kBlue);
2737 gnXWidthday_zoom->GetXaxis()->SetTimeDisplay(1);
2738 gnXWidthday_zoom->GetXaxis()->SetLabelSize(0.03);
2739 gnXWidthday_zoom->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2740 gnXWidthday_zoom->GetXaxis()->SetLimits(time_ago,XNow);
2741 gnXWidthday_zoom->GetXaxis()->SetTitle(
"(central time)");
2742 gnXWidthday_zoom->GetYaxis()->SetTitle(
"(mm)");
2743 gnXWidthday_zoom->GetYaxis()->SetRangeUser((gnXWidthday_zoom->GetMean(2)-3.*gnXWidthday_zoom->GetRMS(2)),(gnXWidthday_zoom->GetMean(2)+3.*gnXWidthday_zoom->GetRMS(2)));
2744 gnXWidthday_zoom->Draw(
"A*");
2747 sprintf(filename,
"%s/%s-%s-P%.1unXWidthperSRzoom%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2748 ctnXWidthday_zoom->Print(filename);
2749 delete ctnXWidthday_zoom;
2750 ctnXWidthday_zoom = 0;
2755 for(
int i = 0;
i < NYWidthDayCount[
p]; ++
i) {
2756 ave += (double)NYWidthDay[p][
i];
2757 if(NYWidthtimeDay[p][
i] > maxtime) {
2758 maxtime = NYWidthtimeDay[
p][
i];
2759 max = NYWidthDay[
p][
i];
2762 if(NYWidthDayCount[p] > 0) ave = ave/(double)NYWidthDayCount[p];
2763 sprintf(lptext,
"Last Point = %f / Average = %f",max,ave);
2765 LastPoint->AddText(lptext);
2766 TCanvas *ctnYWidthday =
new TCanvas(
"cnYWidthday",
"Y Width day",1200,800);
2769 TGraph *gnYWidthday =
new TGraph(NYWidthDayCount[p],NYWidthtimeDay[p],NYWidthDay[p]);
2770 sprintf(title,
"%s Y Width per Subrun - partition %.1u",trigname.c_str(),
p);
2771 gnYWidthday->SetTitle(title);
2772 gnYWidthday->SetMarkerColor(
kBlue);
2773 gnYWidthday->GetXaxis()->SetTimeDisplay(1);
2774 gnYWidthday->GetXaxis()->SetLabelSize(0.03);
2775 gnYWidthday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2776 gnYWidthday->GetXaxis()->SetLimits(time_ago,XNow);
2777 gnYWidthday->GetXaxis()->SetTitle(
"(central time)");
2778 gnYWidthday->GetYaxis()->SetTitle(
"(mm)");
2779 gnYWidthday->GetYaxis()->SetRangeUser(0.5,2.0);
2780 gnYWidthday->Draw(
"A*");
2781 TLine* l2cYWidth=
new TLine(time_ago,0.57,XNow,0.57);
2782 l2cYWidth->SetLineColor(
kRed);
2783 l2cYWidth->SetLineWidth(3);
2784 l2cYWidth->SetLineStyle(9);
2786 TLine* l2bYWidth=
new TLine(time_ago,1.58,XNow,1.58);
2787 l2bYWidth->SetLineColor(
kRed);
2788 l2bYWidth->SetLineWidth(3);
2789 l2bYWidth->SetLineStyle(9);
2793 sprintf(filename,
"%s/%s-%s-P%.1unYWidthperSR%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2794 ctnYWidthday->Print(filename);
2795 delete ctnYWidthday;
2799 TCanvas *ctnYWidthday_zoom =
new TCanvas(
"cnYWidthday_zoom",
"Y Width day",1200,800);
2800 ctnYWidthday_zoom->cd();
2802 TGraph *gnYWidthday_zoom =
new TGraph(NYWidthDayCount[p],NYWidthtimeDay[p],NYWidthDay[p]);
2803 sprintf(title,
"%s Y Width per subrun - partition %.1u",trigname.c_str(),
p);
2804 gnYWidthday_zoom->SetTitle(title);
2805 gnYWidthday_zoom->SetMarkerColor(
kBlue);
2806 gnYWidthday_zoom->GetXaxis()->SetTimeDisplay(1);
2807 gnYWidthday_zoom->GetXaxis()->SetLabelSize(0.03);
2808 gnYWidthday_zoom->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2809 gnYWidthday_zoom->GetXaxis()->SetLimits(time_ago,XNow);
2810 gnYWidthday_zoom->GetXaxis()->SetTitle(
"(central time)");
2811 gnYWidthday_zoom->GetYaxis()->SetTitle(
"(mm)");
2812 gnYWidthday_zoom->GetYaxis()->SetRangeUser((gnYWidthday_zoom->GetMean(2)-3.*gnYWidthday_zoom->GetRMS(2)),(gnYWidthday_zoom->GetMean(2)+3.*gnYWidthday_zoom->GetRMS(2)));
2813 gnYWidthday_zoom->Draw(
"A*");
2816 sprintf(filename,
"%s/%s-%s-P%.1unYWidthperSRzoom%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2817 ctnYWidthday_zoom->Print(filename);
2818 delete ctnYWidthday_zoom;
2819 ctnYWidthday_zoom = 0;
2824 for(
int i = 0;
i < NGoodBeamDayCount[
p]; ++
i) {
2825 ave += (double)NGoodBeamDay[p][
i];
2826 if(NGoodBeamtimeDay[p][
i] > maxtime) {
2827 maxtime = NGoodBeamtimeDay[
p][
i];
2828 max = NGoodBeamDay[
p][
i];
2831 if(NGoodBeamDayCount[p] > 0) ave = ave/(double)NGoodBeamDayCount[p];
2832 sprintf(lptext,
"Last Point = %f / Average = %f",max,ave);
2834 LastPoint->AddText(lptext);
2835 TCanvas *ctnGoodBeamday =
new TCanvas(
"cnGoodBeamday",
"Good Beam day",1200,800);
2836 ctnGoodBeamday->cd();
2838 TGraph *gnGoodBeamday =
new TGraph(NGoodBeamDayCount[p],NGoodBeamtimeDay[p],NGoodBeamDay[p]);
2839 sprintf(title,
"%s Good Beam per Subrun - partition %.1u",trigname.c_str(),
p);
2840 gnGoodBeamday->SetTitle(title);
2841 gnGoodBeamday->SetMarkerColor(
kBlue);
2842 gnGoodBeamday->GetXaxis()->SetTimeDisplay(1);
2843 gnGoodBeamday->GetXaxis()->SetLabelSize(0.03);
2844 gnGoodBeamday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2845 gnGoodBeamday->GetXaxis()->SetLimits(time_ago,XNow);
2846 gnGoodBeamday->GetXaxis()->SetTitle(
"(central time)");
2847 gnGoodBeamday->GetYaxis()->SetRangeUser(-0.1,1.2);
2848 gnGoodBeamday->Draw(
"A*");
2851 sprintf(filename,
"%s/%s-%s-P%.1unGoodBeamperSR%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2852 ctnGoodBeamday->Print(filename);
2853 delete ctnGoodBeamday;
2857 TCanvas *ctnGoodBeamday_zoom =
new TCanvas(
"cnGoodBeamday_zoom",
"Good Beam day",1200,800);
2858 ctnGoodBeamday_zoom->cd();
2860 TGraph *gnGoodBeamday_zoom =
new TGraph(NGoodBeamDayCount[p],NGoodBeamtimeDay[p],NGoodBeamDay[p]);
2861 sprintf(title,
"%s Good Beam per subrun - partition %.1u",trigname.c_str(),
p);
2862 gnGoodBeamday_zoom->SetTitle(title);
2863 gnGoodBeamday_zoom->SetMarkerColor(
kBlue);
2864 gnGoodBeamday_zoom->GetXaxis()->SetTimeDisplay(1);
2865 gnGoodBeamday_zoom->GetXaxis()->SetLabelSize(0.03);
2866 gnGoodBeamday_zoom->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2867 gnGoodBeamday_zoom->GetXaxis()->SetLimits(time_ago,XNow);
2868 gnGoodBeamday_zoom->GetXaxis()->SetTitle(
"(central time)");
2869 gnGoodBeamday_zoom->GetYaxis()->SetRangeUser((gnGoodBeamday_zoom->GetMean(2)-3.*gnGoodBeamday_zoom->GetRMS(2)),(gnGoodBeamday_zoom->GetMean(2)+3.*gnGoodBeamday_zoom->GetRMS(2)));
2870 gnGoodBeamday_zoom->Draw(
"A*");
2873 sprintf(filename,
"%s/%s-%s-P%.1unGoodBeamperSRzoom%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2874 ctnGoodBeamday_zoom->Print(filename);
2875 delete ctnGoodBeamday_zoom;
2876 ctnGoodBeamday_zoom = 0;
2882 for(
int i = 0;
i < NSliceDayCount[
p]; ++
i) {
2883 ave += (double)NSliceDay[p][
i];
2884 if(NSlicetimeDay[p][
i] > maxtime) {
2885 maxtime = NSlicetimeDay[
p][
i];
2886 max = NSliceDay[
p][
i];
2889 if(NSliceDayCount[p] > 0) ave = ave/(double)NSliceDayCount[p];
2890 sprintf(lptext,
"Last Point = %f / Average = %f",max,ave);
2892 LastPoint->AddText(lptext);
2893 TCanvas *ctnSliceday =
new TCanvas(
"cnSliceday",
"# Non-Noise Slices day",1200,800);
2896 TGraph *gnSliceday =
new TGraph(NSliceDayCount[p],NSlicetimeDay[p],NSliceDay[p]);
2897 sprintf(title,
"%s Number of Slices per Subrun - partition %.1u",trigname.c_str(),
p);
2898 gnSliceday->SetTitle(title);
2899 gnSliceday->SetMarkerColor(
kBlue);
2900 gnSliceday->GetXaxis()->SetTimeDisplay(1);
2901 gnSliceday->GetXaxis()->SetLabelSize(0.03);
2902 gnSliceday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2903 gnSliceday->GetXaxis()->SetLimits(time_ago,XNow);
2904 gnSliceday->GetXaxis()->SetTitle(
"(central time)");
2905 gnSliceday->Draw(
"A*");
2908 sprintf(filename,
"%s/%s-%s-P%.1unSliceperSR%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2909 ctnSliceday->Print(filename);
2914 TCanvas *ctnSliceday_zoom =
new TCanvas(
"cnSliceday_zoom",
"# Non-Noise Slices day",1200,800);
2915 ctnSliceday_zoom->cd();
2917 TGraph *gnSliceday_zoom =
new TGraph(NSliceDayCount[p],NSlicetimeDay[p],NSliceDay[p]);
2918 sprintf(title,
"%s Number of Slices per Subrun - partition %.1u",trigname.c_str(),
p);
2919 gnSliceday_zoom->SetTitle(title);
2920 gnSliceday_zoom->SetMarkerColor(
kBlue);
2921 gnSliceday_zoom->GetXaxis()->SetTimeDisplay(1);
2922 gnSliceday_zoom->GetXaxis()->SetLabelSize(0.03);
2923 gnSliceday_zoom->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2924 gnSliceday_zoom->GetXaxis()->SetLimits(time_ago,XNow);
2925 gnSliceday_zoom->GetXaxis()->SetTitle(
"(central time)");
2926 gnSliceday_zoom->GetYaxis()->SetRangeUser((gnSliceday_zoom->GetMean(2)-3.*gnSliceday_zoom->GetRMS(2)),(gnSliceday_zoom->GetMean(2)+3.*gnSliceday_zoom->GetRMS(2)));
2927 gnSliceday_zoom->Draw(
"A*");
2930 sprintf(filename,
"%s/%s-%s-P%.1unSliceperSRzoom%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2931 ctnSliceday_zoom->Print(filename);
2932 delete ctnSliceday_zoom;
2933 ctnSliceday_zoom = 0;
2938 for(
int i = 0;
i < NNonNoiseSliceHitDayCount[
p]; ++
i) {
2939 ave += (double)NNonNoiseSliceHitDay[p][
i];
2940 if(NNonNoiseSliceHittimeDay[p][
i] > maxtime) {
2941 maxtime = NNonNoiseSliceHittimeDay[
p][
i];
2942 max = NNonNoiseSliceHitDay[
p][
i];
2945 if(NNonNoiseSliceHitDayCount[p] > 0) ave = ave/(double)NNonNoiseSliceHitDayCount[p];
2946 sprintf(lptext,
"Last Point = %f / Average = %f",max,ave);
2948 LastPoint->AddText(lptext);
2949 TCanvas *ctnSliceHitday =
new TCanvas(
"cnSliceHitday",
"# Non-Noise Slice Hits day",1200,800);
2950 ctnSliceHitday->cd();
2953 TGraph *gnSliceHitday =
new TGraph(NNonNoiseSliceHitDayCount[p],NNonNoiseSliceHittimeDay[p],NNonNoiseSliceHitDay[p]);
2954 sprintf(title,
"%s Number of Slice Hits per Subrun - partition %.1u",trigname.c_str(),
p);
2955 gnSliceHitday->SetTitle(title);
2956 gnSliceHitday->SetMarkerColor(
kBlue);
2957 gnSliceHitday->GetXaxis()->SetTimeDisplay(1);
2958 gnSliceHitday->GetXaxis()->SetLabelSize(0.03);
2959 gnSliceHitday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2960 gnSliceHitday->GetXaxis()->SetLimits(time_ago,XNow);
2961 gnSliceHitday->GetXaxis()->SetTitle(
"(central time)");
2962 gnSliceHitday->Draw(
"A*");
2965 sprintf(filename,
"%s/%s-%s-P%.1unSliceHitperSR%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2966 ctnSliceHitday->Print(filename);
2967 delete ctnSliceHitday;
2971 TCanvas *ctnSliceHitday_zoom =
new TCanvas(
"cnSliceHitday_zoom",
"# Non-Noise Slice Hits day",1200,800);
2972 ctnSliceHitday_zoom->cd();
2975 TGraph *gnSliceHitday_zoom =
new TGraph(NNonNoiseSliceHitDayCount[p],NNonNoiseSliceHittimeDay[p],NNonNoiseSliceHitDay[p]);
2976 sprintf(title,
"%s Number of Slice Hits per Subrun - partition %.1u",trigname.c_str(),
p);
2977 gnSliceHitday_zoom->SetTitle(title);
2978 gnSliceHitday_zoom->SetMarkerColor(
kBlue);
2979 gnSliceHitday_zoom->GetXaxis()->SetTimeDisplay(1);
2980 gnSliceHitday_zoom->GetXaxis()->SetLabelSize(0.03);
2981 gnSliceHitday_zoom->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
2982 gnSliceHitday_zoom->GetXaxis()->SetLimits(time_ago,XNow);
2983 gnSliceHitday_zoom->GetXaxis()->SetTitle(
"(central time)");
2984 gnSliceHitday_zoom->GetYaxis()->SetRangeUser((gnSliceHitday_zoom->GetMean(2)-3.*gnSliceHitday_zoom->GetRMS(2)),(gnSliceHitday_zoom->GetMean(2)+3.*gnSliceHitday_zoom->GetRMS(2)));
2985 gnSliceHitday_zoom->Draw(
"A*");
2988 sprintf(filename,
"%s/%s-%s-P%.1unSliceHitperSRzoom%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
2989 ctnSliceHitday_zoom->Print(filename);
2990 delete ctnSliceHitday_zoom;
2991 ctnSliceHitday_zoom = 0;
2996 for(
int i = 0;
i < NNoiseSliceHitDayCount[
p]; ++
i) {
2997 ave += (double)NNoiseSliceHitDay[p][
i];
2998 if(NNoiseSliceHittimeDay[p][
i] > maxtime) {
2999 maxtime = NNoiseSliceHittimeDay[
p][
i];
3000 max = NNoiseSliceHitDay[
p][
i];
3003 if(NNoiseSliceHitDayCount[p] > 0) ave = ave/(double)NNoiseSliceHitDayCount[p];
3004 sprintf(lptext,
"Last Point = %f / Average = %f",max,ave);
3006 LastPoint->AddText(lptext);
3007 TCanvas *ctNNoiseSliceHitday =
new TCanvas(
"cNNoiseSliceHitday",
"# Noise Slice Hits day",1200,800);
3008 ctNNoiseSliceHitday->cd();
3010 TGraph *gNNoiseSliceHitday =
new TGraph(NNoiseSliceHitDayCount[p],NNoiseSliceHittimeDay[p],NNoiseSliceHitDay[p]);
3011 sprintf(title,
"%s Number of Noise Slice Hits per Subrun - partition %.1u",trigname.c_str(),
p);
3012 gNNoiseSliceHitday->SetTitle(title);
3013 gNNoiseSliceHitday->SetMarkerColor(
kBlue);
3014 gNNoiseSliceHitday->GetXaxis()->SetTimeDisplay(1);
3015 gNNoiseSliceHitday->GetXaxis()->SetLabelSize(0.03);
3016 gNNoiseSliceHitday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
3017 gNNoiseSliceHitday->GetXaxis()->SetLimits(time_ago,XNow);
3018 gNNoiseSliceHitday->GetXaxis()->SetTitle(
"(central time)");
3019 gNNoiseSliceHitday->Draw(
"A*");
3022 sprintf(filename,
"%s/%s-%s-P%.1uNNoiseSliceHitperSR%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
3023 ctNNoiseSliceHitday->Print(filename);
3024 delete ctNNoiseSliceHitday;
3025 ctNNoiseSliceHitday = 0;
3028 TCanvas *ctNNoiseSliceHitday_zoom =
new TCanvas(
"cNNoiseSliceHitday_zoom",
"# Noise Slice Hits day",1200,800);
3029 ctNNoiseSliceHitday_zoom->cd();
3031 TGraph *gNNoiseSliceHitday_zoom =
new TGraph(NNoiseSliceHitDayCount[p],NNoiseSliceHittimeDay[p],NNoiseSliceHitDay[p]);
3032 sprintf(title,
"%s Number of Noise Slice Hits per Subrun - partition %.1u",trigname.c_str(),
p);
3033 gNNoiseSliceHitday_zoom->SetTitle(title);
3034 gNNoiseSliceHitday_zoom->SetMarkerColor(
kBlue);
3035 gNNoiseSliceHitday_zoom->GetXaxis()->SetTimeDisplay(1);
3036 gNNoiseSliceHitday_zoom->GetXaxis()->SetLabelSize(0.03);
3037 gNNoiseSliceHitday_zoom->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
3038 gNNoiseSliceHitday_zoom->GetXaxis()->SetLimits(time_ago,XNow);
3039 gNNoiseSliceHitday_zoom->GetXaxis()->SetTitle(
"(central time)");
3040 gNNoiseSliceHitday_zoom->GetYaxis()->SetRangeUser((gNNoiseSliceHitday_zoom->GetMean(2)-3.*gNNoiseSliceHitday_zoom->GetRMS(2)),(gNNoiseSliceHitday_zoom->GetMean(2)+3.*gNNoiseSliceHitday_zoom->GetRMS(2)));
3041 gNNoiseSliceHitday_zoom->Draw(
"A*");
3044 sprintf(filename,
"%s/%s-%s-P%.1uNNoiseSliceHitperSRzoom%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
3045 ctNNoiseSliceHitday_zoom->Print(filename);
3046 delete ctNNoiseSliceHitday_zoom;
3047 ctNNoiseSliceHitday_zoom = 0;
3052 for(
int i = 0;
i < NTsdDayCount[
p]; ++
i) {
3053 ave += (double)NTsdDay[p][
i];
3054 if(NTsdtimeDay[p][
i] > maxtime) {
3055 maxtime = NTsdtimeDay[
p][
i];
3056 max = NTsdDay[
p][
i];
3059 if(NTsdDayCount[p] > 0) ave = ave/(double)NTsdDayCount[p];
3060 sprintf(lptext,
"Last Point = %f / Average = %f",max,ave);
3062 LastPoint->AddText(lptext);
3063 TCanvas *ctTsdday =
new TCanvas(
"cTsdday",
"Slice Time Duration Standard Dev. day",1200,800);
3066 TGraph *gTsdday =
new TGraph(NTsdDayCount[p],NTsdtimeDay[p],NTsdDay[p]);
3067 sprintf(title,
"%s Slice Time Duration Standard Dev. by Subrun - partition %.1u",trigname.c_str(),
p);
3068 gTsdday->SetTitle(title);
3069 gTsdday->SetMarkerColor(
kBlue);
3070 gTsdday->GetXaxis()->SetTimeDisplay(1);
3071 gTsdday->GetXaxis()->SetLabelSize(0.03);
3072 gTsdday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
3073 gTsdday->GetXaxis()->SetLimits(time_ago,XNow);
3074 gTsdday->GetXaxis()->SetTitle(
"(central time)");
3075 gTsdday->Draw(
"A*");
3078 sprintf(filename,
"%s/%s-%s-P%.1uTsdperSR%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
3079 ctTsdday->Print(filename);
3084 TCanvas *ctTsdday_zoom =
new TCanvas(
"cTsdday_zoom",
"Slice Time Duration Standard Dev. day",1200,800);
3085 ctTsdday_zoom->cd();
3087 TGraph *gTsdday_zoom =
new TGraph(NTsdDayCount[p],NTsdtimeDay[p],NTsdDay[p]);
3088 sprintf(title,
"%s Slice Time Duration Standard Dev. by Subrun - partition %.1u",trigname.c_str(),
p);
3089 gTsdday_zoom->SetTitle(title);
3090 gTsdday_zoom->SetMarkerColor(
kBlue);
3091 gTsdday_zoom->GetXaxis()->SetTimeDisplay(1);
3092 gTsdday_zoom->GetXaxis()->SetLabelSize(0.03);
3093 gTsdday_zoom->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
3094 gTsdday_zoom->GetXaxis()->SetLimits(time_ago,XNow);
3095 gTsdday_zoom->GetXaxis()->SetTitle(
"(central time)");
3096 gTsdday_zoom->GetYaxis()->SetRangeUser((gTsdday_zoom->GetMean(2)-3.*gTsdday_zoom->GetRMS(2)),(gTsdday_zoom->GetMean(2)+3.*gTsdday_zoom->GetRMS(2)));
3097 gTsdday_zoom->Draw(
"A*");
3100 sprintf(filename,
"%s/%s-%s-P%.1uTsdperSRzoom%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
3101 ctTsdday_zoom->Print(filename);
3102 delete ctTsdday_zoom;
3109 for(
int i = 0;
i < NTrackDayCount[
p]; ++
i) {
3110 ave += (double)NTrackDay[p][
i];
3111 if(NTracktimeDay[p][
i] > maxtime) {
3112 maxtime = NTracktimeDay[
p][
i];
3113 max = NTrackDay[
p][
i];
3116 if(NTrackDayCount[p] > 0) ave = ave/(double)NTrackDayCount[p];
3117 sprintf(lptext,
"Last Point = %f / Average = %f",max,ave);
3119 LastPoint->AddText(lptext);
3120 TCanvas *ctnTrackday =
new TCanvas(
"cnTrackday",
"# 3D Tracks day",1200,800);
3123 TGraph *gnTrackday =
new TGraph(NTrackDayCount[p],NTracktimeDay[p],NTrackDay[p]);
3124 sprintf(title,
"%s # Tracks by Subrun - partition %.1u",trigname.c_str(),
p);
3125 gnTrackday->SetTitle(title);
3126 gnTrackday->SetMarkerColor(
kBlue);
3127 gnTrackday->GetXaxis()->SetTimeDisplay(1);
3128 gnTrackday->GetXaxis()->SetLabelSize(0.03);
3129 gnTrackday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
3130 gnTrackday->GetXaxis()->SetLimits(time_ago,XNow);
3131 gnTrackday->GetXaxis()->SetTitle(
"(central time)");
3132 gnTrackday->Draw(
"A*");
3135 sprintf(filename,
"%s/%s-%s-P%.1unTrackAll3DperSR%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
3136 ctnTrackday->Print(filename);
3141 TCanvas *ctnTrackday_zoom =
new TCanvas(
"cnTrackday_zoom",
"# 3D Tracks day",1200,800);
3142 ctnTrackday_zoom->cd();
3144 TGraph *gnTrackday_zoom =
new TGraph(NTrackDayCount[p],NTracktimeDay[p],NTrackDay[p]);
3145 sprintf(title,
"%s # Tracks by Subrun - partition %.1u",trigname.c_str(),
p);
3146 gnTrackday_zoom->SetTitle(title);
3147 gnTrackday_zoom->SetMarkerColor(
kBlue);
3148 gnTrackday_zoom->GetXaxis()->SetTimeDisplay(1);
3149 gnTrackday_zoom->GetXaxis()->SetLabelSize(0.03);
3150 gnTrackday_zoom->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
3151 gnTrackday_zoom->GetXaxis()->SetLimits(time_ago,XNow);
3152 gnTrackday_zoom->GetXaxis()->SetTitle(
"(central time)");
3153 gnTrackday_zoom->GetYaxis()->SetRangeUser((gnTrackday_zoom->GetMean(2)-3.*gnTrackday_zoom->GetRMS(2)),(gnTrackday_zoom->GetMean(2)+3.*gnTrackday_zoom->GetRMS(2)));
3154 gnTrackday_zoom->Draw(
"A*");
3157 sprintf(filename,
"%s/%s-%s-P%.1unTrackAll3DperSRzoom%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
3158 ctnTrackday_zoom->Print(filename);
3159 delete ctnTrackday_zoom;
3160 ctnTrackday_zoom = 0;
3165 for(
int i = 0;
i < NTrackLenDayCount[
p]; ++
i) {
3166 ave += (double)NTrackLenDay[p][
i];
3167 if(NTrackLentimeDay[p][
i] > maxtime) {
3168 maxtime = NTrackLentimeDay[
p][
i];
3169 max = NTrackLenDay[
p][
i];
3172 if(NTrackLenDayCount[p] > 0) ave = ave/(double)NTrackLenDayCount[p];
3173 sprintf(lptext,
"Last Point = %f / Average = %f",max,ave);
3175 LastPoint->AddText(lptext);
3176 TCanvas *ctTrackLenday =
new TCanvas(
"cTrackLenday",
"3D Track Len day",1200,800);
3177 ctTrackLenday->cd();
3179 TGraph *gTrackLenday =
new TGraph(NTrackLenDayCount[p],NTrackLentimeDay[p],NTrackLenDay[p]);
3180 sprintf(title,
"%s Ave. Track Length by Subrun - partition %.1u",trigname.c_str(),
p);
3181 gTrackLenday->SetTitle(title);
3182 gTrackLenday->SetMarkerColor(
kBlue);
3183 gTrackLenday->GetXaxis()->SetTimeDisplay(1);
3184 gTrackLenday->GetXaxis()->SetLabelSize(0.03);
3185 gTrackLenday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
3186 gTrackLenday->GetXaxis()->SetLimits(time_ago,XNow);
3187 gTrackLenday->GetXaxis()->SetTitle(
"(central time)");
3188 gTrackLenday->Draw(
"A*");
3191 sprintf(filename,
"%s/%s-%s-P%.1uTrackLenAll3DperSR%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
3192 ctTrackLenday->Print(filename);
3193 delete ctTrackLenday;
3197 TCanvas *ctTrackLenday_zoom =
new TCanvas(
"cTrackLenday_zoom",
"3D Track Len day",1200,800);
3198 ctTrackLenday_zoom->cd();
3200 TGraph *gTrackLenday_zoom =
new TGraph(NTrackLenDayCount[p],NTrackLentimeDay[p],NTrackLenDay[p]);
3201 sprintf(title,
"%s Ave. Track Length by Subrun - partition %.1u",trigname.c_str(),
p);
3202 gTrackLenday_zoom->SetTitle(title);
3203 gTrackLenday_zoom->SetMarkerColor(
kBlue);
3204 gTrackLenday_zoom->GetXaxis()->SetTimeDisplay(1);
3205 gTrackLenday_zoom->GetXaxis()->SetLabelSize(0.03);
3206 gTrackLenday_zoom->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
3207 gTrackLenday_zoom->GetXaxis()->SetLimits(time_ago,XNow);
3208 gTrackLenday_zoom->GetXaxis()->SetTitle(
"(central time)");
3209 gTrackLenday_zoom->GetYaxis()->SetRangeUser((gTrackLenday_zoom->GetMean(2)-3.*gTrackLenday_zoom->GetRMS(2)),(gTrackLenday_zoom->GetMean(2)+3.*gTrackLenday_zoom->GetRMS(2)));
3210 gTrackLenday_zoom->Draw(
"A*");
3213 sprintf(filename,
"%s/%s-%s-P%.1uTrackLenAll3DperSRzoom%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
3214 ctTrackLenday_zoom->Print(filename);
3215 delete ctTrackLenday_zoom;
3216 ctTrackLenday_zoom = 0;
3222 TCanvas *cTrackFracday =
new TCanvas(
"cTrackFracday",
"Track Fractions day",1200,800);
3223 TPad *
pad1 =
new TPad(
"pad1",
"",0,0,1,1);
3224 TPad *
pad2 =
new TPad(
"pad2",
"",0,0,1,1);
3225 pad2->SetFillStyle(4000);
3226 pad2->SetFillColor(0);
3227 pad2->SetFrameFillStyle(4000);
3231 TMultiGraph *gTF =
new TMultiGraph;
3232 TGraph *gTFAll3Dday =
new TGraph(TrackFracDayCount[p],TrackFracAll3DtimeDay[p],TrackFracAll3DDay[p]);
3233 TGraph *gTFAll2Dday =
new TGraph(TrackFracDayCount[p],TrackFracAll2DtimeDay[p],TrackFracAll2DDay[p]);
3234 TGraph *gTFCont3Dday =
new TGraph(TrackFracDayCount[p],TrackFracCont3DtimeDay[p],TrackFracCont3DDay[p]);
3235 sprintf(title,
"%s Track Fractions - partition %.1u",trigname.c_str(),
p);
3240 gTFAll2Dday->SetTitle(title);
3241 gTFAll2Dday->SetMarkerColor(
kBlue-7);
3242 gTFAll2Dday->SetFillColor(
kBlue-7);
3243 if(det ==
"NearDet" || det ==
"TestBeam")
3244 gTFAll2Dday->SetMarkerStyle(21);
3246 gTFAll2Dday->SetMarkerStyle(7);
3248 gTFCont3Dday->SetTitle(title);
3249 gTFCont3Dday->SetMarkerColor(kGray+3);
3250 gTFCont3Dday->SetFillColor(kGray+3);
3251 if(det ==
"NearDet" || det ==
"TestBeam")
3252 gTFCont3Dday->SetMarkerStyle(21);
3254 gTFCont3Dday->SetMarkerStyle(7);
3257 gTF->Add(gTFAll2Dday);
3258 gTF->Add(gTFCont3Dday);
3261 gTF->SetTitle(title);
3270 gTF->GetXaxis()->SetRangeUser(0.0,1.1);
3271 gTF->GetXaxis()->SetTimeDisplay(1);
3272 gTF->GetXaxis()->SetLabelSize(0.03);
3273 gTF->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
3274 gTF->GetXaxis()->SetLimits(time_ago,XNow);
3275 gTF->GetXaxis()->SetTitle(
"(central time)");
3276 gTF->GetYaxis()->SetRangeUser(0.001,1.0);
3283 gTFAll3Dday->SetTitle(
"");
3284 gTFAll3Dday->SetMarkerColor(kMagenta-7);
3285 gTFAll3Dday->SetFillColor(kMagenta-7);
3286 if(det ==
"NearDet" || det ==
"TestBeam")
3287 gTFAll3Dday->SetMarkerStyle(21);
3289 gTFAll3Dday->SetMarkerStyle(7);
3290 gTFAll3Dday->GetXaxis()->SetRangeUser(0.0,1.1);
3291 gTFAll3Dday->GetXaxis()->SetTimeDisplay(1);
3292 gTFAll3Dday->GetXaxis()->SetLabelSize(0.03);
3293 gTFAll3Dday->GetXaxis()->SetTimeFormat(taxis_labels.c_str());
3294 gTFAll3Dday->GetXaxis()->SetLimits(time_ago,XNow);
3295 gTFAll3Dday->GetXaxis()->SetTitle(
"(central time)");
3296 gTFAll3Dday->GetYaxis()->SetLabelColor(kMagenta-7);
3297 gTFAll3Dday->GetYaxis()->SetLabelSize(0.026);
3299 gTFAll3Dday->Draw(
"apY+");
3304 TLegend *
leg =
new TLegend(0.60,0.66,0.85,0.78);
3305 leg->SetFillColor(0);
3306 leg->AddEntry(gTFAll2Dday,
"#bf{All 2D Tracks}",
"f");
3307 leg->AddEntry(gTFCont3Dday,
"#bf{Contained 3D Tracks}",
"f");
3308 leg->AddEntry(gTFAll3Dday,
"#bf{All 3D Tracks}",
"f");
3309 leg->SetFillStyle(4000);
3310 leg->SetLineColor(0);
3314 sprintf(filename,
"%s/%s-%s-P%.1uTrackFractionsperSR%s.png",
PLOT_DIR.c_str(),det.c_str(),trig.c_str(),
p,period.c_str());
3315 cTrackFracday->Print(filename);
3316 delete cTrackFracday;
3321 eff_plots(p, det, period, trig, trigname);
3323 UpdateText->Clear();
TH2F * hHitsVwcellDay[Npar]
void eff_plots(unsigned int par_eff, string det, string period, string trig, string trigname)
::xsd::cxx::tree::time< char, simple_type > time
const std::string PLOT_DIR
static float min(const float a, const float b, const float c)
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
TH2F * hCellsVwcellDay[Npar]
static constexpr Double_t year