← 输入框|github.com|刷新
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ChipDigitsContainer
o2::trkft3::PreDigit* findDigit(ULong64_t key);
void addDigit(ULong64_t key, UInt_t roframe, UShort_t row, UShort_t col, int charge, o2::MCCompLabel lbl, float toa = 0.f);
template <int DetID>
void addNoise(UInt_t rofMin, UInt_t rofMax, const o2::trkft3::DigiParams<DetID>* params, int subDetID, int layer);
void addNoise(UInt_t rofMin, UInt_t rofMax, const o2::trkft3::DigiParams<DetID>* params, int subDetID, int layer, float rofLengthNS);

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

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

LOG(debug) << "Adding noise for chip " << mChipIndex << " with mean " << mean << " and charge " << nel;
Expand All @@ -121,7 +121,8 @@ void o2::trkft3::ChipDigitsContainer::addNoise(UInt_t rofMin, UInt_t rofMax, con
}
auto key = getOrderingKey(rof, row, col);
if (!findDigit(key)) {
addDigit(key, rof, row, col, nel, o2::MCCompLabel(true), 0.f); /// TODO: find a better ToA for noise
float toa = gRandom->Uniform(0.f, rofLengthNS); // noise fires uniformly in the ROF
addDigit(key, rof, row, col, nel, o2::MCCompLabel(true), toa);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct DPLDigitizerParam : public o2::conf::ConfigurableParamHelper<DPLDigitizer
}

bool continuous = true; ///< flag for continuous simulation
float noisePerPixel = DEFNoisePerPixel(); ///< ALPIDE Noise per channel
float noisePerPixel = DEFNoisePerPixel(); ///< ALMIRA chips noise rate in hits/pixel/s
float strobeFlatTop = 20.; ///< strobe shape flat top
float strobeMaxRiseTime = 0.; ///< strobe max rise time
float strobeQRiseTime0 = 0.; ///< q @ which strobe rise time is 0
Expand All @@ -54,7 +54,7 @@ struct DPLDigitizerParam : public o2::conf::ConfigurableParamHelper<DPLDigitizer
private:
static constexpr float DEFNoisePerPixel()
{
return N == o2::detectors::DetID::TRK ? 1e-7 : 1e-8; // ITS/MFT values here!!
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
}

static constexpr std::string_view ParamName[2] = {"TRKDigitizerParam", "FT3DigitizerParam"};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class DigiParams

private:
static constexpr double infTime = 1e99;
float mNoisePerPixel = 1.e-7; ///< Noise per chip
float mNoisePerPixel = 0.2; ///< noise rate per pixel, in hits/s
double mTimeOffset = -2 * infTime; ///< time offset (in seconds!) to calculate ROFrame from hit time
int mChargeThreshold = 75; ///< charge threshold in Nelectrons
int mMinChargeToAccount = 7; ///< minimum charge contribution to account
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void DigiParams<DetIDV>::print() const
printf("Min N electrons to account : %d\n", mMinChargeToAccount);
printf("Number of charge sharing steps : %d\n", mNSimSteps);
printf("ELoss to N electrons factor : %e\n", mEnergyToNElectrons);
printf("Noise level per pixel : %e\n", mNoisePerPixel);
printf("Noise rate per pixel : %e/s\n", mNoisePerPixel);
printf("Charge time-response:\n");
mSignalShape.print();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void Digitizer<DetID>::process(const std::vector<Hit>* hits, int evID, int srcID
template <int DetID>
void Digitizer<DetID>::setEventTime(const o2::InteractionTimeRecord& irt, int layer)
{
LOG(info) << "Setting event time to " << irt.getTimeNS() << " ns after orbit 0 bc 0";
LOG(debug) << "Setting event time to " << irt.getTimeNS() << " ns after orbit 0 bc 0";
// assign event time in ns
mEventTime = irt;
// RO frame corresponding to provided time
Expand Down Expand Up @@ -213,7 +213,7 @@ void Digitizer<DetID>::fillOutputContainer(uint32_t frameLast, int layer)
if (chip.isDisabled() || (layer >= 0 && getROFLayer(chip.getChipIndex()) != layer)) {
continue;
}
chip.addNoise(mROFrameMin, mROFrameMin, &mParams, mGeometry->getSubDetID(chip.getChipIndex()), mGeometry->getLayer(chip.getChipIndex())); /// TODO: add noise
chip.addNoise(mROFrameMin, mROFrameMin, &mParams, mGeometry->getSubDetID(chip.getChipIndex()), mGeometry->getLayer(chip.getChipIndex()), mParams.getROFrameLength(getROFLayer(chip.getChipIndex())));
auto& buffer = chip.getPreDigits();
if (buffer.empty()) {
continue;
Expand Down
2 changes: 1 addition & 1 deletion Steer/DigitizerWorkflow/src/TRKDigitizerSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class TRKFT3DPLDigitizerTask : BaseDPLDigitizer
// parameters of signal time response: flat-top duration, max rise time and q @ which rise time is 0
digipar.getSignalShape().setParameters(dopt.strobeFlatTop, dopt.strobeMaxRiseTime, dopt.strobeQRiseTime0);
digipar.setChargeThreshold(dopt.chargeThreshold); // charge threshold in electrons
digipar.setNoisePerPixel(dopt.noisePerPixel); // noise level
digipar.setNoisePerPixel(dopt.noisePerPixel); // noise rate in hits/pixel/s
digipar.setTimeOffset(dopt.timeOffset);
digipar.setNSimSteps(dopt.nSimSteps);

Expand Down
Loading