12#ifndef ALICEO2_EMCAL_FEEDIGITIZER_H
13#define ALICEO2_EMCAL_FEEDIGITIZER_H
17#include <unordered_map>
39class TreeStreamRedirector;
68 void process(
const std::vector<LabeledDigit>& labeledDigit);
101 using TimeSampleContainer = std::array<double, constants::EMCAL_MAXTIMEBINS>;
102 static constexpr int EMC_PHASES = 4;
103 static constexpr int EMC_TOF_BINS = 1500;
104 static constexpr double EMC_TOF_MIN = 0;
105 static constexpr double EMC_TOF_MAX = 1500.;
106 static constexpr double EMC_TOF_BINWITH = (EMC_TOF_MAX - EMC_TOF_MIN) / EMC_TOF_BINS;
107 short mEventTimeOffset = 0;
109 UInt_t mROFrameMin = 0;
110 UInt_t mROFrameMax = 0;
111 bool mSmearEnergy =
true;
112 bool mSimulateTimeResponse =
true;
113 const SimParam* mSimParam =
nullptr;
114 bool mIsBeforeFirstRO =
false;
118 std::vector<Digit> mTempDigitVector;
121 TRandom3* mRandomGenerator =
nullptr;
122 std::array<std::array<TimeSampleContainer, EMC_TOF_BINS>, EMC_PHASES>
123 mAmplitudeInTimeBins;
125 std::unique_ptr<o2::utils::TreeStreamRedirector> mDebugStream =
nullptr;
126 bool mEnableDebugStreaming =
false;
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to process
std::vector< o2::MCCompLabel > labels
Definition of a container to keep Monte Carlo truth external to simulation objects.
EMCAL digit implementation.
void flush()
clear DigitsVectorStream
static double rawResponseFunction(double *x, double *par)
raw pointers used here to allow interface with TF1
void setDebugStreaming(bool doStreaming)
void setEventTime(o2::InteractionTimeRecord record, bool trigger)
Digitizer(const Digitizer &)=delete
bool isLive(double t) const
static constexpr int getTOFSamplingBins()
double getEventTime() const
Digitizer & operator=(const Digitizer &)=delete
void finish()
This is for the readout window that was interrupted by the end of the run.
const std::vector< o2::emcal::TriggerRecord > & getTriggerRecords() const
bool doSmearEnergy() const
void fillOutputContainer(std::vector< Digit > &digits, o2::dataformats::MCTruthContainer< o2::emcal::MCLabel > &labels)
double smearTime(double time, double energy)
~Digitizer() override=default
const std::vector< o2::emcal::Digit > & getDigits() const
bool doSimulateTimeResponse() const
bool isCurrentEventTriggered() const
double getTriggerTime() const
void sampleSDigit(const Digit &sdigit)
double smearEnergy(double energy)
bool preTriggerCollision() const
const o2::dataformats::MCTruthContainer< o2::emcal::MCLabel > & getMCLabels() const
Container class for time sampled digits.
const std::vector< o2::emcal::Digit > & getDigits() const
bool isCurrentEventTriggered() const
void finish()
This is for the readout window that was interrupted by the end of the run.
void flush()
clear DigitsVectorStream
double getTriggerTime() const
const std::vector< o2::emcal::TriggerRecord > & getTriggerRecords() const
const o2::dataformats::MCTruthContainer< o2::emcal::MCLabel > & getMCLabels() const
double getEventTime() const
bool preTriggerCollision() const
bool isLive(double t) const
EMCal simulation parameters.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Common utility functions.
std::vector< Digit > digits