Belle II Software  release-06-01-15
DQMHistAnalysisTRGGDL.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #ifndef TRGGDLDQMANALYSISMODULE_H
10 #define TRGGDLDQMANALYSISMODULE_H
11 
12 #pragma once
13 
14 #ifdef _BELLE2_EPICS
15 // EPICS
16 #include "cadef.h"
17 #endif
18 
19 //DQM
20 #include <dqm/analysis/modules/DQMHistAnalysis.h>
21 
22 
23 //ARICH
24 #include <arich/utility/ARICHChannelHist.h>
25 
26 #include <vector>
27 
28 #include <TCanvas.h>
29 #include <TLine.h>
30 #include <TH2Poly.h>
31 
32 namespace Belle2 {
42 
43  public:
44 
49 
54 
59  virtual void initialize() override;
60 
65  virtual void beginRun() override;
66 
70  virtual void event() override;
71 
76  virtual void endRun() override;
77 
82  virtual void terminate() override;
83 
84  protected:
85  bool m_debug;
89  static const int nskim_gdldqm = 11;
90  std::string skim_smap[nskim_gdldqm] = {
91  "all",
92  "hadron",
93  "tautau",
94  "mumu1trk",
95  "mumu2trk",
96  "gammagamma",
97  "bhabha",
98  "hadronb",
99  "hadronb1",
100  "hadronb2",
101  "mumutight"
102  };
106  TH1D* m_h_psn_pure_extra = nullptr;
107  TCanvas* m_c_eff[nskim_gdldqm] = {};
108  TCanvas* m_c_eff_fast[nskim_gdldqm] = {};
109  TH1D* m_h_eff[nskim_gdldqm] = {};
111  static const int n_eff = 40;
113  const char* c_eff[n_eff] = {
114  "fff with c4|hie",
115  "ffo with c4|hie",
116  "ffb with c4|hie",
117  "ffy with c4|hie",
118  "fyo with c4|hie",
119  "fyb with c4|hie",
120  "hie with fff|ffo|ffb",
121  "c4 with fff|ffo|ffb",
122  "lml0 with fff|ffo|ffb",
123  "lml1 with fff|ffo|ffb",
124  "lml2 with fff|ffo|ffb",
125  "lml3 with fff|ffo|ffb",
126  "lml4 with fff|ffo|ffb",
127  "lml5 with fff|ffo|ffb",
128  "lml6 with fff|ffo|ffb",
129  "lml7 with fff|ffo|ffb",
130  "lml8 with fff|ffo|ffb",
131  "lml9 with fff|ffo|ffb",
132  "lml10 with fff|ffo|ffb",
133  "lml12 with fff|ffo|ffb",
134  "lml13 with fff|ffo|ffb",
135  "bha3d with all",
136  "mu_b2b with fff|ffo|ffb",
137  "mu_b2b with lml|eclmumu",
138  "mu_eb2b with lml|eclmumu",
139  "cdcklm1 with fff|ffo|ffb",
140  "cdcklm2 with fff|ffo|ffb",
141  "fff with lml|eclmumu",
142  "ffo with lml|eclmumu",
143  "ffb with lml|eclmumu",
144  "ff with lml|eclmumu",
145  "f with lml|eclmumu",
146  "ffy with lml|eclmumu",
147  "fyo with lml|eclmumu",
148  "fyb with lml|eclmumu",
149  "cdcecl2 with fff|ffo|ffb",
150  "ecleklm with lml|eclmumu",
151  "syo with c4|hie",
152  "yioiecl1 with c4|hie",
153  "stt with c4|hie"
154  };
155 
156  TCanvas* m_c_eff_shifter = nullptr;
157  TCanvas* m_c_eff_shifter_fast = nullptr;
158  TH1D* m_h_eff_shifter = nullptr;
159  TH1D* m_h_eff_shifter_fast = nullptr;
160  static const int n_eff_shifter = 14;
161  const char* c_eff_shifter[n_eff_shifter] = {
162  "CDC fff",
163  "CDC ffo",
164  "CDC ffy",
165  "CDC fyo",
166  "ECL hie",
167  "ECL c4",
168  "BKLM b2b",
169  "EKLM b2b",
170  "CDC-BKLM>1",
171  "CDC-ECL>1",
172  "ECL-EKLM>0",
173  "CDC syo",
174  "CDC yio",
175  "CDC stt"
176  };
177  TCanvas* m_c_pure_eff = nullptr;
178  TH1D* m_h_pure_eff = nullptr;
179  static const int n_pure_eff = 8;
181  const char* c_pure_eff[n_pure_eff] = {
182  "fff with c4|hie",
183  "ffo with c4|hie",
184  "ffb with c4|hie",
185  "ffy with c4|hie",
186  "fyo with c4|hie",
187  "fyb with c4|hie",
188  "hie with fff|ffo|ffb",
189  "c4 with fff|ffo|ffb"
190  };
191 
195  0.80, 0.80, 0.80, 0.80, 0.80, 0.80, 0.35, 0.05, 0.25, 0.80, 0.20, 0.40, 0.00, 0.70
196  };
198  0.95, 0.95, 0.95, 0.95, 1.00, 1.00, 0.50, 0.20, 0.55, 1.00, 0.40, 0.70, 1.00, 0.90
199  };
201  TH1* m_rtype = nullptr;
202  TString m_runtype;
206 
207 #ifdef _BELLE2_EPICS
208  chid mychid[n_eff_shifter];// hard limit max 10 parameters
209  chid mychid_entry[nskim_gdldqm];
210 #endif
211 
212  };
213 
215 } // Belle2 namespace
216 
217 #endif
The base class for the histogram analysis module.
Make summary of data quality from reconstruction.
TH1D * m_h_eff_shifter_fast
Histogram for TRGGDL efficiency, simplified one for CR shifter.
static const int n_eff_shifter
number of bins for the simplified efficiency histogram
TCanvas * m_c_eff_shifter_fast
Canvas for TRGGDL efficiency, simplified one for CR shifter.
TCanvas * m_c_eff_fast[nskim_gdldqm]
Canvas for TRGGDL efficiency in each HLT skim.
virtual void initialize() override
Initialize the Module.
TH1D * m_h_eff_fast[nskim_gdldqm]
Histogram for TRGGDL efficiency in each HLT skim.
TH1 * m_rtype
histogram from DQMInfo with runtype
bool m_enableAlert
Enable alert by base color of canvases.
TString m_runtype
string with runtype: physics or cosmic
static const int nskim_gdldqm
number of HLT skims
virtual void event() override
Event processor.
TLine * m_line_limit_high_shifter[n_eff_shifter]
upper limit line for the simplified efficiency histogram
virtual void endRun() override
End-of-run action.
double m_limit_low_shifter[n_eff_shifter]
lower limit value in each bin
TH1D * m_h_pure_eff
Histogram for TRGGDL efficiency with offline selection.
virtual void terminate() override
Termination action.
TLine * m_line_limit_low_shifter[n_eff_shifter]
lower limit line for the simplified efficiency histogram
TH1D * m_h_eff[nskim_gdldqm]
Histogram for TRGGDL efficiency in each HLT skim.
const char * c_eff[n_eff]
label of bins for the efficiency histogram
std::string skim_smap[nskim_gdldqm]
name of HLT skims
TH1D * m_h_eff_shifter
Histogram for TRGGDL efficiency, simplified one for CR shifter.
TH1D * m_h_psn_extra_fast[nskim_gdldqm]
DQM Histogram for PSN bits in each HLT skim.
virtual void beginRun() override
Called when entering a new run.
double m_limit_high_shifter[n_eff_shifter]
upper limit value in each bin
TH1D * m_h_psn_pure_extra
DQM Histogram for PSN bits with offline selection.
static const int n_pure_eff
number of bins for the efficiency histogram with offline selection
TH1D * m_h_psn_extra[nskim_gdldqm]
DQM Histogram for PSN bits in each HLT skim.
TCanvas * m_c_pure_eff
Canvas for TRGGDL efficiency with offline selection.
bool m_useEpics
flag if to export to EPICS
TCanvas * m_c_eff[nskim_gdldqm]
Canvas for TRGGDL efficiency in each HLT skim.
const char * c_pure_eff[n_pure_eff]
label of bins for the efficiency histogram with offline selection
TCanvas * m_c_eff_shifter
Canvas for TRGGDL efficiency, simplified one for CR shifter.
static const int n_eff
number of bins for the efficiency histogram
const char * c_eff_shifter[n_eff_shifter]
label of bins for the simplified efficiency histogram
Abstract base class for different kinds of events.