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;
28 class ECLCluster;
29
30 namespace ECL {
32 }
33
34
35
38
39 public:
40
43
45 virtual void prepare() override;
46
48 virtual void collect() override;
49
50 private:
51
55 std::vector<double> m_energies_forward;
56 std::vector<double> m_energies_barrel;
57 std::vector<double> m_energies_backward;
58
60 std::string m_showerArrayName;
66
67
69 const int nLeakReg = 3;
70 bool storeCalib = true;
71 std::vector< std::vector<int> > i_energies;
72
74 int m_nDump = 0;
75
80 TH2F m_bias;
82
83 std::vector<int> m_groupNumber;
84 const int m_nLeakReg = 3;
85 int m_nEnergyBins = 0;
86 std::vector< std::vector<float> > m_eBoundaries;
87
89 int t_cellID = 0;
90 int t_thetaID = 0;
91 int t_region = 0;
92 int t_thetaBin = -1;
94 -1;
95 int t_phiMech = -1;
96 int t_energyBin = -1;
97 int t_nCrys = -1;
98 float t_energyFrac = 0.;
99 float t_origEnergyFrac = 0.;
100 float t_locationError = 999.;
101 };
102
103}
CalibrationCollectorModule()
Constructor. Sets the default prefix for calibration dataobjects.
Class for accessing objects in the database.
Definition DBObjPtr.h:21
ECL cluster data.
Definition ECLCluster.h:27
General DB object to store one calibration number per ECL crystal.
Class to store ECL Showers.
Definition ECLShower.h:30
Class to get position information for a cluster for leakage corrections.
ECL/KLM clustering event level information:
Store event, run, and experiment numbers.
A Class to store the Monte Carlo particle information.
Definition MCParticle.h:32
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
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.
StoreArray< ECLCluster > m_eclClusterArray
Array of ECLClusters.
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.
StoreObjPtr< EventLevelClusteringInfo > m_eventLevelClusteringInfo
EventLevelClusteringInfo.
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.