#include <BetaFuncPrimaryVertexGenerator.h>
Public Member Functions | |
BetaFuncPrimaryVertexGenerator (const edm::ParameterSet &vtx, const RandomEngine *engine) | |
Default constructor. | |
double | BetaFunction (double z, double z0) |
virtual void | generate () |
Generation process (to be implemented) | |
~BetaFuncPrimaryVertexGenerator () | |
Destructor. | |
Private Member Functions | |
TMatrixD * | inverseLorentzBoost () |
Private Attributes | |
double | alpha_ |
double | fbetastar |
double | femittance |
double | fSigmaZ |
double | fX0 |
double | fY0 |
double | fZ0 |
double | phi_ |
Definition at line 15 of file BetaFuncPrimaryVertexGenerator.h.
BetaFuncPrimaryVertexGenerator::BetaFuncPrimaryVertexGenerator | ( | const edm::ParameterSet & | vtx, |
const RandomEngine * | engine | ||
) |
Default constructor.
Definition at line 8 of file BetaFuncPrimaryVertexGenerator.cc.
References PrimaryVertexGenerator::beamSpot_, fX0, fY0, fZ0, inverseLorentzBoost(), and PrimaryVertexGenerator::setBoost().
: PrimaryVertexGenerator(engine), fX0(vtx.getParameter<double>("X0")), fY0(vtx.getParameter<double>("Y0")), fZ0(vtx.getParameter<double>("Z0")), fSigmaZ(vtx.getParameter<double>("SigmaZ")), alpha_(vtx.getParameter<double>("Alpha")), phi_(vtx.getParameter<double>("Phi")), fbetastar(vtx.getParameter<double>("BetaStar")), femittance(vtx.getParameter<double>("Emittance")) { this->setBoost(inverseLorentzBoost()); beamSpot_ = math::XYZPoint(fX0,fY0,fZ0); }
BetaFuncPrimaryVertexGenerator::~BetaFuncPrimaryVertexGenerator | ( | ) | [inline] |
double BetaFuncPrimaryVertexGenerator::BetaFunction | ( | double | z, |
double | z0 | ||
) |
set resolution in Z in cm set mean in X in cm beta function
Definition at line 44 of file BetaFuncPrimaryVertexGenerator.cc.
References fbetastar, femittance, and mathSSE::sqrt().
Referenced by generate().
void BetaFuncPrimaryVertexGenerator::generate | ( | ) | [virtual] |
Generation process (to be implemented)
Implements PrimaryVertexGenerator.
Definition at line 27 of file BetaFuncPrimaryVertexGenerator.cc.
References BetaFunction(), fSigmaZ, fX0, fY0, fZ0, RandomEngine::gaussShoot(), and PrimaryVertexGenerator::random.
{ double tmp_sigz = random->gaussShoot(0., fSigmaZ); this->SetZ(tmp_sigz + fZ0); double tmp_sigx = BetaFunction(tmp_sigz,fZ0); // need to divide by sqrt(2) for beamspot width relative to single beam width tmp_sigx *= 0.707107; this->SetX(random->gaussShoot(fX0,tmp_sigx)); double tmp_sigy = BetaFunction(tmp_sigz,fZ0); // need to divide by sqrt(2) for beamspot width relative to single beam width tmp_sigy *= 0.707107; this->SetY(random->gaussShoot(fY0,tmp_sigy)); }
TMatrixD * BetaFuncPrimaryVertexGenerator::inverseLorentzBoost | ( | ) | [private] |
Definition at line 52 of file BetaFuncPrimaryVertexGenerator.cc.
References alpha_, funct::cos(), phi_, and funct::sin().
Referenced by BetaFuncPrimaryVertexGenerator().
{ TMatrixD* aBoost = 0; if ( fabs(alpha_) < 1E-12 && fabs(phi_) < 1E-12 ) return aBoost; TMatrixD tmpboost(4,4); // Lorentz boost to frame where the collision is head-on // phi is the half crossing angle in the plane ZS // alpha is the angle to the S axis from the X axis in the XY plane double calpha = std::cos(alpha_); double salpha = std::sin(alpha_); double cphi = std::cos(phi_); double sphi = std::sin(phi_); double tphi = sphi/cphi; tmpboost(0,0) = 1./cphi; tmpboost(0,1) = - calpha*sphi; tmpboost(0,2) = - tphi*sphi; tmpboost(0,3) = - salpha*sphi; tmpboost(1,0) = - calpha*tphi; tmpboost(1,1) = 1.; tmpboost(1,2) = calpha*tphi; tmpboost(1,3) = 0.; tmpboost(2,0) = 0.; tmpboost(2,1) = -calpha*sphi; tmpboost(2,2) = cphi; tmpboost(2,3) = - salpha*sphi; tmpboost(3,0) = - salpha*tphi; tmpboost(3,1) = 0.; tmpboost(3,2) = salpha*tphi; tmpboost(3,3) = 1.; tmpboost.Invert(); aBoost = new TMatrixD(tmpboost); return aBoost; }
double BetaFuncPrimaryVertexGenerator::alpha_ [private] |
Definition at line 40 of file BetaFuncPrimaryVertexGenerator.h.
Referenced by inverseLorentzBoost().
double BetaFuncPrimaryVertexGenerator::fbetastar [private] |
Definition at line 41 of file BetaFuncPrimaryVertexGenerator.h.
Referenced by BetaFunction().
double BetaFuncPrimaryVertexGenerator::femittance [private] |
Definition at line 41 of file BetaFuncPrimaryVertexGenerator.h.
Referenced by BetaFunction().
double BetaFuncPrimaryVertexGenerator::fSigmaZ [private] |
Definition at line 39 of file BetaFuncPrimaryVertexGenerator.h.
Referenced by generate().
double BetaFuncPrimaryVertexGenerator::fX0 [private] |
Definition at line 38 of file BetaFuncPrimaryVertexGenerator.h.
Referenced by BetaFuncPrimaryVertexGenerator(), and generate().
double BetaFuncPrimaryVertexGenerator::fY0 [private] |
Definition at line 38 of file BetaFuncPrimaryVertexGenerator.h.
Referenced by BetaFuncPrimaryVertexGenerator(), and generate().
double BetaFuncPrimaryVertexGenerator::fZ0 [private] |
Definition at line 38 of file BetaFuncPrimaryVertexGenerator.h.
Referenced by BetaFuncPrimaryVertexGenerator(), and generate().
double BetaFuncPrimaryVertexGenerator::phi_ [private] |
Definition at line 40 of file BetaFuncPrimaryVertexGenerator.h.
Referenced by inverseLorentzBoost().