ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
TruthParticleID
McParticleEvent
src
TruthParticleMomentum.cxx
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
// TruthParticleMomentum.cxx
8
// Implementation file for class TruthParticleMomentum
9
// Author: S.Binet<binet@cern.ch>
11
12
13
// STL includes
14
#include <ostream>
15
#include <sstream>
16
#include <iomanip>
17
18
// McParticleEvent includes
19
#include "
McParticleEvent/TruthParticleMomentum.h
"
20
22
// Public methods:
24
25
// Constructors
27
28
TruthParticleMomentum::TruthParticleMomentum
() :
29
m_hlv
( 0 )
30
{}
31
32
TruthParticleMomentum::TruthParticleMomentum
(
const
TruthParticleMomentum
& rhs ) :
33
m_hlv
( rhs.
m_hlv
)
34
{}
35
36
37
TruthParticleMomentum
&
38
TruthParticleMomentum::operator=
(
const
TruthParticleMomentum
& rhs )
39
{
40
if
(
this
!= &rhs ) {
41
m_hlv
= rhs.
m_hlv
;
42
}
43
return
*
this
;
44
}
45
46
TruthParticleMomentum::TruthParticleMomentum
(
const
HepMC::FourVector
&
hlv
) :
47
m_hlv
( &
hlv
)
48
{}
49
50
TruthParticleMomentum::~TruthParticleMomentum
()
51
{}
52
54
// Const methods:
56
57
std::ostream&
TruthParticleMomentum::dump
( std::ostream& out )
const
58
{
59
std::stringstream buf;
60
buf <<
"[px,py,pz,e] ="
61
<< std::right << std::scientific << std::setprecision(8)
62
<< std::setw(16) << this->
px
()
63
<< std::setw(16) << this->
py
()
64
<< std::setw(16) << this->
pz
()
65
<< std::setw(16) << this->
e
();
66
return
out << buf.str();
67
}
TruthParticleMomentum.h
TruthParticleMomentum
Definition
TruthParticleMomentum.h:28
TruthParticleMomentum::TruthParticleMomentum
TruthParticleMomentum()
Default constructor:
Definition
TruthParticleMomentum.cxx:28
TruthParticleMomentum::hlv
CLHEP::HepLorentzVector hlv() const
Definition
TruthParticleMomentum.h:269
TruthParticleMomentum::operator=
TruthParticleMomentum & operator=(const TruthParticleMomentum &rhs)
Assignment operator:
Definition
TruthParticleMomentum.cxx:38
TruthParticleMomentum::e
double e() const
Definition
TruthParticleMomentum.h:212
TruthParticleMomentum::dump
std::ostream & dump(std::ostream &out) const
Print I4Momentum content.
Definition
TruthParticleMomentum.cxx:57
TruthParticleMomentum::~TruthParticleMomentum
virtual ~TruthParticleMomentum()
Destructor:
Definition
TruthParticleMomentum.cxx:50
TruthParticleMomentum::py
double py() const
Definition
TruthParticleMomentum.h:133
TruthParticleMomentum::px
double px() const
{@ a la I4Momentum -like interface
Definition
TruthParticleMomentum.h:128
TruthParticleMomentum::pz
double pz() const
Definition
TruthParticleMomentum.h:138
TruthParticleMomentum::m_hlv
const HepMC::FourVector * m_hlv
The CLHEP::LorentzVector we are proxying (from the HepMC::GenParticle which is also being proxied).
Definition
TruthParticleMomentum.h:121
HepMC::FourVector
HepMC3::FourVector FourVector
Definition
SimpleVector.h:11
Generated on
for ATLAS Offline Software by
1.17.0