9#include <beast/claws/modules/ClawsDigitizerModule.h>
10#include <beast/claws/dataobjects/CLAWSSimHit.h>
11#include <framework/logging/Logger.h>
12#include <framework/gearbox/GearDir.h>
13#include <framework/gearbox/Unit.h>
55 B2INFO(
"ClawsDigitizer: Initializing");
97 for (
const auto& SimHit : SimHits) {
98 int lad = SimHit.getLadder();
99 int sen = SimHit.getSensor();
102 int detNb = (lad - 1) * 8 + sen - 1;
103 const double Edep = SimHit.getEnergyVisible() * 1e6;
104 const double tof = SimHit.getTime();
128 GearDir content =
GearDir(
"/Detector/DetectorComponent[@name=\"CLAWS\"]/Content/");
134 m_PEthres = content.getDouble(
"PEthres");
137 B2INFO(
"ClawsDigitizer: Aquired claws locations and gas parameters");
ClassClawsHit - digitization simulated hit for the Claws detector.
GearDir is the basic class used for accessing the parameter store.
void setDescription(const std::string &description)
Sets the description of the module.
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.
static const double ns
Standard of [time].
std::vector< Double_t > m_C_MIP_to_PE
Convertor factor MIP to PE.
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
virtual void endRun() override
End-of-run action.
virtual void getXMLData()
reads data from CLAWS.xml: tube location, drift data filename, sigma of impulse response function
virtual void terminate() override
Termination action.
double m_TimeStep
Time step.
virtual ~ClawsDigitizerModule()
Destructor.
double m_MaxTime
Upper time limit.
int m_ScintCell
Number of CLAWS scintillator cell.
virtual void beginRun() override
Called when entering a new run.
ClawsDigitizerModule()
Constructor: Sets the description, the properties and the parameters of the module.
double m_PEthres
Energy threshold.
double m_MinTime
Lower time limit.
double m_C_keV_to_MIP
Convertor factor keV to MIP.
StoreArray< ClawsHit > m_clawsHit
Array for ClawsHit.
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.