diff --git a/reco/detectors/trd/unpack/CbmTrdUnpackAlgoR.cxx b/reco/detectors/trd/unpack/CbmTrdUnpackAlgoR.cxx index f12519401d3324001eb88d91491e35cb25fd691e..67794ea4ee41bc9bd3c37c778a42bf9ffd39f995 100644 --- a/reco/detectors/trd/unpack/CbmTrdUnpackAlgoR.cxx +++ b/reco/detectors/trd/unpack/CbmTrdUnpackAlgoR.cxx @@ -333,7 +333,7 @@ void CbmTrdUnpackAlgoR::makeDigi(Spadic::FexWord<0x10> fw, std::uint32_t criid) // Store the full time information to last full-time member for error message handling // Get the time information and apply the necessary correction - ULong64_t time = (fw.timestamp - fw.prec_time) * fSpadic->GetClockCycle() + fMsStartTimeRelCC; + ULong64_t time = (fw.timestamp - fw.prec_time) * fSpadic->GetClockCycle() + fMsStartTimeRel; auto energy = fSpadic->MaxAdcToEnergyCal(fw.maxAdc); @@ -381,7 +381,8 @@ bool CbmTrdUnpackAlgoR::unpack(const fles::Timeslice* ts, std::uint16_t icomp, U // Get the µSlice starttime relative to the timeslice starttime. // The UTC is already to large for storing it CbmTrdRawMessageSpadic due to a cast, caused by the multiplication with a double used in the raw message - fMsStartTimeRelCC = (msdesc.idx - fTsStartTime) / fSpadic->GetClockCycle(); + fMsStartTimeRel = msdesc.idx - fTsStartTime; + fMsStartTimeRelCC = fMsStartTimeRel / fSpadic->GetClockCycle(); // Get the hardware ids from which the current µSlice is coming std::uint8_t crobId = 0; diff --git a/reco/detectors/trd/unpack/CbmTrdUnpackAlgoR.h b/reco/detectors/trd/unpack/CbmTrdUnpackAlgoR.h index 1d16c3eefd9505a1c00b3642f48d9e94df9b491c..8ff65e9576dcee589bef8fde7d3333b947317ff0 100644 --- a/reco/detectors/trd/unpack/CbmTrdUnpackAlgoR.h +++ b/reco/detectors/trd/unpack/CbmTrdUnpackAlgoR.h @@ -200,6 +200,9 @@ class CbmTrdUnpackAlgoR : public CbmTrdUnpackAlgoBaseR { /** @brief Number of corrupted EOM frames */ size_t fNrCorruptEom = 0; + /** @brief Start time of the current µSlice relative to the Timeslice start time in ns. */ + size_t fMsStartTimeRel = 0; + /** @brief Start time of the current µSlice relative to the Timeslice start time in Spadic CC. */ size_t fMsStartTimeRelCC = 0;