ATLAS Offline Software
TrackParticleCnv_p1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //-----------------------------------------------------------------------------
6 //
7 // file: TrackParticleCnv_p1.cxx
8 //
9 //-----------------------------------------------------------------------------
10 
11 #include "Particle/TrackParticle.h"
13 #include <cmath>
15 
17 {
19  const Amg::Vector3D& mom = transObj->definingParameters().momentum();
20  transObj->setPx (mom[Trk::px]);
21  transObj->setPy (mom[Trk::py]);
22  transObj->setPz (mom[Trk::pz]);
24  transObj->setE (std::sqrt ((long double)mom.mag2() + (long double)mpi*mpi));
25 }
26 
28 {
30 }
Trk::py
@ py
Definition: ParamDefs.h:60
TrackParticle.h
TrackParticleCnv_p1::persToTrans
virtual void persToTrans(const Rec ::TrackParticle_p1 *persObj, Rec ::TrackParticle *transObj, MsgStream &log)
Definition: TrackParticleCnv_p1.cxx:16
Trk::pz
@ pz
global momentum (cartesian)
Definition: ParamDefs.h:61
ITPConverterFor< TRANS_BASE >::fillTransFromPStore
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
Convert persistent object, stored in the the top-level persistent object and referenced by the TP Ref...
Definition: TPConverter.h:145
P4PxPyPzE::setE
virtual void setE(double theE)
set energy data member
Definition: P4PxPyPzE.h:144
GeoPrimitives.h
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
TrackParticleCnv_p1::m_trackParticleBaseCnv
ITPConverterFor< Trk::TrackParticleBase > * m_trackParticleBaseCnv
Definition: TrackParticleCnv_p1.h:36
P4PxPyPzE::setPx
virtual void setPx(double thePx)
set Px data member
Definition: P4PxPyPzE.h:135
Trk::pion
@ pion
Definition: ParticleHypothesis.h:29
Trk::px
@ px
Definition: ParamDefs.h:59
Trk::ParticleMasses::mass
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:53
ITPConverterFor< TRANS_BASE >::baseToPersistent
TPObjRef baseToPersistent(CNV **cnv, const typename CNV::Trans_t *transObj, MsgStream &log) const
Persistify bass class of a given object and store the persistent represenation in the storage vector ...
Definition: TPConverter.h:97
TrackParticleCnv_p1::transToPers
virtual void transToPers(const Rec ::TrackParticle *transObj, Rec ::TrackParticle_p1 *persObj, MsgStream &log)
Definition: TrackParticleCnv_p1.cxx:27
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Rec::TrackParticle_p1
Definition: TrackParticle_p1.h:20
Rec::TrackParticle
Definition: Reconstruction/Particle/Particle/TrackParticle.h:47
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
P4PxPyPzE::setPz
virtual void setPz(double thePz)
set Pz data member
Definition: P4PxPyPzE.h:141
HepMC::mpi
int mpi(const GenEvent &e)
Definition: GenEvent.h:629
Trk::TrackParticleBase::definingParameters
const TrackParameters & definingParameters() const
Returns the 'defining' parameter of this TrackParticle.
Definition: TrackParticleBase.h:239
P4PxPyPzE::setPy
virtual void setPy(double thePy)
set Py data member
Definition: P4PxPyPzE.h:138
TrackParticleCnv_p1.h
Rec::TrackParticle_p1::m_trackParticleBase
TPObjRef m_trackParticleBase
Definition: TrackParticle_p1.h:24