9#include <beast/bgo/modules/BgoDigitizerModule.h>
10#include <beast/bgo/dataobjects/BgoSimHit.h>
12#include <framework/logging/Logger.h>
13#include <framework/gearbox/GearDir.h>
14#include <framework/core/RandomNumbers.h>
17#include <Math/Vector3D.h>
57 B2INFO(
"BgoDigitizer: Initializing");
74 for (
int i = 0; i < nentries; i++) {
83 double erecdep = m_energyDeposit;
86 BgoHits.
appendNew(
BgoHit(m_cellID, m_trackID, pdgCode, m_Time * m_energyDeposit / erecdep, m_energyDeposit, m_Mom,
87 m_Pos * (m_energyDeposit / erecdep), erecdep));
95 GearDir content =
GearDir(
"/Detector/DetectorComponent[@name=\"BGO\"]/Content/");
100 for (
double EnResConst : content.getArray(
"EnergyResolutionConst", {0})) {
105 for (
double EnResFac : content.getArray(
"EnergyResolutionFactor", {0})) {
110 for (
double Threshold : content.getArray(
"Threshold", {0})) {
116 for (
double Range : content.getArray(
"Range", {0})) {
122 B2INFO(
"BgoDigitizer: Aquired bgo locations and gas parameters");
123 B2INFO(
" from BGO.xml. There are " <<
nBGO <<
" BGOs implemented");
ClassBgoHit - Geant4 ulated hit for the Bgo crystal in beast.
ClassBgoSimHit - Geant4 simulated hit for the Bgo crystal in beast.
int getPDGCode() const
Get Particle PDG (can be one of secondaries)
int getTrackId() const
Get Track ID.
int getCellId() const
Get Cell ID.
double getFlightTime() const
Get Flight time from IP.
double getEnergyDep() const
Get Deposit energy.
ROOT::Math::XYZVector getMomentum() const
Get Momentum.
ROOT::Math::XYZVector getPosition() const
Get Position.
GearDir is the basic class used for accessing the parameter store.
void setDescription(const std::string &description)
Sets the description of the module.
Represents a range of arithmetic types.
Accessor to arrays stored in the data store.
T * appendNew()
Construct a new T object at the end of the array.
int getEntries() const
Get the number of objects in the array.
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.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.