Belle II Software  release-08-00-10
eclWaveformCalibCollectorModule.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 /* ECL headers. */
12 #include <ecl/dataobjects/ECLDigit.h>
13 #include <ecl/dataobjects/ECLDsp.h>
14 
15 /* Basf2 headers. */
16 #include <framework/core/Module.h>
17 #include <framework/database/DBObjPtr.h>
18 #include <framework/datastore/StoreArray.h>
19 
20 #include <TFile.h>
21 #include <TTree.h>
22 
23 namespace Belle2 {
31 
32  public:
33 
36 
38  virtual void initialize() override;
39 
41  virtual void terminate() override;
42 
44  virtual void event() override;
45 
46  private:
47 
50  std::string m_dataOutFileName;
51  TTree* tree{nullptr};
52  TFile* m_rootFile{nullptr};
58  std::vector<float> m_ADCtoEnergy;
68  int m_CellID;
69  int m_runNum;
70  int m_expNum;
71  float m_OnlineE;
72  float m_OfflineE;
73  float m_OfflineHadE;
74  float m_Baseline;
75  float m_BaselineRMS;
76  float m_calibConst;
77  float m_Chi2;
78  float m_Chi2Save0;
79  float m_Chi2Save1;
80  float m_Chi2Save2;
81  int m_FitType;
82  int m_ADC0;
83  int m_ADC1;
84  int m_ADC2;
85  int m_ADC3;
86  int m_ADC4;
87  int m_ADC5;
88  int m_ADC6;
89  int m_ADC7;
90  int m_ADC8;
91  int m_ADC9;
92  int m_ADC10;
93  int m_ADC11;
94  int m_ADC12;
95  int m_ADC13;
96  int m_ADC14;
97  int m_ADC15;
98  int m_ADC16;
99  int m_ADC17;
100  int m_ADC18;
101  int m_ADC19;
102  int m_ADC20;
103  int m_ADC21;
104  int m_ADC22;
105  int m_ADC23;
106  int m_ADC24;
107  int m_ADC25;
108  int m_ADC26;
109  int m_ADC27;
110  int m_ADC28;
111  int m_ADC29;
112  int m_ADC30;
114  };
116 }
Base class for Modules.
Definition: Module.h:72
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
Store information needed to calculate ECL waveform template shapes.
int m_ADC8
To read ntuple branch, ith ADC value of waveform >
float m_OnlineE
To read ntuple branch, waveform energy measured online by FPGA >
int m_ADC9
To read ntuple branch, ith ADC value of waveform >
int m_selectCellID
Root used to select specific CellID to save.
int m_ADC3
To read ntuple branch, ith ADC value of waveform >
float m_Chi2
To read ntuple branch, offline fit chi2 >
int m_ADC13
To read ntuple branch, ith ADC value of waveform >
int m_ADC21
To read ntuple branch, ith ADC value of waveform >
int m_ADC25
To read ntuple branch, ith ADC value of waveform >
float m_Chi2Save0
To read ntuple branch, offline fit chi2 for fit type 0 >
int m_ADC27
To read ntuple branch, ith ADC value of waveform >
float m_Baseline
To read ntuple branch, baseline of waveform >
int m_ADC18
To read ntuple branch, ith ADC value of waveform >
std::string m_dataOutFileName
Root file name for saving the output.
int m_ADC5
To read ntuple branch, ith ADC value of waveform >
int m_ADC20
To read ntuple branch, ith ADC value of waveform >
virtual void initialize() override
Initializes the module.
float m_OfflineHadE
To read ntuple branch, waveform hadron energy measure offline with multi-template fit >
virtual void event() override
Method is called for each event.
double m_LowEnergyThresholdGeV
Low Energy Threshold in GeV.
int m_ADC2
To read ntuple branch, ith ADC value of waveform >
TFile * m_rootFile
Root file for saving the output.
int m_ADC10
To read ntuple branch, ith ADC value of waveform >
eclWaveformCalibCollectorModule()
Constructor: Sets the description, the properties and the parameters of the module.
int m_ADC14
To read ntuple branch, ith ADC value of waveform >
int m_ADC28
To read ntuple branch, ith ADC value of waveform >
StoreArray< ECLDsp > m_eclDSPs
StoreArray ECLDsp.
float m_calibConst
To read ntuple branch, calibration from ADC to GeV >
int m_expNum
To read ntuple branch, waveform ECL crystal cell ID >
StoreArray< ECLDigit > m_eclDigits
StoreArray ECLDigit.
int m_ADC15
To read ntuple branch, ith ADC value of waveform >
int m_ADC22
To read ntuple branch, ith ADC value of waveform >
int m_ADC7
To read ntuple branch, ith ADC value of waveform >
int m_ADC26
To read ntuple branch, ith ADC value of waveform >
int m_ADC30
To read ntuple branch, ith ADC value of waveform >
float m_OfflineE
To read ntuple branch, waveform energy measure offline with multi-template fit >
bool m_includeWaveforms
Flag to save ADC information.
int m_ADC0
To read ntuple branch, ith ADC value of waveform >
int m_ADC29
To read ntuple branch, ith ADC value of waveform >
int m_ADC1
To read ntuple branch, ith ADC value of waveform >
int m_ADC11
To read ntuple branch, ith ADC value of waveform >
int m_ADC24
To read ntuple branch, ith ADC value of waveform >
TTree * tree
Root tree for saving the output.
int m_CellID
To read ntuple branch, waveform ECL crystal cell ID >
int m_ADC16
To read ntuple branch, ith ADC value of waveform >
int m_ADC4
To read ntuple branch, ith ADC value of waveform >
float m_BaselineRMS
To read ntuple branch, RMS squared of waveform baseline >
int m_ADC12
To read ntuple branch, ith ADC value of waveform >
float m_Chi2Save2
To read ntuple branch, offline fit chi2 for fit type 2 >
int m_ADC17
To read ntuple branch, ith ADC value of waveform >
StoreObjPtr< EventMetaData > m_EventMetaData
Event metadata info.
float m_Chi2Save1
To read ntuple branch, offline fit chi2 for fit type 1 >
int m_FitType
To read ntuple branch, offline fit type with best chi2 >
int m_ADC6
To read ntuple branch, ith ADC value of waveform >
int m_ADC23
To read ntuple branch, ith ADC value of waveform >
std::vector< float > m_ADCtoEnergy
calibration vector from adc to energy
double m_HighEnergyThresholdGeV
High Energy Threshold in GeV.
int m_runNum
To read ntuple branch, waveform ECL crystal cell ID >
int m_ADC19
To read ntuple branch, ith ADC value of waveform >
Abstract base class for different kinds of events.