12#ifndef ALICEO2_FV0_DIGITIZER_H
13#define ALICEO2_FV0_DIGITIZER_H
38 : mTimeStamp(0), mIntRecord(), mEventId(-1), mSrcId(-1), mMCLabels(), mCache(), mPmtChargeVsTime(), mNBins(), mNTimeBinsPerBC(), mPmtResponseGlobalRing5(), mPmtResponseGlobalRingA1ToA4(), mPmtResponseTemp(), mLastBCCache(), mCfdStartIndex()
57 void process(
const std::vector<o2::fv0::Hit>& hits, std::vector<o2::fv0::Digit>& digitsBC,
58 std::vector<o2::fv0::ChannelData>& digitsCh, std::vector<o2::fv0::DetTrigInput>& digitsTrig,
61 void flush(std::vector<o2::fv0::Digit>& digitsBC,
62 std::vector<o2::fv0::ChannelData>& digitsCh,
63 std::vector<o2::fv0::DetTrigInput>& digitsTrig,
69 uint16_t
getBC()
const {
return mIntRecord.
bc; }
74 std::vector<o2::fv0::MCLabel>
labels;
80 std::fill(std::begin(channel), std::end(channel), 0.);
94 static constexpr int BCCacheMin = 0, BCCacheMax = 7, NBC2Cache = 1 + BCCacheMax - BCCacheMin;
103 void createPulse(
float mipFraction,
int parID,
const double hitTime,
const float hitR,
104 std::array<o2::InteractionRecord, NBC2Cache>
const& cachedIR,
int nCachedIR,
const int detID);
110 std::deque<fv0::MCLabel> mMCLabels;
111 std::deque<BCCache> mCache;
117 std::vector<o2::fv0::Digit>& digitsBC,
118 std::vector<o2::fv0::ChannelData>& digitsCh,
119 std::vector<o2::fv0::DetTrigInput>& digitsTrig,
121 bool isRing5(
int detID);
123 std::array<std::vector<Float_t>, Constants::nFv0Channels> mPmtChargeVsTime;
125 UInt_t mNTimeBinsPerBC;
129 std::vector<Double_t> mPmtResponseGlobalRing5;
130 std::vector<Double_t> mPmtResponseGlobalRingA1ToA4;
131 std::vector<Double_t> mPmtResponseTemp;
135 std::array<int, Constants::nFv0Channels> mCfdStartIndex;
140 Int_t SimulateLightYield(Int_t pmt, Int_t nPhot)
const;
145 static float getDistFromCellCenter(UInt_t cellId,
double hitx,
double hity);
146 static float getSignalFraction(
float distanceFromXc,
bool isFirstChannel);
154 return -0.668453 / (1.0 + TMath::Exp(TMath::Abs(
x) / 3.64327)) + 0.834284;
std::vector< std::string > labels
Dead channel map for FIT.
General constants in FV0.
Definition of the FV0 detector class.
Definition of a container to keep Monte Carlo truth external to simulation objects.
~Digitizer()=default
Destructor.
Digitizer & operator=(const Digitizer &)=delete
void flush(std::vector< o2::fv0::Digit > &digitsBC, std::vector< o2::fv0::ChannelData > &digitsCh, std::vector< o2::fv0::DetTrigInput > &digitsTrig, o2::dataformats::MCTruthContainer< o2::fv0::MCLabel > &labels)
uint32_t getOrbit() const
void setTimeStamp(long t)
void setInteractionRecord(const InteractionTimeRecord &ir)
void setEventId(Int_t id)
const InteractionRecord & getInteractionRecord() const
void setDeadChannelMap(o2::fit::DeadChannelMap const *deadChannelMap)
void process(const std::vector< o2::fv0::Hit > &hits, std::vector< o2::fv0::Digit > &digitsBC, std::vector< o2::fv0::ChannelData > &digitsCh, std::vector< o2::fv0::DetTrigInput > &digitsTrig, o2::dataformats::MCTruthContainer< o2::fv0::MCLabel > &labels)
Digitizer(const Digitizer &)=delete
std::vector< float > ChannelDigitF
InteractionRecord & getInteractionRecord(InteractionRecord &src)
float sigmoidPmtRing5(float x)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
uint16_t bc
bunch crossing ID of interaction
InteractionRecord & operator=(const InteractionRecord &src)=default
std::vector< o2::fv0::MCLabel > labels
BCCache & operator=(const o2::InteractionRecord &ir)
std::array< ChannelDigitF, Constants::nFv0Channels > mPmtChargeVsTime
o2::InteractionRecord ir(0, 0)