DataFormats
Math
interface
PtEtaPhiMass.h
Go to the documentation of this file.
1
#ifndef DataFormats_Math_PtEtaPhiMass_h
2
#define DataFormats_Math_PtEtaPhiMass_h
3
4
#include <cmath>
5
inline
float
__attribute__
((always_inline))
__attribute__
((pure)) etaFromXYZ(
float
x
,
float
y
,
float
z
) {
6
float
t
(
z
/
std::sqrt
(
x
*
x
+
y
*
y
));
7
return ::asinhf(
t
);
8
}
9
inline
float
__attribute__
((always_inline))
__attribute__
((pure)) etaFromRZ(
float
r
,
float
z
) {
10
float
t
(
z
/
r
);
11
return ::asinhf(
t
);
12
}
13
16
class
PtEtaPhiMass
{
17
private
:
18
float
pt_
,
eta_
,
phi_
,
mass_
;
19
20
public
:
21
// default constructor (unitialized)
22
PtEtaPhiMass
() {}
23
24
//positional constructor (still compatible with Root, c++03)
25
constexpr
PtEtaPhiMass
(
float
ipt,
float
ieta
,
float
iphi
,
float
imass)
26
:
pt_
(ipt),
eta_
(
ieta
),
phi_
(
iphi
),
mass_
(imass) {}
27
29
constexpr
float
pt
()
const
{
return
pt_
; }
31
constexpr
float
eta
()
const
{
return
eta_
; }
33
constexpr
float
phi
()
const
{
return
phi_
; }
35
constexpr
float
mass
()
const
{
return
mass_
; }
36
};
37
38
class
RhoEtaPhi
{
39
private
:
40
float
rho_
,
eta_
,
phi_
;
41
42
public
:
43
// default constructor (unitialized)
44
RhoEtaPhi
() {}
45
46
//positional constructor (still compatible with Root, c++03)
47
RhoEtaPhi
(
float
irho,
float
ieta
,
float
iphi
) :
rho_
(irho),
eta_
(
ieta
),
phi_
(
iphi
) {}
48
50
float
rho
()
const
{
return
rho_
; }
52
float
eta
()
const
{
return
eta_
; }
54
float
phi
()
const
{
return
phi_
; }
55
};
56
57
#endif
PtEtaPhiMass::pt_
float pt_
Definition:
PtEtaPhiMass.h:18
PtEtaPhiMass::eta
constexpr float eta() const
momentum pseudorapidity
Definition:
PtEtaPhiMass.h:31
RhoEtaPhi::RhoEtaPhi
RhoEtaPhi(float irho, float ieta, float iphi)
Definition:
PtEtaPhiMass.h:47
RhoEtaPhi::phi_
float phi_
Definition:
PtEtaPhiMass.h:40
LEDCalibrationChannels.iphi
iphi
Definition:
LEDCalibrationChannels.py:64
RhoEtaPhi::RhoEtaPhi
RhoEtaPhi()
Definition:
PtEtaPhiMass.h:44
RhoEtaPhi
Definition:
PtEtaPhiMass.h:38
RhoEtaPhi::eta_
float eta_
Definition:
PtEtaPhiMass.h:40
PtEtaPhiMass::pt
constexpr float pt() const
transverse momentum
Definition:
PtEtaPhiMass.h:29
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:19
PtEtaPhiMass::mass_
float mass_
Definition:
PtEtaPhiMass.h:18
LEDCalibrationChannels.ieta
ieta
Definition:
LEDCalibrationChannels.py:63
RhoEtaPhi::rho
float rho() const
transverse momentum
Definition:
PtEtaPhiMass.h:50
PtEtaPhiMass::phi
constexpr float phi() const
momentum azimuthal angle
Definition:
PtEtaPhiMass.h:33
PtEtaPhiMass::PtEtaPhiMass
constexpr PtEtaPhiMass(float ipt, float ieta, float iphi, float imass)
Definition:
PtEtaPhiMass.h:25
RhoEtaPhi::rho_
float rho_
Definition:
PtEtaPhiMass.h:40
__attribute__
float __attribute__((always_inline)) __attribute__((pure)) etaFromXYZ(float x
RhoEtaPhi::eta
float eta() const
momentum pseudorapidity
Definition:
PtEtaPhiMass.h:52
PtEtaPhiMass::mass
constexpr float mass() const
mass
Definition:
PtEtaPhiMass.h:35
alignCSCRings.r
r
Definition:
alignCSCRings.py:93
z
float float float z
Definition:
PtEtaPhiMass.h:5
RhoEtaPhi::phi
float phi() const
momentum azimuthal angle
Definition:
PtEtaPhiMass.h:54
genVertex_cff.x
x
Definition:
genVertex_cff.py:12
y
float float y
Definition:
PtEtaPhiMass.h:5
PtEtaPhiMass::PtEtaPhiMass
PtEtaPhiMass()
Definition:
PtEtaPhiMass.h:22
PtEtaPhiMass::phi_
float phi_
Definition:
PtEtaPhiMass.h:18
PtEtaPhiMass
Definition:
PtEtaPhiMass.h:16
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:644
PtEtaPhiMass::eta_
float eta_
Definition:
PtEtaPhiMass.h:18
Generated for CMSSW Reference Manual by
1.8.16