Import Geant4 4.0.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4StackManager.hh,v 1.5.4.1 2001/06/28 19:07:54 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4StackManager.hh,v 1.8 2001/07/19 00:14:16 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -66,11 +66,11 @@ class G4StackManager
|
||||
private:
|
||||
const G4StackManager & operator=
|
||||
(const G4StackManager &right);
|
||||
int operator==(const G4StackManager &right) const;
|
||||
int operator!=(const G4StackManager &right) const;
|
||||
G4int operator==(const G4StackManager &right) const;
|
||||
G4int operator!=(const G4StackManager &right) const;
|
||||
|
||||
public:
|
||||
G4int PushOneTrack(G4Track *newTrack, G4VTrajectory *newTrajectory = NULL);
|
||||
G4int PushOneTrack(G4Track *newTrack, G4VTrajectory *newTrajectory = 0);
|
||||
G4Track * PopNextTrack(G4VTrajectory**newTrajectory);
|
||||
G4int PrepareNewEvent();
|
||||
|
||||
@@ -84,37 +84,66 @@ class G4StackManager
|
||||
// stack are send to the urgent stack and then the user's NewStage()
|
||||
// method is invoked.
|
||||
|
||||
void SetNumberOfAdditionalWaitingStacks(G4int iAdd);
|
||||
// Set the number of additional (optional) waiting stacks.
|
||||
// This method must be invoked at PreInit, Init or Idle states.
|
||||
// Once the user set the number of additional waiting stacks,
|
||||
// he/she can use the corresponding ENUM in G4ClassificationOfNewTrack.
|
||||
// The user should invoke G4RunManager::SetNumberOfAdditionalWaitingStacks
|
||||
// method, which invokes this method.
|
||||
|
||||
void TransferStackedTracks(G4ClassificationOfNewTrack origin, G4ClassificationOfNewTrack destination);
|
||||
// Transfter stacked track from the origin stack to the destination stack.
|
||||
// The destination stack needs not be empty.
|
||||
// If the destination is fKill, tracks are deleted.
|
||||
// If the origin is fKill, nothing happen.
|
||||
|
||||
private:
|
||||
G4UserStackingAction * userStackingAction;
|
||||
int verboseLevel;
|
||||
G4int verboseLevel;
|
||||
G4TrackStack * urgentStack;
|
||||
G4TrackStack * waitingStack;
|
||||
G4TrackStack * postponeStack;
|
||||
G4StackingMessenger* theMessenger;
|
||||
G4std::vector<G4TrackStack*> additionalWaitingStacks;
|
||||
G4int numberOfAdditionalWaitingStacks;
|
||||
|
||||
public:
|
||||
inline void clear()
|
||||
{
|
||||
ClearUrgentStack();
|
||||
ClearWaitingStack();
|
||||
for(int i=1;i<=numberOfAdditionalWaitingStacks;i++) {ClearWaitingStack(i);}
|
||||
}
|
||||
inline void ClearUrgentStack()
|
||||
{ urgentStack->clear(); }
|
||||
inline void ClearWaitingStack()
|
||||
{ waitingStack->clear(); }
|
||||
inline void ClearWaitingStack(int i=0)
|
||||
{
|
||||
if(i==0) {
|
||||
waitingStack->clear();
|
||||
} else {
|
||||
if(i<=numberOfAdditionalWaitingStacks) additionalWaitingStacks[i-1]->clear();
|
||||
}
|
||||
}
|
||||
inline void ClearPostponeStack()
|
||||
{ postponeStack->clear(); }
|
||||
inline G4int GetNTotalTrack() const
|
||||
{ return urgentStack->GetNTrack()
|
||||
+ waitingStack->GetNTrack()
|
||||
+ postponeStack->GetNTrack(); }
|
||||
{ int n = urgentStack->GetNTrack() + waitingStack->GetNTrack() + postponeStack->GetNTrack();
|
||||
for(int i=1;i<=numberOfAdditionalWaitingStacks;i++) {n += additionalWaitingStacks[i-1]->GetNTrack();}
|
||||
return n;
|
||||
}
|
||||
inline G4int GetNUrgentTrack() const
|
||||
{ return urgentStack->GetNTrack(); }
|
||||
inline G4int GetNWaitingTrack() const
|
||||
{ return waitingStack->GetNTrack(); }
|
||||
inline G4int GetNWaitingTrack(int i=0) const
|
||||
{ if(i==0) { return waitingStack->GetNTrack(); }
|
||||
else {
|
||||
if(i<=numberOfAdditionalWaitingStacks) { return additionalWaitingStacks[i-1]->GetNTrack();}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
inline G4int GetNPostponedTrack() const
|
||||
{ return postponeStack->GetNTrack(); }
|
||||
inline void SetVerboseLevel( int const value )
|
||||
inline void SetVerboseLevel( G4int const value )
|
||||
{ verboseLevel = value; }
|
||||
inline void SetUserStackingAction(G4UserStackingAction* value)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user