File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1414
1515#include < TRandom.h>
1616#include < Randomize.hh>
17+ #include < G4Version.hh>
1718
1819class G4TRandom : public TRandom {
1920 public:
@@ -27,7 +28,11 @@ class G4TRandom : public TRandom {
2728 virtual UInt_t GetSeed () const ;
2829 virtual UInt_t Integer (UInt_t imax);
2930 virtual Double_t Landau (Double_t mean=0 , Double_t sigma=1 );
31+ #if G4VERSION_NUMBER >= 1070
3032 virtual ULong64_t Poisson (Double_t mean);
33+ #else
34+ virtual Int_t Poisson (Double_t mean);
35+ #endif
3136 virtual Double_t PoissonD (Double_t mean);
3237 virtual void Rannor (Float_t &a, Float_t &b);
3338 virtual void Rannor (Double_t &a, Double_t &b);
@@ -79,7 +84,11 @@ inline Double_t G4TRandom::Landau(Double_t mean, Double_t sigma) {
7984 return CLHEP::RandLandau::shoot () * sigma + mean;
8085}
8186
87+ #if G4VERSION_NUMBER >= 1070
8288inline ULong64_t G4TRandom::Poisson (Double_t mean) {
89+ #else
90+ inline Int_t G4TRandom::Poisson (Double_t mean) {
91+ #endif
8392 return CLHEP::RandPoisson::shoot (mean);
8493}
8594
You can’t perform that action at this time.
0 commit comments