15 const double theMass = this->
m();
16 const double thePt = this->
pt();
17 const double thePz = this->
pz();
23 double eSign = (thePt >= 0.) ? +1. : -1.;
24 return eSign*std::sqrt(thePt*thePt + thePz*thePz + theMass*theMass);
29 const double thePt = this->
pt();
30 const double thePz = this->
pz();
36 double eSign = (thePt >= 0.) ? +1. : -1.;
37 return eSign*std::sqrt(thePt*thePt + thePz*thePz);
44 const double thePt = this->
pt();
45 const double thePz = this->
pz();
47 return thePt*thePt + thePz*thePz;
51{
const double theM=this->
m();
57 return std::cos(this->
phi());
62 return std::sin(this->
phi());
67 return std::sinh(this->
eta());
72 return std::tanh(this->
eta());
79 double aEta=std::abs(this->
eta());
84 return 1./std::cosh(aEta);
91 double theEta=this->
eta();
92 if ( std::abs(theEta)>710) {
93 theEta=theEta>0 ? 710 : -710;
94 return 1./std::sinh(theEta);
97 return 1./std::sinh(this->
eta());
103 return this->
e()*this->
sinTh();
107 {
return 1./this->
pt();
112 const double theE=this->
e();
113 const double thePz=this->
pz();
114 return 0.5*std::log((theE+thePz)/(theE-thePz));
126{
return this->
pt()*this->
cotTh(); }
131 const double theM = this->
m();
133 const double thePt = this->
pt();
136 const double thePx = thePt*this->
cosPhi();
137 const double thePy = thePt*this->
sinPhi();
139 const double thePz = thePt*this->
cotTh();
141 const double theE=std::sqrt(thePt*thePt+thePz*thePz+theM*theM);
144 return CLHEP::HepLorentzVector( thePx, thePy, thePz, theE );
149 std::stringstream outx;
150 outx <<
"[pt,eta,phi,m] ="
151 << std::right << std::scientific << std::setprecision(8)
152 << std::setw(16) << this->
pt()
153 << std::setw(16) << this->
eta()
154 << std::setw(16) << this->
phi()
155 << std::setw(16) << this->
m();
169 std::cout <<
"FATAL ERROR dummy P4PtEtaPhiMBase::set4Mom called " << std::endl ;
175 std::cout <<
"FATAL ERROR dummy P4PtEtaPhiMBase::set4Mom called " << std::endl; ;
182 std::cout <<
"FATAL ERROR dummy P4PtEtaPhiMBase::set4Mom called " << std::endl ;
I4Momentum is an abstract base class providing 4-momentum behavior.
virtual double m() const =0
mass
virtual double phi() const =0
phi in [-pi,pi[
virtual double pt() const =0
transverse momentum
virtual double eta() const =0
pseudo rapidity
virtual double rapidity() const
rapidity
virtual double m2() const
mass squared
virtual double pz() const
z component of momentum
virtual CLHEP::HepLorentzVector hlv() const
HepLorentzVector Special implementation from Frank Paige : if negative energy, points in opposite dir...
virtual double tanTh() const
tan theta
virtual double et() const
transverse energy defined to be e*sin(theta)
virtual double iPt() const
inverse of transverse momentum
virtual double cosTh() const
cosinus theta
virtual std::ostream & dump(std::ostream &out) const
Print I4Momentum content.
virtual double p() const
magnitude of 3-momentum.
virtual double sinPhi() const
sinus phi
virtual ~P4PtEtaPhiMBase()
virtual destructor needed by pool
virtual double sinTh() const
sinus theta
virtual double py() const
y component of momentum
virtual double cotTh() const
cottan theta
virtual double p2() const
square of momentum magnitude
virtual void set4Mom(const I4Momentum &theI4Mom)
set all 4-mom from another I4Momentum reference DUMMY IMPLEMENTATION
virtual double cosPhi() const
cosinus phi
virtual const I4MomentumError * errors() const
Access to errors, if available; returns 0 if no errors.
virtual double px() const
x component of momentum
virtual double e() const
energy