Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PhononTrackMap Class Reference

#include <G4PhononTrackMap.hh>

Public Types

typedef std::map< const G4Track *, G4ThreeVectorTrkIDKmap
 

Public Member Functions

void SetK (const G4Track *track, const G4ThreeVector &K)
 
void SetK (const G4Track &track, const G4ThreeVector &K)
 
const G4ThreeVectorGetK (const G4Track *track) const
 
const G4ThreeVectorGetK (const G4Track &track) const
 
G4bool Find (const G4Track *track) const
 
G4bool Find (const G4Track &track) const
 
void RemoveTrack (const G4Track *track)
 
void Clear ()
 

Static Public Member Functions

static G4PhononTrackMapGetPhononTrackMap ()
 
static G4PhononTrackMapGetInstance ()
 

Static Public Attributes

static G4ThreadLocal G4PhononTrackMaptheTrackMap = 0
 

Detailed Description

Definition at line 40 of file G4PhononTrackMap.hh.

Member Typedef Documentation

◆ TrkIDKmap

Definition at line 42 of file G4PhononTrackMap.hh.

Member Function Documentation

◆ Clear()

void G4PhononTrackMap::Clear ( )

Definition at line 51 of file G4PhononTrackMap.cc.

51 {
52 theMap.clear(); // Remove all entries from map
53}

◆ Find() [1/2]

G4bool G4PhononTrackMap::Find ( const G4Track & track) const
inline

Definition at line 59 of file G4PhononTrackMap.hh.

59{ return Find(&track); }
G4bool Find(const G4Track *track) const

Referenced by Find().

◆ Find() [2/2]

G4bool G4PhononTrackMap::Find ( const G4Track * track) const

Definition at line 59 of file G4PhononTrackMap.cc.

59 {
60 return (!track || theMap.find(track) != theMap.end());
61}

Referenced by G4VPhononProcess::StartTracking().

◆ GetInstance()

static G4PhononTrackMap * G4PhononTrackMap::GetInstance ( )
inlinestatic

Definition at line 47 of file G4PhononTrackMap.hh.

47{ return GetPhononTrackMap(); }
static G4PhononTrackMap * GetPhononTrackMap()

◆ GetK() [1/2]

const G4ThreeVector & G4PhononTrackMap::GetK ( const G4Track & track) const
inline

Definition at line 55 of file G4PhononTrackMap.hh.

55{ return GetK(&track); }
const G4ThreeVector & GetK(const G4Track *track) const

Referenced by GetK().

◆ GetK() [2/2]

const G4ThreeVector & G4PhononTrackMap::GetK ( const G4Track * track) const

Definition at line 81 of file G4PhononTrackMap.cc.

81 {
82 TrkIDKmap::const_iterator entry = theMap.find(track);
83 return (entry != theMap.end()) ? entry->second : nullVec;
84}

Referenced by G4VPhononProcess::CreateSecondary().

◆ GetPhononTrackMap()

G4PhononTrackMap * G4PhononTrackMap::GetPhononTrackMap ( )
static

Definition at line 46 of file G4PhononTrackMap.cc.

46 {
48 return theTrackMap;
49}
static G4ThreadLocal G4PhononTrackMap * theTrackMap

Referenced by GetInstance().

◆ RemoveTrack()

void G4PhononTrackMap::RemoveTrack ( const G4Track * track)

Definition at line 66 of file G4PhononTrackMap.cc.

66 {
67 TrkIDKmap::iterator entry = theMap.find(track);
68 if (entry != theMap.end()) theMap.erase(entry);
69}

Referenced by G4VPhononProcess::EndTracking().

◆ SetK() [1/2]

void G4PhononTrackMap::SetK ( const G4Track & track,
const G4ThreeVector & K )
inline

Definition at line 51 of file G4PhononTrackMap.hh.

51{ SetK(&track, K); }
void SetK(const G4Track *track, const G4ThreeVector &K)

Referenced by SetK().

◆ SetK() [2/2]

void G4PhononTrackMap::SetK ( const G4Track * track,
const G4ThreeVector & K )

Definition at line 74 of file G4PhononTrackMap.cc.

74 {
75 if (track) theMap[track] = K;
76}

Referenced by G4VPhononProcess::CreateSecondary(), and G4VPhononProcess::StartTracking().

Member Data Documentation

◆ theTrackMap

G4ThreadLocal G4PhononTrackMap * G4PhononTrackMap::theTrackMap = 0
static

Definition at line 43 of file G4PhononTrackMap.hh.

Referenced by GetPhononTrackMap().


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