Import Geant4 11.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2021-12-10 14:46:44 +01:00
committed by Ben Morgan
parent 6399a014b6
commit 80e2389dd8
3932 changed files with 202519 additions and 246221 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 3.12...3.20)
cmake_minimum_required(VERSION 3.16...3.21)
project(gorad)
#----------------------------------------------------------------------------
+16
View File
@@ -16,6 +16,22 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
November 10th, 2021 B. Morgan (gorad-V10-07-05)
- Protect inclusion of G4UIQt.hh
October 25th, 2021 B.Morgan (gorad-V10-07-04)
- Use G4StrUtil functions replacing deprecated G4String member functions
October 6th, 2021 I. Hrivnacova (gorad-V10-07-03)
- Migration to new G4AnalysisManager.hh header;
define the default output file type (csv),
removed Analysis.hh.
July 19th, 2021 Ivana Hrivnacova (gorad-V10-07-02)
- Updated for changes in the analysis category:
removed deleting of the analysis manager,
as this is now done by the Geant4 kernel.
May 24th, 2021 B. Morgan (gorad-V10-07-01)
- Bump required CMake version range to 3.12...3.20, matching core Geant4
-106
View File
@@ -1,106 +0,0 @@
========================================================
GORAD - Geant4 Open-source Radiation Analysis and Design
========================================================
First release : September 2020 with Geant4 version 10.7
Author : Makoto Asai (SLAC National Accelerator Laboratory)
Introduction
------------
Gorad (Geant4 Open-sourced Radiation Analysis and Design) is meant to be
a turn-key application for radiation analysis and spacecraft design built
on top of Geant4. Simulation geometry should be provided in the form of GDML.
Gorad is controlled by UI commands, and it works both in interactive mode
with Qt window and in batch mode with an input macro file.
The current Gorad requires Geant4 version 10.7 (release of December 2020).
It does not work with earlier version of Geant4. Geant4 has to be installed
with multithreading mode and GDML interface enabled. Qt is also recommended
for the use of Gorad in interactive mode. Geant4 GDML interface requires
Xerces-C++ version 3 or higher. Xerces-C++ has to be compiled with the same
compiler Geant4 is compiled. Please refer to the Geant4 installation guide
for enabling these options.
Building and running Gorad
--------------------------
To compile and run Gorad, all the Geant4 environment variables have to be
properly set. Use the shell script in the Geant4 installation directory.
Compilation of Gorad requires cmake and make same as the compilation of
Geant4 itself.
$ source $G4INSTALL/bin/geant4.(c)sh
$ cmake .
$ make
To run Gorad in interactive mode,
$ ./gorad
and then, in the keyboard input field, type
/control/execute <macroFile>
The user may also use any UI commands shown in the left side menu of the
Qt window.
To run Gorad in batch mode,
$ ./gorad <macroFIle>
A sample macro file
-------------------
Associated macro file "run.mac" can be used for both interactive mode
and batch mode. It uses a simple cone-shaped geometry (simpleCone.gdml)
and King Solar Proton Fluence model (https://doi.org/10.2514/3.62088).
It employs both primary particle generation biasing and geometry
importance biasing. This sample macro file defines a probe filled by
water located at the center of the world volume with dose and flux
scorers.
If this sample macro file is used in interactive mode, it also sets up
visualization (through vis.mac). After executing this sample macro, the
user can start an event loop with /run/beamOn command.
If this sample macro file is used in batch mode, it defines 4 histograms.
After the event loop, These histograms are dumped to corresponding files
and also plotted to a Postscript file. Scores of the dose and flux scorers
are also dumped into an output file. In batch mode, this macro executes
one million events.
Gorad manual and additional GDML file
-------------------------------------
Details of the sample macro file and available alternative commands are
described in the full manual downloadable from the following URL. Also,
additional sample GDML file of partial and simplified Orion Spacecraft
is available at the following URL. This is a sample input and it is not
mandatory to execute Gorad.
https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamplesGorad
Known warning messages while processing a GDML file
---------------------------------------------------
If the input GDML file uses some material names defined in G4NISTManager,
these names are unrecognizable by the GDML perser itself and cause
warning messages. For example
G4GDML: VALIDATION ERROR! ID attribute 'G4_AIR' is referenced but was
never declared at line: XX
These messages are harmless and these materials are properly interpreted
once they are set to G4LogicalVolume.
Acknowledgements
----------------
Development of Gorad is funded by NASA Johnson Space Center (JSC) under
the contract NNJ15HK11B.
@@ -45,7 +45,7 @@
#include "G4VUserActionInitialization.hh"
#include "GRAnalysis.hh"
#include "G4AnalysisManager.hh"
#include "G4TScoreHistFiller.hh"
#include "G4Types.hh"
@@ -1,50 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Gorad (Geant4 Open-source Radiation Analysis and Design)
//
// Author : Makoto Asai (SLAC National Accelerator Laboratory)
//
// Development of Gorad is funded by NASA Johnson Space Center (JSC)
// under the contract NNJ15HK11B.
//
// ********************************************************************
//
// GRAnalysis.hh
// Defining the file format of output histogram/n-tuple
//
// History
// September 8th, 2020 : first implementation
//
// ********************************************************************
#ifndef GRAnalysis_h
#define GRAnalysis_h 1
//#include "g4root.hh"
#include "g4csv.hh"
//#include "g4xml.hh"
#endif
@@ -99,7 +99,9 @@ void GRInitialization::Initialize()
}
#include "G4UIExecutive.hh"
#ifdef G4UI_USE_QT
#include "G4UIQt.hh"
#endif
void GRInitialization::SetWindowText(G4UIExecutive* ui)
{
@@ -165,9 +165,9 @@ void GRPrimGenActionMessenger::SetNewValue(G4UIcommand * command,G4String newVal
{
specFile.getline(line,bufsize);
if(line[(size_t)0]=='#') continue;
G4String valStr(line);
valStr = valStr.strip(G4String::both);
valStr = valStr.strip(G4String::trailing,0x0d);
G4String valStr = line;
G4StrUtil::strip(valStr);
G4StrUtil::rstrip(valStr, 0x0d);
if(valStr.size()==0) continue;
cmd = "/gps/hist/point " + valStr;
ec = std::max(UI->ApplyCommand(cmd),ec);
+1 -1
View File
@@ -43,8 +43,8 @@
#include "GRRun.hh"
#include "GRRunAction.hh"
#include "GRAnalysis.hh"
#include "G4AnalysisManager.hh"
#include "G4MultiFunctionalDetector.hh"
#include "G4VPrimitiveScorer.hh"
+2 -2
View File
@@ -44,8 +44,8 @@
#include "GRRunAction.hh"
#include "GRRunActionMessenger.hh"
#include "GRAnalysis.hh"
#include "G4AnalysisManager.hh"
#include "G4Run.hh"
#include "G4RunManager.hh"
#include "G4UnitsTable.hh"
@@ -57,6 +57,7 @@ GRRunAction::GRRunAction()
{
messenger = new GRRunActionMessenger(this);
auto analysisManager = G4AnalysisManager::Instance();
analysisManager->SetDefaultFileType("csv");
G4cout << "Using " << analysisManager->GetType() << G4endl;
analysisManager->SetVerboseLevel(verbose);
@@ -65,7 +66,6 @@ GRRunAction::GRRunAction()
GRRunAction::~GRRunAction()
{
delete G4AnalysisManager::Instance();
delete messenger;
}