ATLAS Offline Software
TrackInformation.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "AtlasHepMC/GenEvent.h"
8 
10  : m_regenerationNr(0)
11  , m_currentGenParticle(nullptr)
12  , m_theBaseISFParticle(nullptr)
13  , m_returnedToISF(false)
14 {
15 }
16 
18  : m_regenerationNr(0)
19  , m_currentGenParticle(std::move(p))
20  , m_theBaseISFParticle(baseIsp)
21  , m_returnedToISF(false)
22 {
23 }
24 
26 {
27  if (m_barcode != HepMC::INVALID_PARTICLE_BARCODE) return m_barcode;
30  return m_barcode;
31  }
32  return HepMC::UNDEFINED_ID;
33 }
34 
36 {
37  if (m_uniqueID != HepMC::INVALID_PARTICLE_BARCODE) return m_uniqueID;
40  m_uniqueID = HepMC::uniqueID(particle);
41  return m_uniqueID;
42  }
43  return HepMC::UNDEFINED_ID;
44 }
45 
47 {
49  return m_currentGenParticle->status();
50  }
51  return 0;
52 }
53 
55 {
56  m_currentGenParticle = std::move(p);
59 }
60 
62 {
64 }
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:79
GenEvent.h
TrackInformation::m_currentGenParticle
HepMC::GenParticlePtr m_currentGenParticle
Definition: TrackInformation.h:103
TrackInformation::SetCurrentGenParticle
virtual void SetCurrentGenParticle(HepMC::GenParticlePtr) override
set m_currentGenParticle, the pointer to the GenParticle corresponding to the current G4Track.
Definition: TrackInformation.cxx:54
TrackInformation::SetBaseISFParticle
virtual void SetBaseISFParticle(ISF::ISFParticle *) override
set the pointer to the ISFParticle corresponding to the current G4Track.
Definition: TrackInformation.cxx:61
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
ISF::ISFParticle
Definition: ISFParticle.h:42
TrackInformation::GetParticleUniqueID
virtual int GetParticleUniqueID() const override
Definition: TrackInformation.cxx:35
HepMC::INVALID_PARTICLE_BARCODE
constexpr int INVALID_PARTICLE_BARCODE
Definition: MagicNumbers.h:55
GenParticle.h
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
TrackInformation::TrackInformation
TrackInformation()
Definition: TrackInformation.cxx:9
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:117
HepMC::UNDEFINED_ID
constexpr int UNDEFINED_ID
Definition: MagicNumbers.h:57
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
TrackInformation.h
TrackInformation::GetParticleBarcode
virtual int GetParticleBarcode() const override
Definition: TrackInformation.cxx:25
TrackInformation::GetParticleStatus
virtual int GetParticleStatus() const override
Definition: TrackInformation.cxx:46
TrackInformation::m_theBaseISFParticle
ISF::ISFParticle * m_theBaseISFParticle
Definition: TrackInformation.h:106