diff --git a/core/base/CbmDaq.cxx b/core/base/CbmDaq.cxx index e9efc440bc534b84055bc80c006ce897af37e0a5..7369824bddef4820d8db8bb7eb9a4bf756de0f97 100644 --- a/core/base/CbmDaq.cxx +++ b/core/base/CbmDaq.cxx @@ -508,5 +508,15 @@ void CbmDaq::StartNextTimeSlice() } // =========================================================================== +// ===== Set the maximum allowed time for disordered digis================== +void CbmDaq::SetLatency(Double_t time) +{ + if (time > fLatency) { + LOG(info) << "The latency was set from " << fLatency + << "ns to " << time << "ns"; + fLatency = time; + } +} +// =========================================================================== ClassImp(CbmDaq) diff --git a/core/base/CbmDaq.h b/core/base/CbmDaq.h index 52c62c1c49b16b3bc91123c8bae6d9922ef5b96d..a8b2813108020ce53fa868d14209a863613358bb 100644 --- a/core/base/CbmDaq.h +++ b/core/base/CbmDaq.h @@ -92,11 +92,7 @@ class CbmDaq : public FairTask { ** The current default of 2,000 ns corresponds to the STS with ** dead time of 800 ns and time resolution of 5 ns. **/ - void SetLatency(Double_t time) - { - if (time > fLatency) fLatency = time; - } - + void SetLatency(Double_t time); /** @brief Set the digitizer for a given system ** @param system System Id (ECbmModuleId) diff --git a/sim/detectors/mvd/CbmMvdDigitizer.h b/sim/detectors/mvd/CbmMvdDigitizer.h index d393047a4122a431411190e6042bf9e2236d64a4..898848812525e8cd372ecd4939481d6a699dd6dd 100644 --- a/sim/detectors/mvd/CbmMvdDigitizer.h +++ b/sim/detectors/mvd/CbmMvdDigitizer.h @@ -62,7 +62,9 @@ public: /** @brief Detector specific latency ** @return latency **/ - Double_t GetLatency() const { return 110000.; } + Double_t GetLatency() const { return fLatency; } + + void SetLatency(Float_t latency) { fLatency = latency;} void SetPileUp(Int_t pileUp) { fNPileup = pileUp; } void SetDeltaEvents(Int_t deltaEvents) { fNDeltaElect = deltaEvents; } @@ -164,6 +166,8 @@ private: TStopwatch fTimer; ///< ROOT timer + Float_t fLatency{150000.}; // maximum time of digi disordering + /** Pileup manager **/ CbmMvdPileupManager* fPileupManager; CbmMvdPileupManager* fDeltaManager;