Skip to content

Commit e157050

Browse files
committed
[ALICE3] TRK/FT3 digitizer: noise rate set in hits/px/s instead of hits/px/ROF + uniform ToA within ROF for noise digits
1 parent d1cef57 commit e157050

6 files changed

Lines changed: 12 additions & 11 deletions

File tree

‎Detectors/Upgrades/ALICE3/TRKFT3/common/simulation/include/TRKFT3Simulation/ChipDigitsContainer.h‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ChipDigitsContainer
4646
o2::trkft3::PreDigit* findDigit(ULong64_t key);
4747
void addDigit(ULong64_t key, UInt_t roframe, UShort_t row, UShort_t col, int charge, o2::MCCompLabel lbl, float toa = 0.f);
4848
template <int DetID>
49-
void addNoise(UInt_t rofMin, UInt_t rofMax, const o2::trkft3::DigiParams<DetID>* params, int subDetID, int layer);
49+
void addNoise(UInt_t rofMin, UInt_t rofMax, const o2::trkft3::DigiParams<DetID>* params, int subDetID, int layer, float rofLengthNS);
5050

5151
/// Get global ordering key made of readout frame, column and row
5252
static ULong64_t getOrderingKey(UInt_t roframe, UShort_t row, UShort_t col)
@@ -85,7 +85,7 @@ inline void ChipDigitsContainer::addDigit(ULong64_t key, UInt_t roframe, UShort_
8585
} // namespace o2::trkft3
8686

8787
template <int DetID>
88-
void o2::trkft3::ChipDigitsContainer::addNoise(UInt_t rofMin, UInt_t rofMax, const o2::trkft3::DigiParams<DetID>* params, int subDetID, int layer)
88+
void o2::trkft3::ChipDigitsContainer::addNoise(UInt_t rofMin, UInt_t rofMax, const o2::trkft3::DigiParams<DetID>* params, int subDetID, int layer, float rofLengthNS)
8989
{
9090
UInt_t row = 0;
9191
UInt_t col = 0;
@@ -102,7 +102,7 @@ void o2::trkft3::ChipDigitsContainer::addNoise(UInt_t rofMin, UInt_t rofMax, con
102102
maxRows = o2::trk::constants::moduleMLOT::chip::nRows;
103103
maxCols = o2::trk::constants::moduleMLOT::chip::nCols;
104104
}
105-
mean = params->getNoisePerPixel() * maxRows * maxCols;
105+
mean = params->getNoisePerPixel() * rofLengthNS * 1e-9 * maxRows * maxCols; // hits per ROF in the chip, calculated from the noise rate in hits/s
106106
nel = static_cast<int>(params->getChargeThreshold() * 1.1);
107107

108108
LOG(debug) << "Adding noise for chip " << mChipIndex << " with mean " << mean << " and charge " << nel;
@@ -121,7 +121,8 @@ void o2::trkft3::ChipDigitsContainer::addNoise(UInt_t rofMin, UInt_t rofMax, con
121121
}
122122
auto key = getOrderingKey(rof, row, col);
123123
if (!findDigit(key)) {
124-
addDigit(key, rof, row, col, nel, o2::MCCompLabel(true), 0.f); /// TODO: find a better ToA for noise
124+
float toa = gRandom->Uniform(0.f, rofLengthNS); // noise fires uniformly in the ROF
125+
addDigit(key, rof, row, col, nel, o2::MCCompLabel(true), toa);
125126
}
126127
}
127128
}

‎Detectors/Upgrades/ALICE3/TRKFT3/common/simulation/include/TRKFT3Simulation/DPLDigitizerParam.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct DPLDigitizerParam : public o2::conf::ConfigurableParamHelper<DPLDigitizer
3131
}
3232

3333
bool continuous = true; ///< flag for continuous simulation
34-
float noisePerPixel = DEFNoisePerPixel(); ///< ALPIDE Noise per channel
34+
float noisePerPixel = DEFNoisePerPixel(); ///< ALMIRA chips noise rate in hits/pixel/s
3535
float strobeFlatTop = 20.; ///< strobe shape flat top
3636
float strobeMaxRiseTime = 0.; ///< strobe max rise time
3737
float strobeQRiseTime0 = 0.; ///< q @ which strobe rise time is 0
@@ -54,7 +54,7 @@ struct DPLDigitizerParam : public o2::conf::ConfigurableParamHelper<DPLDigitizer
5454
private:
5555
static constexpr float DEFNoisePerPixel()
5656
{
57-
return N == o2::detectors::DetID::TRK ? 1e-7 : 1e-8; // ITS/MFT values here!!
57+
return N == o2::detectors::DetID::TRK ? 0.2 : 0.2; // TRK/FT3 values here. At the moment the noise should be the same for both cases, but option to set it differently left for the future
5858
}
5959

