Public Types | Public Member Functions | Private Attributes | List of all members
om::TQPlots Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-01/OnlineMonitoring/producer/TQPlots.h"

Inheritance diagram for om::TQPlots:
om::SummarySubscriber

Public Types

enum  _which { kEvent = 0x01, kDataBlock = 0x02, kMicroSlice = 0x04, kNanoSlice = 0x08 }
 Which summaries does a class want to subscribe to? More...
 

Public Member Functions

 TQPlots ()
 
 ~TQPlots ()
 
virtual void GetNanoSliceSummary (const RawEventSummary &r, const DataBlockSummary &dbs, const MicroSliceSummary &mss, const NanoSliceSummary &nss)
 Interface to the nanoslice summary. More...
 
virtual void GetRawEventSummary (const RawEventSummary &res)
 Interface to the event summary. More...
 
virtual void GetDataBlockSummary (const RawEventSummary &res, const DataBlockSummary &dbs)
 Interface to the data block summary. More...
 
virtual void GetMicroSliceSummary (const RawEventSummary &res, const DataBlockSummary &dbs, const MicroSliceSummary &mss)
 Interface to the microslice summary. More...
 

Private Attributes

TH2F * fTQDCM [TQDCM_size][TQDCM_size]
 
TH2F * fTQDCMnumi [TQDCM_size][TQDCM_size]
 
TH1F * fTPlotALL
 
TH1F * fTPlotZOOM
 
TH1F * fQPlotALL
 
TH2F * fTimingALLvsHour
 
TH2F * fTimingZOOMvsHour
 

Detailed Description

Definition at line 18 of file TQPlots.h.

Member Enumeration Documentation

Which summaries does a class want to subscribe to?

Enumerator
kEvent 
kDataBlock 
kMicroSlice 
kNanoSlice 

Definition at line 20 of file SummarySubscriber.h.

Constructor & Destructor Documentation

TQPlots::TQPlots ( )

Definition at line 20 of file TQPlots.cxx.

References fQPlotALL, fTimingALLvsHour, fTimingZOOMvsHour, fTPlotALL, fTPlotZOOM, fTQDCM, fTQDCMnumi, om::HistoSet::GetTH1F(), om::HistoSet::GetTH2F(), make_syst_table_plots::h, MECModelEnuComparisons::i, om::HistoSet::Instance(), calib::j, and TQDCM_size.

20  :
22 {
23  for(unsigned int i = 0; i < TQDCM_size; ++i) {
24  for(unsigned int j = 0; j < TQDCM_size; ++j) {
25  fTQDCM[i][j] = 0;
26  fTQDCMnumi[i][j] = 0;
27  } // end for j
28  } // end for i
29 
30  // create the initial histos
32  fTPlotALL = h.GetTH1F("TPlotALL");
33  fTPlotZOOM = h.GetTH1F("TPlotZOOM");
34  fQPlotALL = h.GetTH1F("QPlotALL");
35  fTimingALLvsHour = h.GetTH2F("TimingALLvsHour");
36  fTimingZOOMvsHour = h.GetTH2F("TimingZOOMvsHour");
37 }
TH1F * fQPlotALL
Definition: TQPlots.h:31
TH2F * fTimingZOOMvsHour
Definition: TQPlots.h:33
TH1F * GetTH1F(const char *nm)
Definition: HistoSet.cxx:68
TH1F * fTPlotALL
Definition: TQPlots.h:29
TH2F * GetTH2F(const char *nm)
Definition: HistoSet.cxx:89
const double j
Definition: BetheBloch.cxx:29
TH2F * fTQDCMnumi[TQDCM_size][TQDCM_size]
Definition: TQPlots.h:28
static const unsigned int TQDCM_size
Definition: TQPlots.h:8
TH2F * fTQDCM[TQDCM_size][TQDCM_size]
Definition: TQPlots.h:27
TH2F * fTimingALLvsHour
Definition: TQPlots.h:32
static HistoSet & Instance()
Definition: HistoSet.cxx:24
TH1F * fTPlotZOOM
Definition: TQPlots.h:30
TQPlots::~TQPlots ( )

Definition at line 41 of file TQPlots.cxx.

41 { }

Member Function Documentation

virtual void om::SummarySubscriber::GetDataBlockSummary ( const RawEventSummary res,
const DataBlockSummary dbs 
)
inlinevirtualinherited

Interface to the data block summary.

Reimplemented in om::DataBlockErrors.

Definition at line 35 of file SummarySubscriber.h.

36  { abort(); }
virtual void om::SummarySubscriber::GetMicroSliceSummary ( const RawEventSummary res,
const DataBlockSummary dbs,
const MicroSliceSummary mss 
)
inlinevirtualinherited

Interface to the microslice summary.

Reimplemented in om::MicroErrors.

Definition at line 39 of file SummarySubscriber.h.

41  { abort(); }
void TQPlots::GetNanoSliceSummary ( const RawEventSummary res,
const DataBlockSummary dbs,
const MicroSliceSummary mss,
const NanoSliceSummary nss 
)
virtual

Interface to the nanoslice summary.

Reimplemented from om::SummarySubscriber.

Definition at line 45 of file TQPlots.cxx.

References om::NanoSliceSummary::fADC, om::MicroSliceSummary::fDCM, om::MicroSliceSummary::fDiblock, om::RawEventSummary::fHour, fQPlotALL, om::RawEventSummary::fT0lo32Usec, fTimingALLvsHour, fTimingZOOMvsHour, fTPlotALL, fTPlotZOOM, fTQDCM, fTQDCMnumi, om::RawEventSummary::fTrigger, om::NanoSliceSummary::fUsec, om::HistoSet::GetTH2F(), make_syst_table_plots::h, om::Settings::Instance(), om::HistoSet::Instance(), and om::kNEARDET.

