CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GaussianPrimaryVertexGenerator.cc
Go to the documentation of this file.
1 //Framework Headers
3 
4 //Famos Headers
7 
10  const edm::ParameterSet& vtx, const RandomEngine* engine) :
11  PrimaryVertexGenerator(engine),
12  meanX(vtx.getParameter<double>("MeanX")),
13  meanY(vtx.getParameter<double>("MeanY")),
14  meanZ(vtx.getParameter<double>("MeanZ")),
15  sigmaX(vtx.getParameter<double>("SigmaX")),
16  sigmaY(vtx.getParameter<double>("SigmaY")),
17  sigmaZ(vtx.getParameter<double>("SigmaZ"))
18 {
20 }
21 
22 void
24 
25  this->SetX(random->gaussShoot(meanX,sigmaX));
26  this->SetY(random->gaussShoot(meanY,sigmaY));
27  this->SetZ(random->gaussShoot(meanZ,sigmaZ));
28 
29 }
GaussianPrimaryVertexGenerator(const edm::ParameterSet &vtx, const RandomEngine *engine)
Default constructor.
const RandomEngine * random
double gaussShoot(double mean=0.0, double sigma=1.0) const
Definition: RandomEngine.h:37
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
virtual void generate()
Generation process (to be implemented)