Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4TrackStack Class Reference

#include <G4TrackStack.hh>

Inheritance diagram for G4TrackStack:
Collaboration diagram for G4TrackStack:

Public Member Functions

 G4TrackStack ()
 
 G4TrackStack (size_t n)
 
 ~G4TrackStack ()
 
void PushToStack (const G4StackedTrack &aStackedTrack)
 
G4StackedTrack PopFromStack ()
 
void TransferTo (G4TrackStack *aStack)
 
void TransferTo (G4SmartTrackStack *aStack)
 
void clearAndDestroy ()
 
G4int GetNTrack () const
 
G4int GetMaxNTrack () const
 
G4int GetSafetyValve1 () const
 
G4int GetSafetyValve2 () const
 
G4int GetNStick () const
 
G4double getTotalEnergy (void) const
 
void SetSafetyValve2 (int x)
 

Detailed Description

Definition at line 49 of file G4TrackStack.hh.

Constructor & Destructor Documentation

G4TrackStack::G4TrackStack ( )
inline

Definition at line 52 of file G4TrackStack.hh.

52 : safetyValve1(0), safetyValve2(0), nstick(0) {}
G4TrackStack::G4TrackStack ( size_t  n)
inline

Definition at line 53 of file G4TrackStack.hh.

53 : safetyValve1(4*n/5), safetyValve2(4*n/5-100), nstick(100) { reserve(n);}
G4TrackStack::~G4TrackStack ( )

Definition at line 35 of file G4TrackStack.cc.

36 {
38 }
void clearAndDestroy()
Definition: G4TrackStack.cc:40

Here is the call graph for this function:

Member Function Documentation

void G4TrackStack::clearAndDestroy ( )

Definition at line 40 of file G4TrackStack.cc.

41 {
42  for( iterator i = begin(); i != end(); i++ ) {
43  delete (*i).GetTrack();
44  delete (*i).GetTrajectory();
45  }
46  clear();
47 }

Here is the caller graph for this function:

G4int G4TrackStack::GetMaxNTrack ( ) const
inline

Definition at line 75 of file G4TrackStack.hh.

75 { return max_size(); }

Here is the caller graph for this function:

G4int G4TrackStack::GetNStick ( ) const
inline

Definition at line 78 of file G4TrackStack.hh.

78 { return nstick; }
G4int G4TrackStack::GetNTrack ( ) const
inline

Definition at line 74 of file G4TrackStack.hh.

74 { return size(); }

Here is the caller graph for this function:

G4int G4TrackStack::GetSafetyValve1 ( ) const
inline

Definition at line 76 of file G4TrackStack.hh.

76 { return safetyValve1; }

Here is the caller graph for this function:

G4int G4TrackStack::GetSafetyValve2 ( ) const
inline

Definition at line 77 of file G4TrackStack.hh.

77 { return safetyValve2; }

Here is the caller graph for this function:

G4double G4TrackStack::getTotalEnergy ( void  ) const

Definition at line 61 of file G4TrackStack.cc.

62 {
63  G4double totalEnergy = 0.0;
64  for (const_iterator i = begin(); i != end(); i++) {
65  totalEnergy += (*i).GetTrack()->GetDynamicParticle()->GetTotalEnergy();
66  }
67  return totalEnergy;
68 }
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

G4StackedTrack G4TrackStack::PopFromStack ( )
inline

Definition at line 63 of file G4TrackStack.hh.

63 { G4StackedTrack st = back(); pop_back(); return st; }

Here is the caller graph for this function:

void G4TrackStack::PushToStack ( const G4StackedTrack aStackedTrack)
inline

Definition at line 62 of file G4TrackStack.hh.

62 { push_back(aStackedTrack); }

Here is the caller graph for this function:

void G4TrackStack::SetSafetyValve2 ( int  x)
inline

Definition at line 81 of file G4TrackStack.hh.

81 { safetyValve2 = x < 0 ? 0 : x; }
void G4TrackStack::TransferTo ( G4TrackStack aStack)

Definition at line 49 of file G4TrackStack.cc.

49  {
50  for(iterator i = begin(); i != end(); i++) aStack->push_back(*i);
51  clear();
52 }

Here is the caller graph for this function:

void G4TrackStack::TransferTo ( G4SmartTrackStack aStack)

Definition at line 55 of file G4TrackStack.cc.

56 {
57  while(size()) { aStack->PushToStack(PopFromStack()); }
58 }
void PushToStack(const G4StackedTrack &aStackedTrack)
G4StackedTrack PopFromStack()
Definition: G4TrackStack.hh:63

Here is the call graph for this function:


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