6060
static constexpr std::string_view ParamName[2] = {"TRKDigitizerParam", "FT3DigitizerParam"};

‎Detectors/Upgrades/ALICE3/TRKFT3/common/simulation/include/TRKFT3Simulation/DigiParams.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class DigiParams
124124

125125
private:
126126
static constexpr double infTime = 1e99;
127-
float mNoisePerPixel = 1.e-7; ///< Noise per chip
127+
float mNoisePerPixel = 0.2; ///< noise rate per pixel, in hits/s
128128
double mTimeOffset = -2 * infTime; ///< time offset (in seconds!) to calculate ROFrame from hit time
129129
int mChargeThreshold = 75; ///< charge threshold in Nelectrons
130130
int mMinChargeToAccount = 7; ///< minimum charge contribution to account

‎Detectors/Upgrades/ALICE3/TRKFT3/common/simulation/src/DigiParams.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void DigiParams<DetIDV>::print() const
6868
printf("Min N electrons to account : %d\n", mMinChargeToAccount);
6969
printf("Number of charge sharing steps : %d\n", mNSimSteps);
7070
printf("ELoss to N electrons factor : %e\n", mEnergyToNElectrons);
71-
printf("Noise level per pixel : %e\n", mNoisePerPixel);
71+
printf("Noise rate per pixel : %e/s\n", mNoisePerPixel);
7272
printf("Charge time-response:\n");
7373
mSignalShape.print();
7474
}

‎Detectors/Upgrades/ALICE3/TRKFT3/common/simulation/src/Digitizer.cxx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ void Digitizer<DetID>::process(const std::vector<Hit>* hits, int evID, int srcID
153153
template <int DetID>
154154
void Digitizer<DetID>::setEventTime(const o2::InteractionTimeRecord& irt, int layer)
155155
{
156-
LOG(info) << "Setting event time to " << irt.getTimeNS() << " ns after orbit 0 bc 0";
156+
LOG(debug) << "Setting event time to " << irt.getTimeNS() << " ns after orbit 0 bc 0";
157157
// assign event time in ns
158158
mEventTime = irt;
159159
// RO frame corresponding to provided time
@@ -213,7 +213,7 @@ void Digitizer<DetID>::fillOutputContainer(uint32_t frameLast, int layer)
213213
if (chip.isDisabled() || (layer >= 0 && getROFLayer(chip.getChipIndex()) != layer)) {
214214
continue;
215215
}
216-
chip.addNoise(mROFrameMin, mROFrameMin, &mParams, mGeometry->getSubDetID(chip.getChipIndex()), mGeometry->getLayer(chip.getChipIndex())); /// TODO: add noise
216+
chip.addNoise(mROFrameMin, mROFrameMin, &mParams, mGeometry->getSubDetID(chip.getChipIndex()), mGeometry->getLayer(chip.getChipIndex()), mParams.getROFrameLength(getROFLayer(chip.getChipIndex())));
217217
auto& buffer = chip.getPreDigits();
218218
if (buffer.empty()) {
219219
continue;

‎Steer/DigitizerWorkflow/src/TRKDigitizerSpec.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ class TRKFT3DPLDigitizerTask : BaseDPLDigitizer
303303
// parameters of signal time response: flat-top duration, max rise time and q @ which rise time is 0
304304
digipar.getSignalShape().setParameters(dopt.strobeFlatTop, dopt.strobeMaxRiseTime, dopt.strobeQRiseTime0);
305305
digipar.setChargeThreshold(dopt.chargeThreshold); // charge threshold in electrons
306-
digipar.setNoisePerPixel(dopt.noisePerPixel); // noise level
306+
digipar.setNoisePerPixel(dopt.noisePerPixel); // noise rate in hits/pixel/s
307307
digipar.setTimeOffset(dopt.timeOffset);
308308
digipar.setNSimSteps(dopt.nSimSteps);
309309

0 commit comments

Comments
 (0)