ATLAS Offline Software
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 
25 class 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 
88 inline P4IPtCotThPhiM::P4IPtCotThPhiM(const CLHEP::HepLorentzVector & theHlv)
89 {
90  this->set4Mom(theHlv);
91 }
92 
93 inline P4IPtCotThPhiM::P4IPtCotThPhiM(const I4Momentum & theI4Mom )
94 {this->set4Mom(theI4Mom); }
95 
96 inline P4IPtCotThPhiM::P4IPtCotThPhiM(const I4Momentum * const theI4Mom )
97 {this->set4Mom(*theI4Mom); }
98 
99 
100 inline double P4IPtCotThPhiM::iPt() const
101 { return m_iPt;}
102 
103 inline double P4IPtCotThPhiM::cotTh() const
104 { return m_cotTh;}
105 
106 inline double P4IPtCotThPhiM::phi() const
107 { return m_phi;}
108 
109 inline double P4IPtCotThPhiM::m() const
110 { return m_m;}
111 
112 inline void P4IPtCotThPhiM::setIPt(double theIPt)
113 { m_iPt=theIPt;}
114 
115 inline void P4IPtCotThPhiM::setCotTh(double theCotTh)
116 { m_cotTh=theCotTh;}
117 
118 inline void P4IPtCotThPhiM::setPhi(double thePhi)
119 { m_phi=thePhi;}
120 
121 inline void P4IPtCotThPhiM::setM(double theM)
122 { m_m=theM;}
123 
124 
125 inline 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 
133 inline void P4IPtCotThPhiM::set4Mom(const I4Momentum * const theI4Mom )
134 {
135  this->set4Mom(*theI4Mom);
136 }
137 
138 
139 inline 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
P4IPtCotThPhiMBase
Definition: P4IPtCotThPhiMBase.h:28
I4Momentum
Definition: I4Momentum.h:31
P4IPtCotThPhiM::setM
virtual void setM(double theM)
set m data member
Definition: P4IPtCotThPhiM.h:121
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
P4IPtCotThPhiM::set4Mom
virtual void set4Mom(const I4Momentum &theI4Mom)
set all 4-mom from another I4Momentum reference
Definition: P4IPtCotThPhiM.h:125
P4IPtCotThPhiM::m_phi
double m_phi
Definition: P4IPtCotThPhiM.h:75
P4IPtCotThPhiM
Definition: P4IPtCotThPhiM.h:27
P4IPtCotThPhiM::P4IPtCotThPhiM
P4IPtCotThPhiM()
default constructor
Definition: P4IPtCotThPhiM.h:80
P4IPtCotThPhiM::m_cotTh
double m_cotTh
Definition: P4IPtCotThPhiM.h:74
I4Momentum::cotTh
virtual double cotTh() const =0
cottan theta
P4IPtCotThPhiM::m_m
double m_m
Definition: P4IPtCotThPhiM.h:76
I4MomentumError
Definition: I4MomentumError.h:28
CLHEP
STD'S.
Definition: IAtRndmGenSvc.h:19
P4IPtCotThPhiM::m_iPt
double m_iPt
Definition: P4IPtCotThPhiM.h:73
P4IPtCotThPhiM::setPhi
virtual void setPhi(double thePhi)
set phi data member
Definition: P4IPtCotThPhiM.h:118
I4Momentum::phi
virtual double phi() const =0
phi in [-pi,pi[
P4IPtCotThPhiM::phi
virtual double phi() const
get phi data member
Definition: P4IPtCotThPhiM.h:106
P4IPtCotThPhiMBase.h
I4Momentum::m
virtual double m() const =0
mass
P4IPtCotThPhiM::setCotTh
virtual void setCotTh(double theCotTh)
set cot(theta) data member
Definition: P4IPtCotThPhiM.h:115
P4IPtCotThPhiM::m
virtual double m() const
get m data member
Definition: P4IPtCotThPhiM.h:109
P4IPtCotThPhiM::iPt
virtual double iPt() const
get inverse pT data member
Definition: P4IPtCotThPhiM.h:100
P4IPtCotThPhiM::errors
virtual const I4MomentumError * errors() const
Access to errors, if available; returns 0 if no errors.
Definition: P4IPtCotThPhiM.cxx:20
P4IPtCotThPhiM::setIPt
virtual void setIPt(double theIPt)
set inverse pT data member
Definition: P4IPtCotThPhiM.h:112
I4Momentum::iPt
virtual double iPt() const =0
inverse of transverse momentum
P4IPtCotThPhiM::cotTh
virtual double cotTh() const
get cot(theta) data member
Definition: P4IPtCotThPhiM.h:103