Skip to content

Commit 676caa8

Browse files
add time of arrival map in the smearing process
1 parent d44ccff commit 676caa8

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Digitizer.cxx‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,15 @@ double Digitizer::smearTime(double time, const float x, const float y) const
353353
LOG(debug) << "Time resolution map check: x=" << x * o2::iotof::Digitizer::cm2um << ", y=" << y * o2::iotof::Digitizer::cm2um << ", bin=" << bin << ", resolution=" << minimumResolution;
354354
LOG(debug) << "Time resolution scaling: " << resolutionScaling;
355355
}
356+
float timeOfArrivalOffset = 0.;
357+
if (mTimeOfArrivalMap) {
358+
int bin = mTimeOfArrivalMap->FindBin(x * o2::iotof::Digitizer::cm2um, y * o2::iotof::Digitizer::cm2um);
359+
timeOfArrivalOffset = mTimeOfArrivalMap->GetBinContent(bin);
360+
LOG(debug) << "Time of arrival map check: x=" << x * o2::iotof::Digitizer::cm2um << ", y=" << y * o2::iotof::Digitizer::cm2um << ", bin=" << bin << ", time offset=" << timeOfArrivalOffset;
361+
}
356362

357363
if (digitizerParams.timeResolution > 0) {
358-
return time + gRandom->Gaus(0, digitizerParams.timeResolution * resolutionScaling);
364+
return time + gRandom->Gaus(timeOfArrivalOffset, digitizerParams.timeResolution * resolutionScaling);
359365
}
360366
return time;
361367
}

0 commit comments

Comments
 (0)