49 {
51 
52  // NOTE: nss.fUsec and nss.fT0lo32Usec are both calcuated with only the
53  // lower 32 bits of the time (in NOvA time units.) This means that every
54  // now and then, nss.fT0lo32Usec will "roll over" back to zero before
55  // nss.fUsec does resulting in a difference between the two numbers of
56  // about 67 sec. Since this is rare and we are interested in
57  // the overall performance of a specific DCM, this exception is ignored
58  // in favor of not adding extra if statements.
59 
60  //
61  // fill TQDCM plots for all triggers
62  //
63  if(fTQDCM[mss.fDiblock][mss.fDCM] == 0) {
64  char histoname[64];
65  sprintf(histoname, "TQDCM_%.2u_%.2u", mss.fDiblock, mss.fDCM);
66  fTQDCM[mss.fDiblock][mss.fDCM] = h.GetTH2F(histoname);
67  }
68  fTQDCM[mss.fDiblock][mss.fDCM]->Fill(nss.fUsec-r.fT0lo32Usec, nss.fADC);
69 
70  fTPlotALL->Fill(nss.fUsec-r.fT0lo32Usec);
71 
72  // Only fill the Zoom plot if the trigger is NuMI.
73  if(r.fTrigger == 0) fTPlotZOOM->Fill(nss.fUsec-r.fT0lo32Usec);
74 
75  fQPlotALL->Fill(nss.fADC);
76 
77  //
78  // if detector is NearDet, fill TQDCM plots for just NuMI triggers
79  //
80  if(Settings::Instance().fDet == kNEARDET &&
81  fTQDCMnumi[mss.fDiblock][mss.fDCM] == 0 &&
82  r.fTrigger == 0) {
83  char histoname[64];
84  sprintf(histoname, "TQDCM_%.2u_%.2u_NuMI", mss.fDiblock, mss.fDCM);
85  fTQDCMnumi[mss.fDiblock][mss.fDCM] = h.GetTH2F(histoname);
86  }
87  if(Settings::Instance().fDet == kNEARDET &&
88  r.fTrigger == 0) {
89  fTQDCMnumi[mss.fDiblock][mss.fDCM]->Fill(nss.fUsec-r.fT0lo32Usec, nss.fADC);
90  }
91 
92  //
93  // Fill Timing vs Hour plots
94  //
95  fTimingALLvsHour->Fill(r.fHour, nss.fUsec-r.fT0lo32Usec);
96  if (r.fTrigger == 0) fTimingZOOMvsHour->Fill(r.fHour, nss.fUsec-r.fT0lo32Usec);
97  if (r.fHour >= 23.0) {
98  fTimingALLvsHour->Fill(r.fHour - 24.0, nss.fUsec-r.fT0lo32Usec);
99  if (r.fTrigger == 0) fTimingZOOMvsHour->Fill(r.fHour - 24.0, nss.fUsec-r.fT0lo32Usec);
100  }
101 
102 }
unsigned int fDCM
DCM ID.
TH1F * fQPlotALL
Definition: TQPlots.h:31
unsigned int fDiblock
Diblock ID.
TH2F * fTimingZOOMvsHour
Definition: TQPlots.h:33
double fUsec
Time of hit relative to start of micro slice.
TH1F * fTPlotALL
Definition: TQPlots.h:29
TH2F * GetTH2F(const char *nm)
Definition: HistoSet.cxx:89
TH2F * fTQDCMnumi[TQDCM_size][TQDCM_size]
Definition: TQPlots.h:28
TH2F * fTQDCM[TQDCM_size][TQDCM_size]
Definition: TQPlots.h:27
unsigned int fADC
Charge of hit in TDC units.
TH2F * fTimingALLvsHour
Definition: TQPlots.h:32
TRandom3 r(0)
static HistoSet & Instance()
Definition: HistoSet.cxx:24
static Settings & Instance()
Definition: Settings.cxx:12
TH1F * fTPlotZOOM
Definition: TQPlots.h:30
virtual void om::SummarySubscriber::GetRawEventSummary ( const RawEventSummary res)
inlinevirtualinherited

Interface to the event summary.

Reimplemented in om::TriggerPlots, om::RawEventErrors, and om::HitCounts.

Definition at line 32 of file SummarySubscriber.h.

32 { abort(); };

Member Data Documentation

TH1F* om::TQPlots::fQPlotALL
private

Definition at line 31 of file TQPlots.h.

Referenced by GetNanoSliceSummary(), and TQPlots().

TH2F* om::TQPlots::fTimingALLvsHour
private

Definition at line 32 of file TQPlots.h.

Referenced by GetNanoSliceSummary(), and TQPlots().

TH2F* om::TQPlots::fTimingZOOMvsHour
private

Definition at line 33 of file TQPlots.h.

Referenced by GetNanoSliceSummary(), and TQPlots().

TH1F* om::TQPlots::fTPlotALL
private

Definition at line 29 of file TQPlots.h.

Referenced by GetNanoSliceSummary(), and TQPlots().

TH1F* om::TQPlots::fTPlotZOOM
private

Definition at line 30 of file TQPlots.h.

Referenced by GetNanoSliceSummary(), and TQPlots().

TH2F* om::TQPlots::fTQDCM[TQDCM_size][TQDCM_size]
private

Definition at line 27 of file TQPlots.h.

Referenced by GetNanoSliceSummary(), and TQPlots().

TH2F* om::TQPlots::fTQDCMnumi[TQDCM_size][TQDCM_size]
private

Definition at line 28 of file TQPlots.h.

Referenced by GetNanoSliceSummary(), and TQPlots().


The documentation for this class was generated from the following files: