ATLAS Offline Software
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 
7 
9 {
10 }
11 
13  : m_theParticle(p)
14  , m_theISFParticle(isp)
15 {
16 }
17 
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 
29 {
30  if (m_uniqueID != HepMC::INVALID_PARTICLE_BARCODE) return m_uniqueID;
31  if (m_theParticle) {
33  m_uniqueID = HepMC::uniqueID(particle);
34  return m_uniqueID;
35  }
36  return 0;
37 }
38 
40 {
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