Belle II Software development
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 <ecl/dbobjects/ECLnOptimal.h>
15#include <mdst/dataobjects/EventLevelClusteringInfo.h>
16#include <TH2F.h>
17
18namespace Belle2 {
23 class ECLLeakageCorrections;
24 class ECLShower;
25
26 namespace ECL {
27 class ECLLeakagePosition;
28 }
29
32
33 public:
36
39
41 virtual void initialize() override;
42
44 virtual void beginRun() override;
45
47 virtual void event() override;
48
50 virtual void endRun() override;
51
53 virtual void terminate() override;
54
55 private:
56
59
62
65
71 //..Parameters derived from payload (except for nThetaID & nLeakReg, which are fixed)
72 const unsigned int nThetaID = 69;
73 static constexpr unsigned int nLeakReg = 3;
74 int nPositionBins = 0;
75 int nXBins = 0;
76 int nEnergies = 0;
77 std::vector< std::vector<float> > leakLogE;
81 TH2F m_bias;
85 public:
89 virtual const char* eclShowerArrayName() const
90 { return "ECLShowers" ; }
91
92 };
93
96 public:
97
99 virtual const char* eclShowerArrayName() const override
100 { return "ECLShowersPureCsI" ; }
101
102 };
103
105} // end of Belle2 namespace
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Class to perform the shower correction.
static constexpr unsigned 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.
TH2F m_logPeakEnergy
log of peak energy (GeV) contained in nOptimal crystals
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 unsigned int nThetaID
69 thetaIDs
virtual void endRun() override
End run.
int nEnergies
number of energies for which there are leakage corrections
TH2F m_bias
2D histogram of bias = sum of ECLCalDigit energy minus true (GeV)
virtual void terminate() override
Terminate.
TH2F thetaCorrection
histogram of theta-dependent corrections
std::vector< std::vector< float > > leakLogE
log(E) values for each region
int nXBins
number of thetaID x energy bins
TH2F m_peakFracEnergy
2D histogram of peak fractional contained energy
DBObjPtr< ECLnOptimal > m_eclNOptimal
nOptimal payload: bias from beam background, and correction from number of crystals
virtual void beginRun() override
Begin run.
DBObjPtr< ECLLeakageCorrections > m_eclLeakageCorrections
Leakage correction from database: leakage correction as a function of position.
ECL::ECLLeakagePosition * m_leakagePosition
location of cluster; cellID and position within the crystal
int nPositionBins
number of locations across crystal
StoreObjPtr< EventLevelClusteringInfo > m_eventLevelClusteringInfo
EventLevelClusteringInfo.
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
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.