8 |
* Date 26 Jun 2006: Inserted dependences on OnBoardTime and modified histogram ranges. |
* Date 26 Jun 2006: Inserted dependences on OnBoardTime and modified histogram ranges. |
9 |
* Version 1.5 - Modified by G. De Rosa |
* Version 1.5 - Modified by G. De Rosa |
10 |
* Date 9 Mar 2007: To read correctly the OBT changed the type of time variables from signed to unsigned |
* Date 9 Mar 2007: To read correctly the OBT changed the type of time variables from signed to unsigned |
11 |
|
* Version 1.6 - Modified by R. Carbone |
12 |
|
* Date 22 Mar 2011: Modified ranges on Plane Counters and Trigger Counters graphs, optimized for outside belts region |
13 |
* |
* |
14 |
* Description: |
* Description: |
15 |
* Describe the performance of the Trigger. |
* Describe the performance of the Trigger. |
39 |
#include <EventHeader.h> |
#include <EventHeader.h> |
40 |
#include <PscuHeader.h> |
#include <PscuHeader.h> |
41 |
#include <iostream> |
#include <iostream> |
42 |
|
#include <cstdlib> |
43 |
|
|
44 |
using namespace std; |
using namespace std; |
45 |
|
|
94 |
while(i < nevents){ |
while(i < nevents){ |
95 |
HeadBr->GetEntry(i); |
HeadBr->GetEntry(i); |
96 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
97 |
if((ph->GetOrbitalTime()) <= firstime) firstime=ph->GetOrbitalTime(); |
if((ULong_t)(ph->GetOrbitalTime()) <= firstime) firstime=ph->GetOrbitalTime(); |
98 |
if((ph->GetOrbitalTime()) >= lastime) lastime=ph->GetOrbitalTime(); |
if((ULong_t)(ph->GetOrbitalTime()) >= lastime) lastime=ph->GetOrbitalTime(); |
99 |
i++; |
i++; |
100 |
} |
} |
101 |
|
|
221 |
liveTime[i] = 0.16 * triggerEvent->dltime[0]; |
liveTime[i] = 0.16 * triggerEvent->dltime[0]; |
222 |
|
|
223 |
|
|
224 |
if (liveTime[i]<600) h1->Fill(ph->GetOrbitalTime(),liveTime[i]); |
if (liveTime[i]<600) h1->Fill(UnsOBT,liveTime[i]); |
225 |
if (liveTime[i]<600) h2->Fill(ph->GetOrbitalTime()); |
if (liveTime[i]<600) h2->Fill(UnsOBT); |
226 |
|
|
227 |
/* dead time vector fill*/ |
/* dead time vector fill*/ |
228 |
deadTime[i] = 0.01 * triggerEvent->dltime[1]; |
deadTime[i] = 0.01 * triggerEvent->dltime[1]; |
229 |
|
|
230 |
if (deadTime[i]<600) h5->Fill(ph->GetOrbitalTime(),deadTime[i]); |
if (deadTime[i]<600) h5->Fill(UnsOBT,deadTime[i]); |
231 |
} |
} |
232 |
|
|
233 |
gStyle->SetStatY(0.85); |
gStyle->SetStatY(0.85); |
345 |
DeadTimeGraph->GetXaxis()->CenterTitle(); |
DeadTimeGraph->GetXaxis()->CenterTitle(); |
346 |
DeadTimeGraph->GetYaxis()->SetTitle("DeadTime(ms)"); |
DeadTimeGraph->GetYaxis()->SetTitle("DeadTime(ms)"); |
347 |
DeadTimeGraph->GetYaxis()->CenterTitle(); |
DeadTimeGraph->GetYaxis()->CenterTitle(); |
|
// DeadTimeGraph->SetMaximum(100); |
|
348 |
DeadTimeGraph->Draw("AP"); |
DeadTimeGraph->Draw("AP"); |
349 |
//---------- |
//---------- |
350 |
sst.str(""); |
sst.str(""); |
396 |
sst.str(""); |
sst.str(""); |
397 |
sst << "Graph of PMT Plane Counters (S11 AND S12) vs OBT based on " << base.Data(); |
sst << "Graph of PMT Plane Counters (S11 AND S12) vs OBT based on " << base.Data(); |
398 |
TGraph *PMT1Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1); |
TGraph *PMT1Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt1); |
399 |
PMTCanvas->cd(1); |
PMTCanvas->cd(1)->SetGridy(); |
400 |
sst.str(""); |
sst.str(""); |
401 |
sst << "PMT Plane Counters (S11 AND S12)"; |
sst << "PMT Plane Counters (S11 AND S12)"; |
402 |
PMT1Graph->SetTitle(sst.str().c_str()); |
PMT1Graph->SetTitle(sst.str().c_str()); |
405 |
PMT1Graph->GetXaxis()->CenterTitle(); |
PMT1Graph->GetXaxis()->CenterTitle(); |
406 |
PMT1Graph->GetYaxis()->SetTitle("PMT Plane Counters (over 60 ms)"); |
PMT1Graph->GetYaxis()->SetTitle("PMT Plane Counters (over 60 ms)"); |
407 |
PMT1Graph->GetYaxis()->CenterTitle(); |
PMT1Graph->GetYaxis()->CenterTitle(); |
408 |
|
PMT1Graph->SetMaximum(300); |
409 |
|
//PMT1Graph->SetMinimum(100); |
410 |
PMT1Graph->Draw("AP"); |
PMT1Graph->Draw("AP"); |
411 |
//---------- |
//---------- |
412 |
sst.str(""); |
sst.str(""); |
413 |
sst << "Graph PMT Plane Counters (S21 AND S22) vs OBT based on " << base.Data(); |
sst << "Graph PMT Plane Counters (S21 AND S22) vs OBT based on " << base.Data(); |
414 |
TGraph *PMT2Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2); |
TGraph *PMT2Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt2); |
415 |
PMTCanvas->cd(2); |
PMTCanvas->cd(2)->SetGridy(); |
416 |
sst.str(""); |
sst.str(""); |
417 |
sst << "PMT Plane Counters (S21 AND S22)"; |
sst << "PMT Plane Counters (S21 AND S22)"; |
418 |
PMT2Graph->SetTitle(sst.str().c_str()); |
PMT2Graph->SetTitle(sst.str().c_str()); |
421 |
PMT2Graph->GetXaxis()->CenterTitle(); |
PMT2Graph->GetXaxis()->CenterTitle(); |
422 |
PMT2Graph->GetYaxis()->SetTitle("PMT Plane Counters (over 60 ms)"); |
PMT2Graph->GetYaxis()->SetTitle("PMT Plane Counters (over 60 ms)"); |
423 |
PMT2Graph->GetYaxis()->CenterTitle(); |
PMT2Graph->GetYaxis()->CenterTitle(); |
424 |
|
PMT2Graph->SetMaximum(80); |
425 |
PMT2Graph->Draw("AP"); |
PMT2Graph->Draw("AP"); |
426 |
//---------- |
//---------- |
427 |
sst.str(""); |
sst.str(""); |
428 |
sst << "Graph PMT Plane Counters (S31 AND S32) vs OBT based on " << base.Data(); |
sst << "Graph PMT Plane Counters (S31 AND S32) vs OBT based on " << base.Data(); |
429 |
TGraph *PMT3Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt3); |
TGraph *PMT3Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)pmt3); |
430 |
PMTCanvas->cd(3); |
PMTCanvas->cd(3)->SetGridy(); |
431 |
sst.str(""); |
sst.str(""); |
432 |
sst << "PMT Plane Counters (S31 AND S32)"; |
sst << "PMT Plane Counters (S31 AND S32)"; |
433 |
PMT3Graph->SetTitle(sst.str().c_str()); |
PMT3Graph->SetTitle(sst.str().c_str()); |
436 |
PMT3Graph->GetXaxis()->CenterTitle(); |
PMT3Graph->GetXaxis()->CenterTitle(); |
437 |
PMT3Graph->GetYaxis()->SetTitle("PMT Plane Rate Counters (over 60 ms)"); |
PMT3Graph->GetYaxis()->SetTitle("PMT Plane Rate Counters (over 60 ms)"); |
438 |
PMT3Graph->GetYaxis()->CenterTitle(); |
PMT3Graph->GetYaxis()->CenterTitle(); |
439 |
|
PMT3Graph->SetMaximum(70); |
440 |
PMT3Graph->Draw("AP"); |
PMT3Graph->Draw("AP"); |
441 |
// |
// |
442 |
//---------- |
//---------- |
452 |
sst << "Graph of Trigger Rate Counters (S11 OR S12) AND (S21 OR S22) AND (S31 OR S32) vs OBT based on " << base.Data(); |
sst << "Graph of Trigger Rate Counters (S11 OR S12) AND (S21 OR S22) AND (S31 OR S32) vs OBT based on " << base.Data(); |
453 |
|
|
454 |
TGraph *TrigRate0Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate0); |
TGraph *TrigRate0Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate0); |
455 |
TrigRate1Canvas->cd(1); |
TrigRate1Canvas->cd(1)->SetGridy(); |
456 |
sst.str(""); |
sst.str(""); |
457 |
sst << "Trigger Rate Counters (S11 OR S12) AND (S21 OR S22) AND (S31 OR S32)"; |
sst << "Trigger Rate Counters (S11 OR S12) AND (S21 OR S22) AND (S31 OR S32)"; |
458 |
TrigRate0Graph->SetTitle(sst.str().c_str()); |
TrigRate0Graph->SetTitle(sst.str().c_str()); |
461 |
TrigRate0Graph->GetXaxis()->CenterTitle(); |
TrigRate0Graph->GetXaxis()->CenterTitle(); |
462 |
TrigRate0Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
TrigRate0Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
463 |
TrigRate0Graph->GetYaxis()->CenterTitle(); |
TrigRate0Graph->GetYaxis()->CenterTitle(); |
464 |
|
TrigRate0Graph->SetMaximum(100); |
465 |
TrigRate0Graph->Draw("AP"); |
TrigRate0Graph->Draw("AP"); |
466 |
//---------- |
//---------- |
467 |
sst.str(""); |
sst.str(""); |
468 |
sst << "Graph Trigger Rate Counters (S11 AND S12) AND (S21 AND S22) AND (S31 AND S32) vs OBT based on " << base.Data(); |
sst << "Graph Trigger Rate Counters (S11 AND S12) AND (S21 AND S22) AND (S31 AND S32) vs OBT based on " << base.Data(); |
469 |
TGraph *TrigRate1Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate1); |
TGraph *TrigRate1Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate1); |
470 |
TrigRate1Canvas->cd(2); |
TrigRate1Canvas->cd(2)->SetGridy(); |
471 |
sst.str(""); |
sst.str(""); |
472 |
sst << "Trigger Rate Counters (S11 AND S12) AND (S21 AND S22) AND (S31 AND S32)"; |
sst << "Trigger Rate Counters (S11 AND S12) AND (S21 AND S22) AND (S31 AND S32)"; |
473 |
TrigRate1Graph->SetTitle(sst.str().c_str()); |
TrigRate1Graph->SetTitle(sst.str().c_str()); |
476 |
TrigRate1Graph->GetXaxis()->CenterTitle(); |
TrigRate1Graph->GetXaxis()->CenterTitle(); |
477 |
TrigRate1Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
TrigRate1Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
478 |
TrigRate1Graph->GetYaxis()->CenterTitle(); |
TrigRate1Graph->GetYaxis()->CenterTitle(); |
479 |
|
TrigRate1Graph->SetMaximum(60); |
480 |
TrigRate1Graph->Draw("AP"); |
TrigRate1Graph->Draw("AP"); |
481 |
//---------- |
//---------- |
482 |
sst.str(""); |
sst.str(""); |
483 |
sst << "Graph Trigger Rate Counters (S21 OR S22) AND (S31 OR S32) vs OBT based on " << base.Data(); |
sst << "Graph Trigger Rate Counters (S21 OR S22) AND (S31 OR S32) vs OBT based on " << base.Data(); |
484 |
TGraph *TrigRate2Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate2); |
TGraph *TrigRate2Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate2); |
485 |
TrigRate1Canvas->cd(3); |
TrigRate1Canvas->cd(3)->SetGridy(); |
486 |
sst.str(""); |
sst.str(""); |
487 |
sst << "Trigger Rate Counters (S21 OR S22) AND (S31 OR S32) "; |
sst << "Trigger Rate Counters (S21 OR S22) AND (S31 OR S32) "; |
488 |
TrigRate2Graph->SetTitle(sst.str().c_str()); |
TrigRate2Graph->SetTitle(sst.str().c_str()); |
491 |
TrigRate2Graph->GetXaxis()->CenterTitle(); |
TrigRate2Graph->GetXaxis()->CenterTitle(); |
492 |
TrigRate2Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
TrigRate2Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
493 |
TrigRate2Graph->GetYaxis()->CenterTitle(); |
TrigRate2Graph->GetYaxis()->CenterTitle(); |
494 |
|
TrigRate2Graph->SetMaximum(140); |
495 |
TrigRate2Graph->Draw("AP"); |
TrigRate2Graph->Draw("AP"); |
496 |
// |
// |
497 |
//---------- |
//---------- |
503 |
sst << "Graph of Trigger Rate Counters (S21 AND S22) AND (S31 AND S32) vs OBT based on " << base.Data(); |
sst << "Graph of Trigger Rate Counters (S21 AND S22) AND (S31 AND S32) vs OBT based on " << base.Data(); |
504 |
|
|
505 |
TGraph *TrigRate3Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate3); |
TGraph *TrigRate3Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate3); |
506 |
TrigRate2Canvas->cd(1); |
TrigRate2Canvas->cd(1)->SetGridy(); |
507 |
sst.str(""); |
sst.str(""); |
508 |
sst << "Trigger Rate Counters (S21 AND S22) AND (S31 AND S32)"; |
sst << "Trigger Rate Counters (S21 AND S22) AND (S31 AND S32)"; |
509 |
TrigRate3Graph->SetTitle(sst.str().c_str()); |
TrigRate3Graph->SetTitle(sst.str().c_str()); |
512 |
TrigRate3Graph->GetXaxis()->CenterTitle(); |
TrigRate3Graph->GetXaxis()->CenterTitle(); |
513 |
TrigRate3Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
TrigRate3Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
514 |
TrigRate3Graph->GetYaxis()->CenterTitle(); |
TrigRate3Graph->GetYaxis()->CenterTitle(); |
515 |
|
TrigRate3Graph->SetMaximum(60); |
516 |
TrigRate3Graph->Draw("AP"); |
TrigRate3Graph->Draw("AP"); |
517 |
//---------- |
//---------- |
518 |
sst.str(""); |
sst.str(""); |
519 |
sst << "Graph Trigger Rate Counters S12 AND (S21 AND S22) vs OBT based on " << base.Data(); |
sst << "Graph Trigger Rate Counters S12 AND (S21 AND S22) vs OBT based on " << base.Data(); |
520 |
TGraph *TrigRate4Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate4); |
TGraph *TrigRate4Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate4); |
521 |
TrigRate2Canvas->cd(2); |
TrigRate2Canvas->cd(2)->SetGridy(); |
522 |
sst.str(""); |
sst.str(""); |
523 |
sst << "Trigger Rate Counters S12 AND (S21 AND S22)"; |
sst << "Trigger Rate Counters S12 AND (S21 AND S22)"; |
524 |
TrigRate4Graph->SetTitle(sst.str().c_str()); |
TrigRate4Graph->SetTitle(sst.str().c_str()); |
527 |
TrigRate4Graph->GetXaxis()->CenterTitle(); |
TrigRate4Graph->GetXaxis()->CenterTitle(); |
528 |
TrigRate4Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
TrigRate4Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
529 |
TrigRate4Graph->GetYaxis()->CenterTitle(); |
TrigRate4Graph->GetYaxis()->CenterTitle(); |
530 |
|
TrigRate4Graph->SetMaximum(400); |
531 |
TrigRate4Graph->Draw("AP"); |
TrigRate4Graph->Draw("AP"); |
532 |
//---------- |
//---------- |
533 |
sst.str(""); |
sst.str(""); |
534 |
sst << "Graph Trigger Rate Counters (S11 OR S12) AND (S31 OR S32) vs OBT based on " << base.Data(); |
sst << "Graph Trigger Rate Counters (S11 OR S12) AND (S31 OR S32) vs OBT based on " << base.Data(); |
535 |
TGraph *TrigRate5Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate5); |
TGraph *TrigRate5Graph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)trigrate5); |
536 |
TrigRate2Canvas->cd(3); |
TrigRate2Canvas->cd(3)->SetGridy(); |
537 |
sst.str(""); |
sst.str(""); |
538 |
sst << "Trigger Rate Counters (S11 OR S12) AND (S31 OR S32)"; |
sst << "Trigger Rate Counters (S11 OR S12) AND (S31 OR S32)"; |
539 |
TrigRate5Graph->SetTitle(sst.str().c_str()); |
TrigRate5Graph->SetTitle(sst.str().c_str()); |
542 |
TrigRate5Graph->GetXaxis()->CenterTitle(); |
TrigRate5Graph->GetXaxis()->CenterTitle(); |
543 |
TrigRate5Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
TrigRate5Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)"); |
544 |
TrigRate5Graph->GetYaxis()->CenterTitle(); |
TrigRate5Graph->GetYaxis()->CenterTitle(); |
545 |
|
TrigRate5Graph->SetMaximum(170); |
546 |
TrigRate5Graph->Draw("AP"); |
TrigRate5Graph->Draw("AP"); |
547 |
//---------- |
//---------- |
548 |
|
|