ATLAS Offline Software
Simulation
G4Sim
MCTruth
src
PrimaryParticleInformation.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MCTruth/PrimaryParticleInformation.h
"
6
#include "
AtlasHepMC/GenParticle.h
"
7
8
PrimaryParticleInformation::PrimaryParticleInformation
()
9
{
10
}
11
12
PrimaryParticleInformation::PrimaryParticleInformation
(
HepMC::GenParticlePtr
p
,
ISF::ISFParticle
* isp)
13
: m_theParticle(
p
)
14
, m_theISFParticle(isp)
15
{
16
}
17
18
int
PrimaryParticleInformation::GetParticleBarcode
()
const
19
{
20
if
(m_barcode !=
HepMC::INVALID_PARTICLE_BARCODE
)
return
m_barcode;
21
if
(
m_theParticle
) {
22
m_barcode =
HepMC::barcode
(
m_theParticle
);
23
return
m_barcode;
24
}
25
return
0;
26
}
27
28
int
PrimaryParticleInformation::GetParticleUniqueID
()
const
29
{
30
if
(m_uniqueID !=
HepMC::INVALID_PARTICLE_BARCODE
)
return
m_uniqueID;
31
if
(
m_theParticle
) {
32
HepMC::ConstGenParticlePtr
particle
=
m_theParticle
;
33
m_uniqueID =
HepMC::uniqueID
(
particle
);
34
return
m_uniqueID;
35
}
36
return
0;
37
}
38
39
void
PrimaryParticleInformation::SetISFParticle
(
ISF::ISFParticle
*
p
)
40
{
41
m_theISFParticle
=
p
;
42
}
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition:
ParticleHypothesis.h:76
PrimaryParticleInformation::m_theParticle
HepMC::GenParticlePtr m_theParticle
Definition:
PrimaryParticleInformation.h:74
PrimaryParticleInformation::SetISFParticle
void SetISFParticle(ISF::ISFParticle *isp)
Definition:
PrimaryParticleInformation.cxx:39
PrimaryParticleInformation::m_theISFParticle
ISF::ISFParticle * m_theISFParticle
Definition:
PrimaryParticleInformation.h:75
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition:
GenParticle.h:37
ISF::ISFParticle
Definition:
ISFParticle.h:42
HepMC::INVALID_PARTICLE_BARCODE
constexpr int INVALID_PARTICLE_BARCODE
Definition:
MagicNumbers.h:53
GenParticle.h
PrimaryParticleInformation::GetParticleBarcode
int GetParticleBarcode() const
Definition:
PrimaryParticleInformation.cxx:18
PrimaryParticleInformation::PrimaryParticleInformation
PrimaryParticleInformation()
Definition:
PrimaryParticleInformation.cxx:8
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:210
HepMC::barcode
int barcode(const T *p)
Definition:
Barcode.h:16
HepMC::uniqueID
int uniqueID(const T &p)
Definition:
MagicNumbers.h:109
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition:
GenParticle.h:38
PrimaryParticleInformation.h
PrimaryParticleInformation::GetParticleUniqueID
int GetParticleUniqueID() const
Definition:
PrimaryParticleInformation.cxx:28
Generated on Thu Nov 7 2024 21:24:11 for ATLAS Offline Software by
1.8.18