Import Geant4 6.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:56:29 +02:00
parent 1d812b78b1
commit e083ffb441
1415 changed files with 111223 additions and 21207 deletions
@@ -20,131 +20,144 @@
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: PhysicsList.cc,v 1.1 2003/10/08 17:28:47 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: PhysicsList.cc,v 1.2 2004/05/04 07:36:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//---------------------------------------------------------------------------
//
// ClassName: PhysicsList
//
// Author: V.Ivanchenko 03.05.2004
//
// Modified:
//
//----------------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysicsList.hh"
#include "PhysicsListMessenger.hh"
#include "PhysListParticles.hh"
#include "PhysListGeneral.hh"
#include "PhysListEmStandard.hh"
#include "PhysListEmG4v52.hh"
#include "G4LossTableManager.hh"
#include "ParticlesBuilder.hh"
#include "G4EmQEDBuilder.hh"
#include "G4EmMuonBuilder.hh"
#include "G4EmHadronBuilder.hh"
#include "G4EmHighEnergyBuilder.hh"
#include "G4EmQEDBuilder52.hh"
#include "G4EmMuonBuilder52.hh"
#include "G4EmHadronBuilder52.hh"
#include "DecaysBuilder.hh"
#include "G4UnitsTable.hh"
#include "G4LossTableManager.hh"
#include "G4EmProcessOptions.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsList::PhysicsList() : G4VModularPhysicsList()
PhysicsList::PhysicsList() : G4VModularPhysicsList(),
verbose(0),
emBuilderIsRegisted(false)
{
G4LossTableManager::Instance();
currentDefaultCut = 1.0*mm;
cutForGamma = currentDefaultCut;
cutForElectron = currentDefaultCut;
cutForPositron = currentDefaultCut;
defaultCutValue = 1.*mm;
cutForGamma = defaultCutValue;
cutForElectron = defaultCutValue;
cutForPositron = defaultCutValue;
pMessenger = new PhysicsListMessenger(this);
SetVerboseLevel(1);
// Particles
particleList = new PhysListParticles("particles");
// General Physics
generalPhysicsList = new PhysListGeneral("general");
// EM physics
emName = G4String("standard");
emPhysicsList = new PhysListEmStandard(emName);
// Add Physics builders
RegisterPhysics(new ParticlesBuilder());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsList::~PhysicsList()
{
delete pMessenger;
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::ConstructParticle()
{
particleList->ConstructParticle();
if(!emBuilderIsRegisted) AddPhysicsList("standard");
G4VModularPhysicsList::ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::ConstructProcess()
{
AddTransportation();
generalPhysicsList->ConstructProcess();
emPhysicsList->ConstructProcess();
G4VModularPhysicsList::ConstructProcess();
// Define energy interval for loss processes
G4EmProcessOptions emOptions;
emOptions.SetMinEnergy(0.1*keV);
emOptions.SetMaxEnergy(100.*GeV);
emOptions.SetDEDXBinning(90);
emOptions.SetLambdaBinning(90);
emOptions.SetBuildPreciseRange(false);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::AddPhysicsList(const G4String& name)
{
if (verboseLevel>1) {
G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
}
if (name == emName) return;
G4bool yes = false;
if (name == "standard") {
if ("standard" == name && !emBuilderIsRegisted) {
RegisterPhysics(new G4EmQEDBuilder());
RegisterPhysics(new G4EmMuonBuilder());
RegisterPhysics(new G4EmHadronBuilder());
RegisterPhysics(new DecaysBuilder());
emBuilderIsRegisted = true;
yes = true;
emName = name;
delete emPhysicsList;
emPhysicsList = new PhysListEmStandard(name);
} else if ("g4v52" == name && !emBuilderIsRegisted) {
RegisterPhysics(new G4EmQEDBuilder52());
RegisterPhysics(new G4EmMuonBuilder52());
RegisterPhysics(new G4EmHadronBuilder52());
RegisterPhysics(new DecaysBuilder());
emBuilderIsRegisted = true;
yes = true;
} else if (name == "g4v52") {
emName = name;
delete emPhysicsList;
emPhysicsList = new PhysListEmG4v52(name);
} else if ("high_energy" == name ) {
RegisterPhysics(new G4EmHighEnergyBuilder());
} else {
G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
<< " is not defined"
<< G4endl;
G4cout << "PhysicsList::AddPhysicsList <" << name << ">"
<< " fail - name is unknown " << G4endl;
}
if (verbose>0 && yes) {
G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::SetCuts()
{
if (verboseLevel >0){
G4cout << "PhysicsList::SetCuts:";
G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
}
{
// set cut values for gamma at first and for e- second and next for e+,
// because some processes for e+/e- need cut values for gamma
SetCutValue(cutForGamma, "gamma");
SetCutValue(cutForElectron, "e-");
SetCutValue(cutForPositron, "e+");
if (verboseLevel>0) DumpCutValuesTable();
if (verbose>0) DumpCutValuesTable();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
void PhysicsList::SetVerbose(G4int val)
{
verbose = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::SetCutForGamma(G4double cut)
{
cutForGamma = cut;
SetParticleCuts(cutForGamma, G4Gamma::Gamma());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -152,7 +165,6 @@ void PhysicsList::SetCutForGamma(G4double cut)
void PhysicsList::SetCutForElectron(G4double cut)
{
cutForElectron = cut;
SetParticleCuts(cutForElectron, G4Electron::Electron());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -160,8 +172,6 @@ void PhysicsList::SetCutForElectron(G4double cut)
void PhysicsList::SetCutForPositron(G4double cut)
{
cutForPositron = cut;
SetParticleCuts(cutForPositron, G4Positron::Positron());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......