ATLAS Offline Software
|
Implementation of VTrackInformation. Instances of this class are attached as UserInformation to G4Tracks. More...
#include <TrackInformation.h>
Public Types | |
enum | TrackClassification { Primary, RegeneratedPrimary, RegisteredSecondary, Secondary, BarcodeOnly } |
Public Member Functions | |
TrackInformation () | |
TrackInformation (HepMC::GenParticlePtr p, ISF::ISFParticle *baseIsp=nullptr) | |
virtual HepMC::ConstGenParticlePtr | GetCurrentGenParticle () const override |
return a pointer to the GenParticle corresponding to the current G4Track (if there is one). More... | |
virtual HepMC::GenParticlePtr | GetCurrentGenParticle () override |
virtual void | SetCurrentGenParticle (HepMC::GenParticlePtr) override |
set m_currentGenParticle, the pointer to the GenParticle corresponding to the current G4Track. More... | |
virtual const ISF::ISFParticle * | GetBaseISFParticle () const override |
return a pointer to the ISFParticle corresponding to the current G4Track. More... | |
virtual ISF::ISFParticle * | GetBaseISFParticle () override |
virtual void | SetBaseISFParticle (ISF::ISFParticle *) override |
set the pointer to the ISFParticle corresponding to the current G4Track. More... | |
virtual bool | GetReturnedToISF () const override |
Is the ISFParticle corresponding to the current G4Track scheduled to be returned to the ISF? More... | |
virtual void | SetReturnedToISF (bool returned) override |
Flag whether the ISFParticle corresponding to the current G4Track scheduled to be returned to the ISF. More... | |
int | GetRegenerationNr () const |
return the number of times the particle represented by the G4Track has undergone a non-destructive interaction that was recorded in the HepMC::GenEvent. More... | |
void | SetRegenerationNr (int i) |
update the number of times the particle represented by the G4Track has undergone a non-destructive interaction that was recorded in the HepMC::GenEvent. More... | |
virtual int | GetParticleBarcode () const override |
virtual int | GetParticleUniqueID () const override |
virtual int | GetParticleStatus () const override |
TrackClassification | GetClassification () const |
return the classification of the current G4Ttrack (Primary, Regenerated Primary, Registered Secondary, Secondary) More... | |
void | SetClassification (TrackClassification tc) |
update the classification of the currently tracked particle, usually called when a new G4Track is created or after it survives an interaction. More... | |
HepMC::ConstGenParticlePtr | GetPrimaryGenParticle () const |
return a pointer to the GenParticle used to create the initial G4PrimaryParticle from which the current G4Track decends. More... | |
HepMC::GenParticlePtr | GetPrimaryGenParticle () |
void | SetPrimaryGenParticle (HepMC::GenParticlePtr) |
set the pointer to the GenParticle used to create the initial G4PrimaryParticle from which the current G4Track decends. More... | |
virtual void | Print () const |
Private Attributes | |
int | m_regenerationNr {0} |
HepMC::GenParticlePtr | m_currentGenParticle {} |
int m_barcode | ATLAS_THREAD_SAFE = HepMC::INVALID_PARTICLE_BARCODE |
int m_uniqueID | ATLAS_THREAD_SAFE = HepMC::INVALID_PARTICLE_BARCODE |
ISF::ISFParticle * | m_theBaseISFParticle {} |
bool | m_returnedToISF {false} |
TrackClassification | m_classify |
HepMC::GenParticlePtr | m_primaryGenParticle {} |
Implementation of VTrackInformation. Instances of this class are attached as UserInformation to G4Tracks.
The GenParticlePtr m_currentGenParticle held by the TrackInformation object points to the GenParticle corresponding to the current G4Track and can change during simulation (i.e. each time the track undergoes a non-destructive interaction).
The other member variables are: m_theBaseISFParticle - a pointer to the ISFParticle corresponding to the current G4Track, m_returnedToISF - a flag indicating whether the ISFParticle corresponding to the current G4Track scheduled to be returned to the ISF, m_regenerationNr - the number of times the particle represented by the G4Track has undergone a non-destructive interaction that was recorded in the HepMC::GenEvent, m_barcode and m_uniqueID - convenience variables corresponding to the barcode and id of m_currentGenParticle. The member variables are m_classify: a classification of the current G4Track (Primary, Regenerated Primary, Registered Secondary, Secondary) and m_primaryGenParticle: a pointer to the GenParticle used to create the initial G4PrimaryParticle from which the current G4Track decends.
Definition at line 41 of file TrackInformation.h.
|
inherited |
Enumerator | |
---|---|
Primary | |
RegeneratedPrimary | |
RegisteredSecondary | |
Secondary | |
BarcodeOnly |
Definition at line 32 of file VTrackInformation.h.
TrackInformation::TrackInformation | ( | ) |
Definition at line 10 of file TrackInformation.cxx.
TrackInformation::TrackInformation | ( | HepMC::GenParticlePtr | p, |
ISF::ISFParticle * | baseIsp = nullptr |
||
) |
Definition at line 18 of file TrackInformation.cxx.
|
inlineoverridevirtual |
return a pointer to the ISFParticle corresponding to the current G4Track.
Reimplemented from VTrackInformation.
Definition at line 64 of file TrackInformation.h.
|
inlineoverridevirtual |
|
inlineinherited |
return the classification of the current G4Ttrack (Primary, Regenerated Primary, Registered Secondary, Secondary)
Definition at line 39 of file VTrackInformation.h.
|
inlineoverridevirtual |
return a pointer to the GenParticle corresponding to the current G4Track (if there is one).
Reimplemented from VTrackInformation.
Definition at line 49 of file TrackInformation.h.
|
inlineoverridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
inlineinherited |
Definition at line 55 of file VTrackInformation.h.
|
inlineinherited |
return a pointer to the GenParticle used to create the initial G4PrimaryParticle from which the current G4Track decends.
Should match the return value of ISF::TruthBinding::getPrimaryGenParticle(). TODO Check that this is required.
Definition at line 54 of file VTrackInformation.h.
|
inline |
return the number of times the particle represented by the G4Track has undergone a non-destructive interaction that was recorded in the HepMC::GenEvent.
Definition at line 90 of file TrackInformation.h.
|
inlineoverridevirtual |
Is the ISFParticle corresponding to the current G4Track scheduled to be returned to the ISF?
Reimplemented from VTrackInformation.
Definition at line 78 of file TrackInformation.h.
|
inlinevirtualinherited |
Definition at line 105 of file VTrackInformation.h.
|
overridevirtual |
set the pointer to the ISFParticle corresponding to the current G4Track.
(Only used to replace the ISFParticle by a copy of itself when the G4Track is killed and the copy is scheduled to be returned to the ISF.)
Reimplemented from VTrackInformation.
Definition at line 62 of file TrackInformation.cxx.
|
inlineinherited |
update the classification of the currently tracked particle, usually called when a new G4Track is created or after it survives an interaction.
Definition at line 45 of file VTrackInformation.h.
|
overridevirtual |
set m_currentGenParticle, the pointer to the GenParticle corresponding to the current G4Track.
This will be updated each time an interaction of the G4Track is recorded to the HepMC::GenEvent. Also invalidates previously cached values in m_barcode and m_uniqueID.
Reimplemented from VTrackInformation.
Definition at line 55 of file TrackInformation.cxx.
|
inherited |
set the pointer to the GenParticle used to create the initial G4PrimaryParticle from which the current G4Track decends.
TODO Check that this is required - if so, ensure it is set consistently.
Definition at line 12 of file VTrackInformation.cxx.
|
inline |
update the number of times the particle represented by the G4Track has undergone a non-destructive interaction that was recorded in the HepMC::GenEvent.
Definition at line 96 of file TrackInformation.h.
|
inlineoverridevirtual |
Flag whether the ISFParticle corresponding to the current G4Track scheduled to be returned to the ISF.
Only called in TrackProcessorUserActionPassBack::returnParticleToISF
Reimplemented from VTrackInformation.
Definition at line 83 of file TrackInformation.h.
|
mutableprivate |
Definition at line 104 of file TrackInformation.h.
|
mutableprivate |
Definition at line 105 of file TrackInformation.h.
|
privateinherited |
Definition at line 107 of file VTrackInformation.h.
|
private |
Definition at line 103 of file TrackInformation.h.
|
privateinherited |
Definition at line 108 of file VTrackInformation.h.
|
private |
Definition at line 102 of file TrackInformation.h.
|
private |
Definition at line 107 of file TrackInformation.h.
|
private |
Definition at line 106 of file TrackInformation.h.