From d8e22ceeb39624947aebf9de637bab8ccf626153 Mon Sep 17 00:00:00 2001 From: Michael Deveaux <deveaux@physik.uni-frankfurt.de> Date: Mon, 24 Jul 2023 16:50:59 +0200 Subject: [PATCH] Use gRandom instaed of individual TRandom --- core/detectors/mvd/SensorDataSheets/CbmMvdMimosis.cxx | 4 ++-- core/detectors/mvd/SensorDataSheets/CbmMvdMimosis.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/detectors/mvd/SensorDataSheets/CbmMvdMimosis.cxx b/core/detectors/mvd/SensorDataSheets/CbmMvdMimosis.cxx index 4d184f5c63..5cfbf73722 100644 --- a/core/detectors/mvd/SensorDataSheets/CbmMvdMimosis.cxx +++ b/core/detectors/mvd/SensorDataSheets/CbmMvdMimosis.cxx @@ -73,14 +73,14 @@ Double_t CbmMvdMimosis::ComputeHitDelay(Float_t charge){ Double_t delay=47591.8471 * std::pow(charge,-0.9990384691); Double_t delaySigma=11909.5799315438 * std::pow(charge,-1.0784955428); - return delay + fRandom.Gaus(delay,delaySigma); //models the pixel-to-pixel variation in terms of delay + return delay + fRandom->Gaus(delay,delaySigma); //models the pixel-to-pixel variation in terms of delay } Double_t CbmMvdMimosis::ComputeHitJitter (Float_t charge){ Double_t jitter = 194945.6385 * std::pow(charge,-1.6138338012); // Full width of jitter as function of charge - return fRandom.Uniform(-(jitter / 2.), jitter / 2.); + return fRandom->Uniform(-(jitter / 2.), jitter / 2.); } diff --git a/core/detectors/mvd/SensorDataSheets/CbmMvdMimosis.h b/core/detectors/mvd/SensorDataSheets/CbmMvdMimosis.h index 77048209b1..b525ab7f97 100644 --- a/core/detectors/mvd/SensorDataSheets/CbmMvdMimosis.h +++ b/core/detectors/mvd/SensorDataSheets/CbmMvdMimosis.h @@ -21,6 +21,7 @@ #include "CbmMvdSensorDataSheet.h" // for CbmMvdSensorDataSheet #include <Rtypes.h> // for ClassDef +#include <TRandom.h> class TBuffer; class TClass; @@ -38,7 +39,7 @@ public: Double_t ComputeHitDelay(Float_t charge); Double_t ComputeHitJitter (Float_t charge); - TRandom fRandom; + TRandom* fRandom=gRandom; /** Destructor **/ ~CbmMvdMimosis(); -- GitLab