CMS 3D CMS Logo

Functions
MCFilterZboostHelper Namespace Reference

Functions

HepMC::FourVector zboost (const HepMC::FourVector &, double)
 

Function Documentation

HepMC::FourVector MCFilterZboostHelper::zboost ( const HepMC::FourVector &  mom,
double  betaBoost 
)

Definition at line 3 of file MCFilterZboostHelper.cc.

References CustomPhysics_cfi::gamma, and mathSSE::sqrt().

Referenced by PythiaFilterMultiMother::filter(), PythiaFilterMultiAncestor::filter(), MCSmartSingleParticleFilter::filter(), PythiaFilter::filter(), PythiaFilterMotherSister::filter(), MCSingleParticleFilter::filter(), MCParticlePairFilter::filter(), and PythiaMomDauFilter::filter().

3  {
4  //Boost this Lorentz vector (from TLorentzVector::Boost)
5  double b2 = betaBoost*betaBoost;
6  double gamma = 1.0 / sqrt(1.0 - b2);
7  double bp = betaBoost*mom.pz();
8  double gamma2 = b2 > 0 ? (gamma - 1.0)/b2 : 0.0;
9 
10  return HepMC::FourVector(mom.px(), mom.py(), mom.pz() + gamma2*bp*betaBoost + gamma*betaBoost*mom.e(), gamma*(mom.e()+bp));
11 }
T sqrt(T t)
Definition: SSEVec.h:18