Main Page
Namespaces
Classes
Package Documentation
GeneratorInterface
GenFilters
src
MCFilterZboostHelper.cc
Go to the documentation of this file.
1
#include "
GeneratorInterface/GenFilters/interface/MCFilterZboostHelper.h
"
2
3
HepMC::FourVector
MCFilterZboostHelper::zboost
(
const
HepMC::FourVector& mom,
double
betaBoost) {
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
}
MCFilterZboostHelper::zboost
HepMC::FourVector zboost(const HepMC::FourVector &, double)
Definition:
MCFilterZboostHelper.cc:3
MCFilterZboostHelper.h
CustomPhysics_cfi.gamma
gamma
Definition:
CustomPhysics_cfi.py:17
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:18
Generated for CMSSW Reference Manual by
1.8.11