12#ifndef FOURMOM_P4IMPL_H
13#define FOURMOM_P4IMPL_H
28template<
class P4Mom_t >
61 P4Impl(
const double p1,
const double p2,
const double p3,
const double p4 );
62 explicit P4Impl(
const CLHEP::HepLorentzVector& theHlv );
63 explicit P4Impl(
const P4Mom_t& rhs );
77 const P4Mom_t&
base()
const;
143 CLHEP::HepLorentzVector
hlv()
const;
158 virtual void set4Mom (
const CLHEP::HepLorentzVector & theHlv ) ;
162 std::ostream&
dump( std::ostream& out )
const;
186template<
class P4Mom_t>
193template<
class P4Mom_t>
197 P4Mom_t ( rhs.
base() )
200template<
class P4Mom_t>
207template<
class P4Mom_t>
214template<
class P4Mom_t>
220 P4Mom_t::set4Mom(theI4M);
223template<
class P4Mom_t>
230template<
class P4Mom_t>
234 if (
this != &rhs ) {
235 I4Momentum::operator=( rhs );
236 P4Mom_t::operator=( rhs );
241template<
class P4Mom_t >
244 const double p3,
const double p4 ) :
246 P4Mom_t ( p1,
p2, p3, p4 )
249template<
class P4Mom_t>
254template<
class P4Mom_t>
260template<
class P4Mom_t>
263 return P4Mom_t::px();
266template<
class P4Mom_t>
269 return P4Mom_t::py();
272template<
class P4Mom_t>
275 return P4Mom_t::pz();
278template<
class P4Mom_t>
284template<
class P4Mom_t>
287 return P4Mom_t::m2();
290template<
class P4Mom_t>
296template<
class P4Mom_t>
299 return P4Mom_t::p2();
302template<
class P4Mom_t>
305 return P4Mom_t::eta();
308template<
class P4Mom_t>
311 return P4Mom_t::rapidity();
314template<
class P4Mom_t>
317 return P4Mom_t::phi();
320template<
class P4Mom_t>
323 return P4Mom_t::cosPhi();
326template<
class P4Mom_t>
329 return P4Mom_t::sinPhi();
332template<
class P4Mom_t>
338template<
class P4Mom_t>
341 return P4Mom_t::et();
344template<
class P4Mom_t>
347 return P4Mom_t::pt();
350template<
class P4Mom_t>
353 return P4Mom_t::iPt();
356template<
class P4Mom_t>
359 return P4Mom_t::cosTh();
362template<
class P4Mom_t>
365 return P4Mom_t::sinTh();
368template<
class P4Mom_t>
371 return P4Mom_t::tanTh();
374template<
class P4Mom_t>
377 return P4Mom_t::cotTh();
380template<
class P4Mom_t>
383 return P4Mom_t::hlv();
386template<
class P4Mom_t>
389 return P4Mom_t::errors();
392template<
class P4Mom_t>
395 return P4Mom_t::kind();
399template<
class P4Mom_t>
402 return P4Mom_t::set4Mom(theI4Mom);
405template<
class P4Mom_t>
409 P4Mom_t::set4Mom(theI4Mom);
412template<
class P4Mom_t>
415 return P4Mom_t::set4Mom(theHlv);
423template<
class P4Mom_t>
426 return P4Mom_t::dump( out );
430template<
class P4Mom_t>
I4Momentum is an abstract base class providing 4-momentum behavior.
hub for various interface implementations of I4Momentum
P4Impl & operator=(const P4Impl &rhs)
Assignment operator.
virtual void set4Mom(const I4Momentum *const theI4Mom)
set 4Momentum (will throw exception if cannot be implemented)
double sinPhi() const
sin(phi)
double rapidity() const
rapidity
I4Momentum::Kind kind() const
kind (what type of P4XYZ) of underlying class
double p() const
momentum magnitude
virtual const I4MomentumError * errors() const
Access to errors, if available; returns 0 if no errors.
P4Mom_t base_type
publish the type of the base class (ie: 'traits-itize' it)
double cosTh() const
cosinus theta
double phi() const
phi in [-pi,pi[
double eta() const
pseudo rapidity
double iPt() const
inverse of transverse momentum
double sinTh() const
sinus theta
virtual ~P4Impl()
Default constructor:
double cotTh() const
cottan theta
double cosPhi() const
cos(phi)
double m2() const
mass squared
double py() const
y component of momentum
P4Impl()
Default constructor.
const P4Mom_t & base() const
access to underlying base type
double et() const
transverse energy defined to be e*sin(theta)
double px() const
x component of momentum
CLHEP::HepLorentzVector hlv() const
CLHEP HepLorentzVector.
double pt() const
transverse momentum
double pz() const
z component of momentum
std::ostream & dump(std::ostream &out) const
Print I4Momentum content.
double tanTh() const
tan theta