Belle II Software  release-08-01-10
SVDHotStripFinderModule.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 #ifndef SVDHOTSTRIPFINDERMODULE_H
9 #define SVDHOTSTRIPFINDERMODULE_H
10 
11 #include <framework/core/Module.h>
12 #include <framework/datastore/StoreArray.h>
13 #include <framework/datastore/StoreObjPtr.h>
14 #include <framework/dataobjects/EventMetaData.h>
15 
16 #include <svd/dataobjects/SVDShaperDigit.h>
17 #include <vxd/dataobjects/VxdID.h>
18 
19 #include <svd/dataobjects/SVDHistograms.h>
20 #include <svd/dataobjects/SVDSummaryPlots.h>
21 
22 #include <string>
23 #include <TFile.h>
24 #include <TH1F.h>
25 #include <TH2F.h>
26 #include <TList.h>
27 
28 namespace Belle2 {
41  public:
44 
46  virtual ~SVDHotStripFinderModule();
47 
53  virtual void initialize() override;
54 
59  virtual void beginRun() override;
60 
65  virtual void event() override;
66 
71  virtual void endRun() override;
72 
74  virtual void terminate() override;
75 
76  private:
77 
78  /* user-defined parameters */
81  std::string m_rootFileName;
82  std::string m_ShaperDigitName;
83  float m_thr;
84  int m_base;
85  bool m_useHSFinderV1 = true;
86  float m_absThr;
87  float m_relOccPrec;
88  bool m_verbose;
90  /* ROOT file related parameters */
91  TFile* m_rootFilePtr = nullptr;
93  //dbobject related parameters
94  float m_zs;
95  int m_firstExp;
96  int m_firstRun;
97  int m_lastExp;
98  int m_lastRun;
101  static const int m_nLayers = 4;
102  static const int m_nLadders = 16;
103  static const int m_nSensors = 5;
104  static const int m_nSides = 2;
106  TList* m_histoList_occu = nullptr;
121  TH1F* h_tot_dqm = nullptr;
122  TH1F* h_tot_dqm1 = nullptr;
123  TH1F* h_tot_dist = nullptr;
124  TH1F* h_tot_dist1 = nullptr;
125  TH2F* h_tot_dist12 = nullptr;
126  TH1F* h_nevents = nullptr;
130  TH1F* createHistogram1D(const char* name, const char* title,
131  Int_t nbins, Double_t min, Double_t max,
132  const char* xtitle, TList* histoList = nullptr);
133 
135  TH2F* createHistogram2D(const char* name, const char* title,
136  Int_t nbinsX, Double_t minX, Double_t maxX, const char* titleX,
137  Int_t nbinsY, Double_t minY, Double_t maxY, const char* titleY,
138  TList* histoList = nullptr);
141  bool theHSFinder(double* stripOccAfterAbsCut, int* hsflag, int nstrips);
142 
143 
144 
145  };
147 }
148 #endif
Base class for Modules.
Definition: Module.h:72
std::string m_rootFileName
root file name
TH1F * createHistogram1D(const char *name, const char *title, Int_t nbins, Double_t min, Double_t max, const char *xtitle, TList *histoList=nullptr)
create 1D histograms
StoreArray< SVDShaperDigit > m_storeDigits
shaper digits store array
float m_absThr
Absolute Occupancy Threshold cut for Hot strip finder.
SVDHistograms< TH1F > * hm_occupancy
strip occupancy per sensor
SVDHotStripFinderModule()
Constructor, for setting module description and parameters.
std::string m_ShaperDigitName
shaper digits name
SVDHistograms< TH1F > * hm_hot_strips
hot strips per sensor
virtual void initialize() override
Use this to initialize resources or memory your module needs.
SVDHistograms< TH2F > * hm_dist12
true occupancy VS sensor histograms
virtual void event() override
Called once for each event.
TList * m_histoList_occu
occupancy for low charge clusters
float m_relOccPrec
Relative precision on occupancy which is defined to be negligible for the hit background rate estimat...
virtual void endRun() override
Called once when a run ends.
TH1F * h_tot_dist1
absolute occupany histogram
static const int m_nLayers
number of layers
SVDHistograms< TH1F > * hm_dist1
true occupancy histograms
virtual void terminate() override
Clean up anything you created in initialize().
SVDSummaryPlots * m_hHotStripsSummary
hot strip summary histo
bool theHSFinder(double *stripOccAfterAbsCut, int *hsflag, int nstrips)
return true if the strip is hot
static const int m_nSides
number of sides
StoreObjPtr< EventMetaData > m_eventMetaData
event meta data store array
SVDHistograms< TH1F > * hm_dist
occupancy histograms
virtual void beginRun() override
Called once before a new run begins.
SVDHistograms< TH1F > * hm_occAll
occupancy distribution - all strips
float m_zs
zero suppression cut for the input shaper digits
virtual ~SVDHotStripFinderModule()
Use to clean up anything you created in the constructor.
TH1F * h_nevents
number of events counting
TH1F * h_tot_dist
relative occupancy histogram
SVDHistograms< TH1F > * hm_occAfter
occupancy distribution - not hot strips
int m_firstExp
first valid experiment
TH2F * h_tot_dist12
2d distributiuons of occupancies
static const int m_nSensors
max number of sensors
SVDHistograms< TH1F > * hm_occHot
occupancy distribution - hot strips
TH1F * h_tot_dqm
number of hot strips per sensor
TH2F * createHistogram2D(const char *name, const char *title, Int_t nbinsX, Double_t minX, Double_t maxX, const char *titleX, Int_t nbinsY, Double_t minY, Double_t maxY, const char *titleY, TList *histoList=nullptr)
create 2D histograms
SVDHistograms< TH1F > * hm_occupancy_after
strip occupancy after removal of hot strips, per sensor
TFile * m_rootFilePtr
pointer at root file used for storing histograms
TH1F * h_tot_dqm1
number of hot strips per sensor for layer 3
static const int m_nLadders
max number of ladders
bool m_verbose
False by default, it allows to switch on the printing of all found HS.
class to summarize SVD quantities per sensor and side
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.