Belle II Software  release-05-01-25
SVDOccupancyCalibrationsCollectorModule.h
1 /***************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Laura Zani (2019) *
7  * *
8  * *
9  * This software is provided "as is" without any warranty. *
10  ***************************************************************************/
11 #include <calibration/CalibrationCollectorModule.h>
12 
13 #include <framework/datastore/StoreObjPtr.h>
14 #include <framework/datastore/StoreArray.h>
15 #include <string>
16 #include "TH1F.h"
17 
18 #include <svd/dataobjects/SVDShaperDigit.h>
19 
20 #include <svd/dataobjects/SVDHistograms.h>
21 
22 #include "TTree.h"
23 
24 #include <framework/dataobjects/EventMetaData.h>
25 
26 
27 namespace Belle2 {
37  class SVDOccupancyCalibrationsCollectorModule : public CalibrationCollectorModule {
38 
39  public:
44 
48  void prepare() override final;
49 
53  void startRun() override final;
54 
58  void collect() override final;
59 
63  void closeRun() override final;
64 
68  void finish() override;
69 
71  std::string m_svdShaperDigitName;
72  StoreArray<SVDShaperDigit> m_storeDigits;
75  StoreObjPtr<EventMetaData> m_eventMetaData;
78  SVDHistograms<TH1F>* hm_occupancy = nullptr;
82  std::string m_tree = "tree";
83  TTree* m_histogramTree = nullptr;
85  TH1F* m_hnevents = nullptr;
86  TH1F* m_hist = nullptr;
87  int m_layer = 0;
88  int m_ladder = 0;
89  int m_sensor = 0;
90  int m_side = 0;
92  private:
93 
94 
95  static const int m_nSides = 2;
96 
97 
98  //list of functions to create histograms:
99  // TH1F* createHistogram1D(const char* name, const char* title,
100  // Int_t nbins, Double_t min, Double_t max,
101  // const char* xtitle, TList* histoList = nullptr); /**< thf */
102 
103  };
104 
106 } // end namespace Belle2
107 
Belle2::SVDOccupancyCalibrationsCollectorModule::collect
void collect() override final
Event processor.
Definition: SVDOccupancyCalibrationsCollectorModule.cc:94
Belle2::SVDOccupancyCalibrationsCollectorModule::prepare
void prepare() override final
Initialize the module.
Definition: SVDOccupancyCalibrationsCollectorModule.cc:39
Belle2::SVDOccupancyCalibrationsCollectorModule::m_histogramTree
TTree * m_histogramTree
tree containing as events the histograms per layer, ladder, sensor, side
Definition: SVDOccupancyCalibrationsCollectorModule.h:92
Belle2::SVDOccupancyCalibrationsCollectorModule::m_ladder
int m_ladder
SVD ladder identifier.
Definition: SVDOccupancyCalibrationsCollectorModule.h:97
Belle2::SVDOccupancyCalibrationsCollectorModule::m_side
int m_side
SVD side identifier.
Definition: SVDOccupancyCalibrationsCollectorModule.h:99
Belle2::SVDOccupancyCalibrationsCollectorModule::startRun
void startRun() override final
Called when entering a new run.
Definition: SVDOccupancyCalibrationsCollectorModule.cc:71
Belle2::SVDOccupancyCalibrationsCollectorModule::m_eventMetaData
StoreObjPtr< EventMetaData > m_eventMetaData
EventMetaData.
Definition: SVDOccupancyCalibrationsCollectorModule.h:84
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SVDOccupancyCalibrationsCollectorModule::hm_occupancy
SVDHistograms< TH1F > * hm_occupancy
SVDHistograms.
Definition: SVDOccupancyCalibrationsCollectorModule.h:87
Belle2::SVDOccupancyCalibrationsCollectorModule::m_layer
int m_layer
SVD layer identifier.
Definition: SVDOccupancyCalibrationsCollectorModule.h:96
Belle2::SVDOccupancyCalibrationsCollectorModule::m_tree
std::string m_tree
Tree.
Definition: SVDOccupancyCalibrationsCollectorModule.h:91
Belle2::SVDOccupancyCalibrationsCollectorModule::m_hist
TH1F * m_hist
pointer to occupancy histogram
Definition: SVDOccupancyCalibrationsCollectorModule.h:95
Belle2::SVDOccupancyCalibrationsCollectorModule::m_hnevents
TH1F * m_hnevents
first bin of the histogram is counting the processed events
Definition: SVDOccupancyCalibrationsCollectorModule.h:94
Belle2::SVDOccupancyCalibrationsCollectorModule::SVDOccupancyCalibrationsCollectorModule
SVDOccupancyCalibrationsCollectorModule()
Constructor.
Definition: SVDOccupancyCalibrationsCollectorModule.cc:27
Belle2::SVDOccupancyCalibrationsCollectorModule::m_storeDigits
StoreArray< SVDShaperDigit > m_storeDigits
shaper digits store array
Definition: SVDOccupancyCalibrationsCollectorModule.h:81
Belle2::SVDOccupancyCalibrationsCollectorModule::m_svdShaperDigitName
std::string m_svdShaperDigitName
SVDShaperDigits.
Definition: SVDOccupancyCalibrationsCollectorModule.h:80
Belle2::SVDOccupancyCalibrationsCollectorModule::finish
void finish() override
Termination action.
Definition: SVDOccupancyCalibrationsCollectorModule.cc:118
Belle2::SVDOccupancyCalibrationsCollectorModule::m_sensor
int m_sensor
SVD sensor identifier.
Definition: SVDOccupancyCalibrationsCollectorModule.h:98
Belle2::SVDOccupancyCalibrationsCollectorModule::closeRun
void closeRun() override final
End-of-run action.
Definition: SVDOccupancyCalibrationsCollectorModule.cc:122