Belle II Software  release-06-01-15
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/analysis/modules/DQMHistAnalysis.h>
13 #include <framework/datastore/StoreArray.h>
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 <vector>
21 
22 #include <TCanvas.h>
23 #include <TLine.h>
24 #include <TH1F.h>
25 #include <TH2F.h>
26 #include <TH2Poly.h>
27 #include <TString.h>
28 
29 
30 namespace Belle2 {
40 
41  public:
42 
47 
52 
57  virtual void initialize() override;
58 
63  virtual void beginRun() override;
64 
68  virtual void event() override;
69 
74  virtual void endRun() override;
75 
80  virtual void terminate() override;
81 
85  void makeBadChannelList();
86 
87 
91  float getHistMean(TH1D* h);
92 
96  std::pair<int, int> getBoardChannel(unsigned short layer, unsigned short wire);
97 
101  void configureBins(TH2Poly* h);
102  protected:
103  //TObjects for DQM analysis
104  TCanvas* m_cMain = nullptr;
105  TCanvas* m_cADC = nullptr;
106  TCanvas* m_cTDC = nullptr;
107  TCanvas* m_cHit = nullptr;
111  TH2F* m_hADC = nullptr;
112  TH2F* m_hTDC = nullptr;
113  TH2F* m_hHit = nullptr;
114  TH1D* m_hADCs[300];
115  TH1D* m_hTDCs[300];
116  TH1D* m_hHits[56];
118  TH2Poly* h2p = nullptr;
119  TH2F* hBadChannel = nullptr;
120  TH2F* hBadChannelBC = nullptr;
122  std::vector<std::pair<int, int>> m_badChannels = {};
123  std::map<WireID, std::pair<int, int>> m_chMap = {};
125  float m_senseR[56] = {};
126  float m_fieldR[57] = {};
127  float m_offset[56] = {};
128  int m_nSenseWires[56] = {};
130  };
131 
133 } // Belle2 namespace
134 
135 
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
virtual void initialize() override
Initialize the Module.
DBArray< CDCChannelMap > * m_channelMapFromDB
Channel map retrieved from DB.
virtual void event() override
Event processor.
std::vector< std::pair< int, int > > m_badChannels
bad wires list
int m_nSenseWires[56]
number of wires for each layer.
float getHistMean(TH1D *h)
Get mean of ADC histgram excluding 0-th bin.
virtual void endRun() override
End-of-run action.
TH1D * m_hTDCs[300]
TDC histograms with track associated hits (0-299)
virtual void terminate() override
Termination action.
MonitoringObject * m_monObj
monitoring object
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 (0-299)
virtual void beginRun() override
Called when entering a new run.
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 configureBins(TH2Poly *h)
Configure bins of TH2Poly.
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 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.