ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
FourMom
FourMom
P4EEtaPhiM.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_P4EETAPHIM_H
6
#define FOURMOM_P4EETAPHIM_H
7
8
#include "
FourMom/P4EEtaPhiMBase.h
"
9
//#include "SealBase/DebugAids.h"
10
#include <cmath>
11
12
// CLHEP includes
13
#include "CLHEP/Units/SystemOfUnits.h"
14
23
24
class
P4EEtaPhiM
:
public
virtual
P4EEtaPhiMBase
25
{
26
public
:
27
29
P4EEtaPhiM
(
const
double
e
,
const
double
eta
,
const
double
phi
,
const
double
m
);
30
32
P4EEtaPhiM
();
33
35
P4EEtaPhiM
(
const
CLHEP::HepLorentzVector & theHlv);
36
38
P4EEtaPhiM
(
const
I4Momentum
& theI4M );
39
41
P4EEtaPhiM
(
const
I4Momentum
*
const
pI4M );
42
43
45
virtual
double
e
()
const
;
47
virtual
double
eta
()
const
;
49
virtual
double
phi
()
const
;
51
virtual
double
m
()
const
;
52
54
virtual
void
setE
(
double
theE);
56
virtual
void
setEta
(
double
theEta);
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
74
75
double
m_e
;
76
double
m_eta
;
77
double
m_phi
;
78
double
m_m
;
79
80
};
81
82
inline
P4EEtaPhiM::P4EEtaPhiM
() :
83
P4EEtaPhiMBase
(),
84
m_e
( 0.*
CLHEP
::
GeV
),
85
m_eta
( 0. ),
86
m_phi
( 0. ),
87
m_m
( 0.*
CLHEP
::
GeV
)
88
{}
89
90
inline
P4EEtaPhiM::P4EEtaPhiM
(
const
CLHEP::HepLorentzVector & theHlv)
91
{
92
this->
set4Mom
(theHlv);
93
}
94
95
inline
P4EEtaPhiM::P4EEtaPhiM
(
const
I4Momentum
& theI4Mom )
96
{this->
set4Mom
(theI4Mom); }
97
98
inline
P4EEtaPhiM::P4EEtaPhiM
(
const
I4Momentum
*
const
theI4Mom )
99
{this->
set4Mom
(*theI4Mom); }
100
101
102
inline
double
P4EEtaPhiM::e
()
const
103
{
return
m_e
;}
104
105
inline
double
P4EEtaPhiM::eta
()
const
106
{
return
m_eta
;}
107
108
inline
double
P4EEtaPhiM::phi
()
const
109
{
return
m_phi
;}
110
111
inline
double
P4EEtaPhiM::m
()
const
112
{
return
m_m
;}
113
114
inline
void
P4EEtaPhiM::setE
(
double
theE)
115
{
m_e
= theE;}
116
117
inline
void
P4EEtaPhiM::setEta
(
double
theEta)
118
{
m_eta
= theEta;}
119
120
inline
void
P4EEtaPhiM::setPhi
(
double
thePhi)
121
{
m_phi
= thePhi;}
122
123
inline
void
P4EEtaPhiM::setM
(
double
theM)
124
{
m_m
= theM;}
125
126
inline
void
P4EEtaPhiM::set4Mom
(
const
I4Momentum
& theI4Mom )
127
{
128
m_e
=theI4Mom.
e
();
129
m_eta
=theI4Mom.
eta
();
130
m_phi
=theI4Mom.
phi
();
131
m_m
=theI4Mom.
m
();
132
}
133
134
inline
void
P4EEtaPhiM::set4Mom
(
const
I4Momentum
*
const
theI4Mom )
135
{
136
this->
set4Mom
(*theI4Mom);
137
}
138
139
inline
void
P4EEtaPhiM::set4Mom
(
const
CLHEP::HepLorentzVector & theHlv)
140
{
141
m_e
=theHlv.e();
142
m_eta
=theHlv.eta();
143
//FIXME protect against negative energy
144
//assert(m_e >= 0,"P4EEtaPhiM::set4Mom cannot have negative energy");
145
//assert(m_e >= 0);
146
// FIXME of the FIXME in fact it is not necessary to prtoect against negative energy
147
// and besides Seal assert does not work
148
// ASSERT( m_e >= 0 );
149
m_phi
=theHlv.phi();
150
m_m
=theHlv.m();
151
152
153
}
154
155
156
#endif
P4EEtaPhiMBase.h
GeV
#define GeV
Definition
PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
I4MomentumError
Definition
I4MomentumError.h:28
I4Momentum
I4Momentum is an abstract base class providing 4-momentum behavior.
Definition
I4Momentum.h:31
I4Momentum::m
virtual double m() const =0
mass
I4Momentum::phi
virtual double phi() const =0
phi in [-pi,pi[
I4Momentum::eta
virtual double eta() const =0
pseudo rapidity
I4Momentum::e
virtual double e() const =0
energy
P4EEtaPhiMBase
P4EEtaPhiMBase is a base class for classes with 4-momentum behavior, for which E, eta,...
Definition
P4EEtaPhiMBase.h:26
P4EEtaPhiM::m_m
double m_m
Definition
P4EEtaPhiM.h:78
P4EEtaPhiM::setM
virtual void setM(double theM)
set mass data member
Definition
P4EEtaPhiM.h:123
P4EEtaPhiM::P4EEtaPhiM
P4EEtaPhiM()
default constructor
Definition
P4EEtaPhiM.h:82
P4EEtaPhiM::e
virtual double e() const
get energy data member
Definition
P4EEtaPhiM.h:102
P4EEtaPhiM::m_eta
double m_eta
Definition
P4EEtaPhiM.h:76
P4EEtaPhiM::phi
virtual double phi() const
get phi data member
Definition
P4EEtaPhiM.h:108
P4EEtaPhiM::set4Mom
virtual void set4Mom(const I4Momentum &theI4Mom)
set all 4-mom from another I4Momentum reference
Definition
P4EEtaPhiM.h:126
P4EEtaPhiM::m_phi
double m_phi
Definition
P4EEtaPhiM.h:77
P4EEtaPhiM::setEta
virtual void setEta(double theEta)
set eta data member
Definition
P4EEtaPhiM.h:117
P4EEtaPhiM::errors
virtual const I4MomentumError * errors() const
Access to errors, if available; returns 0 if no errors.
Definition
P4EEtaPhiM.cxx:15
P4EEtaPhiM::P4EEtaPhiM
P4EEtaPhiM(const double e, const double eta, const double phi, const double m)
constructor with all data members
Definition
P4EEtaPhiM.cxx:7
P4EEtaPhiM::setE
virtual void setE(double theE)
set energy data member
Definition
P4EEtaPhiM.h:114
P4EEtaPhiM::eta
virtual double eta() const
get eta data member
Definition
P4EEtaPhiM.h:105
P4EEtaPhiM::setPhi
virtual void setPhi(double thePhi)
set phi data member
Definition
P4EEtaPhiM.h:120
P4EEtaPhiM::m_e
double m_e
Definition
P4EEtaPhiM.h:75
P4EEtaPhiM::m
virtual double m() const
get mass data member
Definition
P4EEtaPhiM.h:111
CLHEP
STD'S.
Definition
CaloNoiseCompCondAlg.h:57
Generated on
for ATLAS Offline Software by
1.17.0