Belle II Software  release-08-01-10
DQMHistAnalysisCDCMonObj.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 //DQM
12 #include <dqm/core/DQMHistAnalysis.h>
13 
14 #include <framework/database/DBArray.h>
15 #include <framework/database/DBObjPtr.h>
16 #include <cdc/dataobjects/WireID.h>
17 #include <cdc/dbobjects/CDCChannelMap.h>
18 #include <cdc/dbobjects/CDCGeometry.h>
19 
20 #include <TH2Poly.h>
21 
22 
23 namespace Belle2 {
33 
34  public:
35 
40 
45 
50  void initialize() override final;
51 
56  void beginRun() override final;
57 
62  void endRun() override final;
63 
68  void terminate() override final;
69 
73  void makeBadChannelList();
74 
75 
79  float getHistMean(TH1D* h) const;
80 
84  float getHistMedian(TH1D* h) const;
85 
89  std::pair<int, int> getBoardChannel(unsigned short layer, unsigned short wire);
90 
94  void configureBins(TH2Poly* h);
95  protected:
96  //TObjects for DQM analysis
97  TCanvas* m_cMain = nullptr;
98  TCanvas* m_cADC = nullptr;
99  TCanvas* m_cTDC = nullptr;
100  TCanvas* m_cHit = nullptr;
104  TH2F* m_hADC = nullptr;
105  TH2F* m_hTDC = nullptr;
106  TH2F* m_hHit = nullptr;
107  TH1D* m_hADCs[300];
108  TH1D* m_hTDCs[300];
109  TH1D* m_hHits[56];
111  TH2Poly* h2p = nullptr;
112  TH2F* hBadChannel = nullptr;
113  TH2F* hBadChannelBC = nullptr;
115  std::vector<std::pair<int, int>> m_badChannels = {};
116  std::map<WireID, std::pair<int, int>> m_chMap = {};
118  float m_senseR[56] = {};
119  float m_fieldR[57] = {};
120  float m_offset[56] = {};
121  int m_nSenseWires[56] = {};
123  };
124 
126 } // Belle2 namespace
127 
128 
Class for accessing arrays of objects in the database.
Definition: DBArray.h:26
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Make summary of data quality from reconstruction.
std::map< WireID, std::pair< int, int > > m_chMap
Channel map retrieved
void initialize() override final
Initialize the Module.
DBArray< CDCChannelMap > * m_channelMapFromDB
Channel map retrieved from DB.
std::vector< std::pair< int, int > > m_badChannels
bad wires list
int m_nSenseWires[56]
number of wires for each layer.
TH1D * m_hTDCs[300]
TDC histograms with track associated hits for each board (0-299)
MonitoringObject * m_monObj
monitoring object
void terminate() override final
Termination action.
DBObjPtr< CDCGeometry > * m_cdcGeo
Geometry of CDC.
TH2F * m_hTDC
Summary of TDC histograms with track associated hits.
TH1D * m_hADCs[300]
ADC histograms with track associated hits for each board (0-299)
TH2F * hBadChannel
bad channel map;wire;layer
std::pair< int, int > getBoardChannel(unsigned short layer, unsigned short wire)
Get board/channel from layer/wire.
TH1D * m_hHits[56]
hit histograms for each layer (0-55)
void endRun() override final
End-of-run action.
void configureBins(TH2Poly *h)
Configure bins of TH2Poly.
float getHistMean(TH1D *h) const
Get mean of ADC histogram excluding 0-th bin.
void beginRun() override final
Called when entering a new run.
TH2F * m_hADC
Summary of ADC histograms with track associated hits.
TH2F * hBadChannelBC
bad channel map per board/channel;board;channel
float m_fieldR[57]
Radius of field layer.
float getHistMedian(TH1D *h) const
Get median of ADC histogram excluding 0-th bin.
float m_senseR[56]
Radius of sense (+field) layer.
TH2F * m_hHit
Summary of hit histograms.
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.