8 #include "CLHEP/Random/RandFlat.h" 9 #include "CLHEP/Units/GlobalSystemOfUnits.h" 10 #include "CLHEP/Units/GlobalPhysicalConstants.h" 12 #include "HepMC/SimpleVector.h" 28 <<
"Error in FlatEvtVtxGenerator: " 29 <<
"MinX is greater than MaxX";
33 <<
"Error in FlatEvtVtxGenerator: " 34 <<
"MinY is greater than MaxY";
38 <<
"Error in FlatEvtVtxGenerator: " 39 <<
"MinZ is greater than MaxZ";
43 <<
"Error in FlatEvtVtxGenerator: " 44 <<
"MinT is greater than MaxT";
55 aX = CLHEP::RandFlat::shoot(engine,
fMinX,
fMaxX);
56 aY = CLHEP::RandFlat::shoot(engine,
fMinY,
fMaxY);
57 aZ = CLHEP::RandFlat::shoot(engine,
fMinZ,
fMaxZ);
58 aT = CLHEP::RandFlat::shoot(engine,
fMinT,
fMaxT);
60 return HepMC::FourVector(aX,aY,aZ,aT);
T getParameter(std::string const &) const
void minZ(double m=0.0)
set min in Z in cm
~FlatEvtVtxGenerator() override
void maxZ(double m=0)
set max in Z in cm
FlatEvtVtxGenerator(const edm::ParameterSet &p)
void minX(double m=0.0)
set min in X in cm
void minY(double m=0.0)
set min in Y in cm
void maxX(double m=0)
set max in X in cm
void maxY(double m=0)
set max in Y in cm
HepMC::FourVector newVertex(CLHEP::HepRandomEngine *) const override
return a new event vertex