CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/FastSimulation/Event/src/GaussianPrimaryVertexGenerator.cc

Go to the documentation of this file.
00001 //Framework Headers
00002 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00003 
00004 //Famos Headers
00005 #include "FastSimulation/Event/interface/GaussianPrimaryVertexGenerator.h"
00006 #include "FastSimulation/Utilities/interface/RandomEngine.h"
00007 
00009 GaussianPrimaryVertexGenerator::GaussianPrimaryVertexGenerator(
00010   const edm::ParameterSet& vtx, const RandomEngine* engine) : 
00011   PrimaryVertexGenerator(engine),
00012   meanX(vtx.getParameter<double>("MeanX")),
00013   meanY(vtx.getParameter<double>("MeanY")),
00014   meanZ(vtx.getParameter<double>("MeanZ")),
00015   sigmaX(vtx.getParameter<double>("SigmaX")),
00016   sigmaY(vtx.getParameter<double>("SigmaY")),
00017   sigmaZ(vtx.getParameter<double>("SigmaZ"))
00018 {
00019   beamSpot_ = math::XYZPoint(meanX,meanY,meanZ);
00020 }
00021   
00022 void
00023 GaussianPrimaryVertexGenerator::generate() {
00024 
00025   this->SetX(random->gaussShoot(meanX,sigmaX));
00026   this->SetY(random->gaussShoot(meanY,sigmaY));
00027   this->SetZ(random->gaussShoot(meanZ,sigmaZ));
00028 
00029 }