27 #include "CLHEP/Random/RandGaussQ.h"
28 #include "CLHEP/Units/GlobalSystemOfUnits.h"
29 #include "CLHEP/Units/GlobalPhysicalConstants.h"
31 #include "HepMC/SimpleVector.h"
57 <<
"Error in BetafuncEvtVtxGenerator: "
58 <<
"Illegal resolution in Z (SigmaZ is negative)";
84 phi_=beamhandle->fPhi;
102 double tmp_sigz = CLHEP::RandGaussQ::shoot(engine, 0.,
fSigmaZ);
107 tmp_sigx /=
sqrt(2.0);
108 X = CLHEP::RandGaussQ::shoot(engine, 0., tmp_sigx) +
fX0;
112 tmp_sigy /=
sqrt(2.0);
113 Y = CLHEP::RandGaussQ::shoot(engine, 0., tmp_sigy) +
fY0;
115 double tmp_sigt = CLHEP::RandGaussQ::shoot(engine, 0.,
fSigmaZ);
138 <<
"Error in BetafuncEvtVtxGenerator::sigmaZ: "
139 <<
"Illegal resolution in Z (negative)";
152 TMatrixD tmpboost(4,4);
178 boost_ =
new TMatrixD(tmpboost);
const double Z[kNumberCalorimeter]
T getParameter(std::string const &) const
void sigmaZ(double s=1.0)
set resolution in Z in cm
HepMC::FourVector * fVertex
BetafuncEvtVtxGenerator(const edm::ParameterSet &p)
Sin< T >::type sin(const T &t)
double BetaFunction(double z, double z0)
beta function
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
void update(const edm::EventSetup &iEventSetup)
edm::ESWatcher< SimBeamSpotObjectsRcd > parameterWatcher_
virtual TMatrixD * GetInvLorentzBoost() override
virtual HepMC::FourVector * newVertex(CLHEP::HepRandomEngine *) override
return a new event vertex
bool check(const edm::EventSetup &iSetup)
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
virtual ~BetafuncEvtVtxGenerator()