Belle II Software development
eclLeakageCollectorModule.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/* Basf2 headers. */
12#include <calibration/CalibrationCollectorModule.h>
13#include <framework/database/DBObjPtr.h>
14#include <framework/datastore/StoreArray.h>
15#include <ecl/dbobjects/ECLnOptimal.h>
16#include <TH2F.h>
17
18namespace Belle2 {
23 class ECLCrystalCalib;
24 class ECLShower;
25 class MCParticle;
26 class EventMetaData;
27
28 namespace ECL {
29 class ECLLeakagePosition;
30 }
31
32
33
36
37 public:
38
41
43 virtual void prepare() override;
44
46 virtual void collect() override;
47
48 private:
49
53 std::vector<double> m_energies_forward;
54 std::vector<double> m_energies_barrel;
55 std::vector<double> m_energies_backward;
58 std::string m_showerArrayName;
64 const int nLeakReg = 3;
65 bool storeCalib = true;
66 std::vector< std::vector<int> > i_energies;
69 int m_nDump = 0;
75 TH2F m_bias;
78 std::vector<int> m_groupNumber;
79 const int m_nLeakReg = 3;
80 int m_nEnergyBins = 0;
81 std::vector< std::vector<float> > m_eBoundaries;
84 int t_cellID = 0;
85 int t_thetaID = 0;
86 int t_region = 0;
87 int t_thetaBin = -1;
89 -1;
90 int t_phiMech = -1;
91 int t_energyBin = -1;
92 int t_nCrys = -1;
93 float t_energyFrac = 0.;
94 float t_origEnergyFrac = 0.;
95 float t_locationError = 999.;
96 };
98}
Calibration collector module base class.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Class to get position information for a cluster for leakage corrections.
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 energy leakage corrections.
StoreArray< MCParticle > m_mcParticleArray
Required input array of MCParticles.
eclLeakageCollectorModule()
Constructor: Sets the description, the properties and the parameters of the module.
StoreArray< ECLShower > m_eclShowerArray
Required input array of ECLShowers.
TH2F m_logPeakEnergy
log of peak contained energy in GeV
float t_energyFrac
measured energy without leakage correction divided by generated
const int m_nLeakReg
3 ECL regions: 0 = forward, 1 = barrel, 2 = backward
float t_locationError
reconstructed minus generated position (cm)
std::vector< double > m_energies_forward
generated photon energies, forward
const int nLeakReg
Some other useful quantities.
int m_number_energies
number of generated energies (8)
std::vector< std::vector< int > > i_energies
Generated energies in MeV in each region.
bool storeCalib
store parameters first event
TH2F m_bias
2D histogram of bias = sum of ECLCalDigit energy minus true (GeV)
TH2F m_peakFracEnergy
2D histogram of peak fractional contained energy
virtual void collect() override
Accumulate TTree.
std::string m_showerArrayName
Required arrays.
StoreObjPtr< EventMetaData > m_evtMetaData
dataStore EventMetaData
DBObjPtr< ECLnOptimal > m_eclNOptimal
nOptimal payload
std::vector< double > m_energies_backward
generated photon energies, backward
ECL::ECLLeakagePosition * leakagePosition
location of position of cluster
virtual void prepare() override
Define histograms and read payloads from DB.
int t_phiBin
binned location in phi relative to crystal edge.
int t_phiMech
0: mechanical structure next to phi edge; 1: no mech structure
int t_region
region of photon 0=forward 1=barrel 2=backward
int m_nEnergyBins
number of energies bins in nOptimal payload
int t_thetaBin
binned location in theta relative to crystal edge
int t_nCrys
number of crystals used to calculate energy
std::vector< double > m_energies_barrel
generated photon energies, barrel
int m_position_bins
Parameters to pass along to the algorithm.
float t_origEnergyFrac
original leakage-corrected energy / generated
std::vector< std::vector< float > > m_eBoundaries
energy boundaries each region
TH2F m_nOptimal2D
2D hist of nOptimal for Ebin vs groupID
std::vector< int > m_groupNumber
group number for each crystal
int m_nDump
Number of events with diagnostic printouts.
Abstract base class for different kinds of events.