Import Geant4 9.6.0 source tree
This commit is contained in:
@@ -23,8 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysicsList.cc,v 1.32 2010-04-13 08:10:19 vnivanch Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
/// \file electromagnetic/TestEm3/src/PhysicsList.cc
|
||||
/// \brief Implementation of the PhysicsList class
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -33,32 +35,35 @@
|
||||
#include "PhysicsListMessenger.hh"
|
||||
|
||||
#include "PhysListEmStandard.hh"
|
||||
#include "PhysListEmStandardWVI.hh"
|
||||
|
||||
#include "G4EmStandardPhysics.hh"
|
||||
#include "G4EmStandardPhysics_option1.hh"
|
||||
#include "G4EmStandardPhysics_option2.hh"
|
||||
#include "G4EmStandardPhysics_option3.hh"
|
||||
#include "G4EmStandardPhysics_option4.hh"
|
||||
#include "G4EmLivermorePhysics.hh"
|
||||
#include "G4EmPenelopePhysics.hh"
|
||||
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsList::PhysicsList() : G4VModularPhysicsList()
|
||||
{
|
||||
currentDefaultCut = 1.0*mm;
|
||||
cutForGamma = currentDefaultCut;
|
||||
cutForElectron = currentDefaultCut;
|
||||
cutForPositron = currentDefaultCut;
|
||||
fCurrentDefaultCut = 1.0*mm;
|
||||
fCutForGamma = fCurrentDefaultCut;
|
||||
fCutForElectron = fCurrentDefaultCut;
|
||||
fCutForPositron = fCurrentDefaultCut;
|
||||
|
||||
pMessenger = new PhysicsListMessenger(this);
|
||||
fMessenger = new PhysicsListMessenger(this);
|
||||
|
||||
SetVerboseLevel(1);
|
||||
|
||||
// EM physics
|
||||
emName = G4String("local");
|
||||
emPhysicsList = new PhysListEmStandard(emName);
|
||||
fEmName = G4String("local");
|
||||
fEmPhysicsList = new PhysListEmStandard(fEmName);
|
||||
|
||||
}
|
||||
|
||||
@@ -66,7 +71,7 @@ PhysicsList::PhysicsList() : G4VModularPhysicsList()
|
||||
|
||||
PhysicsList::~PhysicsList()
|
||||
{
|
||||
delete pMessenger;
|
||||
delete fMessenger;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -174,7 +179,7 @@ void PhysicsList::ConstructProcess()
|
||||
|
||||
// electromagnetic Physics List
|
||||
//
|
||||
emPhysicsList->ConstructProcess();
|
||||
fEmPhysicsList->ConstructProcess();
|
||||
|
||||
// Add Decay Process
|
||||
//
|
||||
@@ -209,49 +214,61 @@ void PhysicsList::AddPhysicsList(const G4String& name)
|
||||
G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
|
||||
}
|
||||
|
||||
if (name == emName) return;
|
||||
if (name == fEmName) return;
|
||||
|
||||
if (name == "local") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new PhysListEmStandard(name);
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new PhysListEmStandard(name);
|
||||
|
||||
} else if (name == "emstandard_opt0") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new G4EmStandardPhysics();
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics();
|
||||
|
||||
} else if (name == "emstandard_opt1") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new G4EmStandardPhysics_option1();
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option1();
|
||||
|
||||
} else if (name == "emstandard_opt2") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new G4EmStandardPhysics_option2();
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option2();
|
||||
|
||||
} else if (name == "emstandard_opt3") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new G4EmStandardPhysics_option3();
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option3();
|
||||
|
||||
} else if (name == "emstandard_opt4") {
|
||||
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option4();
|
||||
|
||||
} else if (name == "standardWVI") {
|
||||
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new PhysListEmStandardWVI(name);
|
||||
|
||||
} else if (name == "emlivermore") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new G4EmLivermorePhysics();
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmLivermorePhysics();
|
||||
|
||||
} else if (name == "empenelope") {
|
||||
|
||||
emName = name;
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new G4EmPenelopePhysics();
|
||||
fEmName = name;
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmPenelopePhysics();
|
||||
|
||||
} else {
|
||||
|
||||
@@ -268,16 +285,16 @@ void PhysicsList::AddPhysicsList(const G4String& name)
|
||||
void PhysicsList::AddStepMax()
|
||||
{
|
||||
// Step limitation seen as a process
|
||||
stepMaxProcess = new StepMax();
|
||||
fStepMaxProcess = new StepMax();
|
||||
|
||||
theParticleIterator->reset();
|
||||
while ((*theParticleIterator)()){
|
||||
G4ParticleDefinition* particle = theParticleIterator->value();
|
||||
G4ProcessManager* pmanager = particle->GetProcessManager();
|
||||
|
||||
if (stepMaxProcess->IsApplicable(*particle))
|
||||
if (fStepMaxProcess->IsApplicable(*particle))
|
||||
{
|
||||
pmanager ->AddDiscreteProcess(stepMaxProcess);
|
||||
pmanager ->AddDiscreteProcess(fStepMaxProcess);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -293,13 +310,13 @@ void PhysicsList::SetCuts()
|
||||
|
||||
// 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+");
|
||||
SetCutValue(fCutForGamma, "gamma");
|
||||
SetCutValue(fCutForElectron, "e-");
|
||||
SetCutValue(fCutForPositron, "e+");
|
||||
|
||||
// Cut for proton not used in EM processes except single scattering
|
||||
// so electron cut is used in this example
|
||||
SetCutValue(cutForElectron, "proton");
|
||||
SetCutValue(fCutForElectron, "proton");
|
||||
|
||||
if (verboseLevel>0) DumpCutValuesTable();
|
||||
}
|
||||
@@ -308,24 +325,24 @@ void PhysicsList::SetCuts()
|
||||
|
||||
void PhysicsList::SetCutForGamma(G4double cut)
|
||||
{
|
||||
cutForGamma = cut;
|
||||
SetParticleCuts(cutForGamma, G4Gamma::Gamma());
|
||||
fCutForGamma = cut;
|
||||
SetParticleCuts(fCutForGamma, G4Gamma::Gamma());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::SetCutForElectron(G4double cut)
|
||||
{
|
||||
cutForElectron = cut;
|
||||
SetParticleCuts(cutForElectron, G4Electron::Electron());
|
||||
fCutForElectron = cut;
|
||||
SetParticleCuts(fCutForElectron, G4Electron::Electron());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::SetCutForPositron(G4double cut)
|
||||
{
|
||||
cutForPositron = cut;
|
||||
SetParticleCuts(cutForPositron, G4Positron::Positron());
|
||||
fCutForPositron = cut;
|
||||
SetParticleCuts(fCutForPositron, G4Positron::Positron());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user