ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
FourMom
FourMom
Lib
P4ImplIPtCotThPhiM.h
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
#ifndef FOURMOM_P4IMPLIPTCOTTHPHIM_H
8
#define FOURMOM_P4IMPLIPTCOTTHPHIM_H
9
10
// STL includes
11
#include <cmath>
12
13
// CLHEP includes
14
#include "CLHEP/Vector/LorentzVector.h"
15
#include "CLHEP/Units/SystemOfUnits.h"
16
17
// EventKernel includes
18
#include "
EventKernel/I4Momentum.h
"
19
20
// FourMom includes
21
#include "
FourMom/Lib/P4BaseIPtCotThPhiM.h
"
22
#include "
FourMom/FourMomentumError.h
"
23
24
#include <memory>
25
// forward declare
26
class
P4ImplIPtCotThPhiMCnv_p1
;
// for persistency
27
39
40
class
P4ImplIPtCotThPhiM
:
public
P4BaseIPtCotThPhiM
41
{
42
friend
class
P4ImplIPtCotThPhiMCnv_p1
;
43
public
:
44
45
typedef
FourMomentumError< P4ImplIPtCotThPhiM>
ErrorType
;
46
49
P4ImplIPtCotThPhiM
();
50
53
explicit
P4ImplIPtCotThPhiM
(
const
P4ImplIPtCotThPhiM
& rhs );
54
57
P4ImplIPtCotThPhiM
&
operator=
(
const
P4ImplIPtCotThPhiM
& rhs );
58
60
P4ImplIPtCotThPhiM
(
const
double
iPt
,
const
double
cotTh
,
61
const
double
phi
,
const
double
m
);
62
64
explicit
P4ImplIPtCotThPhiM
(
const
CLHEP::HepLorentzVector&
hlv
);
65
67
explicit
P4ImplIPtCotThPhiM
(
const
I4Momentum
& theI4M );
68
70
explicit
P4ImplIPtCotThPhiM
(
const
I4Momentum
*
const
theI4M );
71
73
virtual
~P4ImplIPtCotThPhiM
();
74
76
// Const methods:
78
81
82
double
m
()
const
;
83
double
phi
()
const
;
84
double
iPt
()
const
;
85
double
cotTh
()
const
;
86
87
virtual
const
I4MomentumError
*
errors
()
const
;
88
89
I4Momentum::Kind
kind
()
const
{
return
I4Momentum::P4IPTCOTTHPHIM
; };
90
93
95
// Non-const methods:
97
99
virtual
void
setIPt
(
const
double
theIPt );
101
virtual
void
setCotTh
(
const
double
theCotTh );
103
virtual
void
setPhi
(
const
double
thePhi );
105
virtual
void
setM
(
const
double
theM );
106
108
void
setErrors
(
const
ErrorMatrixPtCotThPhiM
& err);
109
111
virtual
void
set4Mom
(
const
I4Momentum
& theI4Mom );
113
virtual
void
set4Mom
(
const
I4Momentum
*
const
theI4Mom );
115
virtual
void
set4Mom
(
const
CLHEP::HepLorentzVector & theHlv );
116
118
// Private data:
120
private
:
121
124
double
m_iPt
;
125
128
double
m_cotTh
;
129
132
double
m_phi
;
133
136
double
m_m
;
137
140
std::unique_ptr< ErrorType>
m_error
;
141
142
};
143
144
inline
P4ImplIPtCotThPhiM::P4ImplIPtCotThPhiM
() :
145
P4BaseIPtCotThPhiM
( ),
146
m_iPt
( 0./
CLHEP
::
GeV
),
147
m_cotTh
( 0. ),
148
m_phi
( 0. ),
149
m_m
( 0.*
CLHEP
::
GeV
),
150
m_error
(nullptr)
151
{}
152
153
inline
P4ImplIPtCotThPhiM::P4ImplIPtCotThPhiM
(
const
P4ImplIPtCotThPhiM
& rhs ):
154
P4BaseIPtCotThPhiM
( ),
155
m_iPt
( rhs.
m_iPt
),
156
m_cotTh
( rhs.
m_cotTh
),
157
m_phi
( rhs.
m_phi
),
158
m_m
( rhs.
m_m
),
159
m_error
(nullptr)
160
{}
161
162
inline
P4ImplIPtCotThPhiM::P4ImplIPtCotThPhiM
(
const
double
iPt
,
163
const
double
cotTh
,
164
const
double
phi
,
165
const
double
m
) :
166
P4BaseIPtCotThPhiM
( ),
167
m_iPt
(
std
::fabs(
iPt
) ),
//inverse Pt is unsigned. std::fabs for safety
168
m_cotTh
(
cotTh
),
169
m_phi
(
phi
),
170
m_m
(
m
),
171
m_error
(nullptr)
172
{
173
// could enforce phi range convention there
174
// const double twopi =2.*M_PI;
175
// const double threepi=3.*M_PI;
176
// m_phi=fmod(phi+threepi,twopi)-M_PI;
177
}
178
179
inline
P4ImplIPtCotThPhiM::P4ImplIPtCotThPhiM
(
const
CLHEP::HepLorentzVector&
hlv
) :
180
P4BaseIPtCotThPhiM
( ),
181
m_iPt
( 1./
hlv
.
perp
() ),
182
m_cotTh
(
hlv
.
pz
() /
hlv
.
perp
() ),
183
m_phi
(
hlv
.
phi
() ),
184
m_m
(
hlv
.
m
() ),
185
m_error
(nullptr)
186
{}
187
188
inline
P4ImplIPtCotThPhiM::P4ImplIPtCotThPhiM
(
const
I4Momentum
& p4 ) :
189
P4BaseIPtCotThPhiM
( ),
190
m_iPt
( p4.
iPt
() ),
191
m_cotTh
( p4.
cotTh
() ),
192
m_phi
( p4.
phi
() ),
193
m_m
( p4.
m
() ),
194
m_error
(nullptr)
195
{}
196
197
inline
P4ImplIPtCotThPhiM::P4ImplIPtCotThPhiM
(
const
I4Momentum
*
const
p4 ) :
198
P4BaseIPtCotThPhiM
( ),
199
m_iPt
( p4->
iPt
() ),
200
m_cotTh
( p4->
cotTh
() ),
201
m_phi
( p4->
phi
() ),
202
m_m
( p4->
m
() ),
203
m_error
(nullptr)
204
{}
205
206
inline
P4ImplIPtCotThPhiM::~P4ImplIPtCotThPhiM
()
207
{}
208
209
inline
double
P4ImplIPtCotThPhiM::m
()
const
210
{
211
return
m_m
;
212
}
213
214
inline
double
P4ImplIPtCotThPhiM::phi
()
const
215
{
216
return
m_phi
;
217
}
218
219
inline
double
P4ImplIPtCotThPhiM::iPt
()
const
220
{
221
return
m_iPt
;
222
}
223
224
inline
double
P4ImplIPtCotThPhiM::cotTh
()
const
225
{
226
return
m_cotTh
;
227
}
228
229
inline
const
I4MomentumError
*
P4ImplIPtCotThPhiM::errors
()
const
230
{
231
return
m_error
.get();
232
}
233
234
// setters
235
236
inline
void
P4ImplIPtCotThPhiM::setIPt
(
const
double
theIPt )
237
{
238
m_iPt
= theIPt;
239
}
240
241
inline
void
P4ImplIPtCotThPhiM::setCotTh
(
const
double
theCotTh )
242
{
243
m_cotTh
= theCotTh;
244
}
245
246
inline
void
P4ImplIPtCotThPhiM::setPhi
(
const
double
thePhi )
247
{
248
m_phi
= thePhi;
249
}
250
251
inline
void
P4ImplIPtCotThPhiM::setM
(
const
double
theM )
252
{
253
m_m
=theM;
254
}
255
256
inline
void
P4ImplIPtCotThPhiM::set4Mom
(
const
I4Momentum
& theI4Mom )
257
{
258
m_iPt
= theI4Mom.
iPt
();
259
m_cotTh
= theI4Mom.
cotTh
();
260
m_phi
= theI4Mom.
phi
();
261
m_m
= theI4Mom.
m
();
262
}
263
264
inline
void
P4ImplIPtCotThPhiM::set4Mom
(
const
I4Momentum
*
const
theI4Mom )
265
{
266
this->
set4Mom
(*theI4Mom);
267
}
268
269
inline
void
P4ImplIPtCotThPhiM::set4Mom
(
const
CLHEP::HepLorentzVector &
hlv
)
270
{
271
m_iPt
= 1./
hlv
.perp();
272
m_cotTh
=
hlv
.pz()*
m_iPt
;
273
m_phi
=
hlv
.phi();
274
m_m
=
hlv
.m();
275
}
276
277
inline
void
P4ImplIPtCotThPhiM::setErrors
(
const
ErrorMatrixPtCotThPhiM
& err)
278
{
279
m_error
= std::make_unique< ErrorType>(err, *
this
);
280
}
281
282
283
#endif
// FOURMOM_P4IMPLIPTCOTTHPHIM_H
perp
Scalar perp() const
perp method - perpendicular length
Definition
AmgMatrixBasePlugin.h:44
FourMomentumError.h
I4Momentum.h
P4BaseIPtCotThPhiM.h
GeV
#define GeV
Definition
PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
ErrorMatrixPtCotThPhiM
Definition
ErrorMatrixPtCotThPhiM.h:12
FourMomentumError
Definition
FourMomentumError.h:13
I4MomentumError
Definition
I4MomentumError.h:28
I4Momentum
I4Momentum is an abstract base class providing 4-momentum behavior.
Definition
I4Momentum.h:31
I4Momentum::cotTh
virtual double cotTh() const =0
cottan theta
I4Momentum::m
virtual double m() const =0
mass
I4Momentum::phi
virtual double phi() const =0
phi in [-pi,pi[
I4Momentum::iPt
virtual double iPt() const =0
inverse of transverse momentum
I4Momentum::Kind
Kind
Definition
I4Momentum.h:33
I4Momentum::P4IPTCOTTHPHIM
@ P4IPTCOTTHPHIM
Definition
I4Momentum.h:33
P4BaseIPtCotThPhiM
P4BaseIPtCotThPhiM is a base class for classes with 4-momentum behavior, for which 1/Pt,...
Definition
P4BaseIPtCotThPhiM.h:33
P4BaseIPtCotThPhiM::hlv
CLHEP::HepLorentzVector hlv() const
Definition
P4BaseIPtCotThPhiM.h:226
P4BaseIPtCotThPhiM::pz
double pz() const
Definition
P4BaseIPtCotThPhiM.h:103
P4ImplIPtCotThPhiMCnv_p1
Definition
P4ImplIPtCotThPhiMCnv_p1.h:38
P4ImplIPtCotThPhiM::m_phi
double m_phi
Phi.
Definition
P4ImplIPtCotThPhiM.h:132
P4ImplIPtCotThPhiM::set4Mom
virtual void set4Mom(const I4Momentum &theI4Mom)
set all 4-mom from another I4Momentum reference
Definition
P4ImplIPtCotThPhiM.h:256
P4ImplIPtCotThPhiM::setPhi
virtual void setPhi(const double thePhi)
set phi data member
Definition
P4ImplIPtCotThPhiM.h:246
P4ImplIPtCotThPhiM::P4ImplIPtCotThPhiMCnv_p1
friend class P4ImplIPtCotThPhiMCnv_p1
Definition
P4ImplIPtCotThPhiM.h:42
P4ImplIPtCotThPhiM::setCotTh
virtual void setCotTh(const double theCotTh)
set cot(theta) data member
Definition
P4ImplIPtCotThPhiM.h:241
P4ImplIPtCotThPhiM::errors
virtual const I4MomentumError * errors() const
Definition
P4ImplIPtCotThPhiM.h:229
P4ImplIPtCotThPhiM::cotTh
double cotTh() const
Definition
P4ImplIPtCotThPhiM.h:224
P4ImplIPtCotThPhiM::~P4ImplIPtCotThPhiM
virtual ~P4ImplIPtCotThPhiM()
virtual destructor needed by Pool
Definition
P4ImplIPtCotThPhiM.h:206
P4ImplIPtCotThPhiM::m_iPt
double m_iPt
inverse P_T
Definition
P4ImplIPtCotThPhiM.h:124
P4ImplIPtCotThPhiM::m_m
double m_m
mass
Definition
P4ImplIPtCotThPhiM.h:136
P4ImplIPtCotThPhiM::phi
double phi() const
Definition
P4ImplIPtCotThPhiM.h:214
P4ImplIPtCotThPhiM::m
double m() const
{@ a la I4Momentum -like interface
Definition
P4ImplIPtCotThPhiM.h:209
P4ImplIPtCotThPhiM::m_error
std::unique_ptr< ErrorType > m_error
error matrix pointer
Definition
P4ImplIPtCotThPhiM.h:140
P4ImplIPtCotThPhiM::P4ImplIPtCotThPhiM
P4ImplIPtCotThPhiM()
Default constructor:
Definition
P4ImplIPtCotThPhiM.h:144
P4ImplIPtCotThPhiM::iPt
double iPt() const
Definition
P4ImplIPtCotThPhiM.h:219
P4ImplIPtCotThPhiM::operator=
P4ImplIPtCotThPhiM & operator=(const P4ImplIPtCotThPhiM &rhs)
Assignment operator.
Definition
P4ImplIPtCotThPhiM.cxx:15
P4ImplIPtCotThPhiM::setErrors
void setErrors(const ErrorMatrixPtCotThPhiM &err)
set the errors
Definition
P4ImplIPtCotThPhiM.h:277
P4ImplIPtCotThPhiM::ErrorType
FourMomentumError< P4ImplIPtCotThPhiM > ErrorType
Definition
P4ImplIPtCotThPhiM.h:45
P4ImplIPtCotThPhiM::setM
virtual void setM(const double theM)
set m data member
Definition
P4ImplIPtCotThPhiM.h:251
P4ImplIPtCotThPhiM::m_cotTh
double m_cotTh
cot(theta)
Definition
P4ImplIPtCotThPhiM.h:128
P4ImplIPtCotThPhiM::kind
I4Momentum::Kind kind() const
Definition
P4ImplIPtCotThPhiM.h:89
P4ImplIPtCotThPhiM::setIPt
virtual void setIPt(const double theIPt)
set inverse pT data member
Definition
P4ImplIPtCotThPhiM.h:236
CLHEP
STD'S.
Definition
CaloNoiseCompCondAlg.h:57
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0