ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
TrackBarcodeInfo Class Reference

Minimal implementation of VTrackInformation. Instances of this class are attached as UserInformation to G4Tracks. This is used for G4Tracks with no link to the HepMC::GenEvent, but a non-zero barcode/id value. (See AthenaStackingAction::ClassifyNewTrack(...).) No GenParticlePtr is held by the TrackBarcodeInfo class. The 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_barcode, m_uniqueID and m_status - ??? More...

#include <TrackBarcodeInfo.h>

Inheritance diagram for TrackBarcodeInfo:
Collaboration diagram for TrackBarcodeInfo:

Public Types

enum  TrackClassification {
  Primary, RegeneratedPrimary, RegisteredSecondary, Secondary,
  BarcodeOnly
}
 

Public Member Functions

 TrackBarcodeInfo (int uid, int bc, ISF::ISFParticle *baseIsp=0)
 
virtual const ISF::ISFParticleGetBaseISFParticle () const override
 return a pointer to the ISFParticle corresponding to the current G4Track. More...
 
virtual ISF::ISFParticleGetBaseISFParticle () 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...
 
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 HepMC::ConstGenParticlePtr GetCurrentGenParticle () const
 return a pointer to the GenParticle corresponding to the current G4Track (if there is one). More...
 
virtual HepMC::GenParticlePtr GetCurrentGenParticle ()
 
virtual void SetCurrentGenParticle (HepMC::GenParticlePtr)
 set the pointer to the GenParticle corresponding to the current G4Track. More...
 
virtual void Print () const
 

Private Attributes

ISF::ISFParticlem_theBaseISFParticle {}
 
int m_barcode
 
int m_uniqueID
 
int m_status {0}
 
bool m_returnedToISF
 
TrackClassification m_classify
 
HepMC::GenParticlePtr m_primaryGenParticle {}
 

Detailed Description

Minimal implementation of VTrackInformation. Instances of this class are attached as UserInformation to G4Tracks. This is used for G4Tracks with no link to the HepMC::GenEvent, but a non-zero barcode/id value. (See AthenaStackingAction::ClassifyNewTrack(...).) No GenParticlePtr is held by the TrackBarcodeInfo class. The 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_barcode, m_uniqueID and m_status - ???

Definition at line 28 of file TrackBarcodeInfo.h.

Member Enumeration Documentation

◆ TrackClassification

Enumerator
Primary 
RegeneratedPrimary 
RegisteredSecondary 
Secondary 
BarcodeOnly 

Definition at line 32 of file VTrackInformation.h.

Constructor & Destructor Documentation

◆ TrackBarcodeInfo()

TrackBarcodeInfo::TrackBarcodeInfo ( int  uid,
int  bc,
ISF::ISFParticle baseIsp = 0 
)

Definition at line 7 of file TrackBarcodeInfo.cxx.

9  , m_theBaseISFParticle(baseIsp)
10  , m_barcode(bc)
11  , m_uniqueID(uid)
12  , m_returnedToISF(false)
13 {
14 }

Member Function Documentation

◆ GetBaseISFParticle() [1/2]

virtual const ISF::ISFParticle* TrackBarcodeInfo::GetBaseISFParticle ( ) const
inlineoverridevirtual

return a pointer to the ISFParticle corresponding to the current G4Track.

Reimplemented from VTrackInformation.

Definition at line 36 of file TrackBarcodeInfo.h.

36 {return m_theBaseISFParticle;}

◆ GetBaseISFParticle() [2/2]

virtual ISF::ISFParticle* TrackBarcodeInfo::GetBaseISFParticle ( )
inlineoverridevirtual

Reimplemented from VTrackInformation.

Definition at line 37 of file TrackBarcodeInfo.h.

37 {return m_theBaseISFParticle;}

◆ GetClassification()

TrackClassification VTrackInformation::GetClassification ( ) const
inlineinherited

return the classification of the current G4Ttrack (Primary, Regenerated Primary, Registered Secondary, Secondary)

Definition at line 39 of file VTrackInformation.h.

39 {return m_classify;}

◆ GetCurrentGenParticle() [1/2]

virtual HepMC::GenParticlePtr VTrackInformation::GetCurrentGenParticle ( )
inlinevirtualinherited

Reimplemented in TrackInformation.

Definition at line 68 of file VTrackInformation.h.

68 {return nullptr;}

◆ GetCurrentGenParticle() [2/2]

virtual HepMC::ConstGenParticlePtr VTrackInformation::GetCurrentGenParticle ( ) const
inlinevirtualinherited

return a pointer to the GenParticle corresponding to the current G4Track (if there is one).

Reimplemented in TrackInformation.

Definition at line 67 of file VTrackInformation.h.

67 {return nullptr;}

◆ GetParticleBarcode()

virtual int TrackBarcodeInfo::GetParticleBarcode ( ) const
inlineoverridevirtual

Implements VTrackInformation.

Definition at line 58 of file TrackBarcodeInfo.h.

58 {return m_barcode;} // TODO Drop this once UniqueID and Status are used instead

◆ GetParticleStatus()

virtual int TrackBarcodeInfo::GetParticleStatus ( ) const
inlineoverridevirtual

Implements VTrackInformation.

Definition at line 60 of file TrackBarcodeInfo.h.

60 {return m_status;}

◆ GetParticleUniqueID()

virtual int TrackBarcodeInfo::GetParticleUniqueID ( ) const
inlineoverridevirtual

Implements VTrackInformation.

Definition at line 59 of file TrackBarcodeInfo.h.

59 {return m_uniqueID;}

◆ GetPrimaryGenParticle() [1/2]

HepMC::GenParticlePtr VTrackInformation::GetPrimaryGenParticle ( )
inlineinherited

Definition at line 55 of file VTrackInformation.h.

55 {return m_primaryGenParticle;}

◆ GetPrimaryGenParticle() [2/2]

HepMC::ConstGenParticlePtr VTrackInformation::GetPrimaryGenParticle ( ) const
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.

54 {return m_primaryGenParticle;}

◆ GetReturnedToISF()

virtual bool TrackBarcodeInfo::GetReturnedToISF ( ) const
inlineoverridevirtual

Is the ISFParticle corresponding to the current G4Track scheduled to be returned to the ISF?

Reimplemented from VTrackInformation.

Definition at line 51 of file TrackBarcodeInfo.h.

51 {return m_returnedToISF;}

◆ Print()

virtual void VTrackInformation::Print ( ) const
inlinevirtualinherited

Definition at line 105 of file VTrackInformation.h.

105 {}

◆ SetBaseISFParticle()

void TrackBarcodeInfo::SetBaseISFParticle ( ISF::ISFParticle isp)
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 16 of file TrackBarcodeInfo.cxx.

17 {
19 }

◆ SetClassification()

void VTrackInformation::SetClassification ( TrackClassification  tc)
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.

45 {m_classify=tc;}

◆ SetCurrentGenParticle()

void VTrackInformation::SetCurrentGenParticle ( HepMC::GenParticlePtr  )
virtualinherited

set 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.

Reimplemented in TrackInformation.

Definition at line 22 of file VTrackInformation.cxx.

23 {
24  // you should not call this, perhaps throw an exception?
25  std::cerr<<"ERROR VTrackInformation::SetCurrentGenParticle() not supported "<<std::endl;
26 }

◆ SetPrimaryGenParticle()

void VTrackInformation::SetPrimaryGenParticle ( HepMC::GenParticlePtr  p)
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.

13 {
14  m_primaryGenParticle = std::move(p);
15 }

◆ SetReturnedToISF()

void TrackBarcodeInfo::SetReturnedToISF ( bool  returned)
overridevirtual

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 21 of file TrackBarcodeInfo.cxx.

22 {
23  m_returnedToISF = returned;
24 }

Member Data Documentation

◆ m_barcode

int TrackBarcodeInfo::m_barcode
private

Definition at line 63 of file TrackBarcodeInfo.h.

◆ m_classify

TrackClassification VTrackInformation::m_classify
privateinherited

Definition at line 107 of file VTrackInformation.h.

◆ m_primaryGenParticle

HepMC::GenParticlePtr VTrackInformation::m_primaryGenParticle {}
privateinherited

Definition at line 108 of file VTrackInformation.h.

◆ m_returnedToISF

bool TrackBarcodeInfo::m_returnedToISF
private

Definition at line 66 of file TrackBarcodeInfo.h.

◆ m_status

int TrackBarcodeInfo::m_status {0}
private

Definition at line 65 of file TrackBarcodeInfo.h.

◆ m_theBaseISFParticle

ISF::ISFParticle* TrackBarcodeInfo::m_theBaseISFParticle {}
private

Definition at line 62 of file TrackBarcodeInfo.h.

◆ m_uniqueID

int TrackBarcodeInfo::m_uniqueID
private

Definition at line 64 of file TrackBarcodeInfo.h.


The documentation for this class was generated from the following files:
TrackBarcodeInfo::m_theBaseISFParticle
ISF::ISFParticle * m_theBaseISFParticle
Definition: TrackBarcodeInfo.h:62
TrackBarcodeInfo::m_status
int m_status
Definition: TrackBarcodeInfo.h:65
VTrackInformation::m_primaryGenParticle
HepMC::GenParticlePtr m_primaryGenParticle
Definition: VTrackInformation.h:108
VTrackInformation::m_classify
TrackClassification m_classify
Definition: VTrackInformation.h:107
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
VTrackInformation::Primary
@ Primary
Definition: VTrackInformation.h:32
TrackBarcodeInfo::m_barcode
int m_barcode
Definition: TrackBarcodeInfo.h:63
TrackBarcodeInfo::m_returnedToISF
bool m_returnedToISF
Definition: TrackBarcodeInfo.h:66
VTrackInformation::Secondary
@ Secondary
Definition: VTrackInformation.h:32
TrackBarcodeInfo::m_uniqueID
int m_uniqueID
Definition: TrackBarcodeInfo.h:64
VTrackInformation::BarcodeOnly
@ BarcodeOnly
Definition: VTrackInformation.h:32
VTrackInformation::RegisteredSecondary
@ RegisteredSecondary
Definition: VTrackInformation.h:32
VTrackInformation::VTrackInformation
VTrackInformation(TrackClassification tc=Primary)
Definition: VTrackInformation.cxx:7
VTrackInformation::RegeneratedPrimary
@ RegeneratedPrimary
Definition: VTrackInformation.h:32