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

#include <TrackHelper.h>

Collaboration diagram for TrackHelper:

Public Member Functions

 TrackHelper (const G4Track *t)
 
bool IsPrimary () const
 
bool IsRegeneratedPrimary () const
 
bool IsRegisteredSecondary () const
 
bool IsSecondary () const
 
int GetBarcode () const
 
int GetUniqueID () const
 
int GetStatus () const
 
TrackInformationGetTrackInformation ()
 
HepMcParticleLink GenerateParticleLink ()
 Generates a creates new HepMcParticleLink object on the stack based on GetUniqueID(), assuming that the link should point at the first GenEvent in the McEventCollection. More...
 

Private Attributes

TrackInformationm_trackInfo
 

Detailed Description

Definition at line 14 of file TrackHelper.h.

Constructor & Destructor Documentation

◆ TrackHelper()

TrackHelper::TrackHelper ( const G4Track *  t)

Definition at line 11 of file TrackHelper.cxx.

12 {
13  m_trackInfo=static_cast<TrackInformation *>(t->GetUserInformation());
14 }

Member Function Documentation

◆ GenerateParticleLink()

HepMcParticleLink TrackHelper::GenerateParticleLink ( )
inline

Generates a creates new HepMcParticleLink object on the stack based on GetUniqueID(), assuming that the link should point at the first GenEvent in the McEventCollection.

Definition at line 35 of file TrackHelper.h.

36 {
37 #if defined(HEPMC3)
39 #else
41 #endif
42 }

◆ GetBarcode()

int TrackHelper::GetBarcode ( ) const

Definition at line 35 of file TrackHelper.cxx.

36 {
37  if (m_trackInfo==0 || std::as_const(m_trackInfo)->GetCurrentGenParticle()==0) return 0;
39 }

◆ GetStatus()

int TrackHelper::GetStatus ( ) const

Definition at line 47 of file TrackHelper.cxx.

48 {
49  if (m_trackInfo==0 || std::as_const(m_trackInfo)->GetCurrentGenParticle()==0) return 0;
51 }

◆ GetTrackInformation()

TrackInformation* TrackHelper::GetTrackInformation ( )
inline

Definition at line 24 of file TrackHelper.h.

24 {return m_trackInfo;}

◆ GetUniqueID()

int TrackHelper::GetUniqueID ( ) const

Definition at line 41 of file TrackHelper.cxx.

42 {
43  if (m_trackInfo==0 || std::as_const(m_trackInfo)->GetCurrentGenParticle()==0) return 0;
45 }

◆ IsPrimary()

bool TrackHelper::IsPrimary ( ) const

Definition at line 15 of file TrackHelper.cxx.

16 {
17  if (m_trackInfo==0) return false;
19 }

◆ IsRegeneratedPrimary()

bool TrackHelper::IsRegeneratedPrimary ( ) const

Definition at line 20 of file TrackHelper.cxx.

21 {
22  if (m_trackInfo==0) return false;
24 }

◆ IsRegisteredSecondary()

bool TrackHelper::IsRegisteredSecondary ( ) const

Definition at line 25 of file TrackHelper.cxx.

26 {
27  if (m_trackInfo==0) return false;
29 }

◆ IsSecondary()

bool TrackHelper::IsSecondary ( ) const

Definition at line 30 of file TrackHelper.cxx.

31 {
32  if (m_trackInfo==0) return true;
34 }

Member Data Documentation

◆ m_trackInfo

TrackInformation* TrackHelper::m_trackInfo
private

Definition at line 32 of file TrackHelper.h.


The documentation for this class was generated from the following files:
TrackHelper::GetBarcode
int GetBarcode() const
Definition: TrackHelper.cxx:35
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TrackInformation::GetParticleUniqueID
virtual int GetParticleUniqueID() const override
Definition: TrackInformation.cxx:36
VTrackInformation::Primary
@ Primary
Definition: VTrackInformation.h:32
TrackInformation
Implementation of VTrackInformation. Instances of this class are attached as UserInformation to G4Tra...
Definition: TrackInformation.h:41
TrackInformation::GetParticleBarcode
virtual int GetParticleBarcode() const override
Definition: TrackInformation.cxx:26
TrackInformation::GetParticleStatus
virtual int GetParticleStatus() const override
Definition: TrackInformation.cxx:47
TrackHelper::m_trackInfo
TrackInformation * m_trackInfo
Definition: TrackHelper.h:32
VTrackInformation::Secondary
@ Secondary
Definition: VTrackInformation.h:32
TrackHelper::GetUniqueID
int GetUniqueID() const
Definition: TrackHelper.cxx:41
VTrackInformation::RegisteredSecondary
@ RegisteredSecondary
Definition: VTrackInformation.h:32
VTrackInformation::GetClassification
TrackClassification GetClassification() const
return the classification of the current G4Ttrack (Primary, Regenerated Primary, Registered Secondary...
Definition: VTrackInformation.h:39
VTrackInformation::RegeneratedPrimary
@ RegeneratedPrimary
Definition: VTrackInformation.h:32