Belle II Software development
DQMHistAnalysisCDCDedx.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#pragma once
10
11#include <boost/format.hpp>
12#include <TROOT.h>
13
14#include <TLine.h>
15#include <TPaveText.h>
16#include <TStyle.h>
17#include <TGaxis.h>
18#include <TColor.h>
19#include <TLegend.h>
20
21#include <TF1.h>
22#include <TCanvas.h>
23#include <TH1.h>
24#include <TH2D.h>
25
26#include <dqm/core/DQMHistAnalysis.h>
27#include <cdc/geometry/CDCGeometryParConstants.h>
28
29namespace Belle2 {
43
44 // Public functions
45 public:
46
51
55 void initialize() override final;
56
60 void beginRun() override final;
61
65 void event() override final;
66
70 void endRun() override final;
71
75 void terminate() override final;
76
80 void getMetadata();
81
85 void drawDedxPR();
86
90 void drawDedxIR();
91
95 void drawWireStatus();
96
100 void drawDedxCosPhi();
101
105 void drawBandPlot();
106
110 void drawDedxInjTime();
111
115 void drawDedxInjTimeBin();
116
122 void fitHistogram(TH1*& temphist, std::string& status);
123
131 void setHistPars(TH2D*& hist, TH1F*& hmean, TH1F*& hsigma, int nbin);
132
136 void setPlotStyle();
137
142 void setTextStyle(TPaveText* obj);
143
148 void setHistStyle(TH1* obj);
149
157 void setPadStyle(double l, double r, double t, double b);
158
163 void setBEvtInfo(TPaveText* pt);
164
165 private:
166
167 std::string m_iexprun{""};
168 std::string m_status{""};
169 double m_mean{0.0};
170 double m_sigma{0.0};
172 int m_exp{0};
173 int m_run{0};
174 double m_dbrg{0.};
175 int m_nallevt{0};
177 int m_nhadevt{0};
179 std::string m_mode;
181 //DQM analysis and Mirabelle
182 TCanvas* m_c_pr_dedx = nullptr;
183 TCanvas* m_c_ir_dedx = nullptr;
185 TF1* f_gaus = nullptr;
186 TLine* l_line = nullptr;
188 TPaveText* m_text_dedx_fit = nullptr;
189 TPaveText* m_text_dedx = nullptr;
190 TPaveText* m_text_dedx_ir = nullptr;
192 TPaveText* m_text_bandplot = nullptr;
193 TPaveText* m_text_dedxWire = nullptr;
195 TPaveText* m_text_mean = nullptr;
196 TPaveText* m_text_sigma = nullptr;
198 TH1F* m_hdEdxIRMean = nullptr;
199 TH1F* m_hdEdxIRSigma = nullptr;
200 TH1F* m_hMeanHer = nullptr;
201 TH1F* m_hSigmaHer = nullptr;
202 TH1F* m_hMeanLer = nullptr;
203 TH1F* m_hSigmaLer = nullptr;
204 TH1* m_hdEdxIRInd = nullptr;
206 TLegend* m_lego = nullptr;
207 TLegend* m_legoI = nullptr;
209 unsigned m_first{0};
210 unsigned m_last{0};
214 static const Int_t m_NRGBs = 6;
215 static const Int_t m_NCont = 255;
217 Int_t m_pal = 0;
219 };
221} // end namespace Belle2
DQM analysis module grab canvases from DQM module and perform higher level operation like histogram f...
void drawDedxInjTime()
function to draw the dEdx vs injection time
void drawDedxCosPhi()
function to draw dEdx vs costh and phi
void initialize() override final
init function for default values
void drawBandPlot()
function to dedx bands P
void setTextStyle(TPaveText *obj)
function to add text style
void drawWireStatus()
function to draw ADC-based dead wire status of CDC
TH1F * m_hdEdxIRMean
histogram for dE/dx mean vs events per run
TPaveText * m_text_dedx_fit
add dE/dx fit information
void setHistStyle(TH1 *obj)
function to set the style of histogram
TPaveText * m_text_mean
add dE/dx mean information
TH1 * m_hdEdxIRInd
histogram to calculate dE/dx mean and sigma in bins
TLegend * m_legoI
legends for LER/HER for mean and sigma
MonitoringObject * m_monObj
MonitoringObject for mirabelle.
TH1F * m_hSigmaHer
histogram for dE/dx sigma vs injection time (HER)
void terminate() override final
terminating at the end of last run
void drawDedxInjTimeBin()
function to draw the mean/reso of dedx vs injection time
void event() override final
event by event function
TPaveText * m_text_sigma
add dE/dx sigma information
TCanvas * m_c_ir_dedx
intra-run dedx status
void setHistPars(TH2D *&hist, TH1F *&hmean, TH1F *&hsigma, int nbin)
function to set the mean and sigma histograms
static const Int_t m_NCont
Total number of colors in the table.
TPaveText * m_text_dedxWire
add Wire information
void endRun() override final
end of each run
TH1F * m_hSigmaLer
histogram for dE/dx sigma vs injection time (LER)
void setPadStyle(double l, double r, double t, double b)
function to reset pad margins
Int_t m_palarr[m_NCont]
array of colors
void getMetadata()
function to get metadata from histogram
void setBEvtInfo(TPaveText *pt)
function to set the bhabha event info
void fitHistogram(TH1 *&temphist, std::string &status)
function to fit gaussian dist.
unsigned m_first
substring start value
void beginRun() override final
begin each run
TPaveText * m_text_dedx_ir
add dE/dx intra run information
void drawDedxPR()
function to draw dEdx+Fit
TPaveText * m_text_bandplot
add hadron event information
void drawDedxIR()
function to draw dEdx+Fit for run variation
TPaveText * m_text_dedx
add dE/dx bhabha event information
TH1F * m_hdEdxIRSigma
histogram for dE/dx sigma vs events per run
static const Int_t m_NRGBs
Number of end point colors that will form the gradients.
TH1F * m_hMeanLer
histogram for dE/dx mean vs injection time (LER)
TH1F * m_hMeanHer
histogram for dE/dx mean vs injection time (HER)
std::string m_mode
monitoring mode all/basic
void setPlotStyle()
function to add plot style
The base class for the histogram analysis module.
MonitoringObject is a basic object to hold data for the run-dependency monitoring Run summary TCanvas...
Abstract base class for different kinds of events.