Belle II Software  release-06-00-14
DQMHistAnalysisPXDTrackCharge.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 // File : DQMHistAnalysisPXDTrackCharge.h
10 // Description : DQM Analysis for PXD Tracked Cluster Charges
11 //-
12 
13 #pragma once
14 
15 #ifdef _BELLE2_EPICS
16 // EPICS
17 #include "cadef.h"
18 #endif
19 
20 #include <dqm/analysis/modules/DQMHistAnalysis.h>
21 #include <vxd/dataobjects/VxdID.h>
22 
23 #include <vector>
24 #include <array>
25 #include <TF1.h>
26 #include "TF1Convolution.h"
27 #include <TCanvas.h>
28 #include <TLine.h>
29 #include <TGraphErrors.h>
30 #include <TFile.h>
31 #include <TH2.h>
32 
33 #include <RooRealVar.h>
34 #include <RooWorkspace.h>
35 
36 namespace Belle2 {
44 
45  // Public functions
46  public:
47 
52  private:
53 
55  void initialize(void) override final;
56 
58  void beginRun(void) override final;
59  void event(void) override final;
60  void endRun(void) override final;
61  void terminate(void) override final;
62 
68  TH1* GetHisto(TString histoname);
69 
70  // Data members
71 
75  std::string m_pvPrefix;
77  double m_rangeLow;
79  double m_rangeHigh;
80 
82  std::vector<VxdID> m_PXDModules;
83 
85  RooWorkspace* m_rfws{};
87  RooRealVar* m_x{};
88 
90  TF1* m_fMean = nullptr;
92  TGraphErrors* m_gCharge = nullptr;
94  TCanvas* m_cCharge = nullptr;
96  std::map<VxdID, TCanvas*> m_cChargeMod {};
98  std::map<VxdID, std::array<std::array<TCanvas*, 4>, 6>> m_cChargeModASIC {};
100  TH1F* m_hTrackedClusters = nullptr;
102  TCanvas* m_cTrackedClusters = nullptr;
104  std::map<VxdID, TH2F*> m_hChargeModASIC2d {};
106  std::map<VxdID, TCanvas*> m_cChargeModASIC2d {};
107 
109  TLine* m_line_up{};
111  TLine* m_line_mean{};
113  TLine* m_line_low{};
114 
116  std::string m_refFileName;
118  TFile* m_refFile = nullptr;
120  bool m_color = true;
121 
124 
127 
128 #ifdef _BELLE2_EPICS
130  std::vector <chid> mychid;
131 #endif
132  };
134 } // end namespace Belle2
135 
The base class for the histogram analysis module.
DQM Histogram Analysis for PXD Cluster Charge.
void terminate(void) override final
This method is called at the end of the event processing.
std::string m_refFileName
Reference Histogram Root file name.
bool m_color
Whether to use the color code for warnings and errors.
std::map< VxdID, std::array< std::array< TCanvas *, 4 >, 6 > > m_cChargeModASIC
Final Canvases for Fit and Ref per ASIC.
std::map< VxdID, TH2F * > m_hChargeModASIC2d
Final Canvas Fit and Ref per ASIC.
void initialize(void) override final
Module functions to be called from main process.
void endRun(void) override final
This method is called if the current run ends.
TLine * m_line_up
TLine object for upper limit of track cluster charge.
TGraphErrors * m_gCharge
Graph covering all modules.
std::vector< VxdID > m_PXDModules
IDs of all PXD Modules to iterate over.
std::string m_histogramDirectoryName
name of histogram directory
TH1 * GetHisto(TString histoname)
Get histogram by its name.
TLine * m_line_mean
TLine object for mean of track cluster charge.
TLine * m_line_low
TLine object for lower limit of track cluster charge.
TH1F * m_hTrackedClusters
Histogram for TrackedClusters.
TCanvas * m_cTrackedClusters
Final Canvas for TrackedClusters.
std::map< VxdID, TCanvas * > m_cChargeMod
Final Canvases for Fit and Ref.
void beginRun(void) override final
Module functions to be called from event process.
void event(void) override final
This method is the core of the module.
std::map< VxdID, TCanvas * > m_cChargeModASIC2d
Final Canvas Fit and Ref per ASIC.
TFile * m_refFile
The pointer to the reference file.
MonitoringObject is a basic object to hold data for the run-dependency monitoring Run summary TCanvas...
Abstract base class for different kinds of events.