Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
/// \file hadronic/Hadr01/src/DetectorConstruction.cc
|
||||
/// \brief Implementation of the DetectorConstruction class
|
||||
//
|
||||
// $Id: DetectorConstruction.cc 77255 2013-11-22 10:09:14Z gcosmo $
|
||||
// $Id: DetectorConstruction.cc 101905 2016-12-07 11:34:39Z gunter $
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -154,7 +154,7 @@ G4VPhysicalVolume* DetectorConstruction::Construct()
|
||||
<< " ###" << G4endl;
|
||||
|
||||
// colors
|
||||
G4VisAttributes zero = G4VisAttributes::Invisible;
|
||||
G4VisAttributes zero = G4VisAttributes::GetInvisible();
|
||||
fLogicWorld->SetVisAttributes(&zero);
|
||||
|
||||
G4VisAttributes regWcolor(G4Colour(0.3, 0.3, 0.3));
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file hadronic/Hadr01/src/HistoManager.cc
|
||||
/// \brief Implementation of the HistoManager class
|
||||
//
|
||||
// $Id: HistoManager.cc 70761 2013-06-05 12:30:51Z gcosmo $
|
||||
// $Id: HistoManager.cc 100811 2016-11-02 15:05:20Z gcosmo $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -118,7 +118,7 @@ HistoManager::~HistoManager()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void HistoManager::bookHisto()
|
||||
void HistoManager::BookHisto()
|
||||
{
|
||||
fHistoBooked = true;
|
||||
fHisto->Add1D("1","Energy deposition (MeV/mm/event) in the target",
|
||||
@@ -192,7 +192,7 @@ void HistoManager::BeginOfRun()
|
||||
fEdepSum = 0.0;
|
||||
fEdepSum2 = 0.0;
|
||||
|
||||
if(!fHistoBooked) { bookHisto(); }
|
||||
if(!fHistoBooked) { BookHisto(); }
|
||||
fHisto->Book();
|
||||
|
||||
if(fVerbose > 0) {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
/// \brief Implementation of the PhysicsList class
|
||||
//
|
||||
//
|
||||
// $Id: PhysicsList.cc 92421 2015-09-01 07:38:57Z gcosmo $
|
||||
// $Id: PhysicsList.cc 101216 2016-11-09 13:54:13Z gcosmo $
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -66,7 +66,7 @@
|
||||
#include "G4IonBinaryCascadePhysics.hh"
|
||||
#include "G4IonPhysics.hh"
|
||||
#include "G4EmExtraPhysics.hh"
|
||||
#include "G4EmProcessOptions.hh"
|
||||
#include "G4EmParameters.hh"
|
||||
|
||||
#include "G4HadronPhysicsFTFP_BERT.hh"
|
||||
#include "G4HadronPhysicsFTFP_BERT_HP.hh"
|
||||
@@ -80,8 +80,6 @@
|
||||
#include "G4HadronPhysicsQGSP_FTFP_BERT.hh"
|
||||
#include "G4HadronPhysicsQGS_BIC.hh"
|
||||
|
||||
#include "G4LossTableManager.hh"
|
||||
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
@@ -94,25 +92,19 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
PhysicsList::PhysicsList()
|
||||
: G4VModularPhysicsList(),
|
||||
fEmPhysicsList(0), fParticleList(0), fMessenger(0)
|
||||
PhysicsList::PhysicsList() : G4VModularPhysicsList()
|
||||
{
|
||||
G4LossTableManager::Instance();
|
||||
defaultCutValue = 0.7*mm;
|
||||
fCutForGamma = defaultCutValue;
|
||||
fCutForElectron = defaultCutValue;
|
||||
fCutForPositron = defaultCutValue;
|
||||
fCutForProton = defaultCutValue;
|
||||
verboseLevel = 1;
|
||||
SetDefaultCutValue(0.7*CLHEP::mm);
|
||||
|
||||
verboseLevel = 1;
|
||||
|
||||
fMessenger = new PhysicsListMessenger(this);
|
||||
|
||||
// Particles
|
||||
fParticleList = new G4DecayPhysics("decays");
|
||||
fParticleList = new G4DecayPhysics(verboseLevel);
|
||||
|
||||
// EM physics
|
||||
fEmPhysicsList = new G4EmStandardPhysics();
|
||||
fEmPhysicsList = new G4EmStandardPhysics(verboseLevel);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
@@ -156,125 +148,126 @@ void PhysicsList::AddPhysicsList(const G4String& name)
|
||||
if (name == "emstandard_opt0") {
|
||||
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics();
|
||||
fEmPhysicsList = new G4EmStandardPhysics(verboseLevel);
|
||||
|
||||
} else if (name == "emstandard_opt1") {
|
||||
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option1();
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option1(verboseLevel);
|
||||
|
||||
} else if (name == "emstandard_opt2") {
|
||||
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option2();
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option2(verboseLevel);
|
||||
|
||||
} else if (name == "emstandard_opt3") {
|
||||
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option3();
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option3(verboseLevel);
|
||||
|
||||
} else if (name == "emstandard_opt4") {
|
||||
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option4();
|
||||
fEmPhysicsList = new G4EmStandardPhysics_option4(verboseLevel);
|
||||
|
||||
} else if (name == "emstandardGS") {
|
||||
|
||||
delete fEmPhysicsList;
|
||||
fEmPhysicsList = new G4EmStandardPhysicsGS();
|
||||
fEmPhysicsList = new G4EmStandardPhysicsGS(verboseLevel);
|
||||
|
||||
} else if (name == "FTFP_BERT_EMV") {
|
||||
|
||||
AddPhysicsList("emstandard_opt1");
|
||||
AddPhysicsList("FTFP_BERT");
|
||||
AddPhysicsList("emstandard_opt1");
|
||||
|
||||
} else if (name == "FTFP_BERT_EMX") {
|
||||
|
||||
AddPhysicsList("emstandard_opt2");
|
||||
AddPhysicsList("FTFP_BERT");
|
||||
AddPhysicsList("emstandard_opt2");
|
||||
|
||||
} else if (name == "FTFP_BERT_EMY") {
|
||||
|
||||
AddPhysicsList("emstandard_opt3");
|
||||
AddPhysicsList("FTFP_BERT");
|
||||
AddPhysicsList("emstandard_opt3");
|
||||
|
||||
} else if (name == "FTFP_BERT_EMZ") {
|
||||
|
||||
AddPhysicsList("emstandard_opt4");
|
||||
AddPhysicsList("FTFP_BERT");
|
||||
AddPhysicsList("emstandard_opt4");
|
||||
|
||||
} else if (name == "FTFP_BERT") {
|
||||
|
||||
SetBuilderList0(false);
|
||||
fHadronPhys.push_back( new G4HadronPhysicsFTFP_BERT());
|
||||
fHadronPhys.push_back( new G4HadronPhysicsFTFP_BERT(verboseLevel));
|
||||
|
||||
} else if (name == "FTFP_BERT_TRV") {
|
||||
|
||||
AddPhysicsList("emstandardGS");
|
||||
G4EmParameters::Instance()->SetMscStepLimitType( fUseSafety );
|
||||
|
||||
SetBuilderList1(false);
|
||||
fHadronPhys.push_back( new G4HadronPhysicsFTFP_BERT_TRV());
|
||||
fHadronPhys.push_back( new G4HadronPhysicsFTFP_BERT_TRV(verboseLevel));
|
||||
|
||||
} else if (name == "FTF_BIC") {
|
||||
|
||||
SetBuilderList0(false);
|
||||
fHadronPhys.push_back( new G4HadronPhysicsFTF_BIC());
|
||||
fHadronPhys.push_back( new G4HadronPhysicsFTF_BIC(verboseLevel));
|
||||
|
||||
} else if (name == "QBBC") {
|
||||
|
||||
AddPhysicsList("emstandard_opt0");
|
||||
SetBuilderList2();
|
||||
fHadronPhys.push_back( new G4HadronInelasticQBBC());
|
||||
fHadronPhys.push_back( new G4HadronInelasticQBBC(verboseLevel));
|
||||
|
||||
} else if (name == "QGSP_BERT") {
|
||||
|
||||
SetBuilderList0(false);
|
||||
fHadronPhys.push_back( new G4HadronPhysicsQGSP_BERT());
|
||||
fHadronPhys.push_back( new G4HadronPhysicsQGSP_BERT(verboseLevel));
|
||||
|
||||
} else if (name == "QGSP_FTFP_BERT") {
|
||||
|
||||
SetBuilderList0(false);
|
||||
fHadronPhys.push_back( new G4HadronPhysicsQGSP_FTFP_BERT());
|
||||
fHadronPhys.push_back( new G4HadronPhysicsQGSP_FTFP_BERT(verboseLevel));
|
||||
|
||||
} else if (name == "QGSP_FTFP_BERT_EMV") {
|
||||
|
||||
AddPhysicsList("emstandard_opt1");
|
||||
AddPhysicsList("QGSP_FTFP_BERT");
|
||||
AddPhysicsList("emstandard_opt1");
|
||||
|
||||
} else if (name == "QGSP_BERT_EMV") {
|
||||
|
||||
AddPhysicsList("emstandard_opt1");
|
||||
AddPhysicsList("QGSP_BERT");
|
||||
AddPhysicsList("emstandard_opt1");
|
||||
|
||||
} else if (name == "QGSP_BERT_EMX") {
|
||||
|
||||
AddPhysicsList("emstandard_opt2");
|
||||
AddPhysicsList("QGSP_BERT");
|
||||
AddPhysicsList("emstandard_opt2");
|
||||
|
||||
} else if (name == "QGSP_BERT_HP") {
|
||||
|
||||
SetBuilderList0(true);
|
||||
fHadronPhys.push_back( new G4HadronPhysicsQGSP_BERT_HP());
|
||||
fHadronPhys.push_back( new G4HadronPhysicsQGSP_BERT_HP(verboseLevel));
|
||||
|
||||
} else if (name == "QGSP_BIC") {
|
||||
|
||||
SetBuilderList0(false);
|
||||
fHadronPhys.push_back( new G4HadronPhysicsQGSP_BIC());
|
||||
fHadronPhys.push_back( new G4HadronPhysicsQGSP_BIC(verboseLevel));
|
||||
|
||||
} else if (name == "QGSP_BIC_EMY") {
|
||||
|
||||
AddPhysicsList("QGSP_BIC");
|
||||
AddPhysicsList("emstandard_opt3");
|
||||
SetBuilderList0(false);
|
||||
fHadronPhys.push_back( new G4HadronPhysicsQGSP_BIC());
|
||||
|
||||
} else if (name == "QGS_BIC") {
|
||||
|
||||
SetBuilderList0(false);
|
||||
fHadronPhys.push_back( new G4HadronPhysicsQGS_BIC());
|
||||
fHadronPhys.push_back( new G4HadronPhysicsQGS_BIC(verboseLevel));
|
||||
|
||||
} else if (name == "QGSP_BIC_HP") {
|
||||
|
||||
SetBuilderList0(true);
|
||||
fHadronPhys.push_back( new G4HadronPhysicsQGSP_BIC_HP());
|
||||
fHadronPhys.push_back( new G4HadronPhysicsQGSP_BIC_HP(verboseLevel));
|
||||
|
||||
} else {
|
||||
|
||||
@@ -327,56 +320,6 @@ void PhysicsList::SetBuilderList2()
|
||||
|
||||
//....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(fCutForGamma, "gamma");
|
||||
SetCutValue(fCutForElectron, "e-");
|
||||
SetCutValue(fCutForPositron, "e+");
|
||||
SetCutValue(fCutForProton, "proton");
|
||||
|
||||
if (verboseLevel>0) { DumpCutValuesTable(); }
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
void PhysicsList::SetCutForGamma(G4double cut)
|
||||
{
|
||||
fCutForGamma = cut;
|
||||
SetParticleCuts(fCutForGamma, G4Gamma::Gamma());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::SetCutForElectron(G4double cut)
|
||||
{
|
||||
fCutForElectron = cut;
|
||||
SetParticleCuts(fCutForElectron, G4Electron::Electron());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::SetCutForPositron(G4double cut)
|
||||
{
|
||||
fCutForPositron = cut;
|
||||
SetParticleCuts(fCutForPositron, G4Positron::Positron());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void PhysicsList::SetCutForProton(G4double cut)
|
||||
{
|
||||
fCutForProton = cut;
|
||||
SetParticleCuts(fCutForProton, G4Proton::Proton());
|
||||
}
|
||||
|
||||
void PhysicsList::List()
|
||||
{
|
||||
G4cout << "### PhysicsLists available: FTFP_BERT FTFP_BERT_EMV "
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
/// \brief Implementation of the PhysicsListMessenger class
|
||||
//
|
||||
//
|
||||
// $Id: PhysicsListMessenger.cc 70761 2013-06-05 12:30:51Z gcosmo $
|
||||
// $Id: PhysicsListMessenger.cc 99019 2016-08-31 08:27:06Z gcosmo $
|
||||
//
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
@@ -46,53 +46,15 @@
|
||||
#include "PhysicsListMessenger.hh"
|
||||
|
||||
#include "PhysicsList.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4UIcmdWithoutParameter.hh"
|
||||
#include "G4UImanager.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
PhysicsListMessenger::PhysicsListMessenger(PhysicsList* pPhys)
|
||||
:G4UImessenger(), fPhysicsList(pPhys),
|
||||
fGammaCutCmd(0), fElectCutCmd(0), fPosCutCmd(0), fCutCmd(0), fAllCutCmd(0),
|
||||
fPListCmd(0), fListCmd(0)
|
||||
{
|
||||
fGammaCutCmd = new G4UIcmdWithADoubleAndUnit("/testhadr/CutGamma",this);
|
||||
fGammaCutCmd->SetGuidance("Set gamma cut.");
|
||||
fGammaCutCmd->SetParameterName("Gcut",false);
|
||||
fGammaCutCmd->SetUnitCategory("Length");
|
||||
fGammaCutCmd->SetRange("Gcut>=0.0");
|
||||
fGammaCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
fElectCutCmd = new G4UIcmdWithADoubleAndUnit("/testhadr/CutEl",this);
|
||||
fElectCutCmd->SetGuidance("Set electron cut.");
|
||||
fElectCutCmd->SetParameterName("Ecut",false);
|
||||
fElectCutCmd->SetUnitCategory("Length");
|
||||
fElectCutCmd->SetRange("Ecut>=0.0");
|
||||
fElectCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
fPosCutCmd = new G4UIcmdWithADoubleAndUnit("/testhadr/CutPos",this);
|
||||
fPosCutCmd->SetGuidance("Set positron cut.");
|
||||
fPosCutCmd->SetParameterName("Pcut",false);
|
||||
fPosCutCmd->SetUnitCategory("Length");
|
||||
fPosCutCmd->SetRange("Pcut>=0.0");
|
||||
fPosCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
fCutCmd = new G4UIcmdWithADoubleAndUnit("/testhadr/CutProt",this);
|
||||
fCutCmd->SetGuidance("Set proton cut.");
|
||||
fCutCmd->SetParameterName("ProtCut",false);
|
||||
fCutCmd->SetUnitCategory("Length");
|
||||
fCutCmd->SetRange("ProtCut>=0.0");
|
||||
fCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
fAllCutCmd = new G4UIcmdWithADoubleAndUnit("/testhadr/CutsAll",this);
|
||||
fAllCutCmd->SetGuidance("Set cut for all.");
|
||||
fAllCutCmd->SetParameterName("cut",false);
|
||||
fAllCutCmd->SetUnitCategory("Length");
|
||||
fAllCutCmd->SetRange("cut>=0.0");
|
||||
fAllCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
fPListCmd = new G4UIcmdWithAString("/testhadr/Physics",this);
|
||||
fPListCmd->SetGuidance("Add modula physics list.");
|
||||
fPListCmd->SetParameterName("PList",false);
|
||||
@@ -108,11 +70,6 @@ PhysicsListMessenger::PhysicsListMessenger(PhysicsList* pPhys)
|
||||
|
||||
PhysicsListMessenger::~PhysicsListMessenger()
|
||||
{
|
||||
delete fGammaCutCmd;
|
||||
delete fElectCutCmd;
|
||||
delete fPosCutCmd;
|
||||
delete fCutCmd;
|
||||
delete fAllCutCmd;
|
||||
delete fPListCmd;
|
||||
delete fListCmd;
|
||||
}
|
||||
@@ -121,49 +78,7 @@ PhysicsListMessenger::~PhysicsListMessenger()
|
||||
|
||||
void PhysicsListMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
{
|
||||
G4UImanager* UI = G4UImanager::GetUIpointer();
|
||||
if( command == fGammaCutCmd ) {
|
||||
if(fPhysicsList) {
|
||||
fPhysicsList->SetCutForGamma(fGammaCutCmd->GetNewDoubleValue(newValue));
|
||||
} else {
|
||||
UI->ApplyCommand("/run/setCutForAGivenParticle gamma " + newValue);
|
||||
}
|
||||
|
||||
} else if( command == fElectCutCmd ) {
|
||||
if(fPhysicsList) {
|
||||
fPhysicsList->SetCutForElectron(
|
||||
fElectCutCmd->GetNewDoubleValue(newValue));
|
||||
} else {
|
||||
UI->ApplyCommand("/run/setCutForAGivenParticle e- " + newValue);
|
||||
}
|
||||
|
||||
} else if( command == fPosCutCmd ) {
|
||||
if(fPhysicsList) {
|
||||
fPhysicsList->SetCutForPositron(fPosCutCmd->GetNewDoubleValue(newValue));
|
||||
} else {
|
||||
UI->ApplyCommand("/run/setCutForAGivenParticle e+ " + newValue);
|
||||
}
|
||||
|
||||
} else if( command == fCutCmd ) {
|
||||
if(fPhysicsList) {
|
||||
fPhysicsList->SetCutForProton(fCutCmd->GetNewDoubleValue(newValue));
|
||||
} else {
|
||||
UI->ApplyCommand("/run/setCutForAGivenParticle proton " + newValue);
|
||||
}
|
||||
|
||||
} else if( command == fAllCutCmd ) {
|
||||
|
||||
if(fPhysicsList) {
|
||||
G4double cut = fAllCutCmd->GetNewDoubleValue(newValue);
|
||||
fPhysicsList->SetCutForGamma(cut);
|
||||
fPhysicsList->SetCutForElectron(cut);
|
||||
fPhysicsList->SetCutForPositron(cut);
|
||||
fPhysicsList->SetCutForProton(cut);
|
||||
} else {
|
||||
UI->ApplyCommand("/run/setCut " + newValue);
|
||||
}
|
||||
|
||||
} else if( command == fPListCmd ) {
|
||||
if( command == fPListCmd ) {
|
||||
if(fPhysicsList) {
|
||||
G4String name = newValue;
|
||||
if(name == "PHYSLIST") {
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
RunAction::RunAction()
|
||||
: G4UserRunAction()
|
||||
{
|
||||
timer = new G4Timer();
|
||||
timer->Start();
|
||||
fTimer = new G4Timer();
|
||||
fTimer->Start();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -65,15 +65,15 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
{
|
||||
G4int id = aRun->GetRunID();
|
||||
G4cout << "### Run " << id << " start" << G4endl;
|
||||
timer->Stop();
|
||||
G4cout << "RunAction::BeginOfRunAction: " << *timer << G4endl;
|
||||
fTimer->Stop();
|
||||
G4cout << "RunAction::BeginOfRunAction: " << *fTimer << G4endl;
|
||||
|
||||
delete timer;
|
||||
timer = new G4Timer();
|
||||
timer->Start();
|
||||
delete fTimer;
|
||||
fTimer = new G4Timer();
|
||||
fTimer->Start();
|
||||
G4NuclearLevelData::GetInstance();
|
||||
timer->Stop();
|
||||
G4cout << "NuclearData: " << *timer << G4endl;
|
||||
fTimer->Stop();
|
||||
G4cout << "NuclearData: " << *fTimer << G4endl;
|
||||
|
||||
(HistoManager::GetPointer())->BeginOfRun();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user