CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FlatPrimaryVertexGenerator.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  minX(vtx.getParameter<double>("MinX")),
13  minY(vtx.getParameter<double>("MinY")),
14  minZ(vtx.getParameter<double>("MinZ")),
15  maxX(vtx.getParameter<double>("MaxX")),
16  maxY(vtx.getParameter<double>("MaxY")),
17  maxZ(vtx.getParameter<double>("MaxZ"))
18 {
19  beamSpot_ = math::XYZPoint((minX+maxX)/2.,(minY+maxY)/2.,(minZ+maxZ)/2.);
20 }
21 
22 void
24 
25  this->SetX(random->flatShoot(minX,maxX));
26  this->SetY(random->flatShoot(minY,maxY));
27  this->SetZ(random->flatShoot(minZ,maxZ));
28 
29 }
const RandomEngine * random
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
double flatShoot(double xmin=0.0, double xmax=1.0) const
Definition: RandomEngine.h:30
FlatPrimaryVertexGenerator(const edm::ParameterSet &vtx, const RandomEngine *engine)
Default constructor.
virtual void generate()
Generation process (to be implemented)