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) :
11  minX(vtx.getParameter<double>("MinX")),
12  minY(vtx.getParameter<double>("MinY")),
13  minZ(vtx.getParameter<double>("MinZ")),
14  maxX(vtx.getParameter<double>("MaxX")),
15  maxY(vtx.getParameter<double>("MaxY")),
16  maxZ(vtx.getParameter<double>("MaxZ"))
17 {
18  beamSpot_ = math::XYZPoint((minX+maxX)/2.,(minY+maxY)/2.,(minZ+maxZ)/2.);
19 }
20 
21 void
23 
24  this->SetX(random->flatShoot(minX,maxX));
25  this->SetY(random->flatShoot(minY,maxY));
26  this->SetZ(random->flatShoot(minZ,maxZ));
27 
28 }
double flatShoot(double xmin=0.0, double xmax=1.0) const
TRandom random
Definition: MVATrainer.cc:138
FlatPrimaryVertexGenerator(const edm::ParameterSet &vtx)
Default constructor.
virtual void generate(RandomEngineAndDistribution const *)
Generation process (to be implemented)
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12