Belle II Software development
DQMHistAnalysisCDCEpics.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 <framework/database/DBArray.h>
12#include <framework/database/DBObjPtr.h>
13#include <dqm/core/DQMHistAnalysis.h>
14
15#include <TROOT.h>
16#include <TLine.h>
17#include <TH2F.h>
18#include <TH1F.h>
19#include <TStyle.h>
20#include <TLine.h>
21#include <numeric>
22#include <iostream>
23
24namespace Belle2 {
34
35 public:
36
41
46
50 void initialize() override final;
51
55 void beginRun() override final;
56
60 void event() override final;
61
65 void endRun() override final;
66
70 void terminate() override final;
71
75 void getHistStyle(TH1F*& htemp, std::string label, double max) const
76 {
77 gStyle->SetOptStat("ne");
78 if (strcmp(label.data(), "adc") == 0)htemp->GetYaxis()->SetRangeUser(max * 0.25, max * 2.25);
79 else if (strcmp(label.data(), "tdc") == 0)htemp->GetYaxis()->SetRangeUser(max * 0.90, max * 1.10);
80 htemp->Sumw2(0);
81 };
82
86 float getHistMedian(TH1D* h) const;
87
88
89 protected:
90
91 //Canvas for DQM analysis IR plots
92 TCanvas* c_hist_adc = nullptr;
93 TH1F* m_hist_adc = nullptr;
95 TCanvas* c_hist_tdc = nullptr;
96 TH1F* m_hist_tdc = nullptr;
98 TCanvas* c_hist_crphi = nullptr;
99 TH1D* m_hist_crphi = nullptr;
101 TCanvas* c_hist_effphi = nullptr;
102 TH1D* m_hist_effphi = nullptr;
104 TCanvas* c_hist_skimphi = nullptr;
105 TH1D* m_hist_skimphi[8] = {nullptr};
107 TLine* m_line_ladc = nullptr;
108 TLine* m_line_hadc = nullptr;
109 TLine* m_line_ltdc = nullptr;
110 TLine* m_line_htdc = nullptr;
112 std::string m_histoDir = "";
113 std::string m_histoADC = "";
114 std::string m_histoTDC = "";
115 std::string m_histoPhiIndex = "";
116 std::string m_histoPhiEff = "";
117 std::string m_pvPrefix = "";
118 std::string m_refDir = "";
119 std::string m_refNamePhi = "";
121 TFile* m_fileRefPhi = nullptr;
122 TH2F* m_histref_phiindex = nullptr;
123 TH1D* m_hist_refphi = nullptr;
126 double m_minadc;
127 double m_maxadc;
128 double m_mintdc;
129 double m_maxtdc;
130 double m_phistop;
132 double m_phiwarn;
134 TH1D* m_hADCs[300];
135 TH1D* m_hTDCs[300];
136 };
138} // Belle2 namespace
Make summary of data quality from reconstruction.
TCanvas * c_hist_adc
canvas for adc board median
std::string m_refDir
reference histogram dir of CDC DQMs
void initialize() override final
Initialize the Module.
double m_minadc
min adc median thershold accepted
TLine * m_line_hadc
line for higher ADC window
int m_minevt
min events for single intra-run point
TCanvas * c_hist_effphi
canvas for tracking efficiency
std::string m_histoADC
ADC histogram names of CDC DQMs.
std::string m_histoDir
histogram dir of CDC DQMs
std::string m_histoTDC
TDC histogram names of CDC DQMs.
double m_phiwarn
warn thershold for phi differences
std::string m_refNamePhi
reference histogram of phi
TFile * m_fileRefPhi
reference histogram file point
TLine * m_line_htdc
line for higher TDC window
double m_phialarm
alram thershold for phi differences
double m_maxadc
max adc median thershold accepted
TH1D * m_hTDCs[300]
TDC histograms with track associated hits for each board (0-299)
double m_maxtdc
max tdc median thershold accepted
void getHistStyle(TH1F *&htemp, std::string label, double max) const
get histogram styles
TCanvas * c_hist_crphi
canvas for control shifter phi
void terminate() override final
Termination action.
void event() override final
intra-run actions (EPICC PVs).
std::string m_histoPhiEff
Phi Eff histogram names of CDC DQMs.
TCanvas * c_hist_tdc
canvas for tdc board median
TH1D * m_hADCs[300]
ADC histograms with track associated hits for each board (0-299)
double m_phistop
stop thershold for phi differences
TCanvas * c_hist_skimphi
canvas for various phi distribution
void endRun() override final
End-of-run action.
std::string m_histoPhiIndex
Phi Inedx histogram names of CDC DQMs.
TLine * m_line_ltdc
line for lower TDC window
TLine * m_line_ladc
line for lower ADC window
void beginRun() override final
Called when entering a new run.
float getHistMedian(TH1D *h) const
Get median of given histogram.
double m_mintdc
min tdc median thershold accepted
The base class for the histogram analysis module.
Abstract base class for different kinds of events.