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);
100 using TimeSampleContainer = std::array<double, constants::EMCAL_MAXTIMEBINS>;
101 static constexpr int EMC_PHASES = 4;
102 static constexpr int EMC_TOF_BINS = 1500;
103 static constexpr double EMC_TOF_MIN = 0;
104 static constexpr double EMC_TOF_MAX = 1500.;
105 static constexpr double EMC_TOF_BINWITH = (EMC_TOF_MAX - EMC_TOF_MIN) / EMC_TOF_BINS;
106 short mEventTimeOffset = 0;
108 UInt_t mROFrameMin = 0;
109 UInt_t mROFrameMax = 0;
110 bool mSmearEnergy =
true;
111 bool mSimulateTimeResponse =
true;
112 const SimParam* mSimParam =
nullptr;
113 bool mIsBeforeFirstRO =
false;
117 std::vector<Digit> mTempDigitVector;
120 TRandom3* mRandomGenerator =
nullptr;
121 std::array<std::array<TimeSampleContainer, EMC_TOF_BINS>, EMC_PHASES>
122 mAmplitudeInTimeBins;
124 std::unique_ptr<o2::utils::TreeStreamRedirector> mDebugStream =
nullptr;
125 bool mEnableDebugStreaming =
false;
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
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
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