10#include <top/modules/TOPDoublePulseGenerator/TOPCalPulseGeneratorModule.h>
13#include <top/geometry/TOPGeometryPar.h>
16#include <framework/datastore/StoreArray.h>
19#include <framework/logging/Logger.h>
49 setDescription(
"Realistic generator of calibration double pulses. "
50 "Needs TOPDigitizer to digitize");
55 "list of slots for which to generate cal pulse, empty list means all slots.",
59 "ASIC calibration channels (0 - 7), empty list means all channels.",
64 addParam(
"windowSize",
m_windowSize,
"size of time window in which to generate cal pulses [ns]", 8.0);
79 for (
const auto& module : geo->getModules()) {
84 if (!geo->isModuleIDValid(moduleID))
85 B2ERROR(
"Invalid module ID found in input list: " << moduleID);
94 B2ERROR(
"Invalid ASIC channel found in input list: " << ch);
107 for (
unsigned asic = 0; asic < 64; asic++) {
110 auto pixelID = chMapper.getPixelID(channel);
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
std::vector< unsigned > m_asicChannels
ASIC calibration channels.
StoreArray< TOPSimCalPulse > m_calPulses
collection of simulated cal pulses
double m_windowSize
window size in which to generate cal pulses [ns]
double m_amplitude
cal pulse amplitude [ADC counts]
std::vector< int > m_moduleIDs
slot ID's to generate for
double m_delay
cal pulse delay [ns]
const TOPGeometry * getGeometry() const
Returns pointer to geometry object using basf2 units.
const ChannelMapper & getChannelMapper() const
Returns default channel mapper (mapping of channels to pixels)
static TOPGeometryPar * Instance()
Static method to obtain the pointer to its instance.
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.
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
TOPCalPulseGeneratorModule()
Constructor.
Abstract base class for different kinds of events.
record to be used to store ASIC info