Import Geant4 10.4.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History 102617 2017-02-10 07:58:33Z gcosmo $
|
||||
$Id: History 107562 2017-11-22 15:39:24Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -14,6 +14,12 @@ introduced in the code and keeptrack of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
22-Nov-2017, V. Ivanchenko (phys-ctor-limiters-V10-03-02)
|
||||
- G4StepLimiterPhysics - fixed thread safety - removed possible
|
||||
race condition
|
||||
- G4NeutronTrackingCut - cosmetic change (removed commented code,
|
||||
added explicit builder type)
|
||||
|
||||
09-Feb-2017, M. Asai (phys-ctor-limiters-V10-03-00)
|
||||
- Print-out of G4NeutronTrackingCut is made only for the master thread.
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4NeutronTrackingCut.hh 83417 2014-08-21 15:29:32Z gcosmo $
|
||||
// $Id: G4NeutronTrackingCut.hh 107562 2017-11-22 15:39:24Z gcosmo $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -64,8 +64,6 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
//G4NeutronKiller* pNeutronKiller;
|
||||
|
||||
G4double timeLimit;
|
||||
G4double kineticEnergyLimit;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4StepLimiterPhysics.hh 98777 2016-08-09 14:37:59Z gcosmo $
|
||||
// $Id: G4StepLimiterPhysics.hh 107562 2017-11-22 15:39:24Z gcosmo $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -68,8 +68,6 @@ private:
|
||||
G4StepLimiterPhysics & operator=(const G4StepLimiterPhysics &right);
|
||||
G4StepLimiterPhysics(const G4StepLimiterPhysics&);
|
||||
|
||||
G4StepLimiter* fStepLimiter;
|
||||
G4UserSpecialCuts* fUserSpecialCuts;
|
||||
G4bool fApplyToAll;
|
||||
};
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4NeutronTrackingCut.cc 102617 2017-02-10 07:58:33Z gcosmo $
|
||||
// $Id: G4NeutronTrackingCut.cc 107562 2017-11-22 15:39:24Z gcosmo $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "G4NeutronKiller.hh"
|
||||
#include "G4HadronicProcessStore.hh"
|
||||
|
||||
#include "G4BuilderType.hh"
|
||||
#include "G4Threading.hh"
|
||||
|
||||
// factory
|
||||
@@ -54,19 +55,16 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4NeutronTrackingCut);
|
||||
//
|
||||
|
||||
G4NeutronTrackingCut::G4NeutronTrackingCut(G4int ver)
|
||||
: G4VPhysicsConstructor("neutronTrackingCut")
|
||||
, verbose(ver)
|
||||
: G4VPhysicsConstructor("neutronTrackingCut"), verbose(ver)
|
||||
{
|
||||
timeLimit = 10.*microsecond;
|
||||
kineticEnergyLimit = 0.0;
|
||||
SetPhysicsType(bUnknown);
|
||||
}
|
||||
|
||||
G4NeutronTrackingCut::G4NeutronTrackingCut(const G4String& name, G4int ver)
|
||||
: G4VPhysicsConstructor(name), verbose(ver)
|
||||
{
|
||||
timeLimit = 10.*microsecond;
|
||||
kineticEnergyLimit = 0.0;
|
||||
}
|
||||
G4NeutronTrackingCut::G4NeutronTrackingCut(const G4String&, G4int ver)
|
||||
: G4NeutronTrackingCut(ver)
|
||||
{}
|
||||
|
||||
G4NeutronTrackingCut::~G4NeutronTrackingCut()
|
||||
{}
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
|
||||
#include "G4StepLimiter.hh"
|
||||
#include "G4UserSpecialCuts.hh"
|
||||
#include "G4BuilderType.hh"
|
||||
|
||||
// factory
|
||||
#include "G4PhysicsConstructorFactory.hh"
|
||||
@@ -55,17 +56,15 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4StepLimiterPhysics);
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4StepLimiterPhysics::G4StepLimiterPhysics(const G4String& name)
|
||||
: G4VPhysicsConstructor(name),fStepLimiter(0),fUserSpecialCuts(0),
|
||||
fApplyToAll(false)
|
||||
{}
|
||||
: G4VPhysicsConstructor(name),fApplyToAll(false)
|
||||
{
|
||||
SetPhysicsType(bUnknown);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4StepLimiterPhysics::~G4StepLimiterPhysics()
|
||||
{
|
||||
delete fStepLimiter;
|
||||
delete fUserSpecialCuts;
|
||||
}
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -79,8 +78,8 @@ void G4StepLimiterPhysics::ConstructProcess()
|
||||
auto myParticleIterator=GetParticleIterator();
|
||||
myParticleIterator->reset();
|
||||
|
||||
fStepLimiter = new G4StepLimiter();
|
||||
fUserSpecialCuts = new G4UserSpecialCuts();
|
||||
G4StepLimiter* stepLimiter = new G4StepLimiter();
|
||||
G4UserSpecialCuts* userSpecialCuts = new G4UserSpecialCuts();
|
||||
while ((*myParticleIterator)()) {
|
||||
G4ParticleDefinition* particle = myParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
@@ -88,13 +87,13 @@ void G4StepLimiterPhysics::ConstructProcess()
|
||||
|
||||
if(!particle->IsShortLived()) {
|
||||
if (charge != 0.0 || fApplyToAll) {
|
||||
// All charged particles should have a step limiter
|
||||
// to make sure that the steps do not get too long.
|
||||
pmanager->AddDiscreteProcess(fStepLimiter);
|
||||
pmanager->AddDiscreteProcess(fUserSpecialCuts);
|
||||
// All charged particles should have a step limiter
|
||||
// to make sure that the steps do not get too long.
|
||||
pmanager->AddDiscreteProcess(stepLimiter);
|
||||
pmanager->AddDiscreteProcess(userSpecialCuts);
|
||||
} else {
|
||||
// Energy cuts for all other neutral particles
|
||||
pmanager->AddDiscreteProcess(fUserSpecialCuts);
|
||||
// Energy cuts for all other neutral particles
|
||||
pmanager->AddDiscreteProcess(userSpecialCuts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user