ATLAS Offline Software
I4Momentum.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef EVENTKERNEL_I4MOMENTUM_H
8 #define EVENTKERNEL_I4MOMENTUM_H 1
9 
10 // STL includes
11 #include <ostream>
12 
13 #include "CLHEP/Vector/LorentzVector.h"
14 
15 class I4MomentumError;
16 
30 class I4Momentum
31 {
32  public:
34 
35 
37  virtual ~I4Momentum();
39  virtual double px() const = 0;
41  virtual double py() const = 0 ;
43  virtual double pz() const = 0 ;
45  virtual double m() const = 0 ;
47  virtual double m2() const = 0 ;
49  virtual double p() const = 0 ;
51  virtual double p2() const = 0 ;
53  virtual double eta() const = 0 ;
55  virtual double rapidity() const = 0 ;
57  virtual double phi() const = 0 ;
59  virtual double e() const = 0 ;
61  virtual double et() const = 0 ;
63  virtual double pt() const = 0 ;
65  virtual double iPt() const = 0;
67  virtual double cosPhi() const = 0 ;
69  virtual double sinPhi() const = 0 ;
71  virtual double cosTh() const = 0 ;
73  virtual double sinTh() const = 0 ;
75  virtual double cotTh() const = 0 ;
77  virtual double tanTh() const = 0 ;
79  virtual CLHEP::HepLorentzVector hlv() const = 0 ;
80 
82  virtual const I4MomentumError* errors() const = 0;
83 
85  virtual Kind kind() const = 0;
86 
87 
89  virtual void set4Mom (const I4Momentum * const theI4Mom ) = 0;
90 
92  virtual void set4Mom (const I4Momentum & theI4Mom) = 0;
93 
95  virtual void set4Mom (const CLHEP::HepLorentzVector & theHlv ) = 0;
96 
97 
99  virtual std::ostream& dump( std::ostream& out ) const = 0;
100 
101 };
102 
103 std::ostream& operator<<( std::ostream& out, const I4Momentum& p4 );
104 
105 inline std::ostream& operator<<( std::ostream& out, const I4Momentum& p4 )
106 {
107  return p4.dump( out );
108 }
109 
110 // MsgStream& operator<<( MsgStream& msg, const I4Momentum& p4 );
111 // inline MsgStream& operator<<( MsgStream& msg, const I4Momentum& p4 )
112 // {
113 // std::stringstream out;
114 // p4.dump( out );
115 // msg << out.str();
116 // return msg;
117 // }
118 
119 #endif
I4Momentum::py
virtual double py() const =0
y component of momentum
I4Momentum
Definition: I4Momentum.h:31
I4Momentum::m2
virtual double m2() const =0
mass squared
I4Momentum::et
virtual double et() const =0
transverse energy defined to be e*sin(theta)
I4Momentum::dump
virtual std::ostream & dump(std::ostream &out) const =0
Print I4Momentum content.
I4Momentum::p2
virtual double p2() const =0
square of momentum magnitude
I4Momentum::P4IPTCOTTHPHIM
@ P4IPTCOTTHPHIM
Definition: I4Momentum.h:33
operator<<
std::ostream & operator<<(std::ostream &out, const I4Momentum &p4)
Definition: I4Momentum.h:105
I4Momentum::p
virtual double p() const =0
momentum magnitude
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
I4Momentum::set4Mom
virtual void set4Mom(const I4Momentum *const theI4Mom)=0
set 4Momentum (will throw exception if cannot be implemented)
I4Momentum::cosPhi
virtual double cosPhi() const =0
cosinus phi
I4Momentum::pt
virtual double pt() const =0
transverse momentum
I4Momentum::hlv
virtual CLHEP::HepLorentzVector hlv() const =0
CLHEP HepLorentzVector.
I4Momentum::Kind
Kind
Definition: I4Momentum.h:33
I4Momentum::cotTh
virtual double cotTh() const =0
cottan theta
I4Momentum::tanTh
virtual double tanTh() const =0
tan theta
I4Momentum::pz
virtual double pz() const =0
z component of momentum
I4Momentum::sinPhi
virtual double sinPhi() const =0
sinus phi
I4MomentumError
Definition: I4MomentumError.h:28
I4Momentum::e
virtual double e() const =0
energy
I4Momentum::eta
virtual double eta() const =0
pseudo rapidity
I4Momentum::phi
virtual double phi() const =0
phi in [-pi,pi[
I4Momentum::P4PTETAPHIM
@ P4PTETAPHIM
Definition: I4Momentum.h:33
I4Momentum::kind
virtual Kind kind() const =0
tells what kind of P4XYZT this is
I4Momentum::UNKNOWN
@ UNKNOWN
Definition: I4Momentum.h:33
I4Momentum::~I4Momentum
virtual ~I4Momentum()
virtual destructor needed
Definition: I4Momentum.cxx:28
I4Momentum::set4Mom
virtual void set4Mom(const I4Momentum &theI4Mom)=0
set 4Momentum (will throw exception if cannot be implemented)
I4Momentum::m
virtual double m() const =0
mass
I4Momentum::cosTh
virtual double cosTh() const =0
cosinus theta
I4Momentum::errors
virtual const I4MomentumError * errors() const =0
Access to errors, if available; returns 0 if no errors.
I4Momentum::sinTh
virtual double sinTh() const =0
sinus theta
I4Momentum::set4Mom
virtual void set4Mom(const CLHEP::HepLorentzVector &theHlv)=0
set 4Momentum (will throw exception if cannot be implemented)
I4Momentum::P4EETAPHIM
@ P4EETAPHIM
Definition: I4Momentum.h:33
I4Momentum::rapidity
virtual double rapidity() const =0
rapidity
I4Momentum::iPt
virtual double iPt() const =0
inverse of transverse momentum
I4Momentum::px
virtual double px() const =0
x component of momentum
I4Momentum::P4PXPYPZE
@ P4PXPYPZE
Definition: I4Momentum.h:33