Belle II Software  release-06-01-15
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 #include <calibration/CalibrationCollectorModule.h>
12 #include <framework/database/DBObjPtr.h>
13 #include <framework/datastore/StoreArray.h>
14 
15 
16 namespace Belle2 {
21  class ECLCrystalCalib;
22  class ECLShower;
23  class MCParticle;
24  class EventMetaData;
25 
26  namespace ECL {
27  class ECLLeakagePosition;
28  }
29 
30 
31 
34 
35  public:
36 
39 
41  virtual void prepare() override;
42 
44  virtual void collect() override;
45 
46  private:
47 
51  std::vector<double> m_energies_forward;
52  std::vector<double> m_energies_barrel;
53  std::vector<double> m_energies_backward;
56  std::string m_showerArrayName;
62  const int nLeakReg = 3;
63  const int nCrysMax = 21;
64  bool storeCalib = true;
65  std::vector< std::vector<int> > i_energies;
70  int t_cellID = 0;
71  int t_thetaID = 0;
72  int t_region = 0;
73  int t_thetaBin = -1;
74  int t_phiBin =
75  -1;
76  int t_phiMech = -1;
77  int t_energyBin = -1;
78  int t_nCrys = -1;
79  float t_energyFrac = 0.;
80  float t_origEnergyFrac = 0.;
81  float t_locationError = 999.;
82  };
84 }
Calibration collector module base class.
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:95
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.
float t_energyFrac
measured energy without leakage correction divided by generated
const int nCrysMax
max number of crystals used to calculate energy
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
virtual void collect() override
Accumulate TTree.
std::string m_showerArrayName
Required arrays.
StoreObjPtr< EventMetaData > m_evtMetaData
dataStore EventMetaData
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 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
Abstract base class for different kinds of events.