12#include <klm/dataobjects/KLMDigit.h>
13#include <klm/dataobjects/KLMElementNumbers.h>
14#include <klm/dataobjects/KLMSimHit.h>
15#include <klm/dbobjects/KLMChannelStatus.h>
16#include <klm/dbobjects/KLMElectronicsMap.h>
17#include <klm/dbobjects/KLMScintillatorDigitizationParameters.h>
18#include <klm/dbobjects/KLMScintillatorFEEParameters.h>
19#include <klm/dbobjects/KLMScintillatorFirmware.h>
20#include <klm/dbobjects/KLMStripEfficiency.h>
21#include <klm/rawdata/RawData.h>
22#include <klm/simulation/ScintillatorFirmware.h>
23#include <klm/time/KLMTime.h>
26#include <framework/core/Module.h>
27#include <framework/database/DBObjPtr.h>
28#include <framework/datastore/StoreArray.h>
66 void event()
override;
190 std::multimap<KLMChannelNumber, const KLMSimHit*>::iterator
194 std::multimap<KLMChannelNumber, const KLMSimHit*>::iterator
Class for accessing objects in the database.
KLM digit (class representing a digitized hit in RPCs or scintillators).
std::multimap< KLMElectronicsChannel, const KLMSimHit * > m_MapAsicSimHit
Simulation hit map (by ASIC).
std::multimap< KLMPlaneNumber, const KLMSimHit * > m_MapPlaneSimHit
Simulation hit map (by plane).
KLMDigit * m_AsicDigits[KLM::c_NChannelsAsic]
Digits corresponding to ASIC channels.
EfficiencyMode m_EfficiencyMode
Efficiency determination mode (converted from the string parameter).
StoreArray< KLMDigit > m_Digits
KLM digits.
DBObjPtr< KLMChannelStatus > m_ChannelStatus
Channel status.
DBObjPtr< KLMScintillatorFEEParameters > m_FEEPar
Scintillator FEE parameters.
void initialize() override
Initializer.
bool m_CreateMultiStripDigitsByRun
Whether to create multi-strip digits for one particular run.
bool efficiencyCorrection(float efficiency)
Efficiency correction.
void event() override
This method is called for each event.
const KLMElementNumbers * m_ElementNumbers
Element numbers.
bool m_SaveFPGAFit
Save FPGA fit data (KLMScintillatorFirmwareFitResult).
bool checkActive(KLMChannelNumber channel)
Check if channel is active (status is not KLMChannelStatus::c_Dead).
void endRun() override
This method is called if the current run ends.
DBObjPtr< KLMScintillatorDigitizationParameters > m_DigPar
Scintillator digitization parameters.
std::multimap< KLMChannelNumber, const KLMSimHit * > m_MapChannelSimHit
Simulation hit map (by channel).
void terminate() override
This method is called at the end of the event processing.
EfficiencyMode
Efficiency determination mode.
bool m_Debug
Use debug mode in EKLM::ScintillatorSimulator or not.
StoreArray< KLMSimHit > m_SimHits
Simulation hits.
void digitizeRPC()
Digitization in RPCs.
int m_DigitizationInitialTime
Initial digitization time in CTIME periods.
std::multimap< KLMChannelNumber, constKLMSimHit * >::iterator m_AsicDigitSimHitsUpperBound[KLM::c_NChannelsAsic]
Simulation hits upper bound for ASIC digit.
void digitizeScintillator()
Digitization in scintillators.
void checkScintillatorFEEParameters()
Check scintillator FEE parameters for channel-specific simulation.
std::string m_Efficiency
Efficiency determination mode ("Strip" or "Plane").
void beginRun() override
Called when entering a new run.
DBObjPtr< KLMScintillatorFirmware > m_ScintillatorFirmware
Scintillator FEE firmware version.
DBObjPtr< KLMElectronicsMap > m_ElectronicsMap
Electronics map.
std::multimap< KLMChannelNumber, constKLMSimHit * >::iterator m_AsicDigitSimHitsLowerBound[KLM::c_NChannelsAsic]
Simulation hits lower bound for ASIC digit.
KLMDigitizerModule()
Constructor.
void digitizeAsic()
Digitization in ASIC.
~KLMDigitizerModule()
Destructor.
StoreArray< KLMScintillatorFirmwareFitResult > m_FPGAFits
FPGA fits.
bool m_ChannelSpecificSimulation
Whether the simulation is channel-specific.
KLMTime * m_Time
Time conversion.
bool m_CreateMultiStripDigits
Whether to create multi-strip digits.
DBObjPtr< KLMStripEfficiency > m_StripEfficiency
Strip efficiency.
KLM::ScintillatorFirmware * m_Fitter
FPGA fitter.
std::string m_SimulationMode
Simulation mode.
Accessor to arrays stored in the data store.
uint16_t KLMChannelNumber
Channel number.
Abstract base class for different kinds of events.