ATLAS Offline Software
Loading...
Searching...
No Matches
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
20
22// Public methods:
24
25// Constructors
27
31
35
36
39{
40 if ( this != &rhs ) {
41 m_hlv = rhs.m_hlv;
42 }
43 return *this;
44}
45
47 m_hlv( &hlv )
48{}
49
52
54// Const methods:
56
57std::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()
Default constructor:
CLHEP::HepLorentzVector hlv() const
TruthParticleMomentum & operator=(const TruthParticleMomentum &rhs)
Assignment operator:
std::ostream & dump(std::ostream &out) const
Print I4Momentum content.
virtual ~TruthParticleMomentum()
Destructor:
double px() const
{@ a la I4Momentum -like interface
const HepMC::FourVector * m_hlv
The CLHEP::LorentzVector we are proxying (from the HepMC::GenParticle which is also being proxied)