Belle II Software development
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
28namespace Belle2 {
38 public:
41
44
50 virtual void initialize() override;
51
56 virtual void beginRun() override;
57
62 virtual void event() override;
63
68 virtual void endRun() override;
69
71 virtual void terminate() override;
72
73 private:
74
75 /* user-defined parameters */
78 std::string m_rootFileName;
79 std::string m_ShaperDigitName;
80 float m_thr;
81 int m_base;
82 bool m_useHSFinderV1 = true;
83 float m_absThr;
85 bool m_verbose;
87 /* ROOT file related parameters */
88 TFile* m_rootFilePtr = nullptr;
90 //dbobject related parameters
91 float m_zs;
98 static const int m_nLayers = 4;
99 static const int m_nLadders = 16;
100 static const int m_nSensors = 5;
101 static const int m_nSides = 2;
103 TList* m_histoList_occu = nullptr;
118 TH1F* h_tot_dqm = nullptr;
119 TH1F* h_tot_dqm1 = nullptr;
120 TH1F* h_tot_dist = nullptr;
121 TH1F* h_tot_dist1 = nullptr;
122 TH2F* h_tot_dist12 = nullptr;
123 TH1F* h_nevents = nullptr;
127 TH1F* createHistogram1D(const char* name, const char* title,
128 Int_t nbins, Double_t min, Double_t max,
129 const char* xtitle, TList* histoList = nullptr);
130
132 TH2F* createHistogram2D(const char* name, const char* title,
133 Int_t nbinsX, Double_t minX, Double_t maxX, const char* titleX,
134 Int_t nbinsY, Double_t minY, Double_t maxY, const char* titleY,
135 TList* histoList = nullptr);
138 bool theHSFinder(double* stripOccAfterAbsCut, int* hsflag, int nstrips);
139
140
141
142 };
144}
145#endif
Base class for Modules.
Definition: Module.h:72
template class for SVd histograms
Definition: SVDHistograms.h:24
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.