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(TH1D*& temphist, std::string& status);
123
131 void setHistPars(TH2D* hist, TH1F* hmean, TH1F* hsigma, int nbin);
132
141 void drawHistPars(TH1F* hist, int nbin, double pars, double fac, std::string var);
142
146 void setPlotStyle();
147
152 void setTextStyle(TPaveText*& obj);
153
158 void setHistStyle(TH1* obj);
159
167 void setPadStyle(double l, double r, double t, double b);
168
173 void setBEvtInfo(TPaveText* pt);
174
175 private:
176
177 std::string m_iexprun{""};
178 std::string m_status{""};
179 double m_mean{0.0};
180 double m_sigma{0.0};
182 int m_exp{0};
183 int m_run{0};
184 double m_dbrg{0.};
185 int m_nallevt{0};
187 int m_nhadevt{0};
189 std::string mmode;
191 //DQM analysis and Mirabelle
192 TCanvas* c_pr_dedx = nullptr;
193 TCanvas* c_ir_dedx = nullptr;
195 TF1* f_gaus = nullptr;
196 TLine* l_line = nullptr;
198 unsigned first{0};
199 unsigned last{0};
203 };
205} // 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 drawWireStatus()
function to draw ADC-based dead wire status of CDC
void drawHistPars(TH1F *hist, int nbin, double pars, double fac, std::string var)
function to draw the histograms
void setHistStyle(TH1 *obj)
function to set the style of histogram
MonitoringObject * m_monObj
MonitoringObject for mirabelle.
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
TCanvas * 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
void endRun() override final
end of each run
void setPadStyle(double l, double r, double t, double b)
function to reset pad margins
void getMetadata()
function to get metadata from histogram
void setBEvtInfo(TPaveText *pt)
function to set the bhabha event info
void beginRun() override final
begin each run
void drawDedxPR()
function to draw dEdx+Fit
void fitHistogram(TH1D *&temphist, std::string &status)
function to fit gaussian dist.
void drawDedxIR()
function to draw dEdx+Fit for run variation
void setTextStyle(TPaveText *&obj)
function to add text style
std::string mmode
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.