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