Commit 5d6f80e2 authored by Felix Weiglhofer's avatar Felix Weiglhofer Committed by Volker Friese
Browse files

Digitization: Apply time offset also in event-by-event mode.

parent 365a9936
......@@ -189,7 +189,7 @@ void CbmStsDigitize::Exec(Option_t* /*opt*/)
// --- Generate noise from previous to current event time
if (fParSim->Noise()) {
Int_t nNoise = 0;
Double_t tNoiseStart = fNofEvents ? eventTimePrevious : 0.;
Double_t tNoiseStart = fNofEvents ? eventTimePrevious : 1000.;
Double_t tNoiseEnd = fCurrentEventTime;
for (auto& entry : fModules)
nNoise += entry.second->GenerateNoise(tNoiseStart, tNoiseEnd);
......
......@@ -280,7 +280,7 @@ Int_t CbmDigitizationSource::ReadEvent(UInt_t event)
}
// In the event-by-event mode, get the respective event from the first
// input; the event time is zero.
// input; the event time is fStartTime.
if (fEventMode) return ReadEventByEvent(event);
// If the last used input set was exhausted, switch to a the next one
......@@ -347,7 +347,7 @@ Int_t CbmDigitizationSource::ReadEventByEvent(UInt_t event)
fCurrentEntryId = input->GetNextEntry();
// Set entry properties
fCurrentTime = 0.;
fCurrentTime = fTimeStart;
LOG(info) << "DigitizationSource: Event " << event << " at t = " << fCurrentTime << " ns"
<< " from input " << fCurrentInputId << " (entry " << fCurrentEntryId << ")";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment