Import Geant4 5.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:15:15 +02:00
parent 37fff30d2e
commit fbd4999cf7
4396 changed files with 56662 additions and 52446 deletions
+16 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.58 2002/12/12 16:26:55 gcosmo Exp $
$Id: History,v 1.62 2003/04/11 11:43:29 asaim Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,21 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Apr 11, 2003 M.Asai (tracking-V05-00-03)
- Recover "ApplyCuts" under "cuts-per-region"
Apr 10, 2003 T.Sasaki (tracking-V05-00-02)
- G4SteppingManger2.cc: Fix for the uninitilized variable
Mar 17, 2003, G.Cosmo (tracking-V05-00-01)
- G4SteppingVerbose.cc: fixed retrieval of phys-volume name, adding
check for NULL pointer for post-step physical volume returned.
Dec 16, 2002, G.Cosmo (tracking-V05-00-00)
- Merged branch "geant4-04-01-ref-02-cuts-branch" to HEAD.
Included development for 'cuts-by-region':
o Modified implementation of stepping to cope with new scheme for
cuts and regions.
Dec 12, 2002, G.Cosmo (tracking-V04-01-15)
- G4SteppingVerbose.cc: undo change introduced in tag "tracking-V04-01-07", where
call to CopyState() in TrackingStarted() method was commented out, probably by
@@ -22,7 +22,7 @@
//
//
// $Id: G4SmoothTrajectory.hh,v 1.4 2002/11/05 16:15:50 jacek Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4SmoothTrajectoryPoint.hh,v 1.6 2002/11/08 23:44:36 jacek Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
+3 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SteppingManager.hh,v 1.22 2002/11/06 02:24:34 tsasaki Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: G4SteppingManager.hh,v 1.23 2003/04/11 11:43:30 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//---------------------------------------------------------------
//
@@ -199,6 +199,7 @@ public: //without description
void SetNavigator(G4Navigator* value);
G4double CalculateSafety();
// Return the estimated safety value at the PostStepPoint
void ApplyProductionCut(G4Track*);
// Member data
+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-05-00 $
// GEANT4 tag $Name: geant4-05-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-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrackingManager.hh,v 1.14 2002/08/13 18:14:42 asaim Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrackingMessenger.hh,v 1.7 2001/07/11 10:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4Trajectory.hh,v 1.17 2002/10/28 11:10:57 johna Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrajectoryPoint.hh,v 1.10 2002/10/28 11:10:57 johna Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4UserSteppingAction.hh,v 1.7 2001/07/11 10:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4UserTrackingAction.hh,v 1.8 2001/07/11 10:08:41 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4VSteppingVerbose.hh,v 1.14 2002/12/04 23:00:50 tsasaki Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VTrajectory.hh,v 1.11 2002/11/08 18:17:04 johna Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4VTrajectoryPoint.hh,v 1.9 2002/10/28 11:10:58 johna Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4SmoothTrajectory.cc,v 1.8 2002/11/11 13:13:02 johna Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4SmoothTrajectoryPoint.cc,v 1.8 2002/12/06 12:16:44 johna Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4SteppingManager.cc,v 1.30 2002/12/04 23:00:50 tsasaki Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
+56 -127
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SteppingManager2.cc,v 1.9 2002/11/07 21:31:57 tsasaki Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: G4SteppingManager2.cc,v 1.12 2003/04/11 11:43:30 asaim Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
@@ -46,7 +46,6 @@
#include "G4SteppingControl.hh"
#include "G4TransportationManager.hh"
#include "G4UserLimits.hh"
#include "G4EnergyLossTables.hh"
#include "G4SteppingManager.hh"
/////////////////////////////////////////////////
@@ -230,6 +229,7 @@ void G4SteppingManager::InvokeAtRestDoItProcs()
// returns the time before a process occurs.
G4double lifeTime, shortestLifeTime;
fAtRestDoItProcTriggered = 0;
fN2ndariesAtRestDoIt = 0;
shortestLifeTime = DBL_MAX;
@@ -291,53 +291,14 @@ void G4SteppingManager::InvokeAtRestDoItProcs()
// Now Store the secondaries from ParticleChange to SecondaryList
G4Track* tempSecondaryTrack;
G4bool tApplyCutFlag;
G4double tProdThreshold;
G4Material* tMaterial;
G4double tBelowCutEnergyAndSafety;
fN2ndariesAtRestDoIt = fParticleChange->GetNumberOfSecondaries();
for(G4int DSecLoop=0 ; DSecLoop< fN2ndariesAtRestDoIt; DSecLoop++){
tempSecondaryTrack = fParticleChange->GetSecondary(DSecLoop);
tApplyCutFlag = tempSecondaryTrack->GetDefinition()
->GetApplyCutsFlag();
// 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 ){
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);
}
}
}
if(tempSecondaryTrack->GetDefinition()->GetApplyCutsFlag())
{ ApplyProductionCut(tempSecondaryTrack); }
// Set parentID
tempSecondaryTrack->SetParentID( fTrack->GetTrackID() );
@@ -404,53 +365,14 @@ void G4SteppingManager::InvokeAlongStepDoItProcs()
// Now Store the secondaries from ParticleChange to SecondaryList
G4Track* tempSecondaryTrack;
G4bool tApplyCutFlag;
G4double tProdThreshold;
G4Material* tMaterial;
G4double tBelowCutEnergyAndSafety;
fN2ndariesAlongStepDoIt = fParticleChange->GetNumberOfSecondaries();
for(G4int DSecLoop=0 ; DSecLoop< fN2ndariesAlongStepDoIt; DSecLoop++){
tempSecondaryTrack = fParticleChange->GetSecondary(DSecLoop);
tApplyCutFlag = tempSecondaryTrack->GetDefinition()
->GetApplyCutsFlag();
// 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 ){
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);
}
}
}
if(tempSecondaryTrack->GetDefinition()->GetApplyCutsFlag())
{ ApplyProductionCut(tempSecondaryTrack); }
// Set parentID
tempSecondaryTrack->SetParentID( fTrack->GetTrackID() );
@@ -543,54 +465,15 @@ void G4SteppingManager::InvokePSDIP(size_t np)
// Now Store the secondaries from ParticleChange to SecondaryList
G4Track* tempSecondaryTrack;
G4bool tApplyCutFlag;
G4double tProdThreshold;
G4Material* tMaterial;
G4double tBelowCutEnergyAndSafety;
fN2ndariesPostStepDoIt = fParticleChange->GetNumberOfSecondaries();
for(G4int DSecLoop=0 ; DSecLoop< fN2ndariesPostStepDoIt; DSecLoop++){
tempSecondaryTrack = fParticleChange->GetSecondary(DSecLoop);
tApplyCutFlag = tempSecondaryTrack->GetDefinition()
->GetApplyCutsFlag();
// 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 ){
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);
}
}
}
if(tempSecondaryTrack->GetDefinition()->GetApplyCutsFlag())
{ ApplyProductionCut(tempSecondaryTrack); }
// Set parentID
tempSecondaryTrack->SetParentID( fTrack->GetTrackID() );
@@ -618,3 +501,49 @@ void G4SteppingManager::InvokePSDIP(size_t np)
// clear ParticleChange
fParticleChange->Clear();
}
#include "G4EnergyLossTables.hh"
#include "G4ProductionCuts.hh"
#include "G4ProductionCutsTable.hh"
void G4SteppingManager::ApplyProductionCut(G4Track* aSecondary)
{
G4bool tBelowCutEnergyAndSafety = false;
G4int tPtclIdx
= G4ProductionCuts::GetIndex(aSecondary->GetDefinition());
G4ProductionCutsTable* tCutsTbl
= G4ProductionCutsTable::GetProductionCutsTable();
G4int tCoupleIdx
= tCutsTbl->GetCoupleIndex(fPreStepPoint->GetMaterialCutsCouple());
G4double tProdThreshold
= (*(tCutsTbl->GetEnergyCutsVector(tPtclIdx)))[tCoupleIdx];
if( aSecondary->GetKineticEnergy()<tProdThreshold )
{
tBelowCutEnergyAndSafety = true;
if(aSecondary->GetDynamicParticle()->GetCharge() !=0.0)
{
G4double currentRange
= G4EnergyLossTables::GetRange(aSecondary->GetDefinition(),
aSecondary->GetKineticEnergy(),
fPreStepPoint->GetMaterialCutsCouple());
tBelowCutEnergyAndSafety = (currentRange < CalculateSafety() );
}
}
if( tBelowCutEnergyAndSafety )
{
if( !(aSecondary->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(
aSecondary->GetKineticEnergy() );
aSecondary->SetKineticEnergy(0.0);
}
}
}
+14 -5
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SteppingVerbose.cc,v 1.12 2002/12/12 16:16:41 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: G4SteppingVerbose.cc,v 1.13 2003/03/17 11:13:24 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
@@ -708,6 +708,7 @@ void G4SteppingVerbose::VerboseParticleChange()
void G4SteppingVerbose::ShowStep() const
////////////////////////////////////////
{
G4String volName;
// Show header
G4cout << G4endl;
@@ -771,9 +772,17 @@ void G4SteppingVerbose::ShowStep() const
G4cout << " Velocity (mm/ns) : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetVelocity()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetVelocity() << G4endl;
G4cout << " Volume Name : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetPhysicalVolume()->GetName() << G4endl;
G4cout << " Volume Name : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetPhysicalVolume()->GetName();
if (fStep->GetPostStepPoint()->GetPhysicalVolume())
{
volName = fStep->GetPostStepPoint()->GetPhysicalVolume()->GetName();
}
else
{
volName = "OutOfWorld";
}
G4cout << G4std::setw(20) << volName << G4endl;
G4cout << " Safety (mm) : "
<< G4std::setw(20) << fStep->GetPreStepPoint()->GetSafety()
<< G4std::setw(20) << fStep->GetPostStepPoint()->GetSafety() << G4endl;
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrackingManager.cc,v 1.13 2002/08/21 22:50:52 asaim Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
+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-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4Trajectory.cc,v 1.20 2002/11/08 18:27:40 johna Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrajectoryPoint.cc,v 1.10 2002/11/08 18:28:29 johna Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-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-05-00 $
// GEANT4 tag $Name: geant4-05-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-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VSteppingVerbose.cc,v 1.9 2002/12/04 23:00:51 tsasaki Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VTrajectory.cc,v 1.3 2002/12/12 13:13:27 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// ---------------------------------------------------------------