12#ifndef ALICEO2_FT0_DIGITIZER_H
13#define ALICEO2_FT0_DIGITIZER_H
46 Digitizer(Int_t
mode = 0) : mMode(
mode), mRndGaus(NoiseRandomRingType::RandomType::Gaus), mNumNoiseSamples(), mNoiseSamples(), mSincTable(), mSignalTable(), mSignalCache() {
initParameters(); }
49 void process(
const std::vector<o2::ft0::HitType>* hits, std::vector<o2::ft0::Digit>& digitsBC,
50 std::vector<o2::ft0::ChannelData>& digitsCh,
51 std::vector<o2::ft0::DetTrigInput>& digitsTrig,
53 void flush(std::vector<o2::ft0::Digit>& digitsBC,
54 std::vector<o2::ft0::ChannelData>& digitsCh,
55 std::vector<o2::ft0::DetTrigInput>& digitsTrig,
57 void flush_all(std::vector<o2::ft0::Digit>& digitsBC,
58 std::vector<o2::ft0::ChannelData>& digitsCh,
59 std::vector<o2::ft0::DetTrigInput>& digitsTrig,
76 caliboffsets) { mCalibOffset = caliboffsets; };
94 return (
a.hit_ch !=
b.hit_ch) ? (
a.hit_ch <
b.hit_ch) : (
a.hit_time <
b.hit_time);
97 std::vector<particle>
hits;
112 int const index = std::floor(
y);
114 return mSignalTable.back();
116 float const rem =
y -
index;
117 return mSignalTable[
index] + rem * (mSignalTable[
index + 1] - mSignalTable[
index]);
120 template <
typename VcType>
125 typename VcType::IndexType
const index = floor(
y);
126 auto const rem =
y -
index;
128 for (
size_t i = 0;
i < VcType::size(); ++
i) {
135 val[
i] = mSignalTable.back();
148 bool mIsContinuous =
true;
151 std::deque<BCCache> mCache;
152 std::array<GoodInteractionTimeRecord, NCHANNELS> mDeadTimes;
156 NoiseRandomRingType mRndGaus;
157 int mNumNoiseSamples;
158 std::vector<float> mNoiseSamples;
160 std::array<float, DP::SIGNAL_TABLE_SIZE> mSignalTable;
161 std::vector<float> mSignalCache;
163 void storeBC(BCCache&
bc,
164 std::vector<o2::ft0::Digit>& digitsBC,
165 std::vector<o2::ft0::ChannelData>& digitsCh,
166 std::vector<o2::ft0::DetTrigInput>& digitsTrig,
std::vector< unsigned long > times
Dead channel map for FIT.
Definition of the Detector class.
Configurable digitization parameters.
unsigned short int uint16_t
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.
static const FT0DigParam & Instance()
void flush(std::vector< o2::ft0::Digit > &digitsBC, std::vector< o2::ft0::ChannelData > &digitsCh, std::vector< o2::ft0::DetTrigInput > &digitsTrig, o2::dataformats::MCTruthContainer< o2::ft0::MCLabel > &label)
uint32_t getOrbit() const
void printParameters() const
double getTimeOffsetWrtBC() const
void setContinuous(bool v=true)
void setDeadChannelMap(o2::fit::DeadChannelMap const *deadChannelMap)
CFDOutput get_time(const std::vector< float > ×, float deadTime)
VcType signalFormVc(VcType x) const
bool isContinuous() const
void setInteractionRecord(const o2::InteractionTimeRecord &src)
const o2::InteractionRecord & getInteractionRecord() const
void flush_all(std::vector< o2::ft0::Digit > &digitsBC, std::vector< o2::ft0::ChannelData > &digitsCh, std::vector< o2::ft0::DetTrigInput > &digitsTrig, o2::dataformats::MCTruthContainer< o2::ft0::MCLabel > &label)
void SetChannelOffset(o2::ft0::FT0ChannelTimeCalibrationObject const *caliboffsets)
double measure_amplitude(const std::vector< float > ×) const
o2::InteractionRecord & getInteractionRecord(o2::InteractionRecord &src)
void setEventID(Int_t id)
float signalForm(float x) const
static constexpr int Nchannels
GLboolean GLboolean GLboolean b
GLuint GLsizei const GLchar * label
GLboolean GLboolean GLboolean GLboolean a
struct o2::upgrades_utils::@481 ft0
structure to keep V0C information
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
uint16_t bc
bunch crossing ID of interaction
double getTimeOffsetWrtBC() const
static constexpr int SINC_TABLE_SIZE
static constexpr int SIGNAL_TABLE_SIZE
static constexpr int NOISE_RANDOM_RING_SIZE
friend bool operator<(particle const &a, particle const &b)
std::set< ft0::MCLabel > labels
std::vector< particle > hits
std::optional< double > particle
o2::InteractionRecord intrec