9#include <beast/qcsmonitor/modules/QcsmonitorDigitizerModule.h>
10#include <beast/qcsmonitor/dataobjects/QcsmonitorSimHit.h>
12#include <mdst/dataobjects/MCParticle.h>
13#include <framework/logging/Logger.h>
14#include <framework/gearbox/GearDir.h>
22using namespace qcsmonitor;
55 B2INFO(
"QcsmonitorDigitizer: Initializing");
82 for (
int i = 0; i < 1000; i ++)
83 for (
int j = 0; j < 100; j ++)
86 for (
const auto& SimHit : SimHits) {
87 const int detNb = SimHit.getCellId();
88 const double Edep = SimHit.getEnergyDep() * 1e6;
89 const double tof = SimHit.getFlightTime();
112 for (
int i = 0; i < number_of_timebins; i ++) {
128 GearDir content =
GearDir(
"/Detector/DetectorComponent[@name=\"QCSMONITOR\"]/Content/");
132 m_MinTime = content.getDouble(
"MinTime");
133 m_MaxTime = content.getDouble(
"MaxTime");
138 B2INFO(
"QcsmonitorDigitizer: Aquired qcsmonitor locations and gas parameters");
GearDir is the basic class used for accessing the parameter store.
void setDescription(const std::string &description)
Sets the description of the module.
ClassQcsmonitorHit - digitization simulated hit for the Qcsmonitor detector.
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.
double hitsarrayinMIP[1000][100]
Event MIP array.
virtual void initialize() override
Initialize the Module.
QcsmonitorDigitizerModule()
Constructor: Sets the description, the properties and the parameters of the module.
virtual void event() override
Event processor.
virtual void endRun() override
End-of-run action.
StoreArray< QcsmonitorHit > m_qcsmonitorHit
Array for QcsmonitorHit.
virtual void getXMLData()
reads data from QCSMONITOR.xml: tube location, drift data filename, sigma of impulse response functio...
virtual void terminate() override
Termination action.
virtual ~QcsmonitorDigitizerModule()
Destructor.
double m_TimeStep
Time step.
double m_MaxTime
Upper time limit.
int m_ScintCell
Number of QCSMONITOR scintillator cell.
virtual void beginRun() override
Called when entering a new run.
double m_C_MIP_to_PE
Convertor factor MIP to PE.
double m_MIPthres
Energy threshold.
double m_MinTime
Lower time limit.
double m_C_keV_to_MIP
Convertor factor keV to MIP.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.