Belle II Software  release-06-02-00
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 
48 
49  virtual ~SVDOccupancyAnalysisModule();
50  virtual void initialize() override;
51  virtual void beginRun() override;
52  virtual void event() override;
53  virtual void endRun() override;
54  virtual void terminate() override;
55 
56  /* user-defined parameters */
57  std::string m_rootFileName = "";
58  std::string m_ShaperDigitName = "SVDShaperDigits";
60  /* ROOT file related parameters */
61  TFile* m_rootFilePtr = nullptr;
63  float m_group = 10000;
64  float m_minZS = 3;
65  float m_maxZS = 6;
66  int m_pointsZS = 7;
67  bool m_FADCmode = true;
69  private:
70 
73  bool m_skipRejectedEvents = false;
75  int m_nEvents = 0;
83  std::vector<VxdID> m_SVDModules;
84 
85  //layer summary
86  float m_distr_Nbins = 10000;
87  float m_distr_min = 0;
88  float m_distr_max = 100;
90  TH1F* m_occ_L3U = nullptr;
91  TH1F* m_occ_L3V = nullptr;
92  TH1F* m_occ_L4U = nullptr;
93  TH1F* m_occ_L4V = nullptr;
94  TH1F* m_occ_L5U = nullptr;
95  TH1F* m_occ_L5V = nullptr;
96  TH1F* m_occ_L6U = nullptr;
97  TH1F* m_occ_L6V = nullptr;
99  //SHAPER
100  SVDSummaryPlots* m_hit = nullptr;
107  };
109 }
110 
111 
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
Initialize the Module.
TH1F * m_occ_L4V
occupancy distribution for L4 V-side sensors
virtual void event() override
This method is the core of the module.
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
This method is called if the current run ends.
float m_group
number of events to compute occupancy for occ VS time
virtual void terminate() override
This method is called at the end of the event processing.
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
Called when entering a new run.
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:95
Abstract base class for different kinds of events.