ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
FourMom
FourMom
Lib
P4ImplPxPyPzE.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
// P4ImplPxPyPzE.h
8
// Header file for class P4::Impl::PxPyPzE
9
// Author: S.Binet<binet@cern.ch>
11
#ifndef FOURMOM_P4IMPLPXPYPZE_H
12
#define FOURMOM_P4IMPLPXPYPZE_H
13
14
// STL includes
15
16
// CLHEP includes
17
#include "CLHEP/Vector/LorentzVector.h"
18
#include "CLHEP/Units/SystemOfUnits.h"
19
20
// EventKernel includes
21
#include "
EventKernel/I4Momentum.h
"
22
23
// FourMom includes
24
#include "
FourMom/Lib/P4BasePxPyPzE.h
"
25
#include "
FourMom/FourMomentumError.h
"
26
27
#include <memory>
28
// Forward declaration
29
class
P4ImplPxPyPzECnv_p1
;
//> for persistency
30
31
class
P4ImplPxPyPzE
:
public
P4BasePxPyPzE
32
{
34
// friends:
36
friend
class
P4ImplPxPyPzECnv_p1
;
37
39
// Public methods:
41
public
:
42
43
typedef
FourMomentumError< P4ImplPxPyPzE>
ErrorType
;
44
47
P4ImplPxPyPzE
();
48
51
P4ImplPxPyPzE
(
const
P4ImplPxPyPzE
& rhs );
52
55
P4ImplPxPyPzE
&
operator=
(
const
P4ImplPxPyPzE
& rhs );
56
58
P4ImplPxPyPzE
(
const
double
px
,
const
double
py
,
59
const
double
pz
,
const
double
e
);
60
62
P4ImplPxPyPzE
(
const
CLHEP::HepLorentzVector&
hlv
);
63
65
explicit
P4ImplPxPyPzE
(
const
I4Momentum
& theI4M );
66
68
explicit
P4ImplPxPyPzE
(
const
I4Momentum
*
const
theI4M );
69
72
virtual
~P4ImplPxPyPzE
();
73
75
// Const methods:
77
80
82
double
px
()
const
;
84
double
py
()
const
;
86
double
pz
()
const
;
88
double
e
()
const
;
89
90
virtual
const
I4MomentumError
*
errors
()
const
;
91
92
I4Momentum::Kind
kind
()
const
{
return
I4Momentum::P4PXPYPZE
; };
93
96
98
// Non-const methods:
100
102
void
setPx
(
const
double
thePx );
103
105
void
setPy
(
const
double
thePy );
106
108
void
setPz
(
const
double
thePz );
109
111
void
setE
(
const
double
theE );
112
114
void
set4Mom
(
const
I4Momentum
& theI4Mom );
116
void
set4Mom
(
const
I4Momentum
*
const
theI4Mom );
118
void
set4Mom
(
const
CLHEP::HepLorentzVector & theHlv );
120
void
setErrors
(
const
ErrorMatrixPxPyPzE
& err);
121
123
// Protected data:
125
private
:
126
127
double
m_px
;
128
double
m_py
;
129
double
m_pz
;
130
double
m_e
;
131
std::unique_ptr< ErrorType>
m_error
;
132
133
};
134
136
// Inline methods:
138
139
inline
P4ImplPxPyPzE::P4ImplPxPyPzE
( ) :
140
P4BasePxPyPzE
( ),
141
m_px
( 0.*
CLHEP
::
GeV
),
142
m_py
( 0.*
CLHEP
::
GeV
),
143
m_pz
( 0.*
CLHEP
::
GeV
),
144
m_e
( 0.*
CLHEP
::
GeV
),
145
m_error
(nullptr)
146
{}
147
148
inline
P4ImplPxPyPzE::P4ImplPxPyPzE
(
const
P4ImplPxPyPzE
& rhs ) :
149
P4BasePxPyPzE
( ),
150
m_px
( rhs.
m_px
),
151
m_py
( rhs.
m_py
),
152
m_pz
( rhs.
m_pz
),
153
m_e
( rhs.
m_e
),
154
m_error
(nullptr)
155
{}
156
157
inline
P4ImplPxPyPzE::P4ImplPxPyPzE
(
const
double
px
,
158
const
double
py
,
159
const
double
pz
,
160
const
double
e
) :
161
P4BasePxPyPzE
( ),
162
m_px
(
px
),
163
m_py
(
py
),
164
m_pz
(
pz
),
165
m_e
(
e
),
166
m_error
(nullptr)
167
{}
168
169
inline
P4ImplPxPyPzE::P4ImplPxPyPzE
(
const
CLHEP::HepLorentzVector&
hlv
) :
170
P4BasePxPyPzE
( ),
171
m_px
(
hlv
.
px
() ),
172
m_py
(
hlv
.
py
() ),
173
m_pz
(
hlv
.
pz
() ),
174
m_e
(
hlv
.
e
() ),
175
m_error
(nullptr)
176
{}
177
178
inline
P4ImplPxPyPzE::P4ImplPxPyPzE
(
const
I4Momentum
& i4Mom ) :
179
P4BasePxPyPzE
( ),
180
m_px
( i4Mom.
px
() ),
181
m_py
( i4Mom.
py
() ),
182
m_pz
( i4Mom.
pz
() ),
183
m_e
( i4Mom.
e
() ),
184
m_error
(nullptr)
185
{}
186
187
inline
P4ImplPxPyPzE::P4ImplPxPyPzE
(
const
I4Momentum
*
const
i4Mom ) :
188
P4BasePxPyPzE
( ),
189
m_px
( i4Mom->
px
() ),
190
m_py
( i4Mom->
py
() ),
191
m_pz
( i4Mom->
pz
() ),
192
m_e
( i4Mom->
e
() ),
193
m_error
(nullptr)
194
{}
195
196
inline
P4ImplPxPyPzE::~P4ImplPxPyPzE
()
197
{}
198
199
inline
double
P4ImplPxPyPzE::px
()
const
200
{
201
return
m_px
;
202
}
203
204
inline
double
P4ImplPxPyPzE::py
()
const
205
{
206
return
m_py
;
207
}
208
209
inline
double
P4ImplPxPyPzE::pz
()
const
210
{
211
return
m_pz
;
212
}
213
214
inline
double
P4ImplPxPyPzE::e
()
const
215
{
216
return
m_e
;
217
}
218
219
inline
const
I4MomentumError
*
P4ImplPxPyPzE::errors
()
const
220
{
221
// check if the pointer is empty before dereferencing
222
return
m_error
.get();
223
}
224
225
inline
void
P4ImplPxPyPzE::setPx
(
const
double
px
)
226
{
227
m_px
=
px
;
228
}
229
230
inline
void
P4ImplPxPyPzE::setPy
(
const
double
py
)
231
{
232
m_py
=
py
;
233
}
234
235
inline
void
P4ImplPxPyPzE::setPz
(
const
double
pz
)
236
{
237
m_pz
=
pz
;
238
}
239
240
inline
void
P4ImplPxPyPzE::setE
(
const
double
e
)
241
{
242
m_e
=
e
;
243
}
244
245
inline
void
P4ImplPxPyPzE::set4Mom
(
const
I4Momentum
& i4Mom )
246
{
247
m_px
= i4Mom.
px
();
248
m_py
= i4Mom.
py
();
249
m_pz
= i4Mom.
pz
();
250
m_e
= i4Mom.
e
();
251
}
252
253
inline
void
P4ImplPxPyPzE::set4Mom
(
const
I4Momentum
*
const
i4Mom )
254
{
255
this->
set4Mom
(*i4Mom);
256
}
257
258
259
inline
void
P4ImplPxPyPzE::set4Mom
(
const
CLHEP::HepLorentzVector&
hlv
)
260
{
261
m_px
=
hlv
.px();
262
m_py
=
hlv
.py();
263
m_pz
=
hlv
.pz();
264
m_e
=
hlv
.e();
265
}
266
267
inline
void
P4ImplPxPyPzE::setErrors
(
const
ErrorMatrixPxPyPzE
& err)
268
{
269
m_error
= std::make_unique< ErrorType>( err, *
this
);
270
}
271
272
#endif
//> FOURMOM_P4IMPLPXPYPZE_H
FourMomentumError.h
I4Momentum.h
P4BasePxPyPzE.h
GeV
#define GeV
Definition
PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
ErrorMatrixPxPyPzE
Definition
ErrorMatrixPxPyPzE.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::pz
virtual double pz() const =0
z component of momentum
I4Momentum::px
virtual double px() const =0
x component of momentum
I4Momentum::Kind
Kind
Definition
I4Momentum.h:33
I4Momentum::P4PXPYPZE
@ P4PXPYPZE
Definition
I4Momentum.h:33
I4Momentum::e
virtual double e() const =0
energy
I4Momentum::py
virtual double py() const =0
y component of momentum
P4BasePxPyPzE
Definition
P4BasePxPyPzE.h:28
P4BasePxPyPzE::hlv
CLHEP::HepLorentzVector hlv() const
Definition
P4BasePxPyPzE.h:219
P4ImplPxPyPzECnv_p1
Definition
P4ImplPxPyPzECnv_p1.h:38
P4ImplPxPyPzE::e
double e() const
get energy data member
Definition
P4ImplPxPyPzE.h:214
P4ImplPxPyPzE::m_error
std::unique_ptr< ErrorType > m_error
Definition
P4ImplPxPyPzE.h:131
P4ImplPxPyPzE::setPz
void setPz(const double thePz)
set Pz data member
Definition
P4ImplPxPyPzE.h:235
P4ImplPxPyPzE::set4Mom
void set4Mom(const I4Momentum &theI4Mom)
set all 4-mom from another I4Momentum reference
Definition
P4ImplPxPyPzE.h:245
P4ImplPxPyPzE::py
double py() const
get py data member
Definition
P4ImplPxPyPzE.h:204
P4ImplPxPyPzE::setPy
void setPy(const double thePy)
set Py data member
Definition
P4ImplPxPyPzE.h:230
P4ImplPxPyPzE::P4ImplPxPyPzECnv_p1
friend class P4ImplPxPyPzECnv_p1
Definition
P4ImplPxPyPzE.h:36
P4ImplPxPyPzE::P4ImplPxPyPzE
P4ImplPxPyPzE()
Default constructor:
Definition
P4ImplPxPyPzE.h:139
P4ImplPxPyPzE::setErrors
void setErrors(const ErrorMatrixPxPyPzE &err)
set the errors
Definition
P4ImplPxPyPzE.h:267
P4ImplPxPyPzE::ErrorType
FourMomentumError< P4ImplPxPyPzE > ErrorType
Definition
P4ImplPxPyPzE.h:43
P4ImplPxPyPzE::px
double px() const
{@ a la I4Momentum -like interface
Definition
P4ImplPxPyPzE.h:199
P4ImplPxPyPzE::operator=
P4ImplPxPyPzE & operator=(const P4ImplPxPyPzE &rhs)
Assignment operator:
Definition
P4ImplPxPyPzE.cxx:14
P4ImplPxPyPzE::m_px
double m_px
Definition
P4ImplPxPyPzE.h:127
P4ImplPxPyPzE::m_py
double m_py
Definition
P4ImplPxPyPzE.h:128
P4ImplPxPyPzE::m_pz
double m_pz
Definition
P4ImplPxPyPzE.h:129
P4ImplPxPyPzE::setE
void setE(const double theE)
set energy data member
Definition
P4ImplPxPyPzE.h:240
P4ImplPxPyPzE::kind
I4Momentum::Kind kind() const
Definition
P4ImplPxPyPzE.h:92
P4ImplPxPyPzE::pz
double pz() const
get pz data member
Definition
P4ImplPxPyPzE.h:209
P4ImplPxPyPzE::~P4ImplPxPyPzE
virtual ~P4ImplPxPyPzE()
Destructor:
Definition
P4ImplPxPyPzE.h:196
P4ImplPxPyPzE::setPx
void setPx(const double thePx)
set Px data member
Definition
P4ImplPxPyPzE.h:225
P4ImplPxPyPzE::errors
virtual const I4MomentumError * errors() const
Definition
P4ImplPxPyPzE.h:219
P4ImplPxPyPzE::m_e
double m_e
Definition
P4ImplPxPyPzE.h:130
CLHEP
STD'S.
Definition
CaloNoiseCompCondAlg.h:57
Generated on
for ATLAS Offline Software by
1.17.0