test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PoissonPUGenerator.h
Go to the documentation of this file.
1 #ifndef POISSON_PU_GENERATOR_H
2 #define POISSON_PU_GENERATOR_H
3 
5 #include "CLHEP/Random/RandPoissonQ.h"
6 
7 /*----------------------------------------------------------------------
8 
9 ----------------------------------------------------------------------*/
10 
11 namespace edm
12 {
13 
15  {
16  public:
17  explicit PoissonPUGenerator(double av) :average(av){ }
19 
20  private:
21  virtual unsigned int numberOfEventsPerBunch() const {return CLHEP::RandPoissonQ::fire(average);}
22  double average;
23  };
24 }//edm
25 
26 #endif
virtual unsigned int numberOfEventsPerBunch() const