Belle II Software  release-06-02-00
ECLShowerCorrectorModule.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 <framework/database/DBObjPtr.h>
13 #include <framework/datastore/StoreArray.h>
14 #include <TH2F.h>
15 
16 namespace Belle2 {
21  class ECLLeakageCorrections;
22  class ECLShower;
23 
24  namespace ECL {
25  class ECLLeakagePosition;
26  }
27 
33 
34  public:
37 
40 
42  virtual void initialize() override;
43 
45  virtual void beginRun() override;
46 
48  virtual void event() override;
49 
51  virtual void endRun() override;
52 
54  virtual void terminate() override;
55 
56  private:
57 
60 
63 
70  //..Parameters derived from payload (except for nThetaID & nLeakReg, which are fixed)
71  const int nThetaID = 69;
72  const int nLeakReg = 3;
73  int nPositionBins = 0;
74  int nXBins = 0;
75  int nCrysMax = 0;
76  int nEnergies = 0;
77  std::vector< std::vector<float> > leakLogE;
79  public:
83  virtual const char* eclShowerArrayName() const
84  { return "ECLShowers" ; }
85 
86  };
87 
90  public:
91 
93  virtual const char* eclShowerArrayName() const override
94  { return "ECLShowersPureCsI" ; }
95 
96  };
97 
99 } // end of Belle2 namespace
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Class to perform the shower correction.
TH2F phiCorrection
histogram of phi-dependent corrections
StoreArray< ECLShower > m_eclShowers
Store array: ECLShower.
virtual void initialize() override
Initialize.
virtual void event() override
Event.
const int nLeakReg
0 = forward, 1 = barrel, 2 = backward
virtual const char * eclShowerArrayName() const
We need names for the data objects to differentiate between PureCsI and default.
virtual void endRun() override
End run.
int nEnergies
number of energies for which there are leakage corrections
virtual void terminate() override
Terminate.
TH2F thetaCorrection
histogram of theta-dependent corrections
std::vector< std::vector< float > > leakLogE
log(E) values for each region
TH2F crysCorrection
histogram of nCrys-dependent corrections
int nXBins
number of thetaID x energy bins
virtual void beginRun() override
Begin run.
int nCrysMax
max number of crystals used to calculate energy
DBObjPtr< ECLLeakageCorrections > m_eclLeakageCorrections
Leakage correction from database.
ECL::ECLLeakagePosition * m_leakagePosition
location of cluster; cellID and position within the crystal
int nPositionBins
number of locations across crystal
The very same module but for PureCsI.
virtual const char * eclShowerArrayName() const override
PureCsI name ECLShowersPureCsI.
Class to get position information for a cluster for leakage corrections.
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.