ATLAS Offline Software
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 ),
35  m_dataType ( ParticleDataType::Data )
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 ),
46  m_hasCharge ( rhs.m_hasCharge ),
47  m_pdgId ( rhs.m_pdgId ),
48  m_hasPdgId ( rhs.m_hasPdgId ),
49  m_dataType ( rhs.m_dataType )
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;
63  m_hasPdgId = rhs.m_hasPdgId;
64  m_dataType = rhs.m_dataType;
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 
RecVertex.h
I4Momentum
Definition: I4Momentum.h:31
ParticleBase
Definition: ParticleBase.h:17
Data
@ Data
Definition: BaseObject.h:11
ParticleBase::ParticleBase
ParticleBase()
Default constructor.
Definition: ParticleBase.cxx:25
ParticleBase.h
ParticleBase::~ParticleBase
virtual ~ParticleBase()
Destructor.
Definition: ParticleBase.cxx:71
ParticleBase::m_charge
ChargeType m_charge
Definition: ParticleBase.h:73
Trk::RecVertex
Trk::RecVertex inherits from Trk::Vertex.
Definition: RecVertex.h:44
ParticleBase::m_hasPdgId
bool m_hasPdgId
Definition: ParticleBase.h:76
ParticleBase::m_pdgId
int m_pdgId
Definition: ParticleBase.h:75
ParticleBase::origin
virtual const Trk::RecVertex * origin() const
Return a RecVertex corresponding to particle Origin
Definition: ParticleBase.cxx:76
INavigable
Definition: INavigable.h:18
IAthenaBarCode
Definition: AthenaKernel/AthenaKernel/IAthenaBarCode.h:48
ParticleDataType
Information about type of data used to fill particle.
Definition: Event/EventKernel/EventKernel/IParticle.h:35
ParticleBase::m_hasCharge
bool m_hasCharge
Definition: ParticleBase.h:74
ParticleBase::operator=
ParticleBase & operator=(const ParticleBase &rhs)
Assignement operator.
Definition: ParticleBase.cxx:52
INavigable4Momentum
Definition: INavigable4Momentum.h:21
ParticleBase::m_origin
ElementLink< VxContainer > m_origin
Definition: ParticleBase.h:72
ParticleBase::m_dataType
ParticleDataType::DataType m_dataType
Definition: ParticleBase.h:77
IParticle
Definition: Event/EventKernel/EventKernel/IParticle.h:43