Import Geant4 1.1.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4EvManMessenger.cc,v 1.1.10.1 1999/12/07 20:47:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4EvManMessenger.cc,v 1.2 1999/12/15 14:49:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Event.cc,v 1.1.10.1 1999/12/07 20:47:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4Event.cc,v 1.2 1999/12/15 14:49:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
// G4Event
|
||||
@@ -57,7 +57,7 @@ int G4Event::operator!=(const G4Event &right) const
|
||||
|
||||
void G4Event::Print() const
|
||||
{
|
||||
G4cout << "G4Event " << eventID << endl;
|
||||
G4cout << "G4Event " << eventID << G4endl;
|
||||
}
|
||||
|
||||
void G4Event::Draw() const
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4EventManager.cc,v 1.2.8.1 1999/12/07 20:47:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4EventManager.cc,v 1.5 2000/01/26 06:42:15 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -19,15 +19,31 @@
|
||||
#include "G4UserStackingAction.hh"
|
||||
#include "G4SDManager.hh"
|
||||
|
||||
G4EventManager* G4EventManager::fpEventManager = 0;
|
||||
G4EventManager* G4EventManager::GetEventManager()
|
||||
{ return fpEventManager; }
|
||||
|
||||
G4EventManager::G4EventManager()
|
||||
:verboseLevel(0),trajectoryContainer(NULL),userEventAction(NULL),
|
||||
:verboseLevel(0),trajectoryContainer(NULL),
|
||||
tracking(false),currentEvent(NULL)
|
||||
{
|
||||
if(fpEventManager)
|
||||
{
|
||||
G4Exception("G4EventManager::G4EventManager() has already been made.");
|
||||
}
|
||||
else
|
||||
{
|
||||
trackManager = new G4TrackingManager;
|
||||
transformer = new G4PrimaryTransformer;
|
||||
trackContainer = new G4StackManager;
|
||||
theMessenger = new G4EvManMessenger(this);
|
||||
sdManager = G4SDManager::GetSDMpointerIfExist();
|
||||
fpEventManager = this;
|
||||
userEventAction = 0;
|
||||
userStackingAction = 0;
|
||||
userTrackingAction = 0;
|
||||
userSteppingAction = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// private -> never called
|
||||
@@ -43,7 +59,8 @@ G4EventManager::~G4EventManager()
|
||||
delete transformer;
|
||||
delete trackManager;
|
||||
delete theMessenger;
|
||||
if (userEventAction) delete userEventAction;
|
||||
if(userEventAction) delete userEventAction;
|
||||
fpEventManager = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -63,9 +80,9 @@ void G4EventManager::ProcessOneEvent(G4Event* anEvent)
|
||||
#ifdef G4VERBOSE
|
||||
if ( verboseLevel > 0 )
|
||||
{
|
||||
G4cout << "=====================================" << endl;
|
||||
G4cout << " G4EventManager::ProcessOneEvent() " << endl;
|
||||
G4cout << "=====================================" << endl;
|
||||
G4cout << "=====================================" << G4endl;
|
||||
G4cout << " G4EventManager::ProcessOneEvent() " << G4endl;
|
||||
G4cout << "=====================================" << G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -85,7 +102,7 @@ void G4EventManager::ProcessOneEvent(G4Event* anEvent)
|
||||
if ( verboseLevel > 1 )
|
||||
{
|
||||
G4cout << currentEvent->GetNumberOfPrimaryVertex()
|
||||
<< " vertices passed from G4Event." << endl;
|
||||
<< " vertices passed from G4Event." << G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -95,12 +112,13 @@ void G4EventManager::ProcessOneEvent(G4Event* anEvent)
|
||||
if ( verboseLevel > 0 )
|
||||
{
|
||||
G4cout << trackContainer->GetNTotalTrack() << " primaries "
|
||||
<< "are passed from G4EventTransformer." << endl;
|
||||
G4cout << "!!!!!!! Now start processing an event !!!!!!!" << endl;
|
||||
<< "are passed from G4EventTransformer." << G4endl;
|
||||
G4cout << "!!!!!!! Now start processing an event !!!!!!!" << G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
while( ( track = trackContainer->PopNextTrack() ) != NULL )
|
||||
|
||||
G4VTrajectory* previousTrajectory;
|
||||
while( ( track = trackContainer->PopNextTrack(&previousTrajectory) ) != NULL )
|
||||
{
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
@@ -108,7 +126,7 @@ void G4EventManager::ProcessOneEvent(G4Event* anEvent)
|
||||
{
|
||||
G4cout << "Track " << track << " (trackID " << track->GetTrackID()
|
||||
<< ", parentID " << track->GetParentID()
|
||||
<< ") is passed to G4TrackingManager." << endl;
|
||||
<< ") is passed to G4TrackingManager." << G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -122,13 +140,20 @@ void G4EventManager::ProcessOneEvent(G4Event* anEvent)
|
||||
{
|
||||
G4cout << "Track (trackID " << track->GetTrackID()
|
||||
<< ", parentID " << track->GetParentID()
|
||||
<< ") is processed with stopping code " << istop << endl;
|
||||
<< ") is processed with stopping code " << istop << G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef G4_STORE_TRAJECTORY
|
||||
G4VTrajectory * aTrajectory = trackManager->GimmeTrajectory();
|
||||
if(aTrajectory)
|
||||
|
||||
if(previousTrajectory)
|
||||
{
|
||||
previousTrajectory->MergeTrajectory(aTrajectory);
|
||||
delete aTrajectory;
|
||||
aTrajectory = previousTrajectory;
|
||||
}
|
||||
if(aTrajectory&&(istop!=fStopButAlive)&&(istop!=fSuspend))
|
||||
{
|
||||
if(!trajectoryContainer)
|
||||
{ trajectoryContainer = new G4TrajectoryContainer; }
|
||||
@@ -141,6 +166,10 @@ void G4EventManager::ProcessOneEvent(G4Event* anEvent)
|
||||
{
|
||||
case fStopButAlive:
|
||||
case fSuspend:
|
||||
trackContainer->PushOneTrack( track, aTrajectory );
|
||||
StackTracks( secondaries );
|
||||
break;
|
||||
|
||||
case fPostponeToNextEvent:
|
||||
trackContainer->PushOneTrack( track );
|
||||
StackTracks( secondaries );
|
||||
@@ -153,7 +182,7 @@ void G4EventManager::ProcessOneEvent(G4Event* anEvent)
|
||||
|
||||
case fAlive:
|
||||
G4cout << "Illeagal TrackStatus returned from G4TrackingManager!"
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
case fKillTrackAndSecondaries:
|
||||
if( secondaries ) secondaries->clearAndDestroy();
|
||||
delete track;
|
||||
@@ -164,8 +193,8 @@ void G4EventManager::ProcessOneEvent(G4Event* anEvent)
|
||||
#ifdef G4VERBOSE
|
||||
if ( verboseLevel > 0 )
|
||||
{
|
||||
G4cout << "NULL returned from G4StackManager." << endl;
|
||||
G4cout << "Terminate current event processing." << endl;
|
||||
G4cout << "NULL returned from G4StackManager." << G4endl;
|
||||
G4cout << "Terminate current event processing." << G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -202,7 +231,7 @@ void G4EventManager::StackTracks(G4TrackVector *trackVector)
|
||||
G4cout << "A new track " << newTrack
|
||||
<< " (trackID " << newTrack->GetTrackID()
|
||||
<< ", parentID " << newTrack->GetParentID()
|
||||
<< ") is passed to G4StackManager." << endl;
|
||||
<< ") is passed to G4StackManager." << G4endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -212,8 +241,26 @@ void G4EventManager::StackTracks(G4TrackVector *trackVector)
|
||||
|
||||
void G4EventManager::SetUserAction(G4UserEventAction* userAction)
|
||||
{
|
||||
if (userEventAction) delete userEventAction;
|
||||
userEventAction = userAction;
|
||||
userEventAction->SetEventManager(this);
|
||||
if(userEventAction) userEventAction->SetEventManager(this);
|
||||
}
|
||||
|
||||
void G4EventManager::SetUserAction(G4UserStackingAction* userAction)
|
||||
{
|
||||
userStackingAction = userAction;
|
||||
trackContainer->SetUserStackingAction(userAction);
|
||||
}
|
||||
|
||||
void G4EventManager::SetUserAction(G4UserTrackingAction* userAction)
|
||||
{
|
||||
userTrackingAction = userAction;
|
||||
trackManager->SetUserAction(userAction);
|
||||
}
|
||||
|
||||
void G4EventManager::SetUserAction(G4UserSteppingAction* userAction)
|
||||
{
|
||||
userSteppingAction = userAction;
|
||||
trackManager->SetUserAction(userAction);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,17 +5,13 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HEPEvtInterface.cc,v 1.2.8.1 1999/12/07 20:47:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4HEPEvtInterface.cc,v 1.3 1999/12/15 14:49:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#ifdef WIN32
|
||||
# include <Strstrea.h>
|
||||
#else
|
||||
# include <strstream.h>
|
||||
#endif
|
||||
#include "g4std/strstream"
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "G4HEPEvtInterface.hh"
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HEPEvtParticle.cc,v 1.1.10.1 1999/12/07 20:47:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4HEPEvtParticle.cc,v 1.2 1999/12/15 14:49:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleGun.cc,v 1.1.10.1 1999/12/07 20:47:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4ParticleGun.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
// G4ParticleGun
|
||||
@@ -57,8 +57,8 @@ void G4ParticleGun::SetParticleMomentum(G4ParticleMomentum aMomentum)
|
||||
{
|
||||
if(particle_definition==NULL)
|
||||
{
|
||||
G4cout <<"Particle Definition not defined yet for G4ParticleGun"<< endl;
|
||||
G4cout <<"Zero Mass is assumed"<<endl;
|
||||
G4cout <<"Particle Definition not defined yet for G4ParticleGun"<< G4endl;
|
||||
G4cout <<"Zero Mass is assumed"<<G4endl;
|
||||
particle_momentum_direction = aMomentum.unit();
|
||||
particle_energy = aMomentum.mag();
|
||||
}
|
||||
@@ -69,13 +69,13 @@ void G4ParticleGun::SetParticleMomentum(G4ParticleMomentum aMomentum)
|
||||
particle_momentum_direction = aMomentum.unit();
|
||||
if ((particle_energy>0.0)&&(abs(particle_energy+mass-sqrt(p*p+mass*mass))>keV))
|
||||
{
|
||||
G4cout << "G4ParticleGun::" << particle_definition->GetParticleName() << endl;
|
||||
G4cout << " KineticEnergy and Momentum could be inconsistent" << endl;
|
||||
G4cout << "G4ParticleGun::" << particle_definition->GetParticleName() << G4endl;
|
||||
G4cout << " KineticEnergy and Momentum could be inconsistent" << G4endl;
|
||||
G4cout << " (Momentum:" << p/GeV << " GeV/c";
|
||||
G4cout << " Mass:" << mass/GeV << " GeV/c/c)" << endl;
|
||||
G4cout << " Mass:" << mass/GeV << " GeV/c/c)" << G4endl;
|
||||
G4cout << " KineticEnergy is overwritten!! ";
|
||||
G4cout << particle_energy/GeV << "->";
|
||||
G4cout << (sqrt(p*p+mass*mass)-mass)/GeV << "GeV" << endl;
|
||||
G4cout << (sqrt(p*p+mass*mass)-mass)/GeV << "GeV" << G4endl;
|
||||
}
|
||||
particle_energy = sqrt(p*p+mass*mass)-mass;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleGunMessenger.cc,v 1.1.10.1 1999/12/07 20:47:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4ParticleGunMessenger.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "G4ParticleGunMessenger.hh"
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PrimaryParticle.cc,v 1.1.10.1 1999/12/07 20:47:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4PrimaryParticle.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "G4PrimaryParticle.hh"
|
||||
@@ -80,20 +80,20 @@ void G4PrimaryParticle::Print() const
|
||||
{
|
||||
G4cout << "==== PDGcode " << PDGcode << " Particle name ";
|
||||
if(G4code != NULL)
|
||||
{ G4cout << G4code->GetParticleName() << endl; }
|
||||
{ G4cout << G4code->GetParticleName() << G4endl; }
|
||||
else
|
||||
{ G4cout << "is not defined in G4." << endl; }
|
||||
G4cout << " Momentum ( " << Px << ", " << Py << ", " << Pz << " )" << endl;
|
||||
{ G4cout << "is not defined in G4." << G4endl; }
|
||||
G4cout << " Momentum ( " << Px << ", " << Py << ", " << Pz << " )" << G4endl;
|
||||
G4cout << " Polarization ( " << polX << ", " << polY << ", "
|
||||
<< polZ << " )" << endl;
|
||||
<< polZ << " )" << G4endl;
|
||||
if(daughterParticle != NULL)
|
||||
{
|
||||
G4cout << ">>>> Daughters" << endl;
|
||||
G4cout << ">>>> Daughters" << G4endl;
|
||||
daughterParticle->Print();
|
||||
}
|
||||
if(nextParticle != NULL)
|
||||
{ nextParticle->Print(); }
|
||||
else
|
||||
{ G4cout << "<<<< End of link" << endl; }
|
||||
{ G4cout << "<<<< End of link" << G4endl; }
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PrimaryTransformer.cc,v 1.1.10.1 1999/12/07 20:47:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4PrimaryTransformer.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "G4PrimaryTransformer.hh"
|
||||
@@ -52,7 +52,7 @@ void G4PrimaryTransformer::GenerateTracks(G4PrimaryVertex* primaryVertex)
|
||||
<< X0 / mm << "(mm),"
|
||||
<< Y0 / mm << "(mm),"
|
||||
<< Z0 / mm << "(mm),"
|
||||
<< T0 / nanosecond << "(nsec))" << endl;
|
||||
<< T0 / nanosecond << "(nsec))" << G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -76,7 +76,7 @@ void G4PrimaryTransformer::GenerateSingleTrack
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << "Primary particle (PDGcode " << primaryParticle->GetPDGcode()
|
||||
<< ") --- Ignored" << endl;
|
||||
<< ") --- Ignored" << G4endl;
|
||||
}
|
||||
#endif
|
||||
G4PrimaryParticle* daughter = primaryParticle->GetDaughter();
|
||||
@@ -96,7 +96,7 @@ void G4PrimaryTransformer::GenerateSingleTrack
|
||||
{
|
||||
G4cout << "Primary particle (" << partDef->GetParticleName()
|
||||
<< ") --- Transfered with momentum " << primaryParticle->GetMomentum()
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
#endif
|
||||
G4DynamicParticle* DP =
|
||||
@@ -135,7 +135,7 @@ void G4PrimaryTransformer::SetDecayProducts
|
||||
if(verboseLevel>2)
|
||||
{
|
||||
G4cout << " >> Decay product (PDGcode " << daughter->GetPDGcode()
|
||||
<< ") --- Ignored" << endl;
|
||||
<< ") --- Ignored" << G4endl;
|
||||
}
|
||||
#endif
|
||||
SetDecayProducts(daughter,motherDP);
|
||||
@@ -147,7 +147,7 @@ void G4PrimaryTransformer::SetDecayProducts
|
||||
{
|
||||
G4cout << " >> Decay product (" << partDef->GetParticleName()
|
||||
<< ") --- Attached with momentum " << daughter->GetMomentum()
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
#endif
|
||||
G4DynamicParticle*DP
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PrimaryVertex.cc,v 1.1.10.1 1999/12/07 20:47:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4PrimaryVertex.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "G4PrimaryVertex.hh"
|
||||
@@ -53,8 +53,8 @@ int G4PrimaryVertex::operator!=(const G4PrimaryVertex &right) const
|
||||
void G4PrimaryVertex::Print() const
|
||||
{
|
||||
G4cout << "Vertex ( "
|
||||
<< X0 << ", " << Y0 << ", " << Z0 << ", " << T0 << " )" << endl;
|
||||
G4cout << "#### Primary particles" << endl;
|
||||
<< X0 << ", " << Y0 << ", " << Z0 << ", " << T0 << " )" << G4endl;
|
||||
G4cout << "#### Primary particles" << G4endl;
|
||||
G4PrimaryParticle* aPrim = theParticle;
|
||||
if(aPrim != NULL)
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StackManager.cc,v 1.1.10.1 1999/12/07 20:47:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4StackManager.cc,v 1.3 2000/01/26 06:42:16 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 09/Dec/96 M.Asai
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "G4StackManager.hh"
|
||||
#include "G4StackingMessenger.hh"
|
||||
#include "G4VTrajectory.hh"
|
||||
#include "evmandefs.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
@@ -42,7 +43,7 @@ const{ return false; }
|
||||
int G4StackManager::operator!=(const G4StackManager &)
|
||||
const{ return true; }
|
||||
|
||||
G4int G4StackManager::PushOneTrack(G4Track *newTrack)
|
||||
G4int G4StackManager::PushOneTrack(G4Track *newTrack,G4VTrajectory *newTrajectory)
|
||||
{
|
||||
G4ClassificationOfNewTrack classification;
|
||||
if(userStackingAction)
|
||||
@@ -57,14 +58,15 @@ G4int G4StackManager::PushOneTrack(G4Track *newTrack)
|
||||
{
|
||||
G4cout << " ---> G4Track " << newTrack << " (trackID "
|
||||
<< newTrack->GetTrackID() << ", parentID "
|
||||
<< newTrack->GetParentID() << ") is not to be stored." << endl;
|
||||
<< newTrack->GetParentID() << ") is not to be stored." << G4endl;
|
||||
}
|
||||
#endif
|
||||
delete newTrack;
|
||||
delete newTrajectory;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4StackedTrack * newStackedTrack = new G4StackedTrack( newTrack );
|
||||
G4StackedTrack * newStackedTrack = new G4StackedTrack( newTrack, newTrajectory );
|
||||
switch (classification)
|
||||
{
|
||||
case fUrgent:
|
||||
@@ -85,13 +87,13 @@ G4int G4StackManager::PushOneTrack(G4Track *newTrack)
|
||||
}
|
||||
|
||||
|
||||
G4Track * G4StackManager::PopNextTrack()
|
||||
G4Track * G4StackManager::PopNextTrack(G4VTrajectory**newTrajectory)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if( verboseLevel > 0 )
|
||||
{
|
||||
G4cout << "### pop requested out of "
|
||||
<< GetNUrgentTrack() << " stacked tracks." << endl;
|
||||
<< GetNUrgentTrack() << " stacked tracks." << G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -99,20 +101,21 @@ G4Track * G4StackManager::PopNextTrack()
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if( verboseLevel > 0 ) G4cout << "### " << GetNWaitingTrack()
|
||||
<< " waiting tracks are re-classified to" << endl;
|
||||
<< " waiting tracks are re-classified to" << G4endl;
|
||||
#endif
|
||||
waitingStack->TransferTo(urgentStack);
|
||||
if(userStackingAction) userStackingAction->NewStage();
|
||||
#ifdef G4VERBOSE
|
||||
if( verboseLevel > 0 ) G4cout << " " << GetNUrgentTrack()
|
||||
<< " urgent tracks and " << GetNWaitingTrack()
|
||||
<< " waiting tracks." << endl;
|
||||
<< " waiting tracks." << G4endl;
|
||||
#endif
|
||||
if( ( GetNUrgentTrack()==0 ) && ( GetNWaitingTrack()==0 ) ) return NULL;
|
||||
}
|
||||
|
||||
G4StackedTrack * selectedStackedTrack = urgentStack->PopFromStack();
|
||||
G4Track * selectedTrack = selectedStackedTrack->GetTrack();
|
||||
*newTrajectory = selectedStackedTrack->GetTrajectory();
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if( verboseLevel > 1 )
|
||||
@@ -121,7 +124,7 @@ G4Track * G4StackManager::PopNextTrack()
|
||||
<< " with G4Track " << selectedStackedTrack->GetTrack()
|
||||
<< " (trackID " << selectedStackedTrack->GetTrack()->GetTrackID()
|
||||
<< ", parentID " << selectedStackedTrack->GetTrack()->GetParentID()
|
||||
<< ")" << endl;
|
||||
<< ")" << G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -146,6 +149,7 @@ void G4StackManager::ReClassify()
|
||||
{
|
||||
case fKill:
|
||||
delete aStackedTrack->GetTrack();
|
||||
delete aStackedTrack->GetTrajectory();
|
||||
delete aStackedTrack;
|
||||
break;
|
||||
case fUrgent:
|
||||
@@ -173,7 +177,7 @@ G4int G4StackManager::PrepareNewEvent()
|
||||
if( verboseLevel > 0 )
|
||||
{
|
||||
G4cout << GetNPostponedTrack()
|
||||
<< " postponed tracked are now shifted to the stack." << endl;
|
||||
<< " postponed tracked are now shifted to the stack." << G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -185,6 +189,7 @@ G4int G4StackManager::PrepareNewEvent()
|
||||
while( (aStackedTrack=tmpStack.PopFromStack()) != NULL )
|
||||
{
|
||||
G4Track* aTrack = aStackedTrack->GetTrack();
|
||||
G4VTrajectory* aTrajectory = aStackedTrack->GetTrajectory();
|
||||
aTrack->SetParentID(-1);
|
||||
G4ClassificationOfNewTrack classification;
|
||||
if(userStackingAction)
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StackedTrack.cc,v 1.1.10.1 1999/12/07 20:47:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4StackedTrack.cc,v 1.3 2000/01/26 06:42:16 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 02/Feb/96 M.Asai
|
||||
@@ -17,10 +17,12 @@
|
||||
G4Allocator<G4StackedTrack> aStackedTrackAllocator;
|
||||
|
||||
G4StackedTrack::G4StackedTrack()
|
||||
:track(NULL),trajectory(NULL),priorityWeight(0.),
|
||||
previousStackedTrack(NULL),nextStackedTrack(NULL)
|
||||
{ }
|
||||
|
||||
G4StackedTrack::G4StackedTrack(G4Track * newTrack)
|
||||
:track(newTrack),priorityWeight(0.),
|
||||
G4StackedTrack::G4StackedTrack(G4Track * newTrack, G4VTrajectory * aTrajectory)
|
||||
:track(newTrack),trajectory(aTrajectory),priorityWeight(0.),
|
||||
previousStackedTrack(NULL),nextStackedTrack(NULL)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StackingMessenger.cc,v 1.1.10.1 1999/12/07 20:47:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4StackingMessenger.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -50,11 +50,11 @@ void G4StackingMessenger::SetNewValue(G4UIcommand * command,G4String newValues)
|
||||
{
|
||||
if( command==statusCmd )
|
||||
{
|
||||
G4cout << "========================== Current status of the stack =====" << endl;
|
||||
G4cout << " Number of tracks in the stack" << endl;
|
||||
G4cout << " Urgent stack : " << fContainer->GetNUrgentTrack() << endl;
|
||||
G4cout << " Waiting stack : " << fContainer->GetNWaitingTrack() << endl;
|
||||
G4cout << " Postponed stack : " << fContainer->GetNPostponedTrack() << endl;
|
||||
G4cout << "========================== Current status of the stack =====" << G4endl;
|
||||
G4cout << " Number of tracks in the stack" << G4endl;
|
||||
G4cout << " Urgent stack : " << fContainer->GetNUrgentTrack() << G4endl;
|
||||
G4cout << " Waiting stack : " << fContainer->GetNWaitingTrack() << G4endl;
|
||||
G4cout << " Postponed stack : " << fContainer->GetNPostponedTrack() << G4endl;
|
||||
}
|
||||
if( command==clearCmd )
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrackStack.cc,v 1.1.10.1 1999/12/07 20:47:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4TrackStack.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 09/Dec/96 M.Asai
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserEventAction.cc,v 1.2.8.1 1999/12/07 20:47:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4UserEventAction.cc,v 1.3 1999/12/15 14:49:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserStackingAction.cc,v 1.2.8.1 1999/12/07 20:47:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4UserStackingAction.cc,v 1.3 1999/12/15 14:49:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "G4UserStackingAction.hh"
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VPrimaryGenerator.cc,v 1.1.10.1 1999/12/07 20:47:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VPrimaryGenerator.cc,v 1.2 1999/12/15 14:49:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
// G4VPrimaryGenerator
|
||||
|
||||
Reference in New Issue
Block a user