Import Geant4 10.4.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2017-06-30 10:49:55 +02:00
parent 3a5407696b
commit 1a1316fea4
2180 changed files with 237880 additions and 59109 deletions
@@ -40,16 +40,21 @@
objects rather than complete pre-defined G4 physics lists. This alternative
way gives more freedom to register physics.
PhysicsConstructors are either predefined G4 PhysicsConstructors or 'local'.
They include : HadronElastic (including neutronHP), HadronInelastic,
IonsInelastic, GammaNuclear physics, RadioactiveDecay and Electromagnetic physics.
Physics constructors are either constructors provided in Geant4 (with G4 prefix)
or 'local'. They include : HadronElastic, HadronInelastic, IonsInelastic, GammaNuclear,
RadioactiveDecay and Electomagnetic.
(see geant4/source/physics_lists/constructors)
ElectromagneticPhysics is a variante of EmStandard. No step constraint is imposed for
energy loss mechanism (ionisation and brems). This is enough when spatial distribution
of deposited energy do not need to be accurate.
(see param->SetStepFunction(1., 1*mm))
HadronElasticPhysicsHP include a model for thermalized neutrons, under the control of a command
defined in NeutronHPMesseger.
GammmaNuclearPhysics is a subset of G4BertiniElectroNuclearBuilder.
ElectromagneticPhysics is a simplified version of G4EmStandardPhysics.
In perticular, no step constraint is imposed for energy loss mechanism (ionisation and brems).
This is enough when spatial distribution of deposited energy do not need
to be accurate (see param->SetStepFunction(1., 1*mm)).
Several hadronic physics options are controlled by environment variables.
To trigger them, an envHadronic.csh has been added in this example.
One must select the options wished, and do
@@ -13,6 +13,18 @@ track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
27-04-17 mma (NeutronSource-V10-03-03)
- Update Readme
12-04-17 mma (NeutronSource-V10-03-02)
- BeginOfRunAction() : remove SetRandomNumberStore()
19-02-17 mma (NeutronSource-V10-03-01)
- HistoManager.cc : add a comment
17-02-17 mma (NeutronSource-V10-03-00)
- Run.cc : remove normalisation of all histos
14-10-16 G.Folger (NeutronSource-V10-02-01)
- remove direct use of aParticleIterator, use GetParticleTableIterator().
+24 -19
View File
@@ -42,16 +42,21 @@ $Id: README 69174 2013-04-21 20:38:15Z maire $
objects rather than complete pre-defined G4 physics lists. This alternative
way gives more freedom to register physics.
PhysicsConstructors are either predefined G4 PhysicsConstructors or 'local'.
They include : HadronElastic (including neutronHP), HadronInelastic,
IonsInelastic, GammaNuclear physics, RadioactiveDecay and Electromagnetic physics.
Physics constructors are either constructors provided in Geant4 (with G4 prefix)
or 'local'. They include : HadronElastic, HadronInelastic, IonsInelastic, GammaNuclear,
RadioactiveDecay and Electomagnetic.
(see geant4/source/physics_lists/constructors)
ElectromagneticPhysics is a variante of EmStandard. No step constraint is imposed for
energy loss mechanism (ionisation and brems). This is enough when spatial distribution
of deposited energy do not need to be accurate.
(see param->SetStepFunction(1., 1*mm))
HadronElasticPhysicsHP include a model for thermalized neutrons, under the control of a command
defined in NeutronHPMesseger.
GammmaNuclearPhysics is a subset of G4BertiniElectroNuclearBuilder.
ElectromagneticPhysics is a simplified version of G4EmStandardPhysics.
In perticular, no step constraint is imposed for energy loss mechanism (ionisation and brems).
This is enough when spatial distribution of deposited energy do not need
to be accurate (see param->SetStepFunction(1., 1*mm)).
Several hadronic physics options are controlled by environment variables.
To trigger them, an envHadronic.csh has been added in this example.
One must select the options wished, and do
@@ -82,16 +87,16 @@ $Id: README 69174 2013-04-21 20:38:15Z maire $
1 "total energy deposit"
2 "dummy"
3 "total kinetic energy flow"
4 "gamma flux (dN/dE) at exit"
5 "e+- flux (dN/dE) at exit"
6 "neutrons flux (dN/dE) at exit"
7 "protons flux (dN/dE) at exit"
8 "deuterons flux (dN/dE) at exit"
9 "alphas flux (dN/dE) at exit"
10 "all others ions flux (dN/dE) at exit"
11 "all others baryons flux (dN/dE) at exit"
12 "all others mesons flux (dN/dE) at exit"
13 "all others leptons flux (dN/dE) at exit"
4 "energy spectrum of emerging gamma"
5 "energy spectrum of emerging e+-"
6 "energy spectrum of emerging neutrons"
7 "energy spectrum of emerging protons"
8 "energy spectrum of emerging deuterons"
9 "energy spectrum of emerging alphas"
10 "energy spectrum of all others emerging ions"
11 "energy spectrum of all others emerging baryons"
12 "energy spectrum of all others emerging mesons"
13 "energy spectrum of all others emerging leptons (neutrinos)"
The histograms are managed by the HistoManager class and its Messenger.
The histos can be individually activated with the command :
@@ -39,8 +39,6 @@
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4RayleighScattering.hh"
#include "G4KleinNishinaModel.hh"
#include "G4eMultipleScattering.hh"
#include "G4eIonisation.hh"
@@ -105,13 +103,13 @@ void ElectromagneticPhysics::ConstructProcess()
} else if (particleName == "e-") {
ph->RegisterProcess(new G4eMultipleScattering(), particle);
ph->RegisterProcess(new G4eIonisation, particle);
ph->RegisterProcess(new G4eIonisation(), particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
} else if (particleName == "e+") {
ph->RegisterProcess(new G4eMultipleScattering(), particle);
ph->RegisterProcess(new G4eIonisation, particle);
ph->RegisterProcess(new G4eIonisation(), particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
@@ -119,7 +117,7 @@ void ElectromagneticPhysics::ConstructProcess()
particleName == "mu-" ) {
ph->RegisterProcess(new G4MuMultipleScattering(), particle);
ph->RegisterProcess(new G4MuIonisation, particle);
ph->RegisterProcess(new G4MuIonisation(), particle);
ph->RegisterProcess(new G4MuBremsstrahlung(), particle);
ph->RegisterProcess(new G4MuPairProduction(), particle);
@@ -128,13 +126,13 @@ void ElectromagneticPhysics::ConstructProcess()
particleName == "pi+" ) {
ph->RegisterProcess(new G4hMultipleScattering(), particle);
ph->RegisterProcess(new G4hIonisation, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
} else if( particleName == "alpha" ||
particleName == "He3" ) {
ph->RegisterProcess(new G4hMultipleScattering(), particle);
ph->RegisterProcess(new G4ionIonisation, particle);
ph->RegisterProcess(new G4ionIonisation(), particle);
ph->RegisterProcess(new G4NuclearStopping(), particle);
} else if( particleName == "GenericIon" ) {
@@ -73,12 +73,12 @@ void HadronElasticPhysicsHP::ConstructProcess()
process->RegisterMe(model1);
process->AddDataSet(new G4ParticleHPElasticData());
if (fThermal) {
if (fThermal) {
model1->SetMinEnergy(4*eV);
G4ParticleHPThermalScattering* model2 = new G4ParticleHPThermalScattering();
process->RegisterMe(model2);
process->AddDataSet(new G4ParticleHPThermalScatteringData());
model1->SetMinEnergy(4*eV);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -66,21 +66,21 @@ void HistoManager::Book()
const G4String id[] = {"0","1","2","3","4","5","6","7","8","9",
"10","11","12","13"};
const G4String title[] =
{ "dummy", //0
"total energy deposit", //1
"dummy", //2
"total kinetic energy flow", //3
"gamma flux (dN/dE) at exit", //4
"e+- flux (dN/dE) at exit", //5
"neutrons flux (dN/dE) at exit", //6
"protons flux (dN/dE) at exit", //7
"deuterons flux (dN/dE) at exit", //8
"alphas flux (dN/dE) at exit", //9
"all others ions flux (dN/dE) at exit", //10
"all others baryons flux (dN/dE) at exit", //11
"all others mesons flux (dN/dE) at exit", //12
"all others leptons flux (dN/dE) at exit" //13
};
{ "dummy", //0
"total energy deposit", //1
"dummy", //2
"total kinetic energy flow", //3
"energy spectrum of emerging gamma", //4
"energy spectrum of emerging e+-", //5
"energy spectrum of emerging neutrons", //6
"energy spectrum of emerging protons", //7
"energy spectrum of emerging deuterons", //8
"energy spectrum of emerging alphas", //9
"energy spectrum of all others emerging ions", //10
"energy spectrum of all others emerging baryons", //11
"energy spectrum of all others emerging mesons", //12
"energy spectrum of all others emerging leptons (neutrinos)" //13
};
// Default values (to be reset via /analysis/h1/set command)
G4int nbins = 100;
@@ -49,6 +49,7 @@
#include "GammaNuclearPhysics.hh"
#include "ElectromagneticPhysics.hh"
#include "G4EmStandardPhysics.hh"
#include "G4DecayPhysics.hh"
#include "G4RadioactiveDecayPhysics.hh"
@@ -74,20 +75,21 @@ PhysicsList::PhysicsList()
RegisterPhysics( new G4HadronPhysicsQGSP_BIC_HP(verb));
////RegisterPhysics( new G4HadronInelasticQBBC(verb));
////RegisterPhysics( new G4HadronPhysicsINCLXX(verb));
// Ion Physics
RegisterPhysics( new G4IonPhysics(verb));
////RegisterPhysics( new G4IonINCLXXPhysics(verb));
// stopping Particles
///RegisterPhysics( new G4StoppingPhysics(verb));
// Gamma-Nuclear Physics
RegisterPhysics( new GammaNuclearPhysics("gamma"));
// EM physics
RegisterPhysics(new ElectromagneticPhysics());
////RegisterPhysics(new G4EmStandardPhysics());
// Decay
RegisterPhysics(new G4DecayPhysics());
@@ -315,16 +315,7 @@ void Run::EndOfRun()
<< " --> " << G4BestUnit(eMax, "Energy")
<< ") \tEflow/event = " << G4BestUnit(Eflow, "Energy") << G4endl;
}
//normalize histograms
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
for (G4int ih=1; ih<14; ih++) {
G4double binWidth = analysisManager->GetH1Width(ih);
G4double unit = analysisManager->GetH1Unit(ih);
G4double fac = unit/binWidth;
analysisManager->ScaleH1(ih,fac);
}
//remove all contents in fProcCounter, fCount
fProcCounter.clear();
fParticleDataMap2.clear();
@@ -38,7 +38,6 @@
#include "HistoManager.hh"
#include "G4Run.hh"
#include "G4RunManager.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
@@ -74,8 +73,7 @@ G4Run* RunAction::GenerateRun()
void RunAction::BeginOfRunAction(const G4Run*)
{
// save Rndm status
G4RunManager::GetRunManager()->SetRandomNumberStore(false);
// show Rndm status
if (isMaster) G4Random::showEngineStatus();
// keep run condition
@@ -92,15 +92,15 @@ void TrackingAction::PostUserTrackingAction(const G4Track* track)
if (charge > 3.) ih = 10;
else if (particle == G4Gamma::Gamma()) ih = 4;
else if (particle == G4Electron::Electron()) ih = 5;
else if (particle == G4Positron::Positron()) ih = 5;
else if (particle == G4Positron::Positron()) ih = 5;
else if (particle == G4Neutron::Neutron()) ih = 6;
else if (particle == G4Proton::Proton()) ih = 7;
else if (particle == G4Deuteron::Deuteron()) ih = 8;
else if (particle == G4Alpha::Alpha()) ih = 9;
else if (particle == G4Alpha::Alpha()) ih = 9;
else if (type == "nucleus") ih = 10;
else if (type == "baryon") ih = 11;
else if (type == "baryon") ih = 11;
else if (type == "meson") ih = 12;
else if (type == "lepton") ih = 13;
else if (type == "lepton") ih = 13;
if (ih > 0) analysis->FillH1(ih,energy);
}