Belle II Software  release-08-01-10
BgoDigitizerModule.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 #ifndef BGODIGITIZERMODULE_H
10 #define BGODIGITIZERMODULE_H
11 
12 #include <framework/core/Module.h>
13 #include <framework/datastore/StoreArray.h>
14 #include <beast/bgo/dataobjects/BgoHit.h>
15 
16 namespace Belle2 {
21  namespace bgo {
31  class BgoDigitizerModule : public Module {
32 
33  public:
34 
39 
43  virtual ~BgoDigitizerModule();
44 
49  virtual void initialize() override;
50 
55  virtual void beginRun() override;
56 
60  virtual void event() override;
61 
66  virtual void endRun() override;
67 
72  virtual void terminate() override;
73 
74 
75  private:
76 
81  virtual void getXMLData();
82  /*
83  Double_t GetEnergyResolutionGeV(Double_t pEnergy) const
84  {
85  // Returns energy resolution in GeV when supplied Energy in GeV
86  return (m_EnergyResolutionFactor * TMath::Sqrt(pEnergy) + m_EnergyResolutionConst * pEnergy);
87 
88  }
89  */
91  Double_t GetEnergyResolutionGeV(Double_t, Int_t);
92 
94  int nBGO = 8;
96  double m_Threshold[8];
98  double m_Range[8];
103 
104  };
105 
106  }
108 }
109 
110 #endif /* BGODIGITIZERMODULE_H */
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
int nBGO
number of detectors.
BgoDigitizerModule()
Constructor: Sets the description, the properties and the parameters of the module.
virtual void initialize() override
Initialize the Module.
double m_EnergyResolutionConst[8]
Energy resolution constant.
virtual void event() override
Event processor.
virtual ~BgoDigitizerModule()
Destructor.
double m_Threshold[8]
Energy threshold.
virtual void endRun() override
End-of-run action.
virtual void getXMLData()
reads data from BGO.xml: threshold in MeV, range in MeV, and resolution in %
double m_EnergyResolutionFactor[8]
Energy resolution factor.
virtual void terminate() override
Termination action.
StoreArray< BgoHit > m_bgoHit
Array for Bgo Hits.
virtual void beginRun() override
Called when entering a new run.
double m_Range[8]
Energy range.
Double_t GetEnergyResolutionGeV(Double_t, Int_t)
Fold energy resolution.
Abstract base class for different kinds of events.