Import Geant4 9.6.0 source tree
This commit is contained in:
@@ -23,9 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file hadronic/Hadr01/src/PhysicsList.cc
|
||||
/// \brief Implementation of the PhysicsList class
|
||||
//
|
||||
// $Id: PhysicsList.cc,v 1.37 2010-11-19 20:12:32 vnivanch Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -34,8 +36,9 @@
|
||||
// Created: 31.04.2006 V.Ivanchenko
|
||||
//
|
||||
// Modified:
|
||||
// 04.06.2006 Adoptation of hadr01 (V.Ivanchenko)
|
||||
// 04.06.2006 Adoptation of Hadr01 (V.Ivanchenko)
|
||||
// 26.04.2007 Physics according to 8.3 Physics List (V.Ivanchenko)
|
||||
// 16.10.2012 Renamed used classes (A.Ribon)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -48,6 +51,7 @@
|
||||
#include "G4EmStandardPhysics_option1.hh"
|
||||
#include "G4EmStandardPhysics_option2.hh"
|
||||
#include "G4EmStandardPhysics_option3.hh"
|
||||
#include "G4EmStandardPhysics_option4.hh"
|
||||
#include "G4EmLivermorePhysics.hh"
|
||||
#include "G4EmPenelopePhysics.hh"
|
||||
#include "G4HadronElasticPhysics.hh"
|
||||
@@ -59,9 +63,10 @@
|
||||
#include "G4NeutronTrackingCut.hh"
|
||||
#include "G4NeutronCrossSectionXS.hh"
|
||||
#include "G4QStoppingPhysics.hh"
|
||||
#include "G4StoppingPhysics.hh"
|
||||
#include "G4LHEPStoppingPhysics.hh"
|
||||
#include "G4IonBinaryCascadePhysics.hh"
|
||||
#include "G4IonFTFPBinaryCascadePhysics.hh"
|
||||
#include "G4IonLHEPPhysics.hh"
|
||||
#include "G4IonPhysics.hh"
|
||||
#include "G4EmExtraPhysics.hh"
|
||||
#include "G4EmProcessOptions.hh"
|
||||
@@ -80,8 +85,6 @@
|
||||
#include "HadronPhysicsQGSP_FTFP_BERT.hh"
|
||||
#include "HadronPhysicsQGS_BIC.hh"
|
||||
|
||||
#include "G4IonPhysics.hh"
|
||||
|
||||
#include "G4LossTableManager.hh"
|
||||
|
||||
#include "G4ProcessManager.hh"
|
||||
@@ -92,36 +95,38 @@
|
||||
#include "G4Positron.hh"
|
||||
#include "G4Proton.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
PhysicsList::PhysicsList() : G4VModularPhysicsList()
|
||||
{
|
||||
G4LossTableManager::Instance();
|
||||
defaultCutValue = 0.7*mm;
|
||||
cutForGamma = defaultCutValue;
|
||||
cutForElectron = defaultCutValue;
|
||||
cutForPositron = defaultCutValue;
|
||||
cutForProton = defaultCutValue;
|
||||
fCutForGamma = defaultCutValue;
|
||||
fCutForElectron = defaultCutValue;
|
||||
fCutForPositron = defaultCutValue;
|
||||
fCutForProton = defaultCutValue;
|
||||
verboseLevel = 1;
|
||||
|
||||
pMessenger = new PhysicsListMessenger(this);
|
||||
fMessenger = new PhysicsListMessenger(this);
|
||||
|
||||
// Particles
|
||||
particleList = new G4DecayPhysics("decays");
|
||||
fParticleList = new G4DecayPhysics("decays");
|
||||
|
||||
// EM physics
|
||||
emPhysicsList = new G4EmStandardPhysics();
|
||||
fEmPhysicsList = new G4EmStandardPhysics();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
PhysicsList::~PhysicsList()
|
||||
{
|
||||
delete pMessenger;
|
||||
delete particleList;
|
||||
delete emPhysicsList;
|
||||
for(size_t i=0; i<hadronPhys.size(); i++) {
|
||||
delete hadronPhys[i];
|
||||
delete fMessenger;
|
||||
delete fParticleList;
|
||||
delete fEmPhysicsList;
|
||||
for(size_t i=0; i<fHadronPhys.size(); i++) {
|
||||
delete fHadronPhys[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +134,7 @@ PhysicsList::~PhysicsList()
|
||||
|
||||
void PhysicsList::ConstructParticle()
|
||||
{
|
||||
particleList->ConstructParticle();
|
||||
fParticleList->ConstructParticle();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
@@ -137,10 +142,10 @@ void PhysicsList::ConstructParticle()
|
||||
void PhysicsList::ConstructProcess()
|
||||
{
|
||||
AddTransportation();
|
||||
emPhysicsList->ConstructProcess();
|
||||
particleList->ConstructProcess();
|
||||
for(size_t i=0; i<hadronPhys.size(); i++) {
|
||||
hadronPhys[i]->ConstructProcess();
|
||||
fEmPhysicsList->ConstructProcess();
|
||||
fParticleList->ConstructProcess();
|
||||
for(size_t i=0; i<fHadronPhys.size(); i++) {
|
||||
fHadronPhys[i]->ConstructProcess();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,25 +156,30 @@ void PhysicsList::AddPhysicsList(const G4String& name)
|
||||
if (verboseLevel>0) {
|
||||
G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
|
||||
}
|
||||
if (name == "emstandard_opt2") {
|
||||
if (name == "emstandard_opt0") {
|
||||
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new G4EmStandardPhysics_option2();
|
||||
|
||||
} else if (name == "emstandard_opt3") {
|
||||
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new G4EmStandardPhysics_option3();
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics();
|
||||
|
||||
} else if (name == "emstandard_opt1") {
|
||||
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new G4EmStandardPhysics_option1();
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option1();
|
||||
|
||||
} else if (name == "emstandard_opt0") {
|
||||
} else if (name == "emstandard_opt2") {
|
||||
|
||||
delete emPhysicsList;
|
||||
emPhysicsList = new G4EmStandardPhysics();
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option2();
|
||||
|
||||
} else if (name == "emstandard_opt3") {
|
||||
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option3();
|
||||
|
||||
} else if (name == "emstandard_opt4") {
|
||||
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option4();
|
||||
|
||||
} else if (name == "FTFP_BERT_EMV") {
|
||||
|
||||
@@ -184,50 +194,50 @@ void PhysicsList::AddPhysicsList(const G4String& name)
|
||||
} else if (name == "FTFP_BERT") {
|
||||
|
||||
SetBuilderList1();
|
||||
hadronPhys.push_back( new HadronPhysicsFTFP_BERT());
|
||||
fHadronPhys.push_back( new HadronPhysicsFTFP_BERT());
|
||||
|
||||
} else if (name == "FTF_BIC") {
|
||||
|
||||
SetBuilderList0();
|
||||
hadronPhys.push_back( new HadronPhysicsFTF_BIC());
|
||||
hadronPhys.push_back( new G4NeutronCrossSectionXS(verboseLevel));
|
||||
fHadronPhys.push_back( new HadronPhysicsFTF_BIC());
|
||||
fHadronPhys.push_back( new G4NeutronCrossSectionXS(verboseLevel));
|
||||
|
||||
} else if (name == "LHEP") {
|
||||
|
||||
SetBuilderList2();
|
||||
hadronPhys.push_back( new HadronPhysicsLHEP());
|
||||
fHadronPhys.push_back( new HadronPhysicsLHEP());
|
||||
|
||||
} else if (name == "LHEP_EMV") {
|
||||
|
||||
AddPhysicsList("emstandard_opt1");
|
||||
SetBuilderList2(true);
|
||||
hadronPhys.push_back( new HadronPhysicsLHEP_EMV());
|
||||
fHadronPhys.push_back( new HadronPhysicsLHEP_EMV());
|
||||
|
||||
} else if (name == "QBBC") {
|
||||
|
||||
AddPhysicsList("emstandard_opt2");
|
||||
AddPhysicsList("emstandard_opt0");
|
||||
SetBuilderList3();
|
||||
hadronPhys.push_back( new G4HadronInelasticQBBC());
|
||||
fHadronPhys.push_back( new G4HadronInelasticQBBC());
|
||||
|
||||
} else if (name == "QGSC_BERT") {
|
||||
|
||||
SetBuilderList4();
|
||||
hadronPhys.push_back( new HadronPhysicsQGSC_BERT());
|
||||
fHadronPhys.push_back( new HadronPhysicsQGSC_BERT());
|
||||
|
||||
} else if (name == "QGSP") {
|
||||
|
||||
SetBuilderList1();
|
||||
hadronPhys.push_back( new HadronPhysicsQGSP());
|
||||
fHadronPhys.push_back( new HadronPhysicsQGSP());
|
||||
|
||||
} else if (name == "QGSP_BERT") {
|
||||
|
||||
SetBuilderList1();
|
||||
hadronPhys.push_back( new HadronPhysicsQGSP_BERT());
|
||||
fHadronPhys.push_back( new HadronPhysicsQGSP_BERT());
|
||||
|
||||
} else if (name == "QGSP_FTFP_BERT") {
|
||||
|
||||
SetBuilderList1();
|
||||
hadronPhys.push_back( new HadronPhysicsQGSP_FTFP_BERT());
|
||||
fHadronPhys.push_back( new HadronPhysicsQGSP_FTFP_BERT());
|
||||
|
||||
} else if (name == "QGSP_BERT_EMV") {
|
||||
|
||||
@@ -242,29 +252,29 @@ void PhysicsList::AddPhysicsList(const G4String& name)
|
||||
} else if (name == "QGSP_BERT_HP") {
|
||||
|
||||
SetBuilderList1(true);
|
||||
hadronPhys.push_back( new HadronPhysicsQGSP_BERT_HP());
|
||||
fHadronPhys.push_back( new HadronPhysicsQGSP_BERT_HP());
|
||||
|
||||
} else if (name == "QGSP_BIC") {
|
||||
|
||||
SetBuilderList0();
|
||||
hadronPhys.push_back( new HadronPhysicsQGSP_BIC());
|
||||
fHadronPhys.push_back( new HadronPhysicsQGSP_BIC());
|
||||
|
||||
} else if (name == "QGSP_BIC_EMY") {
|
||||
|
||||
AddPhysicsList("emstandard_opt3");
|
||||
SetBuilderList0();
|
||||
hadronPhys.push_back( new HadronPhysicsQGSP_BIC());
|
||||
fHadronPhys.push_back( new HadronPhysicsQGSP_BIC());
|
||||
|
||||
} else if (name == "QGS_BIC") {
|
||||
|
||||
SetBuilderList0();
|
||||
hadronPhys.push_back( new HadronPhysicsQGS_BIC());
|
||||
hadronPhys.push_back( new G4NeutronCrossSectionXS(verboseLevel));
|
||||
fHadronPhys.push_back( new HadronPhysicsQGS_BIC());
|
||||
fHadronPhys.push_back( new G4NeutronCrossSectionXS(verboseLevel));
|
||||
|
||||
} else if (name == "QGSP_BIC_HP") {
|
||||
|
||||
SetBuilderList0(true);
|
||||
hadronPhys.push_back( new HadronPhysicsQGSP_BIC_HP());
|
||||
fHadronPhys.push_back( new HadronPhysicsQGSP_BIC_HP());
|
||||
|
||||
} else {
|
||||
|
||||
@@ -278,62 +288,62 @@ void PhysicsList::AddPhysicsList(const G4String& name)
|
||||
|
||||
void PhysicsList::SetBuilderList0(G4bool flagHP)
|
||||
{
|
||||
hadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
|
||||
fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
|
||||
if(flagHP) {
|
||||
hadronPhys.push_back( new G4HadronElasticPhysicsHP(verboseLevel) );
|
||||
fHadronPhys.push_back( new G4HadronElasticPhysicsHP(verboseLevel) );
|
||||
} else {
|
||||
hadronPhys.push_back( new G4HadronElasticPhysics(verboseLevel) );
|
||||
fHadronPhys.push_back( new G4HadronElasticPhysics(verboseLevel) );
|
||||
}
|
||||
hadronPhys.push_back( new G4QStoppingPhysics(verboseLevel));
|
||||
hadronPhys.push_back( new G4IonBinaryCascadePhysics(verboseLevel));
|
||||
hadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
|
||||
fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
|
||||
fHadronPhys.push_back( new G4IonBinaryCascadePhysics(verboseLevel));
|
||||
fHadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
void PhysicsList::SetBuilderList1(G4bool flagHP)
|
||||
{
|
||||
hadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
|
||||
fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
|
||||
if(flagHP) {
|
||||
hadronPhys.push_back( new G4HadronElasticPhysicsHP(verboseLevel) );
|
||||
fHadronPhys.push_back( new G4HadronElasticPhysicsHP(verboseLevel) );
|
||||
} else {
|
||||
hadronPhys.push_back( new G4HadronElasticPhysics(verboseLevel) );
|
||||
fHadronPhys.push_back( new G4HadronElasticPhysics(verboseLevel) );
|
||||
}
|
||||
hadronPhys.push_back( new G4QStoppingPhysics(verboseLevel));
|
||||
hadronPhys.push_back( new G4IonPhysics(verboseLevel));
|
||||
hadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
|
||||
fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
|
||||
fHadronPhys.push_back( new G4IonLHEPPhysics(verboseLevel));
|
||||
fHadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
void PhysicsList::SetBuilderList2(G4bool addStopping)
|
||||
{
|
||||
hadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
|
||||
hadronPhys.push_back( new G4HadronElasticPhysicsLHEP(verboseLevel));
|
||||
if(addStopping) { hadronPhys.push_back( new G4QStoppingPhysics(verboseLevel)); }
|
||||
hadronPhys.push_back( new G4IonPhysics(verboseLevel));
|
||||
fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
|
||||
fHadronPhys.push_back( new G4HadronElasticPhysicsLHEP(verboseLevel));
|
||||
if(addStopping) { fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel)); }
|
||||
fHadronPhys.push_back( new G4IonLHEPPhysics(verboseLevel));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
void PhysicsList::SetBuilderList3()
|
||||
{
|
||||
hadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
|
||||
RegisterPhysics( new G4HadronElasticPhysicsXS(verboseLevel) );
|
||||
hadronPhys.push_back( new G4QStoppingPhysics(verboseLevel));
|
||||
hadronPhys.push_back( new G4IonFTFPBinaryCascadePhysics(verboseLevel));
|
||||
hadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
|
||||
fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
|
||||
fHadronPhys.push_back( new G4HadronElasticPhysicsXS(verboseLevel) );
|
||||
fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
|
||||
fHadronPhys.push_back( new G4IonPhysics(verboseLevel));
|
||||
fHadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
void PhysicsList::SetBuilderList4()
|
||||
{
|
||||
hadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
|
||||
hadronPhys.push_back( new G4HadronQElasticPhysics(verboseLevel));
|
||||
hadronPhys.push_back( new G4QStoppingPhysics(verboseLevel));
|
||||
hadronPhys.push_back( new G4IonPhysics(verboseLevel));
|
||||
hadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
|
||||
fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
|
||||
fHadronPhys.push_back( new G4HadronQElasticPhysics(verboseLevel));
|
||||
fHadronPhys.push_back( new G4QStoppingPhysics(verboseLevel)); //16-Oct-2012 A.R. Leave CHIPS stopping
|
||||
fHadronPhys.push_back( new G4IonLHEPPhysics(verboseLevel));
|
||||
fHadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
@@ -348,56 +358,56 @@ 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(cutForProton, "proton");
|
||||
SetCutValue(fCutForGamma, "gamma");
|
||||
SetCutValue(fCutForElectron, "e-");
|
||||
SetCutValue(fCutForPositron, "e+");
|
||||
SetCutValue(fCutForProton, "proton");
|
||||
|
||||
if (verboseLevel>0) DumpCutValuesTable();
|
||||
if (verboseLevel>0) { DumpCutValuesTable(); }
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
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......
|
||||
|
||||
void PhysicsList::SetCutForProton(G4double cut)
|
||||
{
|
||||
cutForProton = cut;
|
||||
SetParticleCuts(cutForProton, G4Proton::Proton());
|
||||
fCutForProton = cut;
|
||||
SetParticleCuts(fCutForProton, G4Proton::Proton());
|
||||
}
|
||||
|
||||
void PhysicsList::List()
|
||||
{
|
||||
G4cout << "### PhysicsLists available: FTFP_BERT FTFP_BERT_EMV FTFP_BERT_EMX FTF_BIC"
|
||||
<< G4endl;
|
||||
<< G4endl;
|
||||
G4cout << " LHEP LHEP_EMV QBBC QGS_BIC QGSP"
|
||||
<< G4endl;
|
||||
<< G4endl;
|
||||
G4cout << " QGSC_BERT QGSP_BERT QGSP_BERT_EMV QGSP_BIC_EMY"
|
||||
<< G4endl;
|
||||
<< G4endl;
|
||||
G4cout << " QGSP_BERT_EMX QGSP_BERT_HP QGSP_BIC QGSP_BIC_HP"
|
||||
<< G4endl;
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user