diff --git a/src/G4TRandom.hh b/src/G4TRandom.hh index 90b2cfa..15e551e 100644 --- a/src/G4TRandom.hh +++ b/src/G4TRandom.hh @@ -14,6 +14,7 @@ #include #include +#include class G4TRandom : public TRandom { public: @@ -27,7 +28,11 @@ class G4TRandom : public TRandom { virtual UInt_t GetSeed() const; virtual UInt_t Integer(UInt_t imax); virtual Double_t Landau(Double_t mean=0, Double_t sigma=1); +#if G4VERSION_NUMBER >= 1070 virtual ULong64_t Poisson(Double_t mean); +#else + virtual Int_t Poisson(Double_t mean); +#endif virtual Double_t PoissonD(Double_t mean); virtual void Rannor(Float_t &a, Float_t &b); virtual void Rannor(Double_t &a, Double_t &b); @@ -79,7 +84,11 @@ inline Double_t G4TRandom::Landau(Double_t mean, Double_t sigma) { return CLHEP::RandLandau::shoot() * sigma + mean; } +#if G4VERSION_NUMBER >= 1070 inline ULong64_t G4TRandom::Poisson(Double_t mean) { +#else +inline Int_t G4TRandom::Poisson(Double_t mean) { +#endif return CLHEP::RandPoisson::shoot(mean); }