Import Geant4 4.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:39:52 +02:00
parent 921d3b1cda
commit 330b82b769
4524 changed files with 178689 additions and 43575 deletions
-2
View File
@@ -1,2 +0,0 @@
*.d
TAGS
+13 -3
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SteppingManager.cc,v 1.23 2001/12/04 17:15:50 radoone Exp $
// GEANT4 tag $Name: geant4-04-00 $
// $Id: G4SteppingManager.cc,v 1.28 2002/02/07 04:00:22 tsasaki Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------
@@ -259,9 +259,10 @@ void G4SteppingManager::SetInitialStep(G4Track* valueTrack)
// If the primary track has 'zero' kinetic energy, set the track
// state to 'StopButAlive'.
if(fTrack->GetKineticEnergy() <= 0.0){
fTrack->SetTrackStatus( fStopButAlive );
fTrack->SetTrackStatus( fStopButAlive );
}
// Set Touchable to track and a private attribute of G4SteppingManager
@@ -296,6 +297,15 @@ void G4SteppingManager::SetInitialStep(G4Track* valueTrack)
// If track is already outside the world boundary, kill it
if( fCurrentVolume==0 ){
// If the track is a primary, stop processing
if(fTrack->GetParentID()==0)
{
G4cerr << "Primary particle starting at "
<< fTrack->GetPosition()
<< " is outside of the world volume." << G4endl;
G4Exception("G4SteppingManager::Primary vertex outside of the world");
}
fTrack->SetTrackStatus( fStopAndKill );
G4cerr << "G4SteppingManager::SetInitialStep(): warning: "
<< "initial track position is outside world! "
+95 -73
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SteppingManager2.cc,v 1.4 2001/11/07 13:14:45 radoone Exp $
// GEANT4 tag $Name: geant4-04-00 $
// $Id: G4SteppingManager2.cc,v 1.5 2002/02/04 01:49:08 tsasaki Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------
@@ -301,15 +301,16 @@ void G4SteppingManager::InvokeAtRestDoItProcs()
-> GetEnergyThreshold(tMaterial);
if( tempSecondaryTrack->GetKineticEnergy()<tProdThreshold ){
G4double currentRange
= G4EnergyLossTables::GetRange(
tempSecondaryTrack->GetDefinition(),
tempSecondaryTrack->GetKineticEnergy(),
tMaterial
);
if (currentRange < CalculateSafety() ){
tBelowCutEnergyAndSafety = true;
}
tBelowCutEnergyAndSafety = true;
if (tempSecondaryTrack-> GetDynamicParticle()->GetCharge() !=0.0) {
G4double currentRange
= G4EnergyLossTables::GetRange(
tempSecondaryTrack->GetDefinition(),
tempSecondaryTrack->GetKineticEnergy(),
tMaterial
);
tBelowCutEnergyAndSafety = (currentRange < CalculateSafety() );
}
}
if( tBelowCutEnergyAndSafety ){
@@ -328,20 +329,27 @@ void G4SteppingManager::InvokeAtRestDoItProcs()
}
}
// If this 2ndry particle has 'zero' kinetic energy, make sure
// it invokes a rest process at the beginning of the tracking
if(tempSecondaryTrack->GetKineticEnergy() <= 0.){
tempSecondaryTrack->SetTrackStatus( fStopButAlive );
}
// Set parentID
tempSecondaryTrack->SetParentID( fTrack->GetTrackID() );
// Set the process pointer which created this track
tempSecondaryTrack->SetCreatorProcess( fCurrentProcess );
// If this 2ndry particle has 'zero' kinetic energy, make sure
// it invokes a rest process at the beginning of the tracking
if(tempSecondaryTrack->GetKineticEnergy() <= 0.){
G4ProcessManager* pm = tempSecondaryTrack->GetDefinition()->GetProcessManager();
if (pm->GetAtRestProcessVector()->entries()>0){
tempSecondaryTrack->SetTrackStatus( fStopButAlive );
fSecondary->push_back( tempSecondaryTrack );
} else {
delete tempSecondaryTrack;
}
} else {
fSecondary->push_back( tempSecondaryTrack );
}
} //end of loop on secondary
fSecondary->push_back ( tempSecondaryTrack );
}
// clear ParticleChange
fParticleChange->Clear();
@@ -405,16 +413,17 @@ void G4SteppingManager::InvokeAlongStepDoItProcs()
tProdThreshold = tempSecondaryTrack->GetDefinition()
-> GetEnergyThreshold(tMaterial);
if( tempSecondaryTrack->GetKineticEnergy()<tProdThreshold ){
G4double currentRange
= G4EnergyLossTables::GetRange(
tempSecondaryTrack->GetDefinition(),
tempSecondaryTrack->GetKineticEnergy(),
tMaterial
);
if (currentRange < CalculateSafety() ){
tBelowCutEnergyAndSafety = true;
}
if( tempSecondaryTrack->GetKineticEnergy()<tProdThreshold ){
tBelowCutEnergyAndSafety = true;
if (tempSecondaryTrack-> GetDynamicParticle()->GetCharge() !=0.0) {
G4double currentRange
= G4EnergyLossTables::GetRange(
tempSecondaryTrack->GetDefinition(),
tempSecondaryTrack->GetKineticEnergy(),
tMaterial
);
tBelowCutEnergyAndSafety = (currentRange < CalculateSafety() );
}
}
if( tBelowCutEnergyAndSafety ){
@@ -433,21 +442,27 @@ void G4SteppingManager::InvokeAlongStepDoItProcs()
}
}
// If this 2ndry particle has 'zero' kinetic energy, make sure
// it invokes a rest process at the beginning of the tracking
if(tempSecondaryTrack->GetKineticEnergy() <= 0.){
tempSecondaryTrack->SetTrackStatus( fStopButAlive );
}
// Set parentID
tempSecondaryTrack->SetParentID( fTrack->GetTrackID() );
// Set the process pointer which created this track
tempSecondaryTrack->SetCreatorProcess( fCurrentProcess );
fSecondary->push_back( tempSecondaryTrack );
}
// If this 2ndry particle has 'zero' kinetic energy, make sure
// it invokes a rest process at the beginning of the tracking
if(tempSecondaryTrack->GetKineticEnergy() <= 0.){
G4ProcessManager* pm = tempSecondaryTrack->GetDefinition()->GetProcessManager();
if (pm->GetAtRestProcessVector()->entries()>0){
tempSecondaryTrack->SetTrackStatus( fStopButAlive );
fSecondary->push_back( tempSecondaryTrack );
} else {
delete tempSecondaryTrack;
}
} else {
fSecondary->push_back( tempSecondaryTrack );
}
} //end of loop on secondary
// Set the track status according to what the process defined
fTrack->SetTrackStatus( fParticleChange->GetStatusChange() );
@@ -511,53 +526,60 @@ void G4SteppingManager::InvokePostStepDoItProcs()
// Check if the particle should be passed without coherent cut
if(tApplyCutFlag){
tBelowCutEnergyAndSafety = false;
tMaterial = fPostStepPoint->GetMaterial();
tProdThreshold = tempSecondaryTrack->GetDefinition()
-> GetEnergyThreshold(tMaterial);
if( tempSecondaryTrack->GetKineticEnergy()<tProdThreshold ){
G4double currentRange
= G4EnergyLossTables::GetRange(
tempSecondaryTrack->GetDefinition(),
tempSecondaryTrack->GetKineticEnergy(),
tMaterial
);
if (currentRange < CalculateSafety() ){
tBelowCutEnergyAndSafety = true;
}
}
if( tBelowCutEnergyAndSafety ){
if( !(tempSecondaryTrack->IsGoodForTracking()) ){
tBelowCutEnergyAndSafety = false;
tMaterial = fPostStepPoint->GetMaterial();
tProdThreshold = tempSecondaryTrack->GetDefinition()
-> GetEnergyThreshold(tMaterial);
if( tempSecondaryTrack->GetKineticEnergy()<tProdThreshold ){
tBelowCutEnergyAndSafety = true;
if (tempSecondaryTrack-> GetDynamicParticle()->GetCharge() !=0.0) {
G4double currentRange
= G4EnergyLossTables::GetRange(
tempSecondaryTrack->GetDefinition(),
tempSecondaryTrack->GetKineticEnergy(),
tMaterial
);
tBelowCutEnergyAndSafety = (currentRange < CalculateSafety() );
}
}
if( tBelowCutEnergyAndSafety ){
if( !(tempSecondaryTrack->IsGoodForTracking()) ){
//// G4cout << "!! Warning - G4SteppingManager:" << G4endl;
//// << " This physics process generated a secondary"
//// << " of which energy is below cut but"
//// << " GoodForTracking is off !!!!!" << G4endl;
// Add kinetic energy to the total energy deposit
fStep->AddTotalEnergyDeposit(
tempSecondaryTrack->GetKineticEnergy() );
tempSecondaryTrack->SetKineticEnergy(0.0);
}
}
// Add kinetic energy to the total energy deposit
fStep->AddTotalEnergyDeposit(
tempSecondaryTrack->GetKineticEnergy() );
tempSecondaryTrack->SetKineticEnergy(0.0);
}
}
}
// If this 2ndry particle has 'zero' kinetic energy, make sure
// it invokes a rest process at the beginning of the tracking
if(tempSecondaryTrack->GetKineticEnergy() <= 0.){
tempSecondaryTrack->SetTrackStatus( fStopButAlive );
}
// Set parentID
tempSecondaryTrack->SetParentID( fTrack->GetTrackID() );
// Set the process pointer which created this track
tempSecondaryTrack->SetCreatorProcess( fCurrentProcess );
fSecondary->push_back( tempSecondaryTrack );
}
// If this 2ndry particle has 'zero' kinetic energy, make sure
// it invokes a rest process at the beginning of the tracking
if(tempSecondaryTrack->GetKineticEnergy() <= 0.){
G4ProcessManager* pm = tempSecondaryTrack->GetDefinition()->GetProcessManager();
if (pm->GetAtRestProcessVector()->entries()>0){
tempSecondaryTrack->SetTrackStatus( fStopButAlive );
fSecondary->push_back( tempSecondaryTrack );
} else {
delete tempSecondaryTrack;
}
} else {
fSecondary->push_back( tempSecondaryTrack );
}
} //end of loop on secondary
// Set the track status according to what the process defined
fTrack->SetTrackStatus( fParticleChange->GetStatusChange() );
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4SteppingVerbose.cc,v 1.10 2001/12/06 10:04:59 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------
+3 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4TrackingManager.cc,v 1.10 2001/11/07 12:39:11 radoone Exp $
// GEANT4 tag $Name: geant4-04-00 $
// $Id: G4TrackingManager.cc,v 1.11 2002/04/25 20:21:14 asaim Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------
@@ -149,6 +149,7 @@ void G4TrackingManager::SetTrajectory(G4VTrajectory* aTrajectory)
void G4TrackingManager::EventAborted()
//////////////////////////////////////
{
fpTrack->SetTrackStatus( fKillTrackAndSecondaries );
}
//************************************************************************
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrackingMessenger.cc,v 1.8 2001/07/11 10:08:43 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4Trajectory.cc,v 1.14 2001/11/07 10:45:37 radoone Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// ---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrajectoryPoint.cc,v 1.6 2001/07/11 10:08:43 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// ---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UserSteppingAction.cc,v 1.6 2001/07/11 10:08:43 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// ---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UserTrackingAction.cc,v 1.6 2001/07/11 10:08:43 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
// ---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VSteppingVerbose.cc,v 1.7 2001/11/07 13:15:18 radoone Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------