Import Geant4 10.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2017-12-08 12:52:30 +01:00
parent 98e455a940
commit fc6af9e721
2166 changed files with 276760 additions and 100873 deletions
+3 -19
View File
@@ -26,7 +26,7 @@
/// \file hadronic/Hadr01/src/Histo.cc
/// \brief Implementation of the Histo class
//
// $Id: Histo.cc 70761 2013-06-05 12:30:51Z gcosmo $
// $Id: Histo.cc 107541 2017-11-22 08:24:57Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -49,10 +49,8 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Histo::Histo()
: fManager(0),
fMessenger(0),
: fManager(nullptr),
fHistName("test"),
fHistType("root"),
fTupleName("tuple"),
fTupleTitle("test"),
fNHisto(0),
@@ -82,7 +80,7 @@ void Histo::Book()
fManager = G4RootAnalysisManager::Instance();
// Creating a tree mapped to a new hbook file.
G4String nam = fHistName + "." + fHistType;
G4String nam = fHistName + ".root";
// Open file histogram file
if(!fManager->OpenFile(nam)) {
@@ -137,9 +135,6 @@ void Histo::Save()
{
if(!(fHistoActive || fNtupleActive)) { return; }
// Creating a tree mapped to a new hbook file.
G4String nam = fHistName + "." + fHistType;
// Write histogram file
if(!fManager->Write()) {
G4cout << "Histo::Save: FATAL ERROR writing ROOT file" << G4endl;
@@ -355,14 +350,3 @@ void Histo::SetFileName(const G4String& nam)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Histo::SetFileType(const G4String& nam)
{
if(nam == "root" || nam == "ROOT" ) { fHistType = "root"; }
else if(nam == "xml" || nam == "XML") { fHistType = "xml"; }
else if(nam == "ascii" || nam == "ASCII" ||
nam == "Csv" || nam == "csv" || nam == "CSV")
{ fHistType = "ascii"; }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file hadronic/Hadr01/src/HistoManager.cc
/// \brief Implementation of the HistoManager class
//
// $Id: HistoManager.cc 100811 2016-11-02 15:05:20Z gcosmo $
// $Id: HistoManager.cc 107541 2017-11-22 08:24:57Z gcosmo $
//
//---------------------------------------------------------------------------
//
@@ -92,7 +92,6 @@ HistoManager* HistoManager::GetPointer()
HistoManager::HistoManager()
: fPrimaryDef(0),
fNeutron(0),
fEdepMax(1.0*GeV),
fLength (300.*mm),
fPrimaryKineticEnergy(0.0),
@@ -101,11 +100,11 @@ HistoManager::HistoManager()
fNSlices(300),
fNHisto (25),
fBeamFlag(true),
fHistoBooked(false),
fHisto(0)
fHistoBooked(false)
{
fHisto = new Histo();
fHisto->SetVerbose(fVerbose);
BookHisto();
fNeutron = G4Neutron::Neutron();
}
@@ -27,7 +27,7 @@
/// \brief Implementation of the HistoMessenger class
//
//
// $Id: HistoMessenger.cc 70761 2013-06-05 12:30:51Z gcosmo $
// $Id: HistoMessenger.cc 107541 2017-11-22 08:24:57Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -45,18 +45,14 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
HistoMessenger::HistoMessenger(Histo* hist)
: G4UImessenger(), fHisto(hist),
fHistoDir(0), fFactoryCmd(0), fFileCmd(0), fHistoCmd(0)
: G4UImessenger(), fHisto(hist)
{
fHistoDir = new G4UIdirectory("/testhadr/histo/");
fHistoDir->SetGuidance("histograms control");
fFactoryCmd = new G4UIcmdWithAString("/testhadr/histo/fileName",this);
fFactoryCmd = new G4UIcmdWithAString("/testhadr/HistoName",this);
fFactoryCmd->SetGuidance("set name for the histograms file");
fFileCmd = new G4UIcmdWithAString("/testhadr/histo/fileType",this);
fFileCmd->SetGuidance("set type (hbook, XML) for the histograms file");
fHistoCmd = new G4UIcommand("/testhadr/histo/setHisto",this);
fHistoCmd->SetGuidance("Set bining of the histo number ih :");
fHistoCmd->SetGuidance(" nbBins; valMin; valMax; unit (of vmin and vmax)");
@@ -89,7 +85,6 @@ HistoMessenger::HistoMessenger(Histo* hist)
HistoMessenger::~HistoMessenger()
{
delete fFileCmd;
delete fHistoCmd;
delete fFactoryCmd;
delete fHistoDir;
@@ -101,8 +96,6 @@ void HistoMessenger::SetNewValue(G4UIcommand* command, G4String newValues)
{
if (command == fFactoryCmd) { fHisto->SetFileName(newValues); }
if (command == fFileCmd) { fHisto->SetFileType(newValues); }
if (command == fHistoCmd) {
G4int ih,nbBins;
G4double vmin,vmax;
@@ -27,7 +27,7 @@
/// \brief Implementation of the PhysicsList class
//
//
// $Id: PhysicsList.cc 101216 2016-11-09 13:54:13Z gcosmo $
// $Id: PhysicsList.cc 107541 2017-11-22 08:24:57Z gcosmo $
//
/////////////////////////////////////////////////////////////////////////
//
@@ -67,6 +67,7 @@
#include "G4IonPhysics.hh"
#include "G4EmExtraPhysics.hh"
#include "G4EmParameters.hh"
#include "G4PhysListFactoryMessenger.hh"
#include "G4HadronPhysicsFTFP_BERT.hh"
#include "G4HadronPhysicsFTFP_BERT_HP.hh"
@@ -79,6 +80,7 @@
#include "G4HadronPhysicsQGSP_BIC_HP.hh"
#include "G4HadronPhysicsQGSP_FTFP_BERT.hh"
#include "G4HadronPhysicsQGS_BIC.hh"
#include "G4RadioactiveDecayPhysics.hh"
#include "G4ProcessManager.hh"
#include "G4ParticleTypes.hh"
@@ -99,6 +101,7 @@ PhysicsList::PhysicsList() : G4VModularPhysicsList()
verboseLevel = 1;
fMessenger = new PhysicsListMessenger(this);
fFactMessenger = new G4PhysListFactoryMessenger(this);
// Particles
fParticleList = new G4DecayPhysics(verboseLevel);
@@ -269,6 +272,10 @@ void PhysicsList::AddPhysicsList(const G4String& name)
SetBuilderList0(true);
fHadronPhys.push_back( new G4HadronPhysicsQGSP_BIC_HP(verboseLevel));
} else if (name == "RadioactiveDecay") {
fHadronPhys.push_back( new G4RadioactiveDecayPhysics(verboseLevel));
} else {
G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
@@ -27,7 +27,7 @@
/// \brief Implementation of the PhysicsListMessenger class
//
//
// $Id: PhysicsListMessenger.cc 99019 2016-08-31 08:27:06Z gcosmo $
// $Id: PhysicsListMessenger.cc 107541 2017-11-22 08:24:57Z gcosmo $
//
//
/////////////////////////////////////////////////////////////////////////
@@ -52,18 +52,16 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsListMessenger::PhysicsListMessenger(PhysicsList* pPhys)
:G4UImessenger(), fPhysicsList(pPhys),
fPListCmd(0), fListCmd(0)
:G4UImessenger(), fPhysicsList(pPhys)
{
fPListCmd = new G4UIcmdWithAString("/testhadr/Physics",this);
fPListCmd->SetGuidance("Add modula physics list.");
fPListCmd->SetGuidance("Add modular physics list.");
fPListCmd->SetParameterName("PList",false);
fPListCmd->AvailableForStates(G4State_PreInit);
fListCmd = new G4UIcmdWithoutParameter("/testhadr/ListPhysics",this);
fListCmd->SetGuidance("Available Physics Lists");
fListCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......