Belle II Software  release-05-02-19
SVDHotStripFinderModule.h
1 #ifndef SVDHOTSTRIPFINDERMODULE_H
2 #define SVDHOTSTRIPFINDERMODULE_H
3 
4 #include <framework/core/Module.h>
5 #include <framework/datastore/StoreArray.h>
6 #include <framework/datastore/StoreObjPtr.h>
7 #include <framework/dataobjects/EventMetaData.h>
8 
9 #include <svd/dataobjects/SVDShaperDigit.h>
10 #include <vxd/dataobjects/VxdID.h>
11 
12 #include <svd/dataobjects/SVDHistograms.h>
13 #include <svd/dataobjects/SVDSummaryPlots.h>
14 
15 #include <string>
16 #include <TFile.h>
17 #include <TH1F.h>
18 #include <TH2F.h>
19 #include <TList.h>
20 
21 namespace Belle2 {
34  public:
37 
39  virtual ~SVDHotStripFinderModule();
40 
46  virtual void initialize() override;
47 
52  virtual void beginRun() override;
53 
58  virtual void event() override;
59 
64  virtual void endRun() override;
65 
67  virtual void terminate() override;
68 
69  private:
70 
71  /* user-defined parameters */
74  std::string m_rootFileName;
75  std::string m_ShaperDigitName;
76  float m_thr;
77  int m_base;
78  bool m_useHSFinderV1 = true;
79  float m_absThr;
80  float m_relOccPrec;
81  bool m_verbose;
83  /* ROOT file related parameters */
84  TFile* m_rootFilePtr = nullptr;
86  //dbobject related parameters
87  float m_zs;
88  int m_firstExp;
89  int m_firstRun;
90  int m_lastExp;
91  int m_lastRun;
94  static const int m_nLayers = 4;// to avoid empty layers we start from 0
95  static const int m_nLadders = 16;
96  static const int m_nSensors = 5;
97  static const int m_nSides = 2;
98 
99  TList* m_histoList_occu = nullptr;
108  SVDHistograms<TH1F>* hm_dist = nullptr;
109  SVDHistograms<TH1F>* hm_dist1 = nullptr;
110  SVDHistograms<TH2F>* hm_dist12 = nullptr;
111 
114  TH1F* h_tot_dqm = nullptr;
115  TH1F* h_tot_dqm1 = nullptr;
116  TH1F* h_tot_dist = nullptr;
117  TH1F* h_tot_dist1 = nullptr;
118  TH2F* h_tot_dist12 = nullptr;
119  TH1F* h_nevents = nullptr;
122  //list of functions to create histograms:
123  TH1F* createHistogram1D(const char* name, const char* title,
124  Int_t nbins, Double_t min, Double_t max,
125  const char* xtitle, TList* histoList = nullptr);
126  //HSFinder algorithm (L&G)
127 
128  bool theHSFinder(double* stripOccAfterAbsCut, int* hsflag, int nstrips);
129 
130  TH2F* createHistogram2D(const char* name, const char* title,
131  Int_t nbinsX, Double_t minX, Double_t maxX, const char* titleX,
132  Int_t nbinsY, Double_t minY, Double_t maxY, const char* titleY,
133  TList* histoList = nullptr);
135  protected:
136  //definition of input parameters
137 
138  };
140 }
141 #endif
Belle2::SVDHotStripFinderModule::beginRun
virtual void beginRun() override
Called once before a new run begins.
Definition: SVDHotStripFinderModule.cc:69
Belle2::SVDHotStripFinderModule::endRun
virtual void endRun() override
Called once when a run ends.
Definition: SVDHotStripFinderModule.cc:173
Belle2::SVDHotStripFinderModule::m_zs
float m_zs
zero suppression cut for the input shaper digits
Definition: SVDHotStripFinderModule.h:87
Belle2::SVDHotStripFinderModule::m_rootFilePtr
TFile * m_rootFilePtr
pointer at root file used for storing histograms
Definition: SVDHotStripFinderModule.h:84
Belle2::SVDHotStripFinderModule::m_lastRun
int m_lastRun
last valid run
Definition: SVDHotStripFinderModule.h:91
Belle2::SVDHistograms< TH1F >
Belle2::SVDHotStripFinderModule::hm_occupancy
SVDHistograms< TH1F > * hm_occupancy
strip occupancy per sensor
Definition: SVDHotStripFinderModule.h:101
Belle2::SVDHotStripFinderModule::m_histoList_occu
TList * m_histoList_occu
occupancy for low charge clusters
Definition: SVDHotStripFinderModule.h:99
Belle2::SVDHotStripFinderModule::~SVDHotStripFinderModule
virtual ~SVDHotStripFinderModule()
Use to clean up anything you created in the constructor.
Definition: SVDHotStripFinderModule.cc:48
Belle2::SVDHotStripFinderModule::event
virtual void event() override
Called once for each event.
Definition: SVDHotStripFinderModule.cc:148
Belle2::SVDHotStripFinderModule::m_rootFileName
std::string m_rootFileName
root file name
Definition: SVDHotStripFinderModule.h:74
Belle2::SVDHotStripFinderModule::h_nevents
TH1F * h_nevents
number of events counting
Definition: SVDHotStripFinderModule.h:119
Belle2::SVDHotStripFinderModule::m_verbose
bool m_verbose
False by default, it allows to switch on the printing of all found HS.
Definition: SVDHotStripFinderModule.h:81
Belle2::SVDHotStripFinderModule::initialize
virtual void initialize() override
Use this to initialize resources or memory your module needs.
Definition: SVDHotStripFinderModule.cc:53
Belle2::SVDHotStripFinderModule::hm_occAll
SVDHistograms< TH1F > * hm_occAll
occupancy distribution - all strips
Definition: SVDHotStripFinderModule.h:104
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::SVDHotStripFinderModule::h_tot_dist
TH1F * h_tot_dist
relative occupancy histogram
Definition: SVDHotStripFinderModule.h:116
Belle2::SVDHotStripFinderModule::createHistogram1D
TH1F * createHistogram1D(const char *name, const char *title, Int_t nbins, Double_t min, Double_t max, const char *xtitle, TList *histoList=nullptr)
thf
Definition: SVDHotStripFinderModule.cc:586
Belle2::SVDHotStripFinderModule::m_firstExp
int m_firstExp
first valid experiment
Definition: SVDHotStripFinderModule.h:88
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::SVDHotStripFinderModule::h_tot_dist12
TH2F * h_tot_dist12
2d distributiuons of occupancies
Definition: SVDHotStripFinderModule.h:118
Belle2::SVDHotStripFinderModule::hm_occupancy_after
SVDHistograms< TH1F > * hm_occupancy_after
strip occupancy after removal of hot strips, per sensor
Definition: SVDHotStripFinderModule.h:103
Belle2::SVDHotStripFinderModule::hm_occAfter
SVDHistograms< TH1F > * hm_occAfter
occupancy distribution - not hot strips
Definition: SVDHotStripFinderModule.h:106
Belle2::SVDHotStripFinderModule::hm_occHot
SVDHistograms< TH1F > * hm_occHot
occupancy distribution - hot strips
Definition: SVDHotStripFinderModule.h:105
Belle2::SVDHotStripFinderModule::SVDHotStripFinderModule
SVDHotStripFinderModule()
Constructor, for setting module description and parameters.
Definition: SVDHotStripFinderModule.cc:19
Belle2::SVDHotStripFinderModule::h_tot_dqm1
TH1F * h_tot_dqm1
number of hot strips per sensor for layer 3
Definition: SVDHotStripFinderModule.h:115
Belle2::SVDHotStripFinderModule::hm_hot_strips
SVDHistograms< TH1F > * hm_hot_strips
hot strips per sensor
Definition: SVDHotStripFinderModule.h:102
Belle2::SVDHotStripFinderModule::m_firstRun
int m_firstRun
first valid run
Definition: SVDHotStripFinderModule.h:89
Belle2::SVDSummaryPlots
class to summarize SVD quantities per sensor and side
Definition: SVDSummaryPlots.h:35
Belle2::SVDHotStripFinderModule::h_tot_dist1
TH1F * h_tot_dist1
absolute occupany histogram
Definition: SVDHotStripFinderModule.h:117
Belle2::SVDHotStripFinderModule::m_absThr
float m_absThr
Absolute Occupancy Threshold cut for Hot strip finder.
Definition: SVDHotStripFinderModule.h:79
Belle2::SVDHotStripFinderModule::createHistogram2D
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)
thf
Definition: SVDHotStripFinderModule.cc:603
Belle2::SVDHotStripFinderModule::m_eventMetaData
StoreObjPtr< EventMetaData > m_eventMetaData
event meta data store array
Definition: SVDHotStripFinderModule.h:73
Belle2::SVDHotStripFinderModule::m_lastExp
int m_lastExp
last valid experiment
Definition: SVDHotStripFinderModule.h:90
Belle2::SVDHotStripFinderModule::h_tot_dqm
TH1F * h_tot_dqm
number of hot strips per sensor
Definition: SVDHotStripFinderModule.h:114
Belle2::SVDHotStripFinderModule
A module template.
Definition: SVDHotStripFinderModule.h:33
Belle2::SVDHotStripFinderModule::terminate
virtual void terminate() override
Clean up anything you created in initialize().
Definition: SVDHotStripFinderModule.cc:350
Belle2::SVDHotStripFinderModule::m_ShaperDigitName
std::string m_ShaperDigitName
shaper digits name
Definition: SVDHotStripFinderModule.h:75
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::SVDHotStripFinderModule::m_relOccPrec
float m_relOccPrec
Relative precision on occupancy which is defined to be negligible for the hit background rate estimat...
Definition: SVDHotStripFinderModule.h:80
Belle2::SVDHotStripFinderModule::m_hHotStripsSummary
SVDSummaryPlots * m_hHotStripsSummary
hot strip summary histo
Definition: SVDHotStripFinderModule.h:112
Belle2::SVDHotStripFinderModule::m_storeDigits
StoreArray< SVDShaperDigit > m_storeDigits
shaper digits store array
Definition: SVDHotStripFinderModule.h:72