10 #include <dqm/analysis/modules/DQMHistAnalysisARICH.h>
32 DQMHistAnalysisARICHModule::DQMHistAnalysisARICHModule()
36 setDescription(
"Modify and analyze the data quality histograms of ARICH");
51 for (
int i = 0; i < 5; i++) {
61 m_apdPoly->SetTitle(
"# of hits/APD/event");
65 B2DEBUG(20,
"DQMHistAnalysisARICH: initialized.");
74 TH1* m_h_mergerHit =
findHist(
"ARICH/mergerHit");
79 m_h_mergerHit->SetMinimum(0);
80 m_h_mergerHit->Draw(
"hist");
84 double mean = m_h_mergerHit->Integral() / 72;
85 for (
int i = 0; i < 72; i++) {
86 int hit = m_h_mergerHit->GetBinContent(i + 1);
87 if ((
bool)hit ^ (
bool)m_h_mergerHit->GetEntries()) {
95 if (hit > mean * 100 && alertMerger < 1) alertMerger = 1;
100 for (
int i = 0; i < 5; i++) {
101 m_LineForMB[i]->DrawLine(12 * (i + 1) + 0.5, 0, 12 * (i + 1) + 0.5, gPad->GetUymax());
106 B2INFO(
"Histogram/canvas named mergerHit is not found.");
111 TH1* m_h_bits =
findHist(
"ARICH/bits");
113 if (m_h_bits != NULL &&
m_c_bits != NULL) {
116 m_h_bits->SetMinimum(0);
117 m_h_bits->Draw(
"hist");
122 double side = m_h_bits->GetBinContent(2) + m_h_bits->GetBinContent(5);
123 double center = m_h_bits->GetBinContent(3) + m_h_bits->GetBinContent(4);
124 if (center / side < 2) alertBits = 1;
125 if (center / side < 1.5) alertBits = 2;
130 B2INFO(
"Histogram/canvas named bits is not found.");
134 TH1* m_h_hitsPerEvent =
findHist(
"ARICH/hitsPerEvent");
139 m_h_hitsPerEvent->SetMinimum(0);
140 m_h_hitsPerEvent->Draw(
"hist");
143 int alertHitsPerEvent = 0;
144 double mean = m_h_hitsPerEvent->GetMean();
145 if (mean < 1) alertHitsPerEvent = 1;
146 double entry = m_h_hitsPerEvent->GetEntries();
147 if (entry == 0) alertHitsPerEvent = 2;
152 B2INFO(
"Histogram/canvas named hitsPerEvent is not found.");
156 TH1* m_h_chHit =
findHist(
"ARICH/chipHit");
157 if (m_h_chHit != NULL) {
159 TH1* htmp =
findHist(
"ARICH/hitsPerEvent");
160 if (htmp) nevt = htmp->GetEntries();
162 if (nevt)
m_apdHist->Scale(1. /
float(nevt));
174 B2INFO(
"Histogram named chipHit is not found.");
181 B2DEBUG(20,
"DQMHistAnalysisARICH : endRun called");
187 B2DEBUG(20,
"terminate called");
ARICH histogram with HAPD plane 3 options for bin segmentation are available type 0 - one bin per HAP...
void fillFromTH1(TH1 *hist)
Fill the channelHist from the histogram Type 0 channelHist has to be filled with 420*144bin TH1 (each...
void setPoly(TH2Poly *poly)
Fill pure TH2Poly from ARICHChannelHist, makes bins and fills content.
void initialize() override final
Initialize the Module.
TCanvas * m_c_apdHist
Canvas for 2D hit map of APDs.
TH2Poly * m_apdPoly
hit map for each APD
TLine * m_LineForMB[5]
Lines to divide the sectors on mergerHit histogram.
TCanvas * m_c_mergerHit
Canvas for modified mergerHit histogram.
bool m_enableAlert
Enable alert by base color of canvases.
Belle2::ARICHChannelHist * m_apdHist
ARICH TObject to draw hit map for each APD.
void terminate() override final
Termination action.
void event() override final
Event processor.
void endRun() override final
End-of-run action.
TCanvas * m_c_bits
Canvas for modified bits histogram.
std::vector< int > maskedMergers
The id numbers of masked merger boards to avoid unnecessary alert.
TCanvas * m_c_hitsPerEvent
Canvas for modified hitsPerTrack histogram.
~DQMHistAnalysisARICHModule()
Destructor.
int alertColor[3]
Alert color of canvases.
The base class for the histogram analysis module.
TCanvas * findCanvas(TString cname)
Find canvas by name.
static TH1 * findHist(const std::string &histname, bool onlyIfUpdated=false)
Get histogram from list (no other search).
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.