Import Geant4 10.1.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: CMakeLists.txt 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
# $Id: CMakeLists.txt 86065 2014-11-07 08:51:15Z gcosmo $
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
@@ -49,7 +49,6 @@ set(EXAMPLEB4D_SCRIPTS
|
||||
icons.mac
|
||||
gui.mac
|
||||
run.png
|
||||
init.mac
|
||||
init_vis.mac
|
||||
run1.mac
|
||||
run2.mac
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# Macro file for example B4 test
|
||||
|
||||
/run/initialize
|
||||
|
||||
# e+ 300MeV
|
||||
/gun/particle e+
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: exampleB4d.cc 75215 2013-10-29 16:07:06Z gcosmo $
|
||||
// $Id: exampleB4d.cc 86065 2014-11-07 08:51:15Z gcosmo $
|
||||
//
|
||||
/// \file exampleB4d.cc
|
||||
/// \brief Main program of the B4d example
|
||||
@@ -43,13 +43,9 @@
|
||||
|
||||
#include "Randomize.hh"
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
#include "G4VisExecutive.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4UI_USE
|
||||
#include "G4UIExecutive.hh"
|
||||
#endif
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -65,7 +61,7 @@ namespace {
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
{
|
||||
// Evaluate arguments
|
||||
//
|
||||
if ( argc > 7 ) {
|
||||
@@ -92,6 +88,13 @@ int main(int argc,char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
// Detect interactive mode (if no macro provided) and define UI session
|
||||
//
|
||||
G4UIExecutive* ui = 0;
|
||||
if ( ! macro.size() ) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
|
||||
// Choose the Random engine
|
||||
//
|
||||
G4Random::setTheEngine(new CLHEP::RanecuEngine);
|
||||
@@ -118,22 +121,18 @@ int main(int argc,char** argv)
|
||||
B4dActionInitialization* actionInitialization
|
||||
= new B4dActionInitialization();
|
||||
runManager->SetUserInitialization(actionInitialization);
|
||||
|
||||
// Initialize G4 kernel
|
||||
//
|
||||
runManager->Initialize();
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
// Initialize visualization
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
// G4VisExecutive can take a verbosity argument - see /vis/verbose guidance.
|
||||
// G4VisManager* visManager = new G4VisExecutive("Quiet");
|
||||
visManager->Initialize();
|
||||
#endif
|
||||
|
||||
// Get the pointer to the User Interface manager
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
// Process macro or start UI session
|
||||
//
|
||||
if ( macro.size() ) {
|
||||
// batch mode
|
||||
G4String command = "/control/execute ";
|
||||
@@ -141,18 +140,12 @@ int main(int argc,char** argv)
|
||||
}
|
||||
else {
|
||||
// interactive mode : define UI session
|
||||
#ifdef G4UI_USE
|
||||
G4UIExecutive* ui = new G4UIExecutive(argc, argv, session);
|
||||
#ifdef G4VIS_USE
|
||||
UImanager->ApplyCommand("/control/execute init_vis.mac");
|
||||
#else
|
||||
UImanager->ApplyCommand("/control/execute init.mac");
|
||||
#endif
|
||||
if (ui->IsGUI())
|
||||
UImanager->ApplyCommand("/control/execute init_vis.mac");
|
||||
if (ui->IsGUI()) {
|
||||
UImanager->ApplyCommand("/control/execute gui.mac");
|
||||
}
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Job termination
|
||||
@@ -160,12 +153,8 @@ int main(int argc,char** argv)
|
||||
// owned and deleted by the run manager, so they should not be deleted
|
||||
// in the main() program !
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
delete visManager;
|
||||
#endif
|
||||
delete runManager;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +0,0 @@
|
||||
# Macro file for the initialization phase of example B4
|
||||
# when running in interactive mode without visualization
|
||||
#
|
||||
# Set some default verbose
|
||||
#
|
||||
/control/verbose 2
|
||||
/control/saveHistory
|
||||
/run/verbose 2
|
||||
@@ -1,11 +1,17 @@
|
||||
# Macro file for the initialization phase of example B4
|
||||
# when running in interactive mode with visualization
|
||||
# Macro file for the initialization of example B4
|
||||
# in interactive session
|
||||
#
|
||||
# Sets some default verbose
|
||||
# Set some default verbose
|
||||
#
|
||||
/control/verbose 2
|
||||
/control/saveHistory
|
||||
/run/verbose 2
|
||||
#
|
||||
# Change the default number of threads (in multi-threaded mode)
|
||||
#/run/numberOfThreads 4
|
||||
#
|
||||
# Initialize kernel
|
||||
/run/initialize
|
||||
#
|
||||
# Visualization setting
|
||||
/control/execute vis.mac
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
# Can be run in batch, without graphic
|
||||
# or interactively: Idle> /control/execute run1.mac
|
||||
#
|
||||
# Change the default number of workers (in multi-threading mode)
|
||||
#/run/numberOfWorkers 4
|
||||
#
|
||||
# Initialize kernel
|
||||
/run/initialize
|
||||
#
|
||||
# Default kinematics:
|
||||
# electron 50 MeV in direction (0.,0.,1.)
|
||||
# 1 event with tracking/verbose
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
# To be run preferably in batch, without graphics:
|
||||
# % exampleB4[a,b,c,d] run2.mac
|
||||
#
|
||||
#/run/numberOfWorkers 4
|
||||
/run/initialize
|
||||
#
|
||||
# Default kinemtics:
|
||||
# electron 50 MeV in direction (0.,0.,1.)
|
||||
# 1000 events
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4RunAction.cc 75215 2013-10-29 16:07:06Z gcosmo $
|
||||
// $Id: B4RunAction.cc 87359 2014-12-01 16:04:27Z gcosmo $
|
||||
//
|
||||
/// \file B4RunAction.cc
|
||||
/// \brief Implementation of the B4RunAction class
|
||||
@@ -106,12 +106,12 @@ void B4RunAction::EndOfRunAction(const G4Run* /*run*/)
|
||||
//
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
if ( analysisManager->GetH1(1) ) {
|
||||
G4cout << "\n ----> print histograms statistic ";
|
||||
G4cout << G4endl << " ----> print histograms statistic ";
|
||||
if(isMaster) {
|
||||
G4cout << "for the entire run \n" << G4endl;
|
||||
G4cout << "for the entire run " << G4endl << G4endl;
|
||||
}
|
||||
else {
|
||||
G4cout << "for the local thread \n" << G4endl;
|
||||
G4cout << "for the local thread " << G4endl << G4endl;
|
||||
}
|
||||
|
||||
G4cout << " EAbs : mean = "
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B4dDetectorConstruction.cc 77601 2013-11-26 17:08:44Z gcosmo $
|
||||
// $Id: B4dDetectorConstruction.cc 87359 2014-12-01 16:04:27Z gcosmo $
|
||||
//
|
||||
/// \file B4dDetectorConstruction.cc
|
||||
/// \brief Implementation of the B4dDetectorConstruction class
|
||||
@@ -250,12 +250,14 @@ G4VPhysicalVolume* B4dDetectorConstruction::DefineVolumes()
|
||||
//
|
||||
// print parameters
|
||||
//
|
||||
G4cout << "\n------------------------------------------------------------"
|
||||
<< "\n---> The calorimeter is " << nofLayers << " layers of: [ "
|
||||
<< absoThickness/mm << "mm of " << absorberMaterial->GetName()
|
||||
<< " + "
|
||||
<< gapThickness/mm << "mm of " << gapMaterial->GetName() << " ] "
|
||||
<< "\n------------------------------------------------------------\n";
|
||||
G4cout
|
||||
<< G4endl
|
||||
<< "------------------------------------------------------------" << G4endl
|
||||
<< "---> The calorimeter is " << nofLayers << " layers of: [ "
|
||||
<< absoThickness/mm << "mm of " << absorberMaterial->GetName()
|
||||
<< " + "
|
||||
<< gapThickness/mm << "mm of " << gapMaterial->GetName() << " ] " << G4endl
|
||||
<< "------------------------------------------------------------" << G4endl;
|
||||
|
||||
//
|
||||
// Visualization attributes
|
||||
|
||||
Reference in New Issue
Block a user