Import Geant4 10.5.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2018-06-29 10:58:11 +02:00
parent fe81a77428
commit 6aa23be517
1581 changed files with 124288 additions and 83758 deletions
+12 -3
View File
@@ -1,4 +1,4 @@
$Id: History 106991 2017-10-31 10:13:42Z gcosmo $
$Id: History 110262 2018-05-17 14:25:55Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -17,11 +17,20 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
May 17, 2018, J.Madsen (tracking-V10-04-01)
- updated "thread-local-static-var" model to
"function-returning-thread-local-static-reference" model
which fixes Windows DLL + MT
April 2, 2018, M.Asai (tracking-V10-04-00)
- G4SteppingManager : remove unnecessary checks of process manager for
generic ion and muonic atom.
October 23, 2017, K.L.Genser (tracking-V10-03-02)
- G4StackManager added #ifdef for the case when a particle IsMuonicAtom
- G4SteppingManager added #ifdef for the case when a particle IsMuonicAtom
September 12, 2017, K.L.Genser (tracking-V10-03-01)
- G4StackManager added a case when a particle IsMuonicAtom
- G4SteppingManager added a case when a particle IsMuonicAtom
Dec 22, 2016 L.Desorgher (tracking-V10-03-00)
- Modification in G4AdjointSteppingAction for correction of a bug in the case of reverse
+6 -7
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4RichTrajectory.hh 90219 2015-05-21 08:07:27Z gcosmo $
// $Id: G4RichTrajectory.hh 110262 2018-05-17 14:25:55Z gcosmo $
//
//---------------------------------------------------------------
//
@@ -110,19 +110,18 @@ private:
};
extern G4TRACKING_DLL G4ThreadLocal
G4Allocator<G4RichTrajectory> *aRichTrajectoryAllocator;
extern G4TRACKING_DLL G4Allocator<G4RichTrajectory>*& aRichTrajectoryAllocator();
inline void* G4RichTrajectory::operator new(size_t)
{
if (!aRichTrajectoryAllocator)
{ aRichTrajectoryAllocator = new G4Allocator<G4RichTrajectory>; }
return (void*)aRichTrajectoryAllocator->MallocSingle();
if (!aRichTrajectoryAllocator())
{ aRichTrajectoryAllocator() = new G4Allocator<G4RichTrajectory>; }
return (void*)aRichTrajectoryAllocator()->MallocSingle();
}
inline void G4RichTrajectory::operator delete(void* aRichTrajectory)
{
aRichTrajectoryAllocator->FreeSingle((G4RichTrajectory*)aRichTrajectory);
aRichTrajectoryAllocator()->FreeSingle((G4RichTrajectory*)aRichTrajectory);
}
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4RichTrajectoryPoint.hh 69003 2013-04-15 09:25:23Z gcosmo $
// $Id: G4RichTrajectoryPoint.hh 110262 2018-05-17 14:25:55Z gcosmo $
//
//---------------------------------------------------------------
//
@@ -117,19 +117,18 @@ private:
G4double fPostStepPointWeight;
};
extern G4TRACKING_DLL G4ThreadLocal
G4Allocator<G4RichTrajectoryPoint> *aRichTrajectoryPointAllocator;
extern G4TRACKING_DLL G4Allocator<G4RichTrajectoryPoint>*& aRichTrajectoryPointAllocator();
inline void* G4RichTrajectoryPoint::operator new(size_t)
{
if (!aRichTrajectoryPointAllocator)
{ aRichTrajectoryPointAllocator = new G4Allocator<G4RichTrajectoryPoint>; }
return (void *) aRichTrajectoryPointAllocator->MallocSingle();
if (!aRichTrajectoryPointAllocator())
{ aRichTrajectoryPointAllocator() = new G4Allocator<G4RichTrajectoryPoint>; }
return (void *) aRichTrajectoryPointAllocator()->MallocSingle();
}
inline void G4RichTrajectoryPoint::operator delete(void *aRichTrajectoryPoint)
{
aRichTrajectoryPointAllocator->FreeSingle
aRichTrajectoryPointAllocator()->FreeSingle
((G4RichTrajectoryPoint *) aRichTrajectoryPoint);
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4SmoothTrajectory.hh 69003 2013-04-15 09:25:23Z gcosmo $
// $Id: G4SmoothTrajectory.hh 110262 2018-05-17 14:25:55Z gcosmo $
//
//---------------------------------------------------------------
//
@@ -135,19 +135,18 @@ public:
};
extern G4TRACKING_DLL G4ThreadLocal
G4Allocator<G4SmoothTrajectory> *aSmoothTrajectoryAllocator;
extern G4TRACKING_DLL G4Allocator<G4SmoothTrajectory>*& aSmoothTrajectoryAllocator();
inline void* G4SmoothTrajectory::operator new(size_t)
{
if (!aSmoothTrajectoryAllocator)
{ aSmoothTrajectoryAllocator = new G4Allocator<G4SmoothTrajectory>; }
return (void*)aSmoothTrajectoryAllocator->MallocSingle();
if (!aSmoothTrajectoryAllocator())
{ aSmoothTrajectoryAllocator() = new G4Allocator<G4SmoothTrajectory>; }
return (void*)aSmoothTrajectoryAllocator()->MallocSingle();
}
inline void G4SmoothTrajectory::operator delete(void* aTrajectory)
{
aSmoothTrajectoryAllocator->FreeSingle((G4SmoothTrajectory*)aTrajectory);
aSmoothTrajectoryAllocator()->FreeSingle((G4SmoothTrajectory*)aTrajectory);
}
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4SmoothTrajectoryPoint.hh 69003 2013-04-15 09:25:23Z gcosmo $
// $Id: G4SmoothTrajectoryPoint.hh 110262 2018-05-17 14:25:55Z gcosmo $
//
//---------------------------------------------------------------
//
@@ -92,19 +92,18 @@ public:
std::vector<G4ThreeVector>* fAuxiliaryPointVector;
};
extern G4TRACKING_DLL G4ThreadLocal
G4Allocator<G4SmoothTrajectoryPoint> *aSmoothTrajectoryPointAllocator;
extern G4TRACKING_DLL G4Allocator<G4SmoothTrajectoryPoint>*& aSmoothTrajectoryPointAllocator();
inline void* G4SmoothTrajectoryPoint::operator new(size_t)
{
if (!aSmoothTrajectoryPointAllocator)
{ aSmoothTrajectoryPointAllocator= new G4Allocator<G4SmoothTrajectoryPoint>; }
return (void *) aSmoothTrajectoryPointAllocator->MallocSingle();
if (!aSmoothTrajectoryPointAllocator())
{ aSmoothTrajectoryPointAllocator()= new G4Allocator<G4SmoothTrajectoryPoint>; }
return (void *) aSmoothTrajectoryPointAllocator()->MallocSingle();
}
inline void G4SmoothTrajectoryPoint::operator delete(void *aTrajectoryPoint)
{
aSmoothTrajectoryPointAllocator->FreeSingle((G4SmoothTrajectoryPoint *) aTrajectoryPoint);
aSmoothTrajectoryPointAllocator()->FreeSingle((G4SmoothTrajectoryPoint *) aTrajectoryPoint);
}
#endif
+6 -7
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4Trajectory.hh 69003 2013-04-15 09:25:23Z gcosmo $
// $Id: G4Trajectory.hh 110262 2018-05-17 14:25:55Z gcosmo $
//
//---------------------------------------------------------------
//
@@ -136,19 +136,18 @@ public: // with description
};
extern G4TRACKING_DLL G4ThreadLocal
G4Allocator<G4Trajectory> *aTrajectoryAllocator;
extern G4TRACKING_DLL G4Allocator<G4Trajectory>*& aTrajectoryAllocator();
inline void* G4Trajectory::operator new(size_t)
{
if (!aTrajectoryAllocator)
{ aTrajectoryAllocator = new G4Allocator<G4Trajectory>; }
return (void*)aTrajectoryAllocator->MallocSingle();
if (!aTrajectoryAllocator())
{ aTrajectoryAllocator() = new G4Allocator<G4Trajectory>; }
return (void*)aTrajectoryAllocator()->MallocSingle();
}
inline void G4Trajectory::operator delete(void* aTrajectory)
{
aTrajectoryAllocator->FreeSingle((G4Trajectory*)aTrajectory);
aTrajectoryAllocator()->FreeSingle((G4Trajectory*)aTrajectory);
}
#endif
+7 -7
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4TrajectoryPoint.hh 69003 2013-04-15 09:25:23Z gcosmo $
// $Id: G4TrajectoryPoint.hh 110262 2018-05-17 14:25:55Z gcosmo $
//
//---------------------------------------------------------------
//
@@ -94,19 +94,19 @@ public: // without description
};
extern G4TRACKING_DLL G4ThreadLocal
G4Allocator<G4TrajectoryPoint> *aTrajectoryPointAllocator;
extern G4TRACKING_DLL
G4Allocator<G4TrajectoryPoint>*& aTrajectoryPointAllocator();
inline void* G4TrajectoryPoint::operator new(size_t)
{
if (!aTrajectoryPointAllocator)
{ aTrajectoryPointAllocator = new G4Allocator<G4TrajectoryPoint>; }
return (void *) aTrajectoryPointAllocator->MallocSingle();
if (!aTrajectoryPointAllocator())
{ aTrajectoryPointAllocator() = new G4Allocator<G4TrajectoryPoint>; }
return (void *) aTrajectoryPointAllocator()->MallocSingle();
}
inline void G4TrajectoryPoint::operator delete(void *aTrajectoryPoint)
{
aTrajectoryPointAllocator->FreeSingle((G4TrajectoryPoint *) aTrajectoryPoint);
aTrajectoryPointAllocator()->FreeSingle((G4TrajectoryPoint *) aTrajectoryPoint);
}
#endif
+6 -2
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4RichTrajectory.cc 91269 2015-06-29 07:05:59Z gcosmo $
// $Id: G4RichTrajectory.cc 110262 2018-05-17 14:25:55Z gcosmo $
//
// ---------------------------------------------------------------
//
@@ -58,7 +58,11 @@
#include <sstream>
G4ThreadLocal G4Allocator<G4RichTrajectory> *aRichTrajectoryAllocator = 0;
G4Allocator<G4RichTrajectory>*& aRichTrajectoryAllocator()
{
G4ThreadLocalStatic G4Allocator<G4RichTrajectory>* _instance = nullptr;
return _instance;
}
G4RichTrajectory::G4RichTrajectory():
fpRichPointsContainer(0),
+6 -2
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4RichTrajectoryPoint.cc 69003 2013-04-15 09:25:23Z gcosmo $
// $Id: G4RichTrajectoryPoint.cc 110262 2018-05-17 14:25:55Z gcosmo $
//
//
// ---------------------------------------------------------------
@@ -61,7 +61,11 @@
#include <sstream>
G4ThreadLocal G4Allocator<G4RichTrajectoryPoint> *aRichTrajectoryPointAllocator = 0;
G4Allocator<G4RichTrajectoryPoint>*& aRichTrajectoryPointAllocator()
{
G4ThreadLocalStatic G4Allocator<G4RichTrajectoryPoint>* _instance = nullptr;
return _instance;
}
G4RichTrajectoryPoint::G4RichTrajectoryPoint():
fpAuxiliaryPointVector(0),
+6 -2
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4SmoothTrajectory.cc 69003 2013-04-15 09:25:23Z gcosmo $
// $Id: G4SmoothTrajectory.cc 110262 2018-05-17 14:25:55Z gcosmo $
//
//
// ---------------------------------------------------------------
@@ -53,7 +53,11 @@
#include "G4AttCheck.hh"
#endif
G4ThreadLocal G4Allocator<G4SmoothTrajectory> *aSmoothTrajectoryAllocator = 0;
G4Allocator<G4SmoothTrajectory>*& aSmoothTrajectoryAllocator()
{
G4ThreadLocalStatic G4Allocator<G4SmoothTrajectory>* _instance = nullptr;
return _instance;
}
G4SmoothTrajectory::G4SmoothTrajectory()
: positionRecord(0), fTrackID(0), fParentID(0),
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4SmoothTrajectoryPoint.cc 69003 2013-04-15 09:25:23Z gcosmo $
// $Id: G4SmoothTrajectoryPoint.cc 110262 2018-05-17 14:25:55Z gcosmo $
//
//
// ---------------------------------------------------------------
@@ -45,7 +45,11 @@
#include "G4AttCheck.hh"
#endif
G4ThreadLocal G4Allocator<G4SmoothTrajectoryPoint> *aSmoothTrajectoryPointAllocator = 0;
G4Allocator<G4SmoothTrajectoryPoint>*& aSmoothTrajectoryPointAllocator()
{
G4ThreadLocalStatic G4Allocator<G4SmoothTrajectoryPoint>* _instance = nullptr;
return _instance;
}
G4SmoothTrajectoryPoint::G4SmoothTrajectoryPoint()
: fAuxiliaryPointVector(0)
+56 -20
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4SteppingManager2.cc 106991 2017-10-31 10:13:42Z gcosmo $
// $Id: G4SteppingManager2.cc 109172 2018-04-03 06:49:31Z gcosmo $
//
//---------------------------------------------------------------
//
@@ -369,12 +369,24 @@ void G4SteppingManager::InvokeAtRestDoItProcs()
// it invokes a rest process at the beginning of the tracking
if(tempSecondaryTrack->GetKineticEnergy() <= DBL_MIN){
G4ProcessManager* pm = tempSecondaryTrack->GetDefinition()->GetProcessManager();
if(!pm && tempSecondaryTrack->GetDefinition()->IsGeneralIon())
{ pm = G4ParticleTable::GetParticleTable()->GetGenericIon()->GetProcessManager(); }
#ifdef G4MUATOMS_INUSE
if(!pm && tempSecondaryTrack->GetDefinition()->IsMuonicAtom())
{ pm = G4ParticleTable::GetParticleTable()->GetGenericMuonicAtom()->GetProcessManager(); }
#endif
if(!pm)
{
G4ExceptionDescription ED;
ED << "A track without proper process manager is pushed into the track stack.\n"
<< " Particle name : " << tempSecondaryTrack->GetDefinition()->GetParticleName() << " -- ";
if(tempSecondaryTrack->GetParentID()<0)
{ ED << "created by a primary particle generator."; }
else
{
const G4VProcess* vp = tempSecondaryTrack->GetCreatorProcess();
if(vp)
{ ED << "created by " << vp->GetProcessName() << "."; }
else
{ ED << "creaded by unknown process."; }
}
G4Exception("G4SteppingManager::InvokeAtRestDoItProcs()","Tracking10051",
FatalException,ED);
}
if (pm->GetAtRestProcessVector()->entries()>0){
tempSecondaryTrack->SetTrackStatus( fStopButAlive );
fSecondary->push_back( tempSecondaryTrack );
@@ -408,7 +420,7 @@ void G4SteppingManager::InvokeAlongStepDoItProcs()
// If the current Step is defined by a 'ExclusivelyForced'
// PostStepDoIt, then don't invoke any AlongStepDoIt
if(fStepStatus == fExclusivelyForcedProc){
return; // Take note 'return' at here !!!
return; // Take note 'return' is here !!!
}
// Invoke the all active continuous processes
@@ -449,12 +461,24 @@ void G4SteppingManager::InvokeAlongStepDoItProcs()
// it invokes a rest process at the beginning of the tracking
if(tempSecondaryTrack->GetKineticEnergy() <= DBL_MIN){
G4ProcessManager* pm = tempSecondaryTrack->GetDefinition()->GetProcessManager();
if(!pm && tempSecondaryTrack->GetDefinition()->IsGeneralIon())
{ pm = G4ParticleTable::GetParticleTable()->GetGenericIon()->GetProcessManager(); }
#ifdef G4MUATOMS_INUSE
if(!pm && tempSecondaryTrack->GetDefinition()->IsMuonicAtom())
{ pm = G4ParticleTable::GetParticleTable()->GetGenericMuonicAtom()->GetProcessManager(); }
#endif
if(!pm)
{
G4ExceptionDescription ED;
ED << "A track without proper process manager is pushed into the track stack.\n"
<< " Particle name : " << tempSecondaryTrack->GetDefinition()->GetParticleName() << " -- ";
if(tempSecondaryTrack->GetParentID()<0)
{ ED << "created by a primary particle generator."; }
else
{
const G4VProcess* vp = tempSecondaryTrack->GetCreatorProcess();
if(vp)
{ ED << "created by " << vp->GetProcessName() << "."; }
else
{ ED << "creaded by unknown process."; }
}
G4Exception("G4SteppingManager::InvokeAlongStepDoItProcs()","Tracking10051",
FatalException,ED);
}
if (pm->GetAtRestProcessVector()->entries()>0){
tempSecondaryTrack->SetTrackStatus( fStopButAlive );
fSecondary->push_back( tempSecondaryTrack );
@@ -571,12 +595,24 @@ void G4SteppingManager::InvokePSDIP(size_t np)
// it invokes a rest process at the beginning of the tracking
if(tempSecondaryTrack->GetKineticEnergy() <= DBL_MIN){
G4ProcessManager* pm = tempSecondaryTrack->GetDefinition()->GetProcessManager();
if(!pm && tempSecondaryTrack->GetDefinition()->IsGeneralIon())
{ pm = G4ParticleTable::GetParticleTable()->GetGenericIon()->GetProcessManager(); }
#ifdef G4MUATOMS_INUSE
if(!pm && tempSecondaryTrack->GetDefinition()->IsMuonicAtom())
{ pm = G4ParticleTable::GetParticleTable()->GetGenericMuonicAtom()->GetProcessManager(); }
#endif
if(!pm)
{
G4ExceptionDescription ED;
ED << "A track without proper process manager is pushed into the track stack.\n"
<< " Particle name : " << tempSecondaryTrack->GetDefinition()->GetParticleName() << " -- ";
if(tempSecondaryTrack->GetParentID()<0)
{ ED << "created by a primary particle generator."; }
else
{
const G4VProcess* vp = tempSecondaryTrack->GetCreatorProcess();
if(vp)
{ ED << "created by " << vp->GetProcessName() << "."; }
else
{ ED << "creaded by unknown process."; }
}
G4Exception("G4SteppingManager::InvokePSDIP()","Tracking10053",
FatalException,ED);
}
if (pm->GetAtRestProcessVector()->entries()>0){
tempSecondaryTrack->SetTrackStatus( fStopButAlive );
fSecondary->push_back( tempSecondaryTrack );
+6 -2
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4Trajectory.cc 69003 2013-04-15 09:25:23Z gcosmo $
// $Id: G4Trajectory.cc 110262 2018-05-17 14:25:55Z gcosmo $
//
// ---------------------------------------------------------------
//
@@ -52,7 +52,11 @@
#include "G4AttCheck.hh"
#endif
G4ThreadLocal G4Allocator<G4Trajectory> *aTrajectoryAllocator = 0;
G4Allocator<G4Trajectory>*& aTrajectoryAllocator()
{
G4ThreadLocalStatic G4Allocator<G4Trajectory>* _instance = nullptr;
return _instance;
}
G4Trajectory::G4Trajectory()
: positionRecord(0), fTrackID(0), fParentID(0),
+6 -2
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4TrajectoryPoint.cc 69003 2013-04-15 09:25:23Z gcosmo $
// $Id: G4TrajectoryPoint.cc 110262 2018-05-17 14:25:55Z gcosmo $
//
// ---------------------------------------------------------------
//
@@ -44,7 +44,11 @@
#include "G4AttCheck.hh"
#endif
G4ThreadLocal G4Allocator<G4TrajectoryPoint> *aTrajectoryPointAllocator = 0;
G4Allocator<G4TrajectoryPoint>*& aTrajectoryPointAllocator()
{
G4ThreadLocalStatic G4Allocator<G4TrajectoryPoint>* _instance = nullptr;
return _instance;
}
G4TrajectoryPoint::G4TrajectoryPoint()
{