Belle II Software  release-08-01-10
ECLDigitizerPureCsIModule.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/digitization/EclConfigurationPure.h>
13 
14 /* Basf2 headers. */
15 #include <framework/core/Module.h>
16 #include <framework/datastore/StoreArray.h>
17 
18 /* C++ headers. */
19 #include <vector>
20 
21 namespace Belle2 {
27  class ECLNoiseData;
28  class ECLDsp;
29  class ECLHit;
30  class ECLPureCsIInfo;
31  class ECLDigit;
32 
45  public:
46 
50 
54 
55 
57  virtual void initialize() override;
58 
60  virtual void beginRun() override;
61 
66  virtual void event() override;
67 
69  virtual void endRun() override;
70 
72  virtual void terminate() override;
73 
74  private:
78  void mapGeometry();
80  bool isPureCsI(int cellId)
81  {
82  if (cellId > ECL::EclConfigurationPure::m_nch) return false;
83  int thId = m_thetaID[cellId - 1];
84  if (thId >= m_thetaIdMin && thId <= m_thetaIdMax) return true;
85  return false;
86  }
87 
89  struct crystallinks_t {
91  short unsigned int idn;
93  short unsigned int inoise;
95  short unsigned int ifunc;
97  short unsigned int iss;
98  };
99 
101  std::vector<crystallinks_t> m_tbl;
102 
109 
118 
121 
123  std::vector<fitparams_type> m_fitparams;
125  std::vector<signalsample_type> m_ss;
126 
128  std::vector<adccounts_type> m_adc;
130  std::vector<ECLNoiseData> m_noise;
132  void readDSPDB();
134  int m_nEvent = 0;
151  double m_elecNoise;
155  bool m_debug;
159  double m_testsig;
161  double m_testenedep;
163  static constexpr const char* eclDigitArrayName() { return "ECLDigitsPureCsI"; }
165  static constexpr const char* eclDspArrayName() { return "ECLDspsPureCsI"; }
167  static constexpr const char* eclPureCsIInfoArrayName() { return "ECLPureCsIInfo"; }
168  };
170 }//Belle2
The ECLDigitizerPureCsI module.
StoreArray< ECLDigit > m_BaselineDigits
ECL digits (baseline, i.e.
StoreArray< ECLDigit > m_ecldigits
StoreArray ECLDigit.
bool m_NoCovMatrix
Flag to use a diagonal (neutral) Covariance matrix.
virtual void initialize() override
Initialize variables
int m_thetaIdMax
Ring ID of last pure CsI ring in FWD.
std::vector< signalsample_type > m_ss
Tabulated shape line.
virtual void event() override
Actual digitization of all pure CsI hits in the ECL.
void mapGeometry()
Returns ring ID for a certain crystal.
double m_elecNoise
Electronic Noise energy equivalente in MeV.
virtual void endRun() override
Nothing so far.
StoreArray< ECLHit > m_hitLists
StoreArray ECLHit.
virtual void terminate() override
Free memory.
bool m_background
Flag to set covariance matrix for WF with beam-bkg.
int m_testtrg
Fixed trigger time for testing purposes.
bool isPureCsI(int cellId)
Returns 1 if corresponding crystal is set as pure CsI crystal.
std::vector< adccounts_type > m_adc
Storage for adc hits from entire calorimeter (8736 crystals).
double m_testenedep
Fixed energy deposition in all crystals, for testing purposes.
virtual void beginRun() override
Nothing so far.
static constexpr const char * eclDigitArrayName()
Pure CsI digit array name.
StoreArray< ECLPureCsIInfo > m_eclpurecsiinfo
StoreArray ECLPureCsIInfo.
double m_photostatresolution
Resolution for a 1 MeV energy deposit.
std::vector< fitparams_type > m_fitparams
Fitting parameters.
std::vector< crystallinks_t > m_tbl
Lookup table for ECL channels.
int m_tickFactor
multiplication factor to get adc tick from trigger tick.
StoreArray< ECLDsp > m_ecldsps
StoreArray ECLDsp.
double m_testsig
Shift in signal arrival time, for testing purposes.
static constexpr const char * eclPureCsIInfoArrayName()
Pure CsI Info array name.
bool m_calibration
Flag to use the DigitizerPureCsI for Waveform fit Covariance Matrix calibration.
std::vector< ECLNoiseData > m_noise
Parameters for correlated noise stimation.
static constexpr const char * eclDspArrayName()
Pure CsI DSP array name.
int m_thetaID[ECL::EclConfigurationPure::m_nch]
ECL ring ID.
void readDSPDB()
read Shaper-DSP data from root file.
static constexpr int m_nch
total number of electronic channels (crystals) in fwd endcap calorimeter
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.
a struct for the fit parameters for the pure CsI calorimeter
A struct for the fit parameters for a single channel of the pure CsI calorimeter (in the simulation,...
a struct for a signal sample for the pure CsI calorimeter