8 #include "CLHEP/Random/RandGaussQ.h"
9 #include "CLHEP/Units/GlobalSystemOfUnits.h"
10 #include "CLHEP/Units/GlobalPhysicalConstants.h"
12 #include "HepMC/SimpleVector.h"
15 fMeanX =
p.getParameter<
double>(
"MeanX") * cm;
16 fMeanY =
p.getParameter<
double>(
"MeanY") * cm;
17 fMeanZ =
p.getParameter<
double>(
"MeanZ") * cm;
18 fSigmaX =
p.getParameter<
double>(
"SigmaX") * cm;
19 fSigmaY =
p.getParameter<
double>(
"SigmaY") * cm;
20 fSigmaZ =
p.getParameter<
double>(
"SigmaZ") * cm;
21 fTimeOffset =
p.getParameter<
double>(
"TimeOffset") * ns * c_light;
24 throw cms::Exception(
"Configuration") <<
"Error in GaussEvtVtxGenerator: "
25 <<
"Illegal resolution in X (SigmaX is negative)";
28 throw cms::Exception(
"Configuration") <<
"Error in GaussEvtVtxGenerator: "
29 <<
"Illegal resolution in Y (SigmaY is negative)";
32 throw cms::Exception(
"Configuration") <<
"Error in GaussEvtVtxGenerator: "
33 <<
"Illegal resolution in Z (SigmaZ is negative)";
46 return HepMC::FourVector(
X,
Y,
Z,
T);
53 throw cms::Exception(
"LogicError") <<
"Error in GaussEvtVtxGenerator::sigmaX: "
54 <<
"Illegal resolution in X (negative)";
62 throw cms::Exception(
"LogicError") <<
"Error in GaussEvtVtxGenerator::sigmaY: "
63 <<
"Illegal resolution in Y (negative)";
71 throw cms::Exception(
"LogicError") <<
"Error in GaussEvtVtxGenerator::sigmaZ: "
72 <<
"Illegal resolution in Z (negative)";