Belle II Software  release-08-01-10
DQMHistAnalysisPXDER.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 <dqm/core/DQMHistAnalysis.h>
12 #include <TFile.h>
13 
14 namespace Belle2 {
22 
23  public:
24 
29 
34 
38  void initialize() override final;
39 
43  void beginRun() override final;
44 
48  void event() override final;
49 
50 
51  private:
52 
54  //TDirectory* m_oldDir;
55 
57 // TH1I* m_fHitMapCountsFlag;
59 // TH1I* m_fHitMapClCountsFlag;
61  TH1I* m_fFiredFlag = nullptr;
63  TH1I* m_fClustersFlag = nullptr;
65  TH1I* m_fStartRowFlag = nullptr;
67  TH1I* m_fChargStartRowFlag = nullptr;
69  TH1I* m_fStartRowCountFlag = nullptr;
71  TH1I* m_fClusterChargeFlag = nullptr;
73  TH1I* m_fPixelSignalFlag = nullptr;
75  TH1I* m_fClusterSizeUFlag = nullptr;
77  TH1I* m_fClusterSizeVFlag = nullptr;
79  TH1I* m_fClusterSizeUVFlag = nullptr;
80 
81  // Name the histograms, we have to find them anyway every event
83 // std::string m_hitMapCounts;
85 // std::string m_hitMapClCounts;
86 
88  std::vector <std::string> m_fired;
90  std::vector <std::string> m_clusters;
92  std::vector <std::string> m_startRow;
94  std::vector <std::string> m_chargStartRow;
96  std::vector <std::string> m_startRowCount;
98  std::vector <std::string> m_clusterCharge;
100  std::vector <std::string> m_pixelSignal;
102  std::vector <std::string> m_clusterSizeU;
104  std::vector <std::string> m_clusterSizeV;
106  std::vector <std::string> m_clusterSizeUV;
107 
108 
110  std::vector <std::string> m_ref_fired;
112  std::vector <std::string> m_ref_clusters;
114  std::vector <std::string> m_ref_startRow;
116  std::vector <std::string> m_ref_chargStartRow;
118  std::vector <std::string> m_ref_startRowCount;
120  std::vector <std::string> m_ref_clusterCharge;
122  std::vector <std::string> m_ref_pixelSignal;
124  std::vector <std::string> m_ref_clusterSizeU;
126  std::vector <std::string> m_ref_clusterSizeV;
128  std::vector <std::string> m_ref_clusterSizeUV;
129 
131  //int m_nPixels;
133  int c_nVXDLayers = 0;
135  int c_nPXDLayers = 0;
137  int c_nSVDLayers = 0;
141  int c_lastVXDLayer = 0;
145  int c_lastPXDLayer = 0;
149  int c_lastSVDLayer = 0;
151  int c_nPXDSensors = 0;
152 
159  void getIDsFromIndex(const int Index, int& Layer, int& Ladder, int& Sensor) const;
185  int SetFlag(int Type, int bin, const double* pars, double ratio, const std::string& name_hist, const std::string& name_refhist,
186  TH1I* flaghist);
212 // int SetFlag(int Type, int bin, double* pars, double ratio, TH1I* hist, TH1I* refhist, TH1I* flaghist);
213 
217  std::string m_refFileName;
219  TFile* m_refFile = nullptr;
220 
221  };
222 
224 }
225 
The base class for the histogram analysis module.
int c_nPXDLayers
Number of PXD layers on Belle II.
std::string m_refFileName
Reference Histogram Root file name.
void initialize() override final
Initializer.
std::vector< std::string > m_chargStartRow
Cluster seed charge by distance from the start row.
std::vector< std::string > m_startRow
Start row distribution.
std::vector< std::string > m_ref_clusterCharge
Charge of clusters.
TH1I * m_fClusterSizeUFlag
Flags of u cluster size.
int c_firstVXDLayer
First VXD layer on Belle II.
std::vector< std::string > m_ref_clusterSizeV
v cluster size
int c_lastVXDLayer
Last VXD layer on Belle II.
std::vector< std::string > m_clusterSizeU
u cluster size
TH1I * m_fPixelSignalFlag
Flags of Charge of pixels.
std::vector< std::string > m_ref_startRow
Start row distribution.
int c_lastPXDLayer
Last PXD layer on Belle II.
std::vector< std::string > m_ref_clusterSizeU
u cluster size
std::vector< std::string > m_clusters
Clusters per event.
std::vector< std::string > m_ref_startRowCount
counter for Cluster seed charge by distance from the start row
TH1I * m_fStartRowFlag
Flags of Start row distribution.
TH1I * m_fClusterSizeUVFlag
Flags of Cluster size.
std::vector< std::string > m_clusterSizeUV
Cluster size.
int c_firstPXDLayer
First PXD layer on Belle II.
TH1I * m_fStartRowCountFlag
Flags of counter for Cluster seed charge by distance from the start row.
TH1I * m_fChargStartRowFlag
Flags of Cluster seed charge by distance from the start row.
void event() override final
This method is called for each event.
TH1I * m_fClusterSizeVFlag
Flags of v cluster size.
TH1I * m_fClustersFlag
Flags of Clusters per event.
std::vector< std::string > m_startRowCount
counter for Cluster seed charge by distance from the start row
std::string m_histogramDirectoryName
Function return flag histogram filled based on condition from TH1I source.
std::vector< std::string > m_clusterSizeV
v cluster size
std::vector< std::string > m_pixelSignal
Charge of pixels.
std::vector< std::string > m_ref_clusterSizeUV
Cluster size.
std::vector< std::string > m_ref_clusters
Clusters per event.
void beginRun() override final
Called when entering a new run.
TH1I * m_fClusterChargeFlag
Flags of Charge of clusters.
int SetFlag(int Type, int bin, const double *pars, double ratio, const std::string &name_hist, const std::string &name_refhist, TH1I *flaghist)
Function return flag histogram filled based on condition from TH1F source.
std::vector< std::string > m_fired
Hitmaps of Digits.
TH1I * m_fFiredFlag
Basic Directory in output file.
std::vector< std::string > m_ref_chargStartRow
Cluster seed charge by distance from the start row.
std::vector< std::string > m_ref_pixelSignal
Charge of pixels.
int c_nPXDSensors
Number of PXD sensors on Belle II.
std::vector< std::string > m_clusterCharge
Charge of clusters.
void getIDsFromIndex(const int Index, int &Layer, int &Ladder, int &Sensor) const
Function return index of sensor in plots.
int c_nVXDLayers
Number of pixels on PXD v direction.
std::vector< std::string > m_ref_fired
Fired pixels per event.
int c_firstSVDLayer
First SVD layer on Belle II.
int c_nSVDLayers
Number of SVD layers on Belle II.
int c_lastSVDLayer
Last SVD layer on Belle II.
TFile * m_refFile
The pointer to the reference file.
Abstract base class for different kinds of events.