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
+36 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.27 2001/12/06 10:06:43 gcosmo Exp $
$Id: History,v 1.34 2002/04/25 20:21:13 asaim Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,41 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Apr 25, 02 M.Asai (tracking-V04-00-05)
- G4TrackingManager.cc
o Implement EventAborted() method
Feb 07. 02 T.Sasaki (tracking-V04-00-04)
- G4SteppingManager.cc
o Withdrawal of the fix in tracking-V04-00-02
Feb 04, 02 G.Cosmo (tracking-V04-00-03)
- G4SteppingManager.hh
o moved 'SizeOfSelectedDoItVector' to global scope again, to allow porting on
WIN-VC compiler. As private member, the following error is reported:
- illegal pure syntax, must be '= 0' -
- 'SizeOfSelectedDoItVector' : pure specifier can only be specified for functions -
Feb 03, 02 T.Sasaki and H.Kurashige
- G4SteppingManager2.cc
o fix for extra steps when the ApplyCuts flag is set
Jan 23, 02 T.Sasaki(tracking-V04-00-02)
- G4SteppingManager.cc
o safe comparison between floating numbers (0.0->DBL_MIN)
Jan 22, 02 M.Asai (tracking-V04-00-01)
- G4SteppingManager.cc
o Issue G4Exception if a primary track starts outside of the world.
Jan 21, 02 T.Sasaki (tracking-V04-00-00)
- G4SteppingManager[.hh.cc]:
o Fixed a bug for particles below threshold. Avoid double steps.
If any of decay process might not set the GoodForTracking flag
properly, the particle will be killed.
o moved static variable SizeOfSelectedDoItVector from the global
to class scope.
Dec 06, 01 G.Cosmo (tracking-V03-02-05)
- G4SteppingVerbose.cc: removed trigraph warning on Linux-g++.
+15 -19
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SteppingManager.hh,v 1.18 2001/11/07 13:02:07 radoone Exp $
// GEANT4 tag $Name: geant4-04-00 $
// $Id: G4SteppingManager.hh,v 1.20 2002/02/04 07:58:47 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
//---------------------------------------------------------------
//
@@ -51,19 +51,18 @@ class G4SteppingManager;
#ifndef G4SteppingManager_h
#define G4SteppingManager_h 1
#include "G4ios.hh" // Include from 'system'
#include "g4std/iomanip" // Include from 'system'
#include "g4std/vector" // Include from 'system'
class G4VSensitiveDetector;
#include "G4ios.hh" // Include from 'system'
#include "g4std/iomanip" // Include from 'system'
#include "g4std/vector" // Include from 'system'
#include "globals.hh" // Include from 'global'
#include "Randomize.hh" // Include from 'global'
#include "G4Navigator.hh" // Include from 'geometry'
#include "G4LogicalVolume.hh" // Include from 'geometry'
#include "G4VPhysicalVolume.hh" // Include from 'geometry'
//#include "G4VSensitiveDetector.hh" // Include from 'hits/digi'
class G4VSensitiveDetector;
#include "G4ProcessManager.hh" // Include from 'piim'
//#include "G4DynamicParticleVector.hh" // Include from 'piim'
//#include "G4Hit.hh" // Include from 'Hit/dig'
#include "G4Track.hh" // Include from 'tracking'
#include "G4TrackVector.hh" // Include from 'tracking'
@@ -72,13 +71,11 @@ class G4VSensitiveDetector;
#include "G4UserSteppingAction.hh" // Include from 'tracking'
#include "G4Step.hh" // Include from 'tracking'
#include "G4StepPoint.hh" // Include from 'tracking'
#include "G4VSteppingVerbose.hh" // Include from 'tracking'
#include "G4TouchableHandle.hh" // Include from 'geometry'
#include "G4VSteppingVerbose.hh" // Include from 'tracking'
#include "G4TouchableHandle.hh" // Include from 'geometry'
#include "G4TouchableHistoryHandle.hh" // Include from 'geometry'
// must be changed in elegant way
static const size_t SizeOfSelectedDoItVector=100;
// RogueWave Tools.h++
//
typedef G4std::vector<G4int>
G4SelectedAtRestDoItVector;
typedef G4std::vector<G4int>
@@ -86,10 +83,14 @@ static const size_t SizeOfSelectedDoItVector=100;
typedef G4std::vector<G4int>
G4SelectedPostStepDoItVector;
static const size_t SizeOfSelectedDoItVector=100;
// In global scope for porting on WIN-VC compiler...
///////////////////////
class G4SteppingManager
///////////////////////
{
//--------
public: //without description
//--------
@@ -499,8 +500,3 @@ public: //without description
#endif
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4SteppingVerbose.hh,v 1.9 2001/07/11 10:08:40 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrackVector.hh,v 1.8 2001/07/11 10:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrackingManager.hh,v 1.13 2001/07/11 10:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrackingMessenger.hh,v 1.7 2001/07/11 10:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4Trajectory.hh,v 1.14 2001/11/07 10:39:46 radoone Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrajectoryPoint.hh,v 1.7 2001/07/11 10:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4UserSteppingAction.hh,v 1.7 2001/07/11 10:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4UserTrackingAction.hh,v 1.8 2001/07/11 10:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4VSteppingVerbose.hh,v 1.13 2001/11/07 13:04:50 radoone Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VTrajectory.hh,v 1.6 2001/07/11 10:08:42 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
//
//---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4VTrajectoryPoint.hh,v 1.5 2001/07/11 10:08:42 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// GEANT4 tag $Name: geant4-04-01 $
//
// class description
-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 $
//
//
//---------------------------------------------------------------