Belle II Software  release-08-01-10
SVDOccupancyAnalysisModule.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 <framework/core/Module.h>
12 #include <vxd/dataobjects/VxdID.h>
13 #include <framework/datastore/StoreArray.h>
14 #include <framework/datastore/StoreObjPtr.h>
15 #include <svd/dataobjects/SVDShaperDigit.h>
16 #include <svd/dataobjects/SVDHistograms.h>
17 #include <svd/dataobjects/SVDSummaryPlots.h>
18 #include <framework/dataobjects/EventMetaData.h>
19 
20 #include <mdst/dataobjects/SoftwareTriggerResult.h>
21 
22 #include <svd/calibration/SVDNoiseCalibrations.h>
23 
24 
25 #include <string>
26 #include <TFile.h>
27 #include <TH1F.h>
28 #include <TH2F.h>
29 
30 namespace Belle2 {
44 
45  public:
46 
49 
52 
53  virtual void initialize() override;
54  virtual void beginRun() override;
55  virtual void event() override;
56  virtual void endRun() override;
58  /* user-defined parameters */
59  std::string m_rootFileName = "";
60  std::string m_ShaperDigitName = "SVDShaperDigits";
62  /* ROOT file related parameters */
63  TFile* m_rootFilePtr = nullptr;
65  float m_group = 10000;
66  float m_minZS = 3;
67  float m_maxZS = 6;
68  int m_pointsZS = 7;
69  bool m_FADCmode = true;
71  private:
72 
75  bool m_skipRejectedEvents = false;
77  int m_nEvents = 0;
85  std::vector<VxdID> m_SVDModules;
86 
87  //layer summary
88  float m_distr_Nbins = 10000;
89  float m_distr_min = 0;
90  float m_distr_max = 100;
92  TH1F* m_occ_L3U = nullptr;
93  TH1F* m_occ_L3V = nullptr;
94  TH1F* m_occ_L4U = nullptr;
95  TH1F* m_occ_L4V = nullptr;
96  TH1F* m_occ_L5U = nullptr;
97  TH1F* m_occ_L5V = nullptr;
98  TH1F* m_occ_L6U = nullptr;
99  TH1F* m_occ_L6V = nullptr;
101  //SHAPER
102  SVDSummaryPlots* m_hit = nullptr;
109  };
111 }
112 
113 
Base class for Modules.
Definition: Module.h:72
This class defines the dbobject and the method to access SVD calibrations from the noise local runs.
The SVD OccupancyAnalysis Module.
SVDSummaryPlots * m_hit
hit number summary histogram
int m_pointsZS
number of steps for different ZS cuts
bool m_skipRejectedEvents
if true skip events rejected by HLT
bool m_FADCmode
if true, ZS done with same algorithm as on FADC
SVDHistograms< TH1F > * m_histo_occ
occupancy histograms
std::string m_ShaperDigitName
ShaperDigit StoreArray name.
virtual void initialize() override
check StoreArrays & create rootfile
TH1F * m_occ_L4V
occupancy distribution for L4 V-side sensors
virtual void event() override
fill histograms
SVDHistograms< TH2F > * m_histo_occtdep
occupancy VS event number
SVDHistograms< TH1F > * m_histo_zsOccSQ
occupancy VS ZS cut swuared histograms
std::vector< VxdID > m_SVDModules
IDs of all SVD Modules to iterate over.
SVDNoiseCalibrations m_NoiseCal
SVDNoise calibrations db object.
virtual void endRun() override
write histogrmas
float m_group
number of events to compute occupancy for occ VS time
TH1F * m_occ_L6U
occupancy distribution for L6 U-side sensors
float m_minZS
minimum zero suppresion cut
TH1F * m_occ_L5U
occupancy distribution for L5 U-side sensors
StoreObjPtr< EventMetaData > m_eventMetaData
Event Meta Data StoreObjectPointer.
SVDHistograms< TH1F > * m_histo_dist
occupancy distribution histograms
float m_distr_Nbins
number of bins of occupancy distributions
virtual void beginRun() override
create histograms
TH1F * m_occ_L4U
occupancy distribution for L4 U-side sensors
TH1F * m_occ_L6V
occupancy distribution for L6 V-side sensors
float m_distr_max
max of occupancy distributions
float m_distr_min
min of occupancy distributions
TH1F * m_occ_L3V
occupancy distribution for L3 V-side sensors
StoreObjPtr< SoftwareTriggerResult > m_resultStoreObjectPointer
Store Object for reading the trigger decision.
TH1F * m_occ_L3U
occupancy distribution for L3 U-side sensors
TFile * m_rootFilePtr
pointer at root file used for storing histograms
SVDHistograms< TH1F > * m_histo_zsOcc
occupancy VS ZScut histograms
StoreArray< SVDShaperDigit > m_svdShapers
SVDShaperDigit StoreArray.
TH1F * m_occ_L5V
occupancy distribution for L5 V-side sensors
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.