Import Geant4 8.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:55:03 +02:00
parent 216a75eeb1
commit fe73f43734
6714 changed files with 118229 additions and 68144 deletions
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: CheckVolumeSD.cc,v 1.3 2006/06/29 17:24:02 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
/////////////////////////////////////////////////////////////////////////
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: DetectorConstruction.cc,v 1.5 2006/06/29 17:24:04 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: DetectorConstruction.cc,v 1.6 2006/10/04 09:56:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
/////////////////////////////////////////////////////////////////////////
//
@@ -171,6 +171,7 @@ void DetectorConstruction::SetTargetMaterial(const G4String& mat)
G4Material* material = G4NistManager::Instance()->FindOrBuildMaterial(mat);
if (material && material != targetMaterial) {
HistoManager::GetPointer()->SetTargetMaterial(material);
targetMaterial = material;
if(logicTarget) logicTarget->SetMaterial(targetMaterial);
G4RunManager::GetRunManager()->PhysicsHasBeenModified();
@@ -23,10 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: DetectorMessenger.cc,v 1.3 2006/06/29 17:24:06 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// $Id: DetectorMessenger.cc,v 1.6 2006/11/15 14:58:10 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
/////////////////////////////////////////////////////////////////////////
//
@@ -36,6 +34,7 @@
//
// Modified:
// 04.06.2006 Adoptation of hadr01 (V.Ivanchenko)
// 16.11.2006 Add beamCmd (V.Ivanchenko)
//
////////////////////////////////////////////////////////////////////////
//
@@ -100,6 +99,9 @@ DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
updateCmd->SetGuidance("if you changed geometrical value(s)");
updateCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
beamCmd = new G4UIcmdWithABool("/testhadr/DefaultBeamPosition",this);
beamCmd->SetGuidance("show inelastic and elastic cross sections");
verbCmd = new G4UIcmdWithAnInteger("/testhadr/Verbose",this);
verbCmd->SetGuidance("Set verbose for ");
verbCmd->SetParameterName("verb",false);
@@ -117,6 +119,7 @@ DetectorMessenger::~DetectorMessenger()
delete nOfAbsCmd;
delete updateCmd;
delete testDir;
delete beamCmd;
delete verbCmd;
}
@@ -124,29 +127,24 @@ DetectorMessenger::~DetectorMessenger()
void DetectorMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
{
HistoManager* h = HistoManager::GetPointer();
if( command == matCmd )
Detector->SetTargetMaterial(newValue);
if( command == mat1Cmd )
else if( command == mat1Cmd )
Detector->SetWorldMaterial(newValue);
if( command == rCmd )
else if( command == rCmd )
Detector->SetTargetRadius(rCmd->GetNewDoubleValue(newValue));
if( command == lCmd )
HistoManager::GetPointer()->SetTargetLength(lCmd->GetNewDoubleValue(newValue));
if( command == nOfAbsCmd )
HistoManager::GetPointer()->SetNumberOfSlices(nOfAbsCmd->GetNewIntValue(newValue));
if( command == binCmd )
HistoManager::GetPointer()->SetNumberOfBinsE(binCmd->GetNewIntValue(newValue));
if( command == verbCmd )
HistoManager::GetPointer()->SetVerbose(verbCmd->GetNewIntValue(newValue));
if( command == updateCmd )
else if( command == lCmd )
h->SetTargetLength(lCmd->GetNewDoubleValue(newValue));
else if( command == nOfAbsCmd )
h->SetNumberOfSlices(nOfAbsCmd->GetNewIntValue(newValue));
else if( command == binCmd )
h->SetNumberOfBinsE(binCmd->GetNewIntValue(newValue));
else if( command == verbCmd )
h->SetVerbose(verbCmd->GetNewIntValue(newValue));
else if (command == beamCmd)
h->SetDefaultBeamPositionFlag(beamCmd->GetNewBoolValue(newValue));
else if( command == updateCmd )
Detector->UpdateGeometry();
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: EventAction.cc,v 1.3 2006/06/29 17:24:08 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
/////////////////////////////////////////////////////////////////////////
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: EventActionMessenger.cc,v 1.3 2006/06/29 17:24:11 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
/////////////////////////////////////////////////////////////////////////
//
+10 -2
View File
@@ -96,8 +96,16 @@ void Histo::book()
if(verbose>0)
G4cout<<"Histo books tree factory ......... "<<G4endl;
G4String histExt = "";
char* path = getenv("PHYSLIST");
if (path) histExt = "_" + G4String(path);
G4String histDir = "";
path = getenv("HISTODIR");
if (path) histDir = G4String(path) + "/";
// Creating a tree mapped to a new hbook file.
G4String name = histName + "." + histType;
G4String name = histDir + histName + histExt + "." + histType;
tree = tf->create(name, histType, false, true, option);
G4cout << "Histo: tree store : " << tree->storeName() << G4endl;
@@ -214,7 +222,7 @@ void Histo::fill(G4int i, G4double x, G4double w)
{
if(verbose > 1)
G4cout << "fill histogram: #" << i << " at x= " << x
<< " weight= " << w
<< " weight= " << w << " unit= " << unit[i]
<< G4endl;
#ifdef G4ANALYSIS_USE
if(i>=0 && i<nHisto) {
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: HistoManager.cc,v 1.5 2006/06/29 17:24:16 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: HistoManager.cc,v 1.11 2006/11/15 14:58:10 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------------------
//
@@ -35,6 +35,7 @@
//
// Modified:
// 04.06.2006 Adoptation of hadr01 (V.Ivanchenko)
// 16.11.2006 Add beamFlag (V.Ivanchenko)
//
//----------------------------------------------------------------------------
//
@@ -90,6 +91,9 @@ HistoManager::HistoManager()
nBinsE = 100;
nHisto = 19;
length = 300.*mm;
beamFlag = true;
material = 0;
elm = 0;
histo = new Histo(verbose);
neutron = G4Neutron::Neutron();
}
@@ -105,63 +109,28 @@ HistoManager::~HistoManager()
void HistoManager::bookHisto()
{
histo->add1D("1",
"Energy deposition (MeV/mm/event) in the target",nSlices,0.0,length/mm,MeV/mm);
histo->add1D("2",
"Log10 Energy (MeV) of gammas",nBinsE,-5.,5.,1.0);
histo->add1D("3",
"Log10 Energy (MeV) of electrons",nBinsE,-5.,5.,1.0);
histo->add1D("4",
"Log10 Energy (MeV) of positrons",nBinsE,-5.,5.,1.0);
histo->add1D("5",
"Log10 Energy (MeV) of protons",nBinsE,-5.,5.,1.0);
histo->add1D("6",
"Log10 Energy (MeV) of neutrons",nBinsE,-5.,5.,1.0);
histo->add1D("7",
"Log10 Energy (MeV) of charged pions",nBinsE,-4.,6.,1.0);
histo->add1D("8",
"Log10 Energy (MeV) of pi0",nBinsE,-4.,6.,1.0);
histo->add1D("9",
"Log10 Energy (MeV) of charged kaons",nBinsE,-4.,6.,1.0);
histo->add1D("10",
"Log10 Energy (MeV) of neutral kaons",nBinsE,-4.,6.,1.0);
histo->add1D("11",
"Log10 Energy (MeV) of deuterons and tritons",nBinsE,-5.,5.,1.0);
histo->add1D("12",
"Log10 Energy (MeV) of He3 and alpha",nBinsE,-5.,5.,1.0);
histo->add1D("13",
"Log10 Energy (MeV) of Generic Ions",nBinsE,-5.,5.,1.0);
histo->add1D("14",
"Log10 Energy (MeV) of muons",nBinsE,-4.,6.,1.0);
histo->add1D("15",
"log10 Energy (MeV) of side-leaked neutrons",nBinsE,-5.,5.,1.0);
histo->add1D("16",
"log10 Energy (MeV) of forward-leaked neutrons",nBinsE,-5.,5.,1.0);
histo->add1D("17",
"log10 Energy (MeV) of backward-leaked neutrons",nBinsE,-5.,5.,1.0);
histo->add1D("18",
"log10 Energy (MeV) of leaking protons",nBinsE,-4.,6.,1.0);
histo->add1D("19",
"log10 Energy (MeV) of leaking charged pions",nBinsE,-4.,6.,1.0);
histo->add1D("1","Energy deposition (MeV/mm/event) in the target",
nSlices,0.0,length/mm,MeV/mm);
histo->add1D("2","Log10 Energy (MeV) of gammas",nBinsE,-5.,5.,1.0);
histo->add1D("3","Log10 Energy (MeV) of electrons",nBinsE,-5.,5.,1.0);
histo->add1D("4","Log10 Energy (MeV) of positrons",nBinsE,-5.,5.,1.0);
histo->add1D("5","Log10 Energy (MeV) of protons",nBinsE,-5.,5.,1.0);
histo->add1D("6","Log10 Energy (MeV) of neutrons",nBinsE,-5.,5.,1.0);
histo->add1D("7","Log10 Energy (MeV) of charged pions",nBinsE,-4.,6.,1.0);
histo->add1D("8","Log10 Energy (MeV) of pi0",nBinsE,-4.,6.,1.0);
histo->add1D("9","Log10 Energy (MeV) of charged kaons",nBinsE,-4.,6.,1.0);
histo->add1D("10","Log10 Energy (MeV) of neutral kaons",nBinsE,-4.,6.,1.0);
histo->add1D("11","Log10 Energy (MeV) of deuterons and tritons",nBinsE,-5.,5.,1.0);
histo->add1D("12","Log10 Energy (MeV) of He3 and alpha",nBinsE,-5.,5.,1.0);
histo->add1D("13","Log10 Energy (MeV) of Generic Ions",nBinsE,-5.,5.,1.0);
histo->add1D("14","Log10 Energy (MeV) of muons",nBinsE,-4.,6.,1.0);
histo->add1D("15","log10 Energy (MeV) of side-leaked neutrons",nBinsE,-5.,5.,1.0);
histo->add1D("16","log10 Energy (MeV) of forward-leaked neutrons",nBinsE,-5.,5.,1.0);
histo->add1D("17","log10 Energy (MeV) of backward-leaked neutrons",nBinsE,-5.,5.,1.0);
histo->add1D("18","log10 Energy (MeV) of leaking protons",nBinsE,-4.,6.,1.0);
histo->add1D("19","log10 Energy (MeV) of leaking charged pions",nBinsE,-4.,6.,1.0);
histo->add1D("20","Log10 Energy (MeV) of pi+",nBinsE,-4.,6.,1.0);
histo->add1D("21","Log10 Energy (MeV) of pi-",nBinsE,-4.,6.,1.0);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -318,9 +287,16 @@ void HistoManager::ScoreNewTrack(const G4Track* track)
histo->fill(5,e,1.0);
} else if ( pd == G4AntiProton::AntiProton()) {
n_aproton++;
} else if ( pd == G4PionPlus::PionPlus() || pd == G4PionMinus::PionMinus()) {
} else if ( pd == G4PionPlus::PionPlus() ) {
n_cpions++;
histo->fill(6,e,1.0);
histo->fill(19,e,1.0);
} else if ( pd == G4PionMinus::PionMinus()) {
n_cpions++;
histo->fill(6,e,1.0);
histo->fill(20,e,1.0);
} else if ( pd == G4PionZero::PionZero()) {
n_pi0++;
histo->fill(7,e,1.0);
@@ -431,3 +407,20 @@ void HistoManager::SetVerbose(G4int val)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void HistoManager::SetTargetMaterial(const G4Material* mat)
{
if(mat) {
material = mat;
elm = (*(material->GetElementVector()))[0];
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void HistoManager::Fill(G4int id, G4double x, G4double w)
{
histo->fill(id, x, w);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -25,7 +25,7 @@
//
//
// $Id: HistoMessenger.cc,v 1.5 2006/06/29 17:24:18 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
/////////////////////////////////////////////////////////////////////////
//
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: PhysicsList.cc,v 1.11 2006/06/29 17:24:21 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: PhysicsList.cc,v 1.17 2006/11/24 16:48:57 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
/////////////////////////////////////////////////////////////////////////
//
@@ -47,6 +47,9 @@
#include "G4EmStandardPhysics71.hh"
#include "G4EmStandardPhysics.hh"
#include "G4HadronElasticPhysics.hh"
#include "G4HadronQElasticPhysics.hh"
#include "G4HadronHElasticPhysics.hh"
#include "G4NeutronTrackingCut.hh"
#include "G4QStoppingPhysics.hh"
#include "G4LHEPStoppingPhysics.hh"
#include "G4IonBinaryCascadePhysics.hh"
@@ -87,6 +90,7 @@ PhysicsList::PhysicsList() : G4VModularPhysicsList()
cutForGamma = defaultCutValue;
cutForElectron = defaultCutValue;
cutForPositron = defaultCutValue;
dump = false;
pMessenger = new PhysicsListMessenger(this);
@@ -127,7 +131,7 @@ void PhysicsList::ConstructProcess()
hadronPhys[i]->ConstructProcess();
}
G4HadronProcessStore::Instance()->Dump(1);
if(dump) G4HadronProcessStore::Instance()->Dump(1);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
@@ -145,52 +149,25 @@ void PhysicsList::AddPhysicsList(const G4String& name)
hadronPhys.push_back( new HadronPhysicsLHEP());
hadronPhys.push_back( new G4IonPhysics("ion"));
} else if (name == "em_fast") {
} else if (name == "G4standard_exp") {
delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics72("standard");
} else if (name == "em_71") {
} else if (name == "G4standard_fast") {
delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics71("standard");
} else if (name == "LHEP_BERT") {
hadronPhys.push_back( new G4EmExtraPhysics("gamma_nuc"));
hadronPhys.push_back( new G4HadronElasticPhysics("elastic",
verboseLevel,false));
hadronPhys.push_back( new HadronPhysicsLHEP_BERT());
hadronPhys.push_back( new G4QStoppingPhysics("stopping"));
hadronPhys.push_back( new G4IonPhysics("ion"));
} else if (name == "LHEP_BERT_HP") {
hadronPhys.push_back( new G4EmExtraPhysics("gamma_nuc"));
hadronPhys.push_back( new G4HadronElasticPhysics("elastic",
verboseLevel,false));
hadronPhys.push_back( new HadronPhysicsLHEP_BERT_HP());
hadronPhys.push_back( new G4QStoppingPhysics("stopping"));
hadronPhys.push_back( new G4IonPhysics("ion"));
} else if (name == "LHEP_BIC") {
SetStandardList(false);
hadronPhys.push_back( new HadronPhysicsLHEP_BIC());
} else if (name == "LHEP_BIC_HP") {
SetStandardList(true);
hadronPhys.push_back( new HadronPhysicsLHEP_BIC_HP());
} else if (name == "QGSC") {
hadronPhys.push_back( new G4EmExtraPhysics("gamma_nuc"));
hadronPhys.push_back( new G4HadronElasticPhysics("elastic",
verboseLevel,false));
hadronPhys.push_back( new G4HadronQElasticPhysics("QElastic",verboseLevel));
hadronPhys.push_back( new HadronPhysicsQGSC());
hadronPhys.push_back( new G4QStoppingPhysics("stopping"));
hadronPhys.push_back( new G4IonPhysics("ion"));
hadronPhys.push_back( new G4NeutronTrackingCut());
dump = true;
} else if (name == "QGSP") {
@@ -200,21 +177,26 @@ void PhysicsList::AddPhysicsList(const G4String& name)
hadronPhys.push_back( new HadronPhysicsQGSP());
hadronPhys.push_back( new G4QStoppingPhysics("stopping"));
hadronPhys.push_back( new G4IonPhysics("ion"));
hadronPhys.push_back( new G4NeutronTrackingCut());
dump = true;
} else if (name == "LHEP_EMV") {
AddPhysicsList("em_71");
AddPhysicsList("G4standard_fast");
AddPhysicsList("LHEP");
dump = true;
} else if (name == "QGSP_EMV") {
AddPhysicsList("em_71");
AddPhysicsList("G4standard_fast");
AddPhysicsList("QGSP");
dump = true;
} else if (name == "QGSP_EMX") {
AddPhysicsList("em_fast");
AddPhysicsList("G4standard_exp");
AddPhysicsList("QGSP");
dump = true;
} else if (name == "QGSP_BERT") {
@@ -224,6 +206,8 @@ void PhysicsList::AddPhysicsList(const G4String& name)
hadronPhys.push_back( new HadronPhysicsQGSP_BERT());
hadronPhys.push_back( new G4QStoppingPhysics("stopping"));
hadronPhys.push_back( new G4IonPhysics("ion"));
hadronPhys.push_back( new G4NeutronTrackingCut());
dump = true;
} else if (name == "QGSP_BERT_HP") {
@@ -233,18 +217,33 @@ void PhysicsList::AddPhysicsList(const G4String& name)
hadronPhys.push_back( new HadronPhysicsQGSP_BERT_HP());
hadronPhys.push_back( new G4QStoppingPhysics("stopping"));
hadronPhys.push_back( new G4IonPhysics("ion"));
hadronPhys.push_back( new G4NeutronTrackingCut());
dump = true;
} else if (name == "QGSP_BIC") {
SetStandardList(false);
hadronPhys.push_back( new HadronPhysicsQGSP_BIC());
dump = true;
} else if (name == "QGSP_BIC_HP") {
SetStandardList(true);
hadronPhys.push_back( new HadronPhysicsQGSP_BIC());
dump = true;
} else if (name == "QBBC") {
SetStandardList(false);
hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel));
} else if (name == "QBBC_BERT") {
} else if (name == "QBBCG") {
SetStandardList(false, true);
hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
false,false,false,false,true));
} else if (name == "QBEC") {
SetStandardList(false);
hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
@@ -256,6 +255,12 @@ void PhysicsList::AddPhysicsList(const G4String& name)
hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
false,false,false,true));
} else if (name == "QBEC_HP") {
SetStandardList(true);
hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
false,true,false,true));
} else if (name == "QBBC_CHIPS") {
SetStandardList(false);
@@ -268,26 +273,6 @@ void PhysicsList::AddPhysicsList(const G4String& name)
hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
true,false,false,false));
} else if (name == "QQGSP") {
hadronPhys.push_back( new G4EmExtraPhysics("gamma_nuc"));
hadronPhys.push_back( new G4HadronElasticPhysics("elastic",
verboseLevel,false));
hadronPhys.push_back( new G4HadronInelasticQLHEP("QGSP",verboseLevel,
true,false,false,false));
hadronPhys.push_back( new G4QStoppingPhysics("stopping"));
hadronPhys.push_back( new G4IonPhysics("ion"));
} else if (name == "QQGSP_BERT") {
hadronPhys.push_back( new G4EmExtraPhysics("gamma_nuc"));
hadronPhys.push_back( new G4HadronElasticPhysics("elastic",
verboseLevel,false));
hadronPhys.push_back( new G4HadronInelasticQLHEP("QGSP_BERT",verboseLevel,
true,true,false,false));
hadronPhys.push_back( new G4QStoppingPhysics("stopping"));
hadronPhys.push_back( new G4IonPhysics("ion"));
} else {
G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
@@ -298,13 +283,14 @@ void PhysicsList::AddPhysicsList(const G4String& name)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
void PhysicsList::SetStandardList(G4bool flagHP)
void PhysicsList::SetStandardList(G4bool flagHP, G4bool glauber)
{
hadronPhys.push_back( new G4EmExtraPhysics("gamma_nuc"));
hadronPhys.push_back( new G4HadronElasticPhysics("elastic",verboseLevel,
flagHP));
hadronPhys.push_back( new G4HadronHElasticPhysics("elastic",verboseLevel,
flagHP,glauber));
hadronPhys.push_back( new G4QStoppingPhysics("stopping"));
hadronPhys.push_back( new G4IonBinaryCascadePhysics("binary_ion"));
hadronPhys.push_back( new G4NeutronTrackingCut());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
@@ -352,8 +338,10 @@ void PhysicsList::SetCutForPositron(G4double cut)
void PhysicsList::List()
{
G4cout << "### PhysicsLists available: LHEP LHEP_BERT LHEP_BERT_HP LHEP_BIC LHEP_BIC_HP" << G4endl;
G4cout << " QGSC QGSP QGSP_BERT QGSP_BERT_HP QGSP_BIC QBBC" << G4endl;
G4cout << "### PhysicsLists available: LHEP LHEP_EMV QGSP QGSP_BERT QGSP_BERT_HP QGSP_BIC QGSP_BIC_HP"
<< G4endl;
G4cout << " QGSP_EMV QGSP_EMX QGSC QBBC QBEC QBBC_HP QBEC_HP QBBC_CHIPS QBBC_FTF"
<< G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: PhysicsListMessenger.cc,v 1.3 2006/06/29 17:24:23 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: PhysicsListMessenger.cc,v 1.4 2006/08/11 14:38:11 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
/////////////////////////////////////////////////////////////////////////
@@ -126,8 +126,20 @@ void PhysicsListMessenger::SetNewValue(G4UIcommand* command,
pPhysicsList->SetCutForPositron(cut);
}
if( command == pListCmd )
pPhysicsList->AddPhysicsList(newValue);
if( command == pListCmd ) {
G4String name = newValue;
if(name == "PHYSLIST") {
char* path = getenv(name);
if (path) name = G4String(path);
else {
G4cout << "### PhysicsListMessenger WARNING: "
<< " environment variable PHYSLIST is not defined"
<< G4endl;
return;
}
}
pPhysicsList->AddPhysicsList(name);
}
if( command == listCmd )
pPhysicsList->List();
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PrimaryGeneratorAction.cc,v 1.3 2006/06/29 17:24:26 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: PrimaryGeneratorAction.cc,v 1.4 2006/11/15 14:58:10 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
/////////////////////////////////////////////////////////////////////////
//
@@ -34,6 +34,7 @@
//
// Modified:
// 04.06.2006 Adoptation of hadr01 (V.Ivanchenko)
// 16.11.2006 Add option allowing to have user defined beam position (VI)
//
////////////////////////////////////////////////////////////////////////
//
@@ -62,8 +63,10 @@ PrimaryGeneratorAction::~PrimaryGeneratorAction()
void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
G4double zVertex = -(5.0*mm + histo->Length());
particleGun->SetParticlePosition(G4ThreeVector(0.,0.,zVertex));
if(histo->DefaultBeamPosition()) {
G4double zVertex = -(5.0*mm + histo->Length());
particleGun->SetParticlePosition(G4ThreeVector(0.,0.,zVertex));
}
particleGun->GeneratePrimaryVertex(anEvent);
}
@@ -39,6 +39,9 @@
#include "HistoManager.hh"
#include "G4UImanager.hh"
#include "G4VVisManager.hh"
#include "G4HadronProcessStore.hh"
#include "G4NistManager.hh"
#include "G4Element.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -75,15 +78,14 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
void RunAction::EndOfRunAction(const G4Run*)
{
G4cout << "RunAction: End of run actions are started" << G4endl;
(HistoManager::GetPointer())->EndOfRun();
#ifdef G4VIS_USE
if (G4VVisManager::GetConcreteInstance())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
#endif
HistoManager::GetPointer()->EndOfRun();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: StackingAction.cc,v 1.3 2006/06/29 17:24:30 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: StackingAction.cc,v 1.5 2006/10/04 09:56:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
/////////////////////////////////////////////////////////////////////////
//
@@ -80,11 +80,12 @@ StackingAction::ClassifyNewTrack(const G4Track* aTrack)
<< aTrack->GetTrackID() << " of " << name
<< " E(MeV)= " << aTrack->GetKineticEnergy()/MeV
<< " produced by "
<< histoManager->CurrentDefinition()->GetParticleName()
<< histoManager->CurrentParticle()->GetParticleName()
<< " ID= " << aTrack->GetParentID()
<< " with E(MeV)= " << histoManager->CurrentKinEnergy()/MeV
<< G4endl;
}
if(aTrack->GetTrackID() == 1) return status;
//stack or delete secondaries
if (killSecondary) status = fKill;
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: StackingMessenger.cc,v 1.3 2006/06/29 17:24:32 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
/////////////////////////////////////////////////////////////////////////
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: TargetSD.cc,v 1.4 2006/06/29 17:24:34 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
/////////////////////////////////////////////////////////////////////////
//