CMS 3D CMS Logo

P8RndmEngine.h
Go to the documentation of this file.
1 #ifndef GeneratorInterface_Pythia8Interface_P8RndmEngine_h
2 #define GeneratorInterface_Pythia8Interface_P8RndmEngine_h
3 
19 #include "Pythia8/Basics.h"
20 
21 namespace CLHEP {
22  class HepRandomEngine;
23 }
24 
25 namespace gen {
26 
27  class P8RndmEngine : public Pythia8::RndmEngine {
28  public:
29  P8RndmEngine() : randomEngine_(nullptr) {}
30 
31  // Routine for generating a random number.
32  double flat() override;
33 
34  void setRandomEngine(CLHEP::HepRandomEngine* v) { randomEngine_ = v; }
35 
36  private:
37  void throwNullPtr() const;
38 
39  CLHEP::HepRandomEngine* randomEngine_;
40  };
41  typedef std::shared_ptr<P8RndmEngine> P8RndmEnginePtr;
42 } // namespace gen
43 #endif
void throwNullPtr() const
Definition: P8RndmEngine.cc:14
double flat() override
Definition: P8RndmEngine.cc:7
double v[5][pyjets_maxn]
void setRandomEngine(CLHEP::HepRandomEngine *v)
Definition: P8RndmEngine.h:34
std::shared_ptr< P8RndmEngine > P8RndmEnginePtr
Definition: PythiaDecays.h:14
CLHEP::HepRandomEngine * randomEngine_
Definition: P8RndmEngine.h:39