SLIC  6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
TrackSummary Class Reference

Container for all information from G4Track that may be persisted to MCParticle output collection. More...

#include <TrackSummary.hh>

Public Member Functions

 TrackSummary (const G4Track *track, G4bool toBeSaved, G4bool backScattering=false)
 
virtual ~TrackSummary ()
 
void buildMCParticle ()
 
TrackSummary * findParent () const
 
G4bool getBackScattering () const
 
G4double getCharge () const
 
G4ThreeVector getEndPoint () const
 
G4double getEnergy () const
 
G4int getHepEvtStatus () const
 
G4double getMass () const
 
MCParticleImpl * getMCParticle ()
 
G4ThreeVector getMomentum () const
 
TrackSummary * getParent () const
 
G4int getParentID () const
 
G4int getPDG () const
 
G4int getSimulatorStatus () const
 
G4bool getToBeSaved () const
 
G4int getTrackID () const
 
G4double getTrackLength () const
 
const G4ThreeVector & getVertex () const
 
void operator delete (void *)
 
void * operator new (size_t)
 
void setBackScattering ()
 
void setHasTrackerHit ()
 
void setMCParticle (MCParticleImpl *mcp)
 
void setParentToBeSaved ()
 
void setToBeSaved ()
 
void update (const G4Track *track)
 

Private Attributes

G4bool _backScattering
 
G4double _charge
 
G4ThreeVector _endPoint
 
G4double _energy
 
G4double _globalTime
 
G4bool _hasTrackerHit
 
G4int _hepEvtStatus
 
G4double _mass
 
MCParticleImpl * _mcparticle
 
G4bool _mcParticleIsUpToDate
 
G4ThreeVector _momentum
 
G4ThreeVector _momentumAtEndpoint
 
TrackSummary * _parent
 
G4int _parentTrackID
 
G4int _PDG
 
std::bitset< 32 > _simstatus
 
G4bool _toBeSaved
 
G4int _trackID
 
G4double _trackLength
 
G4ThreeVector _vertex
 

Static Private Attributes

static TrackManager * m_trackManager = TrackManager::instance()
 

Detailed Description

Container for all information from G4Track that may be persisted to MCParticle output collection.

Definition at line 33 of file TrackSummary.hh.

Constructor & Destructor Documentation

◆ TrackSummary()

TrackSummary ( const G4Track *  track,
G4bool  toBeSaved,
G4bool  backScattering = false 
)

◆ ~TrackSummary()

virtual ~TrackSummary ( )
inlinevirtual

Class destructor.

Definition at line 45 of file TrackSummary.hh.

Member Function Documentation

◆ buildMCParticle()

void buildMCParticle ( )

◆ findParent()

TrackSummary * findParent ( ) const

Find the parent particle.

Returns
The parent particle or this if has no parent.

Definition at line 174 of file TrackSummary.cc.

References TrackSummary::_parentTrackID, TrackManager::findTrackSummary(), and TrackSummary::m_trackManager.

Referenced by TrackManager::findFirstSavedAncestor(), TrackSummary::setParentToBeSaved(), and TrackSummary::update().

◆ getBackScattering()

G4bool getBackScattering ( ) const
inline

Return the back scatter status of this particle.

Returns
True if particle is back scatter; false if not.

Definition at line 188 of file TrackSummary.hh.

References TrackSummary::_backScattering.

Referenced by TrackingAction::PreUserTrackingAction(), and TrackSummary::update().

◆ getCharge()

G4double getCharge ( ) const
inline

Get the charge.

Returns
The charge.

Definition at line 68 of file TrackSummary.hh.

References TrackSummary::_charge.

Referenced by TrackSummary::buildMCParticle().

◆ getEndPoint()

G4ThreeVector getEndPoint ( ) const
inline

Get the endpoint of the particle.

Returns
The end point of the particle in mm.

Definition at line 76 of file TrackSummary.hh.

References TrackSummary::_endPoint.

Referenced by TrackSummary::buildMCParticle(), and TrackSummary::update().

◆ getEnergy()

G4double getEnergy ( ) const
inline

Get the total energy including momentum and mass.

Returns
The total energy in GeV.

Definition at line 84 of file TrackSummary.hh.

References TrackSummary::_mass, and TrackSummary::_momentum.

◆ getHepEvtStatus()

G4int getHepEvtStatus ( ) const
inline

Get the HEPEVT or "generator" status of this particle, which is zero if this particle was generated in the simulation as a secondary.

Returns
The HEPEVT status.

Definition at line 101 of file TrackSummary.hh.

References TrackSummary::_hepEvtStatus.

Referenced by TrackSummary::buildMCParticle().

◆ getMass()

G4double getMass ( ) const
inline

Get the mass in GeV.

Returns
The mass.

Definition at line 92 of file TrackSummary.hh.

References TrackSummary::_mass.

◆ getMCParticle()

MCParticleImpl* getMCParticle ( )
inline

Get the MCParticle of this particle.

Returns
The MCParticle of this particle or NULL if not built yet.

Definition at line 208 of file TrackSummary.hh.

References TrackSummary::_mcparticle.

Referenced by TrackManager::findFirstSavedAncestor(), TrackManager::saveTrackSummaries(), and TrackSummary::setParentToBeSaved().

◆ getMomentum()

G4ThreeVector getMomentum ( ) const
inline

Get the momentum (px, py, pz).

Returns
The momentum.

Definition at line 117 of file TrackSummary.hh.

References TrackSummary::_momentum.

Referenced by TrackSummary::buildMCParticle().

◆ getParent()

TrackSummary* getParent ( ) const
inline

Get the parent particle.

Returns
The parent particle.

Definition at line 125 of file TrackSummary.hh.

References TrackSummary::_parent.

◆ getParentID()

G4int getParentID ( ) const
inline

Get the parent particle's track ID.

Returns
The parent's track ID.

Definition at line 157 of file TrackSummary.hh.

References TrackSummary::_parentTrackID.

Referenced by TrackSummary::setParentToBeSaved().

◆ getPDG()

G4int getPDG ( ) const
inline

Get the PDG ID.

Returns
The PDG ID.

Definition at line 133 of file TrackSummary.hh.

References TrackSummary::_PDG.

Referenced by TrackSummary::buildMCParticle().

◆ getSimulatorStatus()

G4int getSimulatorStatus ( ) const
inline

Get the simulator status, which is zero if this is a generator particle.

Returns
The simulator status.

Definition at line 109 of file TrackSummary.hh.

References TrackSummary::_simstatus.

Referenced by TrackSummary::buildMCParticle().

◆ getToBeSaved()

G4bool getToBeSaved ( ) const
inline

Return true if this particle will be saved to the output collection.

Returns
True if particle will be saved; false if not.

Definition at line 173 of file TrackSummary.hh.

References TrackSummary::_toBeSaved.

Referenced by TrackManager::findFirstSavedAncestor(), and TrackManager::saveTrackSummaries().

◆ getTrackID()

G4int getTrackID ( ) const
inline

◆ getTrackLength()

G4double getTrackLength ( ) const
inline

Get the track length in mm.

Returns
The track length.

Definition at line 165 of file TrackSummary.hh.

References TrackSummary::_trackLength.

◆ getVertex()

const G4ThreeVector& getVertex ( ) const
inline

Get the vertex (x, y, z) in mm.

Returns
The vertex.

Definition at line 141 of file TrackSummary.hh.

References TrackSummary::_vertex.

Referenced by TrackSummary::buildMCParticle(), and TrackSummary::update().

◆ operator delete()

void operator delete ( void *  aTrackSummary)
inline

Delete operator.

Definition at line 278 of file TrackSummary.hh.

References slic::TrackSummaryAllocator.

◆ operator new()

void * operator new ( size_t  )
inline

New operator.

Definition at line 272 of file TrackSummary.hh.

References slic::TrackSummaryAllocator.

◆ setBackScattering()

void setBackScattering ( )
inline

Set back scatter status to true.

Definition at line 195 of file TrackSummary.hh.

References TrackSummary::_backScattering.

Referenced by SteppingAction::UserSteppingAction().

◆ setHasTrackerHit()

void setHasTrackerHit ( )
inline

Set hasTrackerHit status to true.

Definition at line 223 of file TrackSummary.hh.

References TrackSummary::_hasTrackerHit.

Referenced by UserTrackInformation::setHasTrackerHit().

◆ setMCParticle()

void setMCParticle ( MCParticleImpl *  mcp)
inline

Set the MCParticle.

Parameters
[in]mcpThe MCParticle.

Definition at line 216 of file TrackSummary.hh.

References TrackSummary::_mcparticle.

◆ setParentToBeSaved()

void setParentToBeSaved ( )

◆ setToBeSaved()

void setToBeSaved ( )
inline

Set that this particle will be saved.

Definition at line 180 of file TrackSummary.hh.

References TrackSummary::_toBeSaved.

◆ update()

void update ( const G4Track *  track)

Member Data Documentation

◆ _backScattering

G4bool _backScattering
private

◆ _charge

G4double _charge
private

Definition at line 242 of file TrackSummary.hh.

Referenced by TrackSummary::TrackSummary(), and TrackSummary::getCharge().

◆ _endPoint

G4ThreeVector _endPoint
private

Definition at line 243 of file TrackSummary.hh.

Referenced by TrackSummary::getEndPoint(), and TrackSummary::update().

◆ _energy

G4double _energy
private

Definition at line 244 of file TrackSummary.hh.

Referenced by TrackSummary::TrackSummary().

◆ _globalTime

G4double _globalTime
private

Definition at line 253 of file TrackSummary.hh.

Referenced by TrackSummary::TrackSummary(), and TrackSummary::buildMCParticle().

◆ _hasTrackerHit

G4bool _hasTrackerHit
private

Definition at line 265 of file TrackSummary.hh.

Referenced by TrackSummary::setHasTrackerHit().

◆ _hepEvtStatus

G4int _hepEvtStatus
private

Definition at line 246 of file TrackSummary.hh.

Referenced by TrackSummary::getHepEvtStatus(), and TrackSummary::update().

◆ _mass

G4double _mass
private

◆ _mcparticle

MCParticleImpl* _mcparticle
private

◆ _mcParticleIsUpToDate

G4bool _mcParticleIsUpToDate
private

◆ _momentum

G4ThreeVector _momentum
private

◆ _momentumAtEndpoint

G4ThreeVector _momentumAtEndpoint
private

Definition at line 249 of file TrackSummary.hh.

Referenced by TrackSummary::buildMCParticle(), and TrackSummary::update().

◆ _parent

TrackSummary* _parent
private

Definition at line 250 of file TrackSummary.hh.

Referenced by TrackSummary::getParent().

◆ _parentTrackID

G4int _parentTrackID
private

◆ _PDG

G4int _PDG
private

Definition at line 251 of file TrackSummary.hh.

Referenced by TrackSummary::TrackSummary(), and TrackSummary::getPDG().

◆ _simstatus

std::bitset<32> _simstatus
private

◆ _toBeSaved

G4bool _toBeSaved
private

◆ _trackID

G4int _trackID
private

Definition at line 258 of file TrackSummary.hh.

Referenced by TrackSummary::TrackSummary(), and TrackSummary::getTrackID().

◆ _trackLength

G4double _trackLength
private

Definition at line 260 of file TrackSummary.hh.

Referenced by TrackSummary::getTrackLength(), and TrackSummary::update().

◆ _vertex

G4ThreeVector _vertex
private

Definition at line 252 of file TrackSummary.hh.

Referenced by TrackSummary::getVertex(), and TrackSummary::update().

◆ m_trackManager

TrackManager * m_trackManager = TrackManager::instance()
staticprivate

Definition at line 267 of file TrackSummary.hh.

Referenced by TrackSummary::findParent().


The documentation for this class was generated from the following files: