12#ifndef ALICEO2_TRK_CHIPDIGITSCONTAINER_
13#define ALICEO2_TRK_CHIPDIGITSCONTAINER_
21#include <fairlogger/Logger.h>
54 return (
static_cast<ULong64_t
>(roframe) << (8 *
sizeof(UInt_t))) + (
static_cast<ULong64_t
>(
col) << (8 *
sizeof(Short_t))) +
row;
65 std::map<ULong64_t, o2::trkft3::PreDigit>
mDigits;
75 return digitentry !=
mDigits.end() ? &(digitentry->second) :
nullptr;
100 maxCols = o2::trk::constants::VD::petal::layer::nCols;
105 mean =
params->getNoisePerPixel() * rofLengthNS * 1
e-9 * maxRows * maxCols;
106 nel =
static_cast<int>(
params->getChargeThreshold() * 1.1);
108 LOG(
debug) <<
"Adding noise for chip " << mChipIndex <<
" with mean " << mean <<
" and charge " << nel;
110 for (UInt_t rof = rofMin; rof <= rofMax; rof++) {
111 nhits = gRandom->Poisson(mean);
112 for (Int_t
i = 0;
i < nhits; ++
i) {
113 row = gRandom->Integer(maxRows);
114 col = gRandom->Integer(maxCols);
115 LOG(
debug) <<
"Generated noise hit at ROF " << rof <<
", row " <<
row <<
", col " <<
col;
116 if (mNoiseMap && mNoiseMap->isNoisy(mChipIndex,
row,
col)) {
119 if (mDeadChanMap && mDeadChanMap->isNoisy(mChipIndex,
row,
col)) {
122 auto key = getOrderingKey(rof,
row,
col);
123 if (!findDigit(
key)) {
124 float toa = gRandom->Uniform(0.f, rofLengthNS);
Simulation parameters for the TRK digitizer. Based on the ITS2 and ITS3 digitizer parameters.
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 Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
Definition of the ITSMFT NoiseMap.
Definition of the SegmentationChipclass.
Definition of the digit contribution from single hit for TRK/FT3 (based on o2::itsmft::PreDigit,...
NoiseMap class for the ITS and MFT.
static int getNRowsVD(int layer)
Container for simulated points connected to a given chip.
void addDigit(ULong64_t key, UInt_t roframe, UShort_t row, UShort_t col, int charge, o2::MCCompLabel lbl, float toa=0.f)
const o2::itsmft::NoiseMap * mNoiseMap
std::map< ULong64_t, o2::trkft3::PreDigit > mDigits
Map of fired pixels, possibly in multiple frames.
void setNoiseMap(const o2::itsmft::NoiseMap *mp)
std::map< ULong64_t, o2::trkft3::PreDigit > & getPreDigits()
UShort_t mChipIndex
chip index
const o2::itsmft::NoiseMap * mDeadChanMap
UShort_t getChipIndex() const
void setDeadChanMap(const o2::itsmft::NoiseMap *mp)
void setChipIndex(UShort_t ind)
ClassDefNV(ChipDigitsContainer, 2)
static ULong64_t getOrderingKey(UInt_t roframe, UShort_t row, UShort_t col)
Get global ordering key made of readout frame, column and row.
~ChipDigitsContainer()=default
Destructor.
void addNoise(UInt_t rofMin, UInt_t rofMax, const o2::trkft3::DigiParams< DetID > *params, int subDetID, int layer, float rofLengthNS)
o2::trkft3::PreDigit * findDigit(ULong64_t key)
GLenum const GLfloat * params
GLenum GLuint GLint GLint layer
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"