ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleBase.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6// ParticleBase.cxx
7// Implementation file for class ParticleBase
8// Author: S.Binet<binet@cern.ch>
10
11
13
14#include "VxVertex/RecVertex.h"
15
18
22
26 INavigable ( ),
27 I4Momentum ( ),
29 IParticle ( ),
30 m_origin(),
31 m_charge( 0. ),
32 m_hasCharge ( false ),
33 m_pdgId ( 0 ),
34 m_hasPdgId ( false ),
36{}
37
39 IAthenaBarCode ( rhs ),
40 INavigable ( rhs ),
41 I4Momentum ( rhs ),
42 INavigable4Momentum ( rhs ),
43 IParticle ( rhs ),
44 m_origin ( rhs.m_origin ),
45 m_charge ( rhs.m_charge ),
47 m_pdgId ( rhs.m_pdgId ),
48 m_hasPdgId ( rhs.m_hasPdgId ),
50{}
51
53{
54 if ( this != &rhs ) {
55 INavigable::operator=( rhs );
56 I4Momentum::operator=( rhs );
57 INavigable4Momentum::operator=( rhs );
58 IParticle::operator=( rhs );
59 m_origin = rhs.m_origin;
60 m_charge = rhs.m_charge;
62 m_pdgId = rhs.m_pdgId;
65 }
66 return *this;
67}
68
72
77{
78 // check if the link is empty
79 if (!m_origin.isValid()) return 0;
80 return &(**m_origin).recVertex();
81}
82
@ Data
Definition BaseObject.h:11
I4Momentum is an abstract base class providing 4-momentum behavior.
Definition I4Momentum.h:31
ParticleBase & operator=(const ParticleBase &rhs)
Assignement operator.
virtual ~ParticleBase()
Destructor.
ParticleBase()
Default constructor.
virtual const Trk::RecVertex * origin() const
Return a RecVertex corresponding to particle Origin.
ElementLink< VxContainer > m_origin
ParticleDataType::DataType m_dataType
ChargeType m_charge
Trk::RecVertex inherits from Trk::Vertex.
Definition RecVertex.h:44
Information about type of data used to fill particle.