Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -61,10 +61,39 @@ public:
|
||||
|
||||
// support for physics list defined within a namespace
|
||||
// a bit tricky because cpp macro expansion doesn't like "::"
|
||||
// ala G4_DECLARE_PHYSLIST_FACTORY_NS(myns::MyPL,myns,MyPL) // without trailing ";"
|
||||
// ala G4_DECLARE_PHYSLIST_FACTORY_NS(myns::MyPL,myns,MyPL);
|
||||
#define G4_DECLARE_PHYSLIST_FACTORY_NS( physics_list , nsname , plbase ) \
|
||||
namespace nsname { \
|
||||
const G4PhysListStamper<physics_list>& plbase##Factory = G4PhysListStamper<physics_list>(#physics_list); \
|
||||
}
|
||||
} \
|
||||
typedef int xyzzy__LINE__
|
||||
// eat trailing semicolon using silly typedef
|
||||
|
||||
// REFERENCE (rather than DECLARE) when the physics list if it is part
|
||||
// of a static library. No need to include the header (DECLARE needs this
|
||||
// to build the code), we just need to make a reference in order to pull
|
||||
// the compilation unit static variable from the library and cause it
|
||||
// to be initialized (and thus self-register)
|
||||
|
||||
// this is _very_ much complicated because of the templating of these lists
|
||||
|
||||
#define G4_REFERENCE_PHYSLIST_FACTORY(physics_list) \
|
||||
class G4VModularPhysicsList; \
|
||||
template <class T> class T##physics_list; \
|
||||
typedef T##physics_list<G4VModularPhysicsList> physics_list; \
|
||||
extern const G4PhysListStamper<physics_list>& physics_list##Factory; \
|
||||
const G4PhysListStamper<physics_list>& physics_list##FactoryRef = physics_list##Factory
|
||||
|
||||
#define G4_REFERENCE_PHYSLIST_FACTORY_NS(physics_list, nsname, plbase ) \
|
||||
class G4VModularPhysicsList; \
|
||||
namespace nsname { \
|
||||
template <class T> class T##plbase; \
|
||||
typedef T##plbase<G4VModularPhysicsList> plbase; \
|
||||
extern const G4PhysListStamper<plbase>& plbase##Factory; \
|
||||
const G4PhysListStamper<plbase>& plbase##FactoryRef = plbase##Factory; \
|
||||
} \
|
||||
typedef int xyzzy__LINE__
|
||||
// eat trailing semicolon using silly typedef
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -213,9 +213,10 @@ template<class T> TLBE<T>::~TLBE()
|
||||
|
||||
G4VUserPhysicsList::AddTransportation();
|
||||
|
||||
theParticleIterator->reset();
|
||||
while( (*(theParticleIterator))() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
auto myParticleIterator=G4ParticleTable::GetParticleTable()->GetIterator();
|
||||
myParticleIterator->reset();
|
||||
while( (*(myParticleIterator))() ){
|
||||
G4ParticleDefinition* particle = myParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
// time cuts for ONLY neutrons:
|
||||
@@ -285,9 +286,10 @@ template<class T> TLBE<T>::~TLBE()
|
||||
// models for higher energy
|
||||
G4double LivermoreHighEnergyLimit = 20*CLHEP::MeV;
|
||||
//
|
||||
theParticleIterator->reset();
|
||||
while( (*(theParticleIterator))() ){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
auto myParticleIterator=G4ParticleTable::GetParticleTable()->GetIterator();
|
||||
myParticleIterator->reset();
|
||||
while( (*(myParticleIterator))() ){
|
||||
G4ParticleDefinition* particle = myParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
G4String particleType = particle->GetParticleType();
|
||||
@@ -470,10 +472,11 @@ template<class T> TLBE<T>::~TLBE()
|
||||
// theRayleighScatteringProcess->SetVerboseLevel(OpVerbLevel);
|
||||
theBoundaryProcess->SetVerboseLevel(OpVerbLevel);
|
||||
|
||||
theParticleIterator->reset();
|
||||
while( (*(theParticleIterator))() )
|
||||
auto myParticleIterator=G4ParticleTable::GetParticleTable()->GetIterator();
|
||||
myParticleIterator->reset();
|
||||
while( (*(myParticleIterator))() )
|
||||
{
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ParticleDefinition* particle = myParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
if (theScintProcessDef->IsApplicable(*particle)) {
|
||||
@@ -641,15 +644,17 @@ template<class T> TLBE<T>::~TLBE()
|
||||
theIonBC->SetMinEnergy( theIonBCMin );
|
||||
theIonBC->SetMaxEnergy( theIonBCMax );
|
||||
|
||||
G4VCrossSectionDataSet * thePiData = new G4CrossSectionPairGG( (G4PiNuclearCrossSection*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4PiNuclearCrossSection::Default_Name()), 91*GeV );
|
||||
G4VCrossSectionDataSet * thePiData = new G4CrossSectionPairGG(
|
||||
(G4PiNuclearCrossSection*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4PiNuclearCrossSection::Default_Name()), 91*CLHEP::GeV );
|
||||
G4VCrossSectionDataSet * theAntiNucleonData = new G4CrossSectionInelastic( new G4ComponentAntiNuclNuclearXS );
|
||||
G4ComponentGGNuclNuclXsc * ggNuclNuclXsec = new G4ComponentGGNuclNuclXsc();
|
||||
G4VCrossSectionDataSet * theGGNuclNuclData = new G4CrossSectionInelastic(ggNuclNuclXsec);
|
||||
|
||||
theParticleIterator->reset();
|
||||
while ((*(theParticleIterator))())
|
||||
auto myParticleIterator=G4ParticleTable::GetParticleTable()->GetIterator();
|
||||
myParticleIterator->reset();
|
||||
while ((*(myParticleIterator))())
|
||||
{
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ParticleDefinition* particle = myParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
G4String particleName = particle->GetParticleName();
|
||||
|
||||
@@ -868,7 +873,7 @@ template<class T> TLBE<T>::~TLBE()
|
||||
theInelasticProcess->RegisterMe( theIonBC );
|
||||
pmanager->AddDiscreteProcess( theInelasticProcess );
|
||||
}
|
||||
} // while ((*(theParticleIterator))())
|
||||
} // while ((*(myParticleIterator))())
|
||||
|
||||
// Add stopping processes with builder
|
||||
stoppingPhysics->ConstructProcess();
|
||||
@@ -886,10 +891,11 @@ template<class T> TLBE<T>::~TLBE()
|
||||
// Add Decay Process
|
||||
G4Decay* theDecayProcess = new G4Decay();
|
||||
G4bool theDecayProcessNeverUsed = true; //Check if theDecayProcess will be used
|
||||
theParticleIterator->reset();
|
||||
while( (*(theParticleIterator))() )
|
||||
auto myParticleIterator=G4ParticleTable::GetParticleTable()->GetIterator();
|
||||
myParticleIterator->reset();
|
||||
while( (*(myParticleIterator))() )
|
||||
{
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ParticleDefinition* particle = myParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
|
||||
if (theDecayProcess->IsApplicable(*particle) && !particle->IsShortLived())
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
#include "globals.hh"
|
||||
#include <CLHEP/Units/SystemOfUnits.h>
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4ProcessVector.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
@@ -57,13 +58,13 @@
|
||||
template<class T> TQGSP_BIC_AllHP<T>::TQGSP_BIC_AllHP(G4int ver): T()
|
||||
{
|
||||
// default cut value (1.0mm)
|
||||
// defaultCutValue = 1.0*mm;
|
||||
// defaultCutValue = 1.0*CLHEP::mm;
|
||||
|
||||
G4DataQuestionaire it(photon);
|
||||
G4cout << "<<< Geant4 Physics List simulation engine: QGSP_BIC_AllHP 1.3"<<G4endl;
|
||||
G4cout <<G4endl;
|
||||
|
||||
this->defaultCutValue = 0.7*mm;
|
||||
this->defaultCutValue = 0.7*CLHEP::mm;
|
||||
this->SetVerboseLevel(ver);
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: Shielding.icc 83413 2014-08-21 15:21:43Z gcosmo $
|
||||
// $Id: Shielding.icc 101813 2016-11-30 18:05:43Z gunter $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -129,9 +129,9 @@ template<class T> TShielding<T>::TShielding( G4int verbose, G4String LEN_model,
|
||||
G4HadronPhysicsShielding* hps;
|
||||
// Hadron Physics
|
||||
if (HadrPhysVariant == "M") {
|
||||
hps = new G4HadronPhysicsShielding("hInelastic Shielding", verbose, 9.5*GeV, 9.9*GeV);
|
||||
hps = new G4HadronPhysicsShielding("hInelastic Shielding", verbose, 9.5*CLHEP::GeV, 9.9*CLHEP::GeV);
|
||||
} else {
|
||||
hps = new G4HadronPhysicsShielding("hInelastic Shielding", verbose, 4.0*GeV, 5.0*GeV);
|
||||
hps = new G4HadronPhysicsShielding("hInelastic Shielding", verbose, 4.0*CLHEP::GeV, 5.0*CLHEP::GeV);
|
||||
}
|
||||
if ( LEN_model == "HP" )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user