11 #include <beast/beamabort/modules/BeamDigitizerModule.h>
12 #include <beast/beamabort/dataobjects/BeamabortSimHit.h>
14 #include <framework/logging/Logger.h>
15 #include <framework/core/RandomNumbers.h>
24 using namespace beamabort;
39 setDescription(
"Beamabort digitizer module");
42 addParam(
"WorkFunction", m_WorkFunction,
"Convert eV to e [e/eV] ", 1.12);
43 addParam(
"FanoFactor", m_FanoFactor,
"e resolution ", 0.1);
47 BeamDigitizerModule::~BeamDigitizerModule()
51 void BeamDigitizerModule::initialize()
53 B2INFO(
"BeamDigitizer: Initializing");
54 m_beamabortHit.registerInDataStore();
58 void BeamDigitizerModule::beginRun()
62 void BeamDigitizerModule::event()
73 for (
int i = 0; i < nentries; i++) {
79 double meanEl = edep / m_WorkFunction * 1e9;
80 double sigma = sqrt(m_FanoFactor * meanEl);
81 int NbEle = (int)gRandom->Gaus(meanEl, sigma);
82 double fedep = ((double) NbEle) * m_WorkFunction * 1e-3;
83 double Amp = NbEle / (6.25 * 1e18);
90 void BeamDigitizerModule::endRun()
94 void BeamDigitizerModule::terminate()