Import Geant4 10.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 14:11:04 +02:00
parent c9b32a6c0a
commit d4af681f38
4886 changed files with 420149 additions and 1023309 deletions
+12 -1
View File
@@ -1,4 +1,4 @@
$Id: History 78011 2013-12-02 11:32:48Z gcosmo $
$Id: History 88804 2015-03-10 17:12:21Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,17 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
March 10th, 2015 G.Cosmo
- G4ImportanceProcess, G4WeightCutOffProcess: made static thread-local
variables into class data members.
Renamed them accordingly: fEndTrack, feLimited, fParaflag.
- Use const reference for string in argument in SetParallelWorld() in
G4ImportanceProcess, G4WeithCutOffProcess and G4WeightWindowProcess.
February 12th, 2015 J.Apostolakis
- G4WeightWindowProcess: made static thread-local variables into class
data members. Renamed them accordingly: fEndTrack, feLimited, fParaflag.
December 2nd, 2013 A.Howard
- Moved static methods in the initialiser to the body for G4GeometrySampler
and G4ImportanceConfigurator
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4ImportanceProcess.hh 77477 2013-11-25 09:42:24Z gcosmo $
// $Id: G4ImportanceProcess.hh 88804 2015-03-10 17:12:21Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4ImportanceProcess
@@ -56,7 +56,7 @@ class G4VTouchable;
#include "G4FieldTrack.hh"
#include "G4TouchableHandle.hh"
#include "G4MultiNavigator.hh" // For ELimited enum
class G4ImportanceProcess : public G4VProcess, public G4VTrackTerminator
{
@@ -74,10 +74,10 @@ public: // with description
//--------------------------------------------------------------
// Set Paralle World
// Set Parallel World
//--------------------------------------------------------------
void SetParallelWorld(G4String parallelWorldName);
void SetParallelWorld(const G4String &parallelWorldName);
// void SetParallelWorld(const G4VPhysicalVolume* parallelWorld);
//--------------------------------------------------------------
@@ -156,7 +156,9 @@ private:
G4double fGhostSafety;
G4bool fOnBoundary;
G4bool paraflag;
G4bool fParaflag;
G4FieldTrack fEndTrack;
ELimited feLimited;
};
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4WeightCutOffProcess.hh 66241 2012-12-13 18:34:42Z gunter $
// $Id: G4WeightCutOffProcess.hh 88804 2015-03-10 17:12:21Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4WeightCutOffProcess
@@ -53,8 +53,7 @@ class G4VTouchable;
#include "G4FieldTrack.hh"
#include "G4TouchableHandle.hh"
#include "G4MultiNavigator.hh" // For ELimited enum
class G4WeightCutOffProcess : public G4VProcess
{
@@ -74,10 +73,10 @@ public: // with description
//--------------------------------------------------------------
// Set Paralle World
// Set Parallel World
//--------------------------------------------------------------
void SetParallelWorld(G4String parallelWorldName);
void SetParallelWorld(const G4String &parallelWorldName);
void SetParallelWorld(G4VPhysicalVolume* parallelWorld);
//--------------------------------------------------------------
@@ -151,8 +150,9 @@ private:
G4double fGhostSafety;
G4bool fOnBoundary;
G4bool paraflag;
G4bool fParaflag;
G4FieldTrack fEndTrack;
ELimited feLimited;
};
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4WeightWindowProcess.hh 66241 2012-12-13 18:34:42Z gunter $
// $Id: G4WeightWindowProcess.hh 88804 2015-03-10 17:12:21Z gcosmo $
//
// ----------------------------------------------------------------------
// Class G4MassWeioghtWindowProcess
@@ -57,7 +57,7 @@ class G4VTouchable;
#include "G4FieldTrack.hh"
#include "G4TouchableHandle.hh"
#include "G4MultiNavigator.hh" // For ELimited enum
class G4WeightWindowProcess : public G4VProcess, public G4VTrackTerminator
{
@@ -78,10 +78,10 @@ public: // with description
//--------------------------------------------------------------
// Set Paralle World
// Set Parallel World
//--------------------------------------------------------------
void SetParallelWorld(G4String parallelWorldName);
void SetParallelWorld(const G4String &parallelWorldName);
void SetParallelWorld(G4VPhysicalVolume* parallelWorld);
//--------------------------------------------------------------
@@ -162,8 +162,9 @@ private:
G4double fGhostSafety;
G4bool fOnBoundary;
G4bool paraflag;
G4bool fParaflag;
G4FieldTrack fEndTrack;
ELimited feLimited;
};
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4ImportanceProcess.cc 77999 2013-12-02 08:18:01Z gcosmo $
// $Id: G4ImportanceProcess.cc 88804 2015-03-10 17:12:21Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -63,8 +63,7 @@ G4ImportanceProcess(const G4VImportanceAlgorithm &aImportanceAlgorithm,
fPostStepAction(0),
fGhostWorldName("NoParallelWorld"),fGhostWorld(0),
fGhostNavigator(0), fNavigatorID(-1), fFieldTrack('0'),
paraflag(para)
fParaflag(para), fEndTrack('0'), feLimited(kDoNot)
{
G4cout << G4endl << G4endl << G4endl;
G4cout << "G4ImportanceProcess:: Creating " << G4endl;
@@ -97,7 +96,7 @@ G4ImportanceProcess(const G4VImportanceAlgorithm &aImportanceAlgorithm,
G4cout << GetProcessName() << " is created " << G4endl;
}
G4cout << "G4ImportanceProcess:: importance process paraflag is: " << paraflag << G4endl;
G4cout << "G4ImportanceProcess:: importance process paraflag is: " << fParaflag << G4endl;
}
@@ -120,7 +119,7 @@ G4ImportanceProcess::~G4ImportanceProcess()
//
//------------------------------------------------------
void G4ImportanceProcess::
SetParallelWorld(G4String parallelWorldName)
SetParallelWorld(const G4String &parallelWorldName)
{
G4cout << G4endl << G4endl << G4endl;
G4cout << "G4ImportanceProcess:: SetParallelWorld name = " << parallelWorldName << G4endl;
@@ -161,7 +160,7 @@ void G4ImportanceProcess::StartTracking(G4Track* trk)
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// G4cout << " G4ParallelWorldScoringProcess::StartTracking" << G4endl;
if(paraflag) {
if(fParaflag) {
if(fGhostNavigator)
{ fNavigatorID = fTransportationManager->ActivateNavigator(fGhostNavigator); }
else
@@ -214,7 +213,7 @@ G4ImportanceProcess::PostStepDoIt(const G4Track &aTrack,
{
fParticleChange->Initialize(aTrack);
if(paraflag) {
if(fParaflag) {
fOldGhostTouchable = fGhostPostStepPoint->GetTouchableHandle();
//xbug? fOnBoundary = false;
CopyStep(aStep);
@@ -359,13 +358,7 @@ AlongStepGetPhysicalInteractionLength(
const G4Track& track, G4double previousStepSize, G4double currentMinimumStep,
G4double& proposedSafety, G4GPILSelection* selection)
{
//AH G4cout << " along step physical interaction length " << G4endl;
if(paraflag) {
static G4ThreadLocal G4FieldTrack *endTrack_G4MT_TLS_ = 0 ; if (!endTrack_G4MT_TLS_) endTrack_G4MT_TLS_ = new G4FieldTrack ('0') ; G4FieldTrack &endTrack = *endTrack_G4MT_TLS_;
static G4ThreadLocal ELimited *eLimited_G4MT_TLS_ = 0 ; if (!eLimited_G4MT_TLS_) eLimited_G4MT_TLS_ = new ELimited ; ELimited &eLimited = *eLimited_G4MT_TLS_;
if(fParaflag) {
*selection = NotCandidateForSelection;
G4double returnedStep = DBL_MAX;
@@ -394,15 +387,15 @@ AlongStepGetPhysicalInteractionLength(
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
returnedStep
= fPathFinder->ComputeStep(fFieldTrack,currentMinimumStep,fNavigatorID,
track.GetCurrentStepNumber(),fGhostSafety,eLimited,
endTrack,track.GetVolume());
track.GetCurrentStepNumber(),fGhostSafety,feLimited,
fEndTrack,track.GetVolume());
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(eLimited == kDoNot)
if(feLimited == kDoNot)
{
//AH G4cout << " computestep came back with not-boundary " << G4endl;
// Track is not on the boundary
fOnBoundary = false;
fGhostSafety = fGhostNavigator->ComputeSafety(endTrack.GetPosition());
fGhostSafety = fGhostNavigator->ComputeSafety(fEndTrack.GetPosition());
}
else
{
@@ -412,9 +405,9 @@ AlongStepGetPhysicalInteractionLength(
// proposedSafety = fGhostSafety;
}
proposedSafety = fGhostSafety;
if(eLimited == kUnique || eLimited == kSharedOther) {
if(feLimited == kUnique || feLimited == kSharedOther) {
*selection = CandidateForSelection;
}else if (eLimited == kSharedTransport) {
}else if (feLimited == kSharedTransport) {
returnedStep *= (1.0 + 1.0e-9);
// Expand to disable its selection in Step Manager comparison
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4WeightCutOffProcess.cc 77999 2013-12-02 08:18:01Z gcosmo $
// $Id: G4WeightCutOffProcess.cc 88804 2015-03-10 17:12:21Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -66,7 +66,8 @@ G4WeightCutOffProcess(G4double wsurvival,
fIStore(istore),
// fGCellFinder(aGCellFinder),
fGhostWorldName("NoParallelWorld"), fGhostWorld(0),
fGhostNavigator(0), fNavigatorID(-1), fFieldTrack('0')
fGhostNavigator(0), fNavigatorID(-1), fFieldTrack('0'),
fParaflag(para), fEndTrack('0'), feLimited(kDoNot)
{
if (!fParticleChange)
{
@@ -88,9 +89,6 @@ G4WeightCutOffProcess(G4double wsurvival,
{
G4cout << GetProcessName() << " is created " << G4endl;
}
paraflag = para;
}
G4WeightCutOffProcess::~G4WeightCutOffProcess()
@@ -106,7 +104,7 @@ G4WeightCutOffProcess::~G4WeightCutOffProcess()
//
//------------------------------------------------------
void G4WeightCutOffProcess::
SetParallelWorld(G4String parallelWorldName)
SetParallelWorld(const G4String &parallelWorldName)
{
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Get pointers of the parallel world and its navigator
@@ -141,7 +139,7 @@ void G4WeightCutOffProcess::StartTracking(G4Track* trk)
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// G4cout << " G4ParallelWorldScoringProcess::StartTracking" << G4endl;
if(paraflag) {
if(fParaflag) {
if(fGhostNavigator)
{ fNavigatorID = fTransportationManager->ActivateNavigator(fGhostNavigator); }
else
@@ -192,7 +190,7 @@ G4WeightCutOffProcess::PostStepDoIt(const G4Track& aTrack,
{
fParticleChange->Initialize(aTrack);
if(paraflag) {
if(fParaflag) {
fOldGhostTouchable = fGhostPostStepPoint->GetTouchableHandle();
//xbug? fOnBoundary = false;
CopyStep(aStep);
@@ -224,7 +222,7 @@ G4WeightCutOffProcess::PostStepDoIt(const G4Track& aTrack,
}
if(paraflag) {
if(fParaflag) {
G4GeometryCell postCell(*(fGhostPostStepPoint->GetPhysicalVolume()),
fGhostPostStepPoint->GetTouchable()->GetReplicaNumber());
@@ -300,9 +298,7 @@ AlongStepGetPhysicalInteractionLength(
const G4Track& track, G4double previousStepSize, G4double currentMinimumStep,
G4double& proposedSafety, G4GPILSelection* selection)
{
if(paraflag) {
static G4ThreadLocal G4FieldTrack *endTrack_G4MT_TLS_ = 0 ; if (!endTrack_G4MT_TLS_) endTrack_G4MT_TLS_ = new G4FieldTrack ('0') ; G4FieldTrack &endTrack = *endTrack_G4MT_TLS_;
static G4ThreadLocal ELimited *eLimited_G4MT_TLS_ = 0 ; if (!eLimited_G4MT_TLS_) eLimited_G4MT_TLS_ = new ELimited ; ELimited &eLimited = *eLimited_G4MT_TLS_;
if(fParaflag) {
*selection = NotCandidateForSelection;
G4double returnedStep = DBL_MAX;
@@ -331,14 +327,14 @@ AlongStepGetPhysicalInteractionLength(
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
returnedStep
= fPathFinder->ComputeStep(fFieldTrack,currentMinimumStep,fNavigatorID,
track.GetCurrentStepNumber(),fGhostSafety,eLimited,
endTrack,track.GetVolume());
track.GetCurrentStepNumber(),fGhostSafety,feLimited,
fEndTrack,track.GetVolume());
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(eLimited == kDoNot)
if(feLimited == kDoNot)
{
// Track is not on the boundary
fOnBoundary = false;
fGhostSafety = fGhostNavigator->ComputeSafety(endTrack.GetPosition());
fGhostSafety = fGhostNavigator->ComputeSafety(fEndTrack.GetPosition());
}
else
{
@@ -347,9 +343,9 @@ AlongStepGetPhysicalInteractionLength(
proposedSafety = fGhostSafety;
}
//xbug? proposedSafety = fGhostSafety;
if(eLimited == kUnique || eLimited == kSharedOther) {
if(feLimited == kUnique || feLimited == kSharedOther) {
*selection = CandidateForSelection;
}else if (eLimited == kSharedTransport) {
}else if (feLimited == kSharedTransport) {
returnedStep *= (1.0 + 1.0e-9);
// Expand to disable its selection in Step Manager comparison
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4WeightWindowProcess.cc 77999 2013-12-02 08:18:01Z gcosmo $
// $Id: G4WeightWindowProcess.cc 88804 2015-03-10 17:12:21Z gcosmo $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -65,7 +65,8 @@ G4WeightWindowProcess::G4WeightWindowProcess(
fPostStepAction(0),
fPlaceOfAction(placeOfAction),
fGhostWorldName("NoParallelWorld"),fGhostWorld(0),
fGhostNavigator(0), fNavigatorID(-1), fFieldTrack('0')
fGhostNavigator(0), fNavigatorID(-1), fFieldTrack('0'),
fParaflag(), fEndTrack('0'), feLimited(kDoNot)
{
if (TrackTerminator)
{
@@ -95,7 +96,7 @@ G4WeightWindowProcess::G4WeightWindowProcess(
G4cout << GetProcessName() << " is created " << G4endl;
}
paraflag = para;
fParaflag = para;
}
@@ -115,7 +116,7 @@ G4WeightWindowProcess::~G4WeightWindowProcess()
//
//------------------------------------------------------
void G4WeightWindowProcess::
SetParallelWorld(G4String parallelWorldName)
SetParallelWorld(const G4String &parallelWorldName)
{
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Get pointers of the parallel world and its navigator
@@ -150,7 +151,7 @@ void G4WeightWindowProcess::StartTracking(G4Track* trk)
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// G4cout << " G4ParallelWorldScoringProcess::StartTracking" << G4endl;
if(paraflag) {
if(fParaflag) {
if(fGhostNavigator)
{ fNavigatorID = fTransportationManager->ActivateNavigator(fGhostNavigator); }
else
@@ -203,7 +204,7 @@ G4WeightWindowProcess::PostStepDoIt(const G4Track &aTrack,
fParticleChange->Initialize(aTrack);
if(paraflag) {
if(fParaflag) {
fOldGhostTouchable = fGhostPostStepPoint->GetTouchableHandle();
//xbug? fOnBoundary = false;
CopyStep(aStep);
@@ -242,7 +243,7 @@ G4WeightWindowProcess::PostStepDoIt(const G4Track &aTrack,
// (aStep.GetPostStepPoint()->GetStepStatus() == fGeomBoundary) )
// || ( (fPlaceOfAction == onCollision) &&
// (aStep.GetPostStepPoint()->GetStepStatus() != fGeomBoundary) ) )
if(paraflag) {
if(fParaflag) {
if ( ( fPlaceOfAction == onBoundaryAndCollision)
|| ( (fPlaceOfAction == onBoundary) &&
(fGhostPostStepPoint->GetStepStatus() == fGeomBoundary) )
@@ -302,10 +303,8 @@ AlongStepGetPhysicalInteractionLength(
const G4Track& track, G4double previousStepSize, G4double currentMinimumStep,
G4double& proposedSafety, G4GPILSelection* selection)
{
if(paraflag) {
static G4ThreadLocal G4FieldTrack *endTrack_G4MT_TLS_ = 0 ; if (!endTrack_G4MT_TLS_) endTrack_G4MT_TLS_ = new G4FieldTrack ('0') ; G4FieldTrack &endTrack = *endTrack_G4MT_TLS_;
static G4ThreadLocal ELimited *eLimited_G4MT_TLS_ = 0 ; if (!eLimited_G4MT_TLS_) eLimited_G4MT_TLS_ = new ELimited ; ELimited &eLimited = *eLimited_G4MT_TLS_;
if(fParaflag)
{
*selection = NotCandidateForSelection;
G4double returnedStep = DBL_MAX;
@@ -333,14 +332,15 @@ AlongStepGetPhysicalInteractionLength(
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
returnedStep
= fPathFinder->ComputeStep(fFieldTrack,currentMinimumStep,fNavigatorID,
track.GetCurrentStepNumber(),fGhostSafety,eLimited,
endTrack,track.GetVolume());
track.GetCurrentStepNumber(),fGhostSafety,feLimited,
fEndTrack,track.GetVolume());
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(eLimited == kDoNot)
if(feLimited == kDoNot)
{
// Track is not on the boundary
fOnBoundary = false;
fGhostSafety = fGhostNavigator->ComputeSafety(endTrack.GetPosition());
fGhostSafety = fGhostNavigator->ComputeSafety(fEndTrack.GetPosition());
// fGhostSafety = fGhostNavigator->ComputeSafety(endTrack.GetPosition(), DBL_MAX, true);
}
else
{
@@ -349,9 +349,9 @@ AlongStepGetPhysicalInteractionLength(
proposedSafety = fGhostSafety;
}
//xbug? proposedSafety = fGhostSafety;
if(eLimited == kUnique || eLimited == kSharedOther) {
if(feLimited == kUnique || feLimited == kSharedOther) {
*selection = CandidateForSelection;
}else if (eLimited == kSharedTransport) {
}else if (feLimited == kSharedTransport) {
returnedStep *= (1.0 + 1.0e-9);
// Expand to disable its selection in Step Manager comparison
}