ATLAS Offline Software
Loading...
Searching...
No Matches
P4IPtCotThPhiM.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef FOURMOM_P4IPTCOTTHPHIM_H
6#define FOURMOM_P4IPTCOTTHPHIM_H
7
9#include <cmath>
10
11// CLHEP includes
12#include "CLHEP/Units/SystemOfUnits.h"
13
23
24
25class P4IPtCotThPhiM : public virtual P4IPtCotThPhiMBase
26
27{
28 public:
30 P4IPtCotThPhiM(const double iPt, const double cotTh, const double phi, const double m);
31
34
36 P4IPtCotThPhiM(const CLHEP::HepLorentzVector & theHlv);
37
39 P4IPtCotThPhiM(const I4Momentum & theI4M );
40
42 P4IPtCotThPhiM(const I4Momentum * const pI4M );
43
45 virtual double iPt() const;
47 virtual double cotTh() const;
49 virtual double phi() const;
51 virtual double m() const;
52
54 virtual void setIPt(double theIPt) ;
56 virtual void setCotTh(double theCotTh) ;
58 virtual void setPhi(double thePhi) ;
60 virtual void setM(double theM) ;
61
63 virtual void set4Mom (const I4Momentum & theI4Mom );
65 virtual void set4Mom (const I4Momentum * const theI4Mom );
67 virtual void set4Mom (const CLHEP::HepLorentzVector & theHlv );
68
69 virtual const I4MomentumError* errors() const;
70
71 protected:
72
73 double m_iPt;
74 double m_cotTh;
75 double m_phi;
76 double m_m;
77
78};
79
82 m_iPt ( 0./CLHEP::GeV ),
83 m_cotTh ( 0. ),
84 m_phi ( 0. ),
85 m_m ( 0.*CLHEP::GeV )
86{}
87
88inline P4IPtCotThPhiM::P4IPtCotThPhiM(const CLHEP::HepLorentzVector & theHlv)
89{
90 this->set4Mom(theHlv);
91}
92
94{this->set4Mom(theI4Mom); }
95
96inline P4IPtCotThPhiM::P4IPtCotThPhiM(const I4Momentum * const theI4Mom )
97{this->set4Mom(*theI4Mom); }
98
99
100inline double P4IPtCotThPhiM::iPt() const
101{ return m_iPt;}
102
103inline double P4IPtCotThPhiM::cotTh() const
104{ return m_cotTh;}
105
106inline double P4IPtCotThPhiM::phi() const
107{ return m_phi;}
108
109inline double P4IPtCotThPhiM::m() const
110{ return m_m;}
111
112inline void P4IPtCotThPhiM::setIPt(double theIPt)
113{ m_iPt=theIPt;}
114
115inline void P4IPtCotThPhiM::setCotTh(double theCotTh)
116{ m_cotTh=theCotTh;}
117
118inline void P4IPtCotThPhiM::setPhi(double thePhi)
119{ m_phi=thePhi;}
120
121inline void P4IPtCotThPhiM::setM(double theM)
122{ m_m=theM;}
123
124
125inline void P4IPtCotThPhiM::set4Mom(const I4Momentum & theI4Mom )
126{
127 m_iPt=theI4Mom.iPt();
128 m_cotTh=theI4Mom.cotTh();
129 m_phi=theI4Mom.phi();
130 m_m=theI4Mom.m();
131}
132
133inline void P4IPtCotThPhiM::set4Mom(const I4Momentum * const theI4Mom )
134{
135 this->set4Mom(*theI4Mom);
136}
137
138
139inline void P4IPtCotThPhiM::set4Mom(const CLHEP::HepLorentzVector & theHlv)
140{
141 m_iPt=1./theHlv.perp();
142 m_cotTh=theHlv.pz()*m_iPt;
143 m_phi=theHlv.phi();
144 m_m=theHlv.m();
145}
146
147
148#endif
I4Momentum is an abstract base class providing 4-momentum behavior.
Definition I4Momentum.h:31
virtual double cotTh() const =0
cottan theta
virtual double m() const =0
mass
virtual double phi() const =0
phi in [-pi,pi[
virtual double iPt() const =0
inverse of transverse momentum
P4IPtCotThPhiMBase is a base class for classes with 4-momentum behavior, for which 1/Pt,...
virtual double m() const
get m data member
virtual void setIPt(double theIPt)
set inverse pT data member
P4IPtCotThPhiM()
default constructor
virtual void setPhi(double thePhi)
set phi data member
virtual void setCotTh(double theCotTh)
set cot(theta) data member
P4IPtCotThPhiM(const double iPt, const double cotTh, const double phi, const double m)
constructor with all data members
virtual const I4MomentumError * errors() const
Access to errors, if available; returns 0 if no errors.
virtual void set4Mom(const I4Momentum &theI4Mom)
set all 4-mom from another I4Momentum reference
virtual void setM(double theM)
set m data member
virtual double cotTh() const
get cot(theta) data member
virtual double phi() const
get phi data member
virtual double iPt() const
get inverse pT data member