27 #include "CLHEP/Random/RandGaussQ.h" 28 #include "CLHEP/Units/GlobalSystemOfUnits.h" 29 #include "CLHEP/Units/GlobalPhysicalConstants.h" 31 #include "HepMC/SimpleVector.h" 58 <<
"Error in BetafuncEvtVtxGenerator: " 59 <<
"Illegal resolution in Z (SigmaZ is negative)";
98 double tmp_sigz = CLHEP::RandGaussQ::shoot(engine, 0.,
fSigmaZ);
103 tmp_sigx /=
sqrt(2.0);
104 X = CLHEP::RandGaussQ::shoot(engine, 0., tmp_sigx) +
fX0;
108 tmp_sigy /=
sqrt(2.0);
109 Y = CLHEP::RandGaussQ::shoot(engine, 0., tmp_sigy) +
fY0;
111 double tmp_sigt = CLHEP::RandGaussQ::shoot(engine, 0.,
fSigmaZ);
114 return HepMC::FourVector(X,Y,Z,T);
127 TMatrixD tmpboost(4,4);
135 tmpboost(0,0) = 1./
cos(phi);
136 tmpboost(0,1) = -
cos(alpha)*
sin(phi);
137 tmpboost(0,2) = -
tan(phi)*
sin(phi);
138 tmpboost(0,3) = -
sin(alpha)*
sin(phi);
139 tmpboost(1,0) = -
cos(alpha)*
tan(phi);
141 tmpboost(1,2) =
cos(alpha)*
tan(phi);
144 tmpboost(2,1) = -
cos(alpha)*
sin(phi);
145 tmpboost(2,2) =
cos(phi);
146 tmpboost(2,3) = -
sin(alpha)*
sin(phi);
147 tmpboost(3,0) = -
sin(alpha)*
tan(phi);
149 tmpboost(3,2) =
sin(alpha)*
tan(phi);
164 <<
"Error in BetafuncEvtVtxGenerator::sigmaZ: " 165 <<
"Illegal resolution in Z (negative)";
T getParameter(std::string const &) const
void sigmaZ(double s=1.0)
set resolution in Z in cm
BetafuncEvtVtxGenerator(const edm::ParameterSet &p)
Sin< T >::type sin(const T &t)
void setBoost(double alpha, double phi)
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)
virtual TMatrixD const * GetInvLorentzBoost() const override
edm::ESWatcher< SimBeamSpotObjectsRcd > parameterWatcher_
double BetaFunction(double z, double z0) const
beta function
virtual HepMC::FourVector newVertex(CLHEP::HepRandomEngine *) const override
return a new event vertex
bool check(const edm::EventSetup &iSetup)
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
virtual ~BetafuncEvtVtxGenerator()