12#ifndef ALICEO2_EMCAL_TRIGGERDIGITIZER_H
13#define ALICEO2_EMCAL_TRIGGERDIGITIZER_H
16#include <unordered_map>
40class TreeStreamRedirector;
73 void process(
const gsl::span<const Digit> summableDigits);
106 mDebugStream->Close();
128 short mEventTimeOffset = 0;
129 bool mSmearEnergy =
true;
130 bool mSimulateTimeResponse =
true;
133 std::vector<Digit> mTempDigitVector;
137 std::vector<TRUElectronics> patchesFromAllTRUs;
140 std::array<double, constants::EMCAL_MAXTIMEBINS>
141 mAmplitudeInTimeBins;
146 int mTimeWindowStart = 7;
148 bool mWasTriggerFound =
false;
149 int mPreviousTriggerSize = 0;
151 std::unique_ptr<o2::utils::TreeStreamRedirector> mDebugStream =
nullptr;
153 bool mEnableDebugStreaming =
false;
Definition of a container to keep Monte Carlo truth external to simulation objects.
EMCAL digit implementation.
EMCAL DigitizerTRU, digitizes with the help of a temporary description based upon a pol9*Heavyside.
int GetChannelForMaskRun2(int mask, int bitnumber, bool onethirdsm)
bool doSmearEnergy() const
const std::vector< EMCALTriggerInputs > & getTriggerInputs()
Getter for triggers.
void setDebugStreaming(bool doStreaming)
void setWindowStartTime(int time)
std::vector< int > GetAbsFastORIndexFromMask()
double smearEnergy(double energy)
void setEventTime(o2::InteractionTimeRecord record)
int GetTRUIndexFromSTUIndex(Int_t id, Int_t detector)
Utility functions obtained from QC for EMC.
void finish()
This is for the readout window that was interrupted by the end of the run.
void setMaskedFastOrsInLZERO()
Sets the masked fastOrs from the CCDB in the LZERO.
DigitizerTRU(const DigitizerTRU &)=delete
void setGeometry(o2::emcal::Geometry *gm)
Sets geometry for trigger mapping.
void sampleSDigit(const Digit &sdigit)
DigitizerTRU & operator=(const DigitizerTRU &)=delete
std::vector< std::tuple< int, Digit > > makeAnaloguesFastorSums(const gsl::span< const Digit > sdigits)
void fillOutputContainer(std::vector< Digit > &digits, o2::dataformats::MCTruthContainer< o2::emcal::MCLabel > &labels)
bool doSimulateTimeResponse() const
static double rawResponseFunction(double *x, double *par)
raw pointers used here to allow interface with TF1
double smearTime(double time, double energy)
std::vector< TRUElectronics > getPatchesVector()
Getter for patches.
void endDebugStream()
Close the TreeStreamer to make the file readable.
void flush()
clear DigitsVectorStream
void setPatches()
Sets patches for the current geometry.
bool isDebugMode()
Getter for debug mode.
void setFEE(o2::emcal::FeeDCS *fees)
Sets FEE DCS for the masking of the fastOrs.
void printMaskedFastOrsInLZERO()
Container class for time sampled digits to be sent to TRUs in true continuous readout.
void flush()
clear DigitsVectorStream
EMCAL geometry definition.
Container class for Digits, MC lebels, and trigger records.
const std::vector< EMCALTriggerInputs > & getTriggerInputs() const
Getter for the trigger inputs found by the LZERO algorithm.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Common utility functions.
std::vector< Digit > digits