Import Geant4 10.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 11:51:14 +02:00
parent e2d2f9810a
commit 286caacf06
12421 changed files with 730077 additions and 502383 deletions
+41 -14
View File
@@ -1,4 +1,4 @@
//$Id$
//$Id: .README 78001 2013-12-02 08:24:53Z gcosmo $
///\file "B1/.README"
///\brief Example B1 README page
@@ -6,8 +6,8 @@
/*! \page ExampleB1 Example B1
This example demonstrates a very simple application where an energy
deposit is accounted in user actions and a dose in a selected volume
is calculated.
deposit is accounted in user actions and their associated objects
and a dose in a selected volume is calculated.
\section B1_s1 GEOMETRY DEFINITION
@@ -21,7 +21,8 @@
The materials are created with the help of the G4NistManager class,
which allows to build a material from the NIST database using their
names. Available materials and their compositions can be found in
<a href="http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/apas10.html">
<a href="http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides
/ForApplicationDeveloper/html/apas10.html">
the Geant4 User's Guide for Application Developers, Appendix 10:
Geant4 Materials Database
</a>.
@@ -32,7 +33,8 @@
in this example are set in the QBBC physics list. This physics list
requires data files for electromagnetic and hadronic processes.
See more on installation of the datasets in
<a href="http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch03s03.html">
<a href="http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides
/InstallationGuide/html/ch03s03.html">
Geant4 Installation Guide, Chapter 3.3: Note On Geant4 Datasets </a>.
The following datasets: G4LEDATA, G4LEVELGAMMADATA, G4NEUTRONXSDATA and
G4SAIDXSDATA are mandatory for this example.
@@ -42,8 +44,24 @@
/process/(in)activate processName
\endverbatim
allows to activate/inactivate the processes one by one.
\section B1_s3 ACTION INITALIZATION
\section B1_s3 PRIMARY GENERATOR
A newly introduced class, B1ActionInitialization, instantiates and registers
to Geant4 kernel all user action classes.
While in sequential mode the action classes are instatiated just once,
via invoking the method:
B1ActionInitialization::Build()
in multi-threading mode the same method is invoked for each thread worker
and so all user action classes are defined thread-local.
A run action class is instantiated both thread-local
and global that's why its instance is created also in the method
B1ActionInitialization::BuildForMaster()
which is invoked only in multi-threading mode.
\section B1_s4 PRIMARY GENERATOR
The primary generator is defined in the B1PrimaryGeneratorAction class.
The default kinematics is a 6 MeV gamma, randomly distributed in front
@@ -51,17 +69,26 @@
This default setting can be changed via the Geant4 built-in commands
of the G4ParticleGun class.
\section B1_s4 DETECTOR RESPONSE
\section B1_s5 DETECTOR RESPONSE
This example demonstrates a simple scoring implemented directly
in the user action classes. Alternative ways of scoring via
Geant4 classes can be found in the other examples.
in the user action classes and B1Run object.
Alternative ways of scoring via Geant4 classes can be found in the
other examples.
It is in B1SteppingAction that the energy deposition is collected
for a selected volume step by step and the statistical event by event
accumulation of energy deposition is done within B1EventAction.
Information about the primary particle is printed in the
B1RunAction::EndOfRunAction() along with the computation of the dose.
The energy deposited is collected step by step for a selected volume
in B1SteppingAction and accumulated event by event in B1EventAction.
At end of event, the value acummulated in B1EventAction is added in B1Run
and summed over the whole run (see B1EventAction::EndOfevent()).
Total dose deposited is computed at B1RunAction::EndOfRunAction(),
and printed together with informations about the primary particle.
In multi-threading mode the energy accumulated in B1Run objects per
workers is merged to the master in B1Run::Merge() and the final
result is printed on the screen.
An example of creating and computing new units (e.g., dose) is also shown
in the class constructor.
+2
View File
@@ -1,3 +1,5 @@
# $Id: CMakeLists.txt 68058 2013-03-13 14:47:43Z gcosmo $
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
+1 -1
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.2 2000-10-19 12:22:10 stanaka Exp $
# $Id: GNUmakefile 68058 2013-03-13 14:47:43Z gcosmo $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
+28 -1
View File
@@ -1,4 +1,4 @@
$Id$
$Id:$
-------------------------------------------------------------------
=========================================================
@@ -15,6 +15,33 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
28/10/13 I. Hrivnacova (exampleB1-V09-06-06)
- Removed SetNumberOfThreads(4) from main (use Geant4 default)
26/10/13 mma (exampleB1-V09-06-05)
- Use /run/printProgress. Cleanup in EventAction
08/10/13 I. Hrivnacova (exampleB1-V09-06-04)
- Removed B1EventInformation for keeping maximum simplicity
- Improved documentation (added paragraph on Run::Merge())
- Code clean-up
09/06/13 I. Hrivnacova (exampleB1-V09-06-03)
- clarify local names in user actions
05/06/13 mma (exampleB1-V09-06-02)
- add section about ACTION INITALIZATION to README and .README
- update section DETECTOR RESPONSE
05/05/13 I. Hrivnacova (exampleB1-V09-06-01)
- Migration for MT (by Makoto):
Added B1ActionInitialization, B1EventInformation and B1Run classes
and updated actions classes accordingly.
README files still need to be updated.
15/01/13 I. Hrivnacova (exampleB1-V09-06-00)
- Tag for a test only (g4svn update with svn 1.7.x)
13/11/12 I. Hrivnacova (exampleB1-V09-05-03)
- Use QBBC physics list instead of QGSP_BIC_EMY, which becomes
obsolete
+41 -15
View File
@@ -1,4 +1,4 @@
$Id$
$Id: README 78001 2013-12-02 08:24:53Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -9,8 +9,8 @@ $Id$
-----------
This example demonstrates a very simple application where an energy
deposit is accounted in user actions and a dose in a selected volume
is calculated.
deposit is accounted in user actions and their associated objects
and a dose in a selected volume is calculated.
1- GEOMETRY DEFINITION
@@ -34,33 +34,59 @@ $Id$
requires data files for electromagnetic and hadronic processes.
See more on installation of the datasets in Geant4 Installation Guide,
Chapter 3.3: Note On Geant4 Datasets:
http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch03s03.html
http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides
/InstallationGuide/html/ch03s03.html
The following datasets: G4LEDATA, G4LEVELGAMMADATA, G4NEUTRONXSDATA and
G4SAIDXSDATA are mandatory for this example.
In addition the build-in interactive command:
/process/(in)activate processName
allows to activate/inactivate the processes one by one.
3- PRIMARY GENERATOR
3- ACTION INITALIZATION
A newly introduced class, B1ActionInitialization, instantiates and registers
to Geant4 kernel all user action classes.
While in sequential mode the action classes are instatiated just once,
via invoking the method:
B1ActionInitialization::Build()
in multi-threading mode the same method is invoked for each thread worker
and so all user action classes are defined thread-local.
A run action class is instantiated both thread-local
and global that's why its instance is created also in the method
B1ActionInitialization::BuildForMaster()
which is invoked only in multi-threading mode.
4- PRIMARY GENERATOR
The primary generator is defined in the B1PrimaryGeneratorAction class.
The default kinematics is a 6 MeV gamma, randomly distributed in front
of the envelope across 80% of the transvers (X,Y) envelope size.
of the envelope across 80% of the transverse (X,Y) envelope size.
This default setting can be changed via the Geant4 built-in commands
of the G4ParticleGun class.
4- DETECTOR RESPONSE
5- DETECTOR RESPONSE
This example demonstrates a simple scoring implemented directly
in the user action classes. Alternative ways of scoring via
Geant4 classes can be found in the other examples.
in the user action classes and B1Run object.
Alternative ways of scoring via Geant4 classes can be found in the
other examples.
It is in B1SteppingAction that the energy deposition is collected
for a selected volume step by step and the statistical event by event
accumulation of energy deposition is done within B1EventAction.
Information about the primary particle is printed in the
B1RunAction::EndOfRunAction() along with the computation of the dose.
The energy deposited is collected step by step for a selected volume
in B1SteppingAction and accumulated event by event in B1EventAction.
At end of event, the value acummulated in B1EventAction is added in B1Run
and summed over the whole run (see B1EventAction::EndOfevent()).
Total dose deposited is computed at B1RunAction::EndOfRunAction(),
and printed together with informations about the primary particle.
In multi-threading mode the energy accumulated in B1Run objects per
workers is merged to the master in B1Run::Merge() and the final
result is printed on the screen.
An example of creating and computing new units (e.g., dose) is also shown
in the class constructor.
+15 -20
View File
@@ -23,18 +23,20 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: exampleB1.cc 75216 2013-10-29 16:08:11Z gcosmo $
//
/// \file exampleB1.cc
/// \brief Main program of the B1 example
#include "B1DetectorConstruction.hh"
#include "B1PrimaryGeneratorAction.hh"
#include "B1RunAction.hh"
#include "B1EventAction.hh"
#include "B1SteppingAction.hh"
#include "B1ActionInitialization.hh"
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
#else
#include "G4RunManager.hh"
#endif
#include "G4UImanager.hh"
#include "QBBC.hh"
@@ -54,11 +56,15 @@ int main(int argc,char** argv)
{
// Choose the Random engine
//
CLHEP::HepRandom::setTheEngine(new CLHEP::RanecuEngine);
G4Random::setTheEngine(new CLHEP::RanecuEngine);
// Construct the default run manager
//
G4RunManager * runManager = new G4RunManager;
#ifdef G4MULTITHREADED
G4MTRunManager* runManager = new G4MTRunManager;
#else
G4RunManager* runManager = new G4RunManager;
#endif
// Set mandatory initialization classes
//
@@ -70,20 +76,9 @@ int main(int argc,char** argv)
physicsList->SetVerboseLevel(1);
runManager->SetUserInitialization(physicsList);
// Primary generator action
runManager->SetUserAction(new B1PrimaryGeneratorAction());
// User action initialization
runManager->SetUserInitialization(new B1ActionInitialization());
// Set user action classes
//
// Stepping action
runManager->SetUserAction(new B1SteppingAction());
// Event action
runManager->SetUserAction(new B1EventAction());
// Run action
runManager->SetUserAction(new B1RunAction());
// Initialize G4 kernel
//
runManager->Initialize();
+3
View File
@@ -2,9 +2,12 @@
# gamma 6 MeV
/gun/particle gamma
/gun/energy 6 MeV
#
/run/printProgress 100
/run/beamOn 1000
#
# proton 210 MeV
/gun/particle proton
/gun/energy 210 MeV
#
/run/beamOn 1000
+180 -188
View File
@@ -4,7 +4,7 @@
############################################
*************************************************************
Geant4 version Name: geant4-09-06-ref-00 (30-November-2012)
Geant4 version Name: geant4-10-00-ref-00 (6-December-2013)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
@@ -14,7 +14,6 @@
Checking overlaps for volume Envelope ... OK!
Checking overlaps for volume Shape1 ... OK!
Checking overlaps for volume Shape2 ... OK!
WARNING: G4QInelastic is deprecated and will be removed in GEANT4 version 10.0.
### Adding tracking cuts for neutron TimeCut(ns)= 10000 KinEnergyCut(MeV)= 0
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
@@ -26,12 +25,10 @@ Current available graphics systems are:
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
OpenGLImmediateQt (OGLI, OGLIQt)
OpenGLImmediateX (OGLIX)
OpenGLImmediateXm (OGLIXm, OGLI_FALLBACK, OGLIQt_FALLBACK)
OpenGLStoredQt (OGL, OGLS, OGLSQt)
OpenGLImmediateXm (OGLI, OGLIXm)
OpenGLStoredX (OGLSX)
OpenGLStoredXm (OGLSXm, OGL_FALLBACK, OGLS_FALLBACK, OGLSQt_FALLBACK)
OpenGLStoredXm (OGL, OGLS, OGLSXm)
RayTracer (RayTracer)
RayTracerX (RayTracerX)
VRML1FILE (VRML1FILE)
@@ -84,7 +81,7 @@ conv: for gamma SubType= 14
msc: for e- SubType= 10
RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
UrbanMsc : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 10 TeV Table with 35 bins Emin= 100 MeV Emax= 10 TeV
eIoni: for e- SubType= 2
@@ -111,7 +108,7 @@ CoulombScat: for e- SubType= 1
msc: for e+ SubType= 10
RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
UrbanMsc : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 10 TeV Table with 35 bins Emin= 100 MeV Emax= 10 TeV
eIoni: for e+ SubType= 2
@@ -161,13 +158,14 @@ hBrems: for proton SubType= 3
hPairProd: for proton SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 13x1001 from 7.50618 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
msc: for GenericIon SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 10 TeV
UrbanMsc : Emin= 0 eV Emax= 10 TeV
ionIoni: for GenericIon SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
@@ -181,7 +179,7 @@ ionIoni: for GenericIon SubType= 2
msc: for alpha SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
UrbanMsc : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
ionIoni: for alpha SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
@@ -213,6 +211,7 @@ hBrems: for anti_proton SubType= 3
hPairProd: for anti_proton SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 13x1001 from 7.50618 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -238,6 +237,7 @@ hBrems: for kaon+ SubType= 3
hPairProd: for kaon+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 14x1001 from 3.94942 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -263,6 +263,7 @@ hBrems: for kaon- SubType= 3
hPairProd: for kaon- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 14x1001 from 3.94942 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -289,6 +290,7 @@ muBrems: for mu+ SubType= 3
muPairProd: for mu+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 17x1001 from 1 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 10 TeV
@@ -321,6 +323,7 @@ muBrems: for mu- SubType= 3
muPairProd: for mu- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 17x1001 from 1 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 10 TeV
@@ -352,6 +355,7 @@ hBrems: for pi+ SubType= 3
hPairProd: for pi+ SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 16x1001 from 1.11656 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
@@ -377,239 +381,227 @@ hBrems: for pi- SubType= 3
hPairProd: for pi- SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
Sampling table 16x1001 from 1.11656 GeV to 10 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
============================================================================================
HADRONIC PROCESSES SUMMARY (verbose level 1)
Hadronic Processes for <GenericIon>
-----------------------------------
ionInelastic Models: Binary Light Ion Cascade: Emin(GeV)= 0 Emax(GeV)= 4
FTFP: Emin(GeV)= 2 Emax(GeV)= 100000
====================================================================
HADRONIC PROCESSES SUMMARY (verbose level 1)
ionInelastic Crs sctns: Glauber-Gribov nucleus nucleus: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for GenericIon
Process: ionInelastic
Model: Binary Light Ion Cascade: 0 eV ---> 4 GeV
Model: FTFP: 2 GeV ---> 100 TeV
Cr_sctns: Glauber-Gribov nucleus nucleus: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Hadronic Processes for <anti_neutron>
-----------------------------------
hadElastic Models: hElasticLHEP: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for anti_neutron
hadElastic Crs sctns: GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
anti_neutronInelastic Models: FTFP: Emin(GeV)= 0 Emax(GeV)= 100000
Process: anti_neutronInelastic
Model: FTFP: 0 eV ---> 100 TeV
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
anti_neutronInelastic Crs sctns: AntiAGlauber: Emin(GeV)= 0 Emax(GeV)= 1.79769e+305
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for anti_proton
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100.1 MeV
Model: AntiAElastic: 100 MeV ---> 100 TeV
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Hadronic Processes for <anti_proton>
-----------------------------------
hadElastic Models: hElasticLHEP: Emin(GeV)= 0 Emax(GeV)= 0.1
AntiAElastic: Emin(GeV)= 0.1 Emax(GeV)= 100000
Process: anti_protonInelastic
Model: FTFP: 0 eV ---> 100 TeV
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
hadElastic Crs sctns: AntiAGlauber: Emin(GeV)= 0 Emax(GeV)= 1.79769e+305
GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: hFritiofCaptureAtRest
anti_protonInelastic Models: FTFP: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for e+
anti_protonInelastic Crs sctns: AntiAGlauber: Emin(GeV)= 0 Emax(GeV)= 1.79769e+305
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: positronNuclear
Model: G4ElectroVDNuclearModel: 0 eV ---> 1 PeV
Cr_sctns: ElectroNuclearXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
hFritiofCaptureAtRest
---------------------------------------------------
Hadronic Processes for e-
Hadronic Processes for <e+>
-----------------------------------
PositronNuclear Models: G4ElectroVDNuclearModel: Emin(GeV)= 0 Emax(GeV)= 1e+06
Process: electronNuclear
Model: G4ElectroVDNuclearModel: 0 eV ---> 1 PeV
Cr_sctns: ElectroNuclearXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
PositronNuclear Crs sctns: ElectroNuclearXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for gamma
Process: photonNuclear
Model: BertiniCascade: 0 eV ---> 3.5 GeV
Model: TheoFSGenerator: 3 GeV ---> 100 TeV
Cr_sctns: PhotoNuclearXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Hadronic Processes for <e->
-----------------------------------
ElectroNuclear Models: G4ElectroVDNuclearModel: Emin(GeV)= 0 Emax(GeV)= 1e+06
---------------------------------------------------
Hadronic Processes for kaon+
ElectroNuclear Crs sctns: ElectroNuclearXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: kaon+Inelastic
Model: FTFP: 3 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 12 GeV
Cr_sctns: ChipsKaonPlusInelasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Hadronic Processes for <gamma>
-----------------------------------
PhotonInelastic Models: BertiniCascade: Emin(GeV)= 0 Emax(GeV)= 3.5
TheoFSGenerator: Emin(GeV)= 3 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for kaon-
PhotonInelastic Crs sctns: PhotoNuclearXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: kaon-Inelastic
Model: FTFP: 3 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 12 GeV
Cr_sctns: ChipsKaonMinusInelasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Hadronic Processes for <kaon+>
-----------------------------------
hadElastic Models: hElasticLHEP: Emin(GeV)= 0 Emax(GeV)= 100000
Process: hBertiniCaptureAtRest
hadElastic Crs sctns: GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for lambda
kaon+Inelastic Models: FTFP: Emin(GeV)= 3 Emax(GeV)= 100000
BertiniCascade: Emin(GeV)= 0 Emax(GeV)= 12
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
kaon+Inelastic Crs sctns: ChipsKaonPlusInelasticXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: lambdaInelastic
Model: FTFP: 3 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 12 GeV
Cr_sctns: ChipsHyperonInelasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for mu-
Hadronic Processes for <kaon->
-----------------------------------
hadElastic Models: hElasticLHEP: Emin(GeV)= 0 Emax(GeV)= 100000
Process: muMinusCaptureAtRest
hadElastic Crs sctns: GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for neutron
kaon-Inelastic Models: FTFP: Emin(GeV)= 3 Emax(GeV)= 100000
BertiniCascade: Emin(GeV)= 0 Emax(GeV)= 12
Process: hadElastic
Model: hElasticCHIPS: 0 eV ---> 100 TeV
Cr_sctns: G4NeutronElasticXS: 0 eV ---> 100 TeV
Cr_sctns: ChipsNeutronElasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
kaon-Inelastic Crs sctns: ChipsKaonMinusInelasticXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: neutronInelastic
Model: FTFP: 3 GeV ---> 100 TeV
Model: BertiniCascade: 1 GeV ---> 12 GeV
Model: Binary Cascade: 0 eV ---> 1.5 GeV
Cr_sctns: G4NeutronInelasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
hBertiniCaptureAtRest
Process: nCapture
Model: nRadCapture: 0 eV ---> 100 TeV
Cr_sctns: G4NeutronCaptureXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaCaptureXS: 0 eV ---> 100 TeV
Hadronic Processes for <lambda>
-----------------------------------
hadElastic Models: hElasticLHEP: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for pi+
hadElastic Crs sctns: GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 1.0001 GeV
Model: hElasticGlauber: 1 GeV ---> 100 TeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
lambdaInelastic Models: FTFP: Emin(GeV)= 3 Emax(GeV)= 100000
BertiniCascade: Emin(GeV)= 0 Emax(GeV)= 12
lambdaInelastic Crs sctns: ChipsHyperonInelasticXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Hadronic Processes for <mu->
muMinusCaptureAtRest
Hadronic Processes for <neutron>
-----------------------------------
hadElastic Models: hElasticCHIPS: Emin(GeV)= 0 Emax(GeV)= 100000
hadElastic Crs sctns: G4NeutronElasticXS: Emin(GeV)= 0 Emax(GeV)= 100000
ChipsNeutronElasticXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
neutronInelastic Models: FTFP: Emin(GeV)= 3 Emax(GeV)= 100000
BertiniCascade: Emin(GeV)= 1 Emax(GeV)= 12
Binary Cascade: Emin(GeV)= 0 Emax(GeV)= 1.5
neutronInelastic Crs sctns: G4NeutronInelasticXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
nCapture Models: nRadCapture: Emin(GeV)= 0 Emax(GeV)= 100000
nCapture Crs sctns: G4NeutronCaptureXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaCaptureXS: Emin(GeV)= 0 Emax(GeV)= 100000
Hadronic Processes for <pi+>
-----------------------------------
hadElastic Models: hElasticLHEP: Emin(GeV)= 0 Emax(GeV)= 1
hElasticGlauber: Emin(GeV)= 1 Emax(GeV)= 100000
hadElastic Crs sctns: Barashenkov-Glauber: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
pi+Inelastic Models: FTFP: Emin(GeV)= 3 Emax(GeV)= 100000
BertiniCascade: Emin(GeV)= 0 Emax(GeV)= 12
pi+Inelastic Crs sctns: G4CrossSectionPairGG: Emin(GeV)= 0 Emax(GeV)= 100000
Process: pi+Inelastic
Model: FTFP: 3 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 12 GeV
Cr_sctns: G4CrossSectionPairGG: 0 eV ---> 100 TeV
G4CrossSectionPairGG: G4PiNuclearCrossSection cross sections
below 91 GeV, Glauber-Gribov above
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for pi-
Hadronic Processes for <pi->
-----------------------------------
hadElastic Models: hElasticLHEP: Emin(GeV)= 0 Emax(GeV)= 1
hElasticGlauber: Emin(GeV)= 1 Emax(GeV)= 100000
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 1.0001 GeV
Model: hElasticGlauber: 1 GeV ---> 100 TeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
hadElastic Crs sctns: Barashenkov-Glauber: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
pi-Inelastic Models: FTFP: Emin(GeV)= 3 Emax(GeV)= 100000
BertiniCascade: Emin(GeV)= 0 Emax(GeV)= 12
pi-Inelastic Crs sctns: G4CrossSectionPairGG: Emin(GeV)= 0 Emax(GeV)= 100000
Process: pi-Inelastic
Model: FTFP: 3 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 12 GeV
Cr_sctns: G4CrossSectionPairGG: 0 eV ---> 100 TeV
G4CrossSectionPairGG: G4PiNuclearCrossSection cross sections
below 91 GeV, Glauber-Gribov above
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
hBertiniCaptureAtRest
Process: hBertiniCaptureAtRest
Hadronic Processes for <proton>
-----------------------------------
hadElastic Models: hElasticCHIPS: Emin(GeV)= 0 Emax(GeV)= 100000
---------------------------------------------------
Hadronic Processes for proton
hadElastic Crs sctns: Barashenkov-Glauber: Emin(GeV)= 0 Emax(GeV)= 100000
ChipsProtonElasticXS: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaElastic: Emin(GeV)= 0 Emax(GeV)= 100000
Process: hadElastic
Model: hElasticCHIPS: 0 eV ---> 100 TeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
Cr_sctns: ChipsProtonElasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
protonInelastic Models: FTFP: Emin(GeV)= 3 Emax(GeV)= 100000
BertiniCascade: Emin(GeV)= 1 Emax(GeV)= 12
Binary Cascade: Emin(GeV)= 0 Emax(GeV)= 1.5
Process: protonInelastic
Model: FTFP: 3 GeV ---> 100 TeV
Model: BertiniCascade: 1 GeV ---> 12 GeV
Model: Binary Cascade: 0 eV ---> 1.5 GeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
protonInelastic Crs sctns: Barashenkov-Glauber: Emin(GeV)= 0 Emax(GeV)= 100000
GheishaInelastic: Emin(GeV)= 0 Emax(GeV)= 100000
================================================================
### Run 0 starts.
--> Event 0 starts.
--> Event 100 starts.
--> Event 200 starts.
--> Event 300 starts.
--> Event 400 starts.
--> Event 500 starts.
--> Event 600 starts.
--> Event 700 starts.
--> Event 800 starts.
--> Event 900 starts.
============================================================================================
### Run 0 start.
---> Begin of event: 0
---> Begin of event: 100
---> Begin of event: 200
---> Begin of event: 300
---> Begin of event: 400
---> Begin of event: 500
---> Begin of event: 600
---> Begin of event: 700
---> Begin of event: 800
---> Begin of event: 900
--------------------End of Run------------------------------
--------------------End of Global Run-----------------------
The run consists of 1000 gamma of 6 MeV
Dose in scoring volume Shape2 : 47.4315 picoGy +- 4.06645 picoGy
Dose in scoring volume : 39.9621 picoGy +- 3.67187 picoGy
------------------------------------------------------------
### Run 1 start.
### Run 1 starts.
--> Event 0 starts.
--> Event 100 starts.
--> Event 200 starts.
--> Event 300 starts.
--> Event 400 starts.
--> Event 500 starts.
--> Event 600 starts.
--> Event 700 starts.
--> Event 800 starts.
--> Event 900 starts.
---> Begin of event: 0
---> Begin of event: 100
---> Begin of event: 200
---> Begin of event: 300
---> Begin of event: 400
---> Begin of event: 500
---> Begin of event: 600
---> Begin of event: 700
---> Begin of event: 800
---> Begin of event: 900
--------------------End of Run------------------------------
--------------------End of Global Run-----------------------
The run consists of 1000 proton of 210 MeV
Dose in scoring volume Shape2 : 4.92099 nanoGy +- 146.205 picoGy
Dose in scoring volume : 4.98403 nanoGy +- 146.516 picoGy
------------------------------------------------------------
Graphics systems deleted.
@@ -0,0 +1,52 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B1ActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B1ActionInitialization.hh
/// \brief Definition of the B1ActionInitialization class
#ifndef B1ActionInitialization_h
#define B1ActionInitialization_h 1
#include "G4VUserActionInitialization.hh"
/// Action initialization class.
class B1ActionInitialization : public G4VUserActionInitialization
{
public:
B1ActionInitialization();
virtual ~B1ActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B1DetectorConstruction.hh 69565 2013-05-08 12:35:31Z gcosmo $
//
/// \file B1DetectorConstruction.hh
/// \brief Definition of the B1DetectorConstruction class
@@ -35,6 +35,7 @@
#include "globals.hh"
class G4VPhysicalVolume;
class G4LogicalVolume;
/// Detector construction class to define materials and geometry.
@@ -44,8 +45,12 @@ class B1DetectorConstruction : public G4VUserDetectorConstruction
B1DetectorConstruction();
virtual ~B1DetectorConstruction();
public:
virtual G4VPhysicalVolume* Construct();
G4LogicalVolume* GetScoringVolume() const { return fScoringVolume; }
protected:
G4LogicalVolume* fScoringVolume;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+3 -21
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B1EventAction.hh 75216 2013-10-29 16:08:11Z gcosmo $
//
/// \file B1EventAction.hh
/// \brief Definition of the B1EventAction class
@@ -34,15 +34,8 @@
#include "G4UserEventAction.hh"
#include "globals.hh"
class B1SteppingAction;
/// Event action class
///
/// It holds data member fEnergySum and fEnergy2Sum for accumulating
/// the event energy deposit its square event by event.
/// These data are then used in the run action to compute the dose.
/// The accumulated energy and enrgy square sums are reset for each
/// new run via the Reset() function from the run action.
class B1EventAction : public G4UserEventAction
{
@@ -50,24 +43,13 @@ class B1EventAction : public G4UserEventAction
B1EventAction();
virtual ~B1EventAction();
// static access method
static B1EventAction* Instance();
virtual void BeginOfEventAction(const G4Event* event);
virtual void EndOfEventAction(const G4Event* event);
void Reset();
void AddEdep(G4double edep) { fEdep += edep; }
// get methods
G4double GetEnergySum() const { return fEnergySum; }
G4double GetEnergy2Sum() const { return fEnergy2Sum; }
private:
static B1EventAction* fgInstance;
G4int fPrintModulo;
G4double fEnergySum;
G4double fEnergy2Sum;
G4double fEdep;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B1PrimaryGeneratorAction.hh 69565 2013-05-08 12:35:31Z gcosmo $
//
/// \file B1PrimaryGeneratorAction.hh
/// \brief Definition of the B1PrimaryGeneratorAction class
@@ -37,9 +37,9 @@
class G4ParticleGun;
class G4Event;
class B1DetectorConstruction;
class G4Box;
/// The primary generator action class with particle gum.
/// The primary generator action class with particle gun.
///
/// The default kinematic is a 6 MeV gamma, randomly distribued
/// in front of the phantom across 80% of the (X,Y) phantom size.
@@ -50,9 +50,6 @@ class B1PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
B1PrimaryGeneratorAction();
virtual ~B1PrimaryGeneratorAction();
// static access method
static const B1PrimaryGeneratorAction* Instance();
// method from the base class
virtual void GeneratePrimaries(G4Event*);
@@ -60,9 +57,8 @@ class B1PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
const G4ParticleGun* GetParticleGun() const { return fParticleGun; }
private:
static B1PrimaryGeneratorAction* fgInstance;
G4ParticleGun* fParticleGun; // pointer a to G4 gun class
G4Box* fEnvelopeBox;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+65
View File
@@ -0,0 +1,65 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B1Run.hh 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B1Run.hh
/// \brief Definition of the B1Run class
#ifndef B1Run_h
#define B1Run_h 1
#include "G4Run.hh"
#include "globals.hh"
class G4Event;
/// Run class
///
class B1Run : public G4Run
{
public:
B1Run();
virtual ~B1Run();
// method from the base class
virtual void Merge(const G4Run*);
void AddEdep (G4double edep);
// get methods
G4double GetEdep() const { return fEdep; }
G4double GetEdep2() const { return fEdep2; }
private:
G4double fEdep;
G4double fEdep2;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
+3 -1
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B1RunAction.hh 69565 2013-05-08 12:35:31Z gcosmo $
//
/// \file B1RunAction.hh
/// \brief Definition of the B1RunAction class
@@ -35,6 +35,7 @@
#include "globals.hh"
class G4Run;
class G4LogicalVolume;
/// Run action class
///
@@ -48,6 +49,7 @@ class B1RunAction : public G4UserRunAction
B1RunAction();
virtual ~B1RunAction();
virtual G4Run* GenerateRun();
virtual void BeginOfRunAction(const G4Run*);
virtual void EndOfRunAction(const G4Run*);
};
+6 -24
View File
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B1SteppingAction.hh 74483 2013-10-09 13:37:06Z gcosmo $
//
/// \file B1SteppingAction.hh
/// \brief Definition of the B1SteppingAction class
@@ -34,43 +34,25 @@
#include "G4UserSteppingAction.hh"
#include "globals.hh"
class B1EventAction;
class G4LogicalVolume;
/// Stepping action class
///
/// It holds data member fEnergy for accumulating the energy deposit
/// in a selected volume step by step.
/// The selected volume is set from the detector construction via the
/// SetVolume() function. The accumulated energy deposit is reset for each
/// new event via the Reset() function from the event action.
class B1SteppingAction : public G4UserSteppingAction
{
public:
B1SteppingAction();
B1SteppingAction(B1EventAction* eventAction);
virtual ~B1SteppingAction();
// static access method
static B1SteppingAction* Instance();
// method from the base class
virtual void UserSteppingAction(const G4Step*);
// reset accumulated energy
void Reset();
// set methods
void SetVolume(G4LogicalVolume* volume) { fVolume = volume; }
// get methods
G4LogicalVolume* GetVolume() const { return fVolume; }
G4double GetEnergy() const { return fEnergy; }
private:
static B1SteppingAction* fgInstance;
G4LogicalVolume* fVolume;
G4double fEnergy;
B1EventAction* fEventAction;
G4LogicalVolume* fScoringVolume;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+1
View File
@@ -12,6 +12,7 @@
/gun/particle gamma
/gun/energy 6 MeV
#
/run/printProgress 100
/run/beamOn 1000
#
# proton 210 MeV to the direction (0.,0.,1.)
@@ -0,0 +1,68 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B1ActionInitialization.cc 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file B1ActionInitialization.cc
/// \brief Implementation of the B1ActionInitialization class
#include "B1ActionInitialization.hh"
#include "B1PrimaryGeneratorAction.hh"
#include "B1RunAction.hh"
#include "B1EventAction.hh"
#include "B1SteppingAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1ActionInitialization::B1ActionInitialization()
: G4VUserActionInitialization()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1ActionInitialization::~B1ActionInitialization()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B1ActionInitialization::BuildForMaster() const
{
SetUserAction(new B1RunAction);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B1ActionInitialization::Build() const
{
SetUserAction(new B1PrimaryGeneratorAction);
SetUserAction(new B1RunAction);
B1EventAction* eventAction = new B1EventAction;
SetUserAction(eventAction);
SetUserAction(new B1SteppingAction(eventAction));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,14 +23,12 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B1DetectorConstruction.cc 75117 2013-10-28 09:38:37Z gcosmo $
//
/// \file B1DetectorConstruction.cc
/// \brief Implementation of the B1DetectorConstruction class
#include "B1DetectorConstruction.hh"
#include "B1SteppingAction.hh"
// use of stepping action to set the accounting volume
#include "G4RunManager.hh"
#include "G4NistManager.hh"
@@ -46,7 +44,8 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1DetectorConstruction::B1DetectorConstruction()
: G4VUserDetectorConstruction()
: G4VUserDetectorConstruction(),
fScoringVolume(0)
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -119,8 +118,7 @@ G4VPhysicalVolume* B1DetectorConstruction::Construct()
//
// Shape 1
//
//
G4Material* shape1_mat = nist->FindOrBuildMaterial("G4_A-150_TISSUE");
G4ThreeVector pos1 = G4ThreeVector(0, 2*cm, -7*cm);
@@ -133,29 +131,6 @@ G4VPhysicalVolume* B1DetectorConstruction::Construct()
new G4Cons("Shape1",
shape1_rmina, shape1_rmaxa, shape1_rminb, shape1_rmaxb, shape1_hz,
shape1_phimin, shape1_phimax);
/*
// Full sphere shape
G4double shape1_rmax = 4*cm;
G4Orb* solidShape1 =
new G4Orb("Shape1", //its name
shape1_rmax); //its size
// Sphere shape
G4double shape1_rmin = 0*cm, shape1_rmax = 4*cm;
G4double shape1_thetamin = 0.*deg, shape1_thetamax = 180.*deg;
G4double shape1_phimin = 0.*deg, shape1_phimax = 360.*deg;
G4Sphere* solidShape1 =
new G4Sphere("Shape1", //its name
shape1_rmin, shape1_rmax, //its size
shape1_phimin, shape1_phimax, //phi angle
shape1_thetamin, shape1_thetamax); //theta angle
// Box shape
G4double shape1_dx = 8*cm, shape1_dy = 8*cm, shape1_dz = 8*cm;
G4Box* solidShape1 =
new G4Box("Shape1", //its name
0.5*shape1_dx, 0.5*shape1_dy, 0.5*shape1_dz); //its size
*/
G4LogicalVolume* logicShape1 =
new G4LogicalVolume(solidShape1, //its solid
@@ -177,17 +152,6 @@ G4VPhysicalVolume* B1DetectorConstruction::Construct()
//
G4Material* shape2_mat = nist->FindOrBuildMaterial("G4_BONE_COMPACT_ICRU");
G4ThreeVector pos2 = G4ThreeVector(0, -1*cm, 7*cm);
/*
// Shape 2 - conical section shape
G4double shape2_rmina = 0.*cm, shape2_rmaxa = 5.*cm;
G4double shape2_rminb = 0.*cm, shape2_rmaxb = 8.*cm;
G4double shape2_hz = 3.*cm;
G4double shape2_phimin = 0.*deg, shape2_phimax = 360.*deg;
G4Cons* solidShape2 =
new G4Cons("Shape2",
shape2_rmina, shape2_rmaxa, shape2_rminb, shape2_rmaxb, shape2_hz,
shape2_phimin, shape2_phimax);
*/
// Trapezoid shape
G4double shape2_dxa = 12*cm, shape2_dxb = 12*cm;
@@ -212,13 +176,9 @@ G4VPhysicalVolume* B1DetectorConstruction::Construct()
0, //copy number
checkOverlaps); //overlaps checking
// Set scoring volume to stepping action
// (where we will account energy deposit)
// Set Shape2 as scoring volume
//
B1SteppingAction* steppingAction = B1SteppingAction::Instance();
////steppingAction->SetVolume(logicShape1);
steppingAction->SetVolume(logicShape2);
fScoringVolume = logicShape2;
//
//always return the physical World
+19 -56
View File
@@ -23,82 +23,45 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B1EventAction.cc 75117 2013-10-28 09:38:37Z gcosmo $
//
/// \file B1EventAction.cc
/// \brief Implementation of the B1EventAction class
#include "B1EventAction.hh"
#include "B1Run.hh"
#include "B1RunAction.hh"
#include "B1SteppingAction.hh"
// use of stepping action to get and reset accumulated energy
#include "G4RunManager.hh"
#include "G4Event.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1EventAction* B1EventAction::fgInstance = 0;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1EventAction* B1EventAction::Instance()
{
// Static acces function via G4RunManager
return fgInstance;
}
#include "G4RunManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1EventAction::B1EventAction()
: G4UserEventAction(),
fPrintModulo(100),
fEnergySum(0.),
fEnergy2Sum(0.)
{
fgInstance = this;
}
fEdep(0.)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1EventAction::~B1EventAction()
{
fgInstance = 0;
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B1EventAction::BeginOfEventAction(const G4Event*)
{
fEdep = 0.;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B1EventAction::BeginOfEventAction(const G4Event* event)
{
G4int eventNb = event->GetEventID();
if (eventNb%fPrintModulo == 0) {
G4cout << "\n---> Begin of event: " << eventNb << G4endl;
}
// Reset accounted energy in stepping action
B1SteppingAction::Instance()->Reset();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B1EventAction::EndOfEventAction(const G4Event* /*event*/)
{
// accumulate statistics
G4double energy = B1SteppingAction::Instance()->GetEnergy();
fEnergySum += energy;
fEnergy2Sum += energy*energy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B1EventAction::Reset()
{
//reset cumulative quantities
//
fEnergySum = 0.;
fEnergy2Sum = 0.;
void B1EventAction::EndOfEventAction(const G4Event*)
{
// accumulate statistics in B1Run
B1Run* run
= static_cast<B1Run*>(
G4RunManager::GetRunManager()->GetNonConstCurrentRun());
run->AddEdep(fEdep);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B1PrimaryGeneratorAction.cc 69565 2013-05-08 12:35:31Z gcosmo $
//
/// \file B1PrimaryGeneratorAction.cc
/// \brief Implementation of the B1PrimaryGeneratorAction class
@@ -42,22 +42,10 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1PrimaryGeneratorAction* B1PrimaryGeneratorAction::fgInstance = 0;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
const B1PrimaryGeneratorAction* B1PrimaryGeneratorAction::Instance()
{
// Static acces function via G4RunManager
return fgInstance;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1PrimaryGeneratorAction::B1PrimaryGeneratorAction()
: G4VUserPrimaryGeneratorAction(),
fParticleGun(0)
fParticleGun(0),
fEnvelopeBox(0)
{
G4int n_particle = 1;
fParticleGun = new G4ParticleGun(n_particle);
@@ -70,8 +58,6 @@ B1PrimaryGeneratorAction::B1PrimaryGeneratorAction()
fParticleGun->SetParticleDefinition(particle);
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
fParticleGun->SetParticleEnergy(6.*MeV);
fgInstance = this;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -79,7 +65,6 @@ B1PrimaryGeneratorAction::B1PrimaryGeneratorAction()
B1PrimaryGeneratorAction::~B1PrimaryGeneratorAction()
{
delete fParticleGun;
fgInstance = 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -95,18 +80,25 @@ void B1PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
G4double envSizeXY = 0;
G4double envSizeZ = 0;
G4LogicalVolume* envLV
= G4LogicalVolumeStore::GetInstance()->GetVolume("Envelope");
G4Box* envBox = NULL;
if ( envLV ) envBox = dynamic_cast<G4Box*>(envLV->GetSolid());
if ( envBox ) {
envSizeXY = envBox->GetXHalfLength()*2.;
envSizeZ = envBox->GetZHalfLength()*2.;
if (!fEnvelopeBox)
{
G4LogicalVolume* envLV
= G4LogicalVolumeStore::GetInstance()->GetVolume("Envelope");
if ( envLV ) fEnvelopeBox = dynamic_cast<G4Box*>(envLV->GetSolid());
}
if ( fEnvelopeBox ) {
envSizeXY = fEnvelopeBox->GetXHalfLength()*2.;
envSizeZ = fEnvelopeBox->GetZHalfLength()*2.;
}
else {
G4cerr << "Envelope volume of box shape not found." << G4endl;
G4cerr << "Perhaps you have changed geometry." << G4endl;
G4cerr << "The gun will be place in the center." << G4endl;
G4ExceptionDescription msg;
msg << "Envelope volume of box shape not found.\n";
msg << "Perhaps you have changed geometry.\n";
msg << "The gun will be place at the center.";
G4Exception("B1PrimaryGeneratorAction::GeneratePrimaries()",
"MyCode0002",JustWarning,msg);
}
G4double size = 0.8;
+67
View File
@@ -0,0 +1,67 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: B1Run.cc 66536 2012-12-19 14:32:36Z ihrivnac $
//
/// \file B1Run.cc
/// \brief Implementation of the B1Run class
#include "B1Run.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1Run::B1Run()
: G4Run(),
fEdep(0.),
fEdep2(0.)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1Run::~B1Run()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B1Run::Merge(const G4Run* run)
{
const B1Run* localRun = static_cast<const B1Run*>(run);
fEdep += localRun->fEdep;
fEdep2 += localRun->fEdep2;
G4Run::Merge(run);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B1Run::AddEdep (G4double edep)
{
fEdep += edep;
fEdep2 += edep*edep;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+55 -38
View File
@@ -23,22 +23,19 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B1RunAction.cc 75216 2013-10-29 16:08:11Z gcosmo $
//
/// \file B1RunAction.cc
/// \brief Implementation of the B1RunAction class
#include "B1RunAction.hh"
#include "B1PrimaryGeneratorAction.hh"
#include "B1EventAction.hh"
#include "B1SteppingAction.hh"
// use of other actions
// - primary generator: to get info for printing about the primary
// - event action: to get and reset accumulated energy sums
// - stepping action: to get info about accounting volume
#include "B1DetectorConstruction.hh"
#include "B1Run.hh"
#include "G4Run.hh"
#include "G4RunManager.hh"
#include "G4LogicalVolumeStore.hh"
#include "G4LogicalVolume.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
@@ -46,7 +43,7 @@
B1RunAction::B1RunAction()
: G4UserRunAction()
{
{
// add new units for dose
//
const G4double milligray = 1.e-3*gray;
@@ -67,53 +64,73 @@ B1RunAction::~B1RunAction()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B1RunAction::BeginOfRunAction(const G4Run* aRun)
{
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
//inform the runManager to save random number seed
G4RunManager::GetRunManager()->SetRandomNumberStore(false);
//initialize event cumulative quantities
B1EventAction::Instance()->Reset();
G4Run* B1RunAction::GenerateRun()
{
return new B1Run;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B1RunAction::EndOfRunAction(const G4Run* aRun)
void B1RunAction::BeginOfRunAction(const G4Run*)
{
//inform the runManager to save random number seed
G4RunManager::GetRunManager()->SetRandomNumberStore(false);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B1RunAction::EndOfRunAction(const G4Run* run)
{
G4int nofEvents = aRun->GetNumberOfEvent();
G4int nofEvents = run->GetNumberOfEvent();
if (nofEvents == 0) return;
const B1Run* b1Run = static_cast<const B1Run*>(run);
// Compute dose
//
G4double energySum = B1EventAction::Instance()->GetEnergySum();
G4double energy2Sum = B1EventAction::Instance()->GetEnergy2Sum();
G4double rms = energy2Sum - energySum*energySum/nofEvents;
G4double edep = b1Run->GetEdep();
G4double edep2 = b1Run->GetEdep2();
G4double rms = edep2 - edep*edep/nofEvents;
if (rms > 0.) rms = std::sqrt(rms); else rms = 0.;
G4double mass = B1SteppingAction::Instance()->GetVolume()->GetMass();
G4double dose = energySum/mass;
const B1DetectorConstruction* detectorConstruction
= static_cast<const B1DetectorConstruction*>
(G4RunManager::GetRunManager()->GetUserDetectorConstruction());
G4double mass = detectorConstruction->GetScoringVolume()->GetMass();
G4double dose = edep/mass;
G4double rmsDose = rms/mass;
// Run conditions
//
const G4ParticleGun* particleGun
= B1PrimaryGeneratorAction::Instance()->GetParticleGun();
G4String particleName
= particleGun->GetParticleDefinition()->GetParticleName();
G4double particleEnergy = particleGun->GetParticleEnergy();
// note: There is no primary generator action object for "master"
// run manager for multi-threaded mode.
const B1PrimaryGeneratorAction* generatorAction
= static_cast<const B1PrimaryGeneratorAction*>
(G4RunManager::GetRunManager()->GetUserPrimaryGeneratorAction());
G4String runCondition;
if (generatorAction)
{
const G4ParticleGun* particleGun = generatorAction->GetParticleGun();
runCondition += particleGun->GetParticleDefinition()->GetParticleName();
runCondition += " of ";
G4double particleEnergy = particleGun->GetParticleEnergy();
runCondition += G4BestUnit(particleEnergy,"Energy");
}
// Print
//
if (IsMaster()) {
G4cout
<< "\n--------------------End of Global Run-----------------------";
}
else {
G4cout
<< "\n--------------------End of Local Run------------------------";
}
G4cout
<< "\n--------------------End of Run------------------------------\n"
<< " The run consists of " << nofEvents << " "<< particleName << " of "
<< G4BestUnit(particleEnergy,"Energy")
<< "\n Dose in scoring volume "
<< B1SteppingAction::Instance()->GetVolume()->GetName() << " : "
<< G4BestUnit(dose,"Dose")
<< " +- " << G4BestUnit(rmsDose,"Dose")
<< "\n The run consists of " << nofEvents << " "<< runCondition
<< "\n Dose in scoring volume : "
<< G4BestUnit(dose,"Dose") << " +- " << G4BestUnit(rmsDose,"Dose")
<< "\n------------------------------------------------------------\n"
<< G4endl;
}
+20 -34
View File
@@ -23,70 +23,56 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// $Id: B1SteppingAction.cc 74483 2013-10-09 13:37:06Z gcosmo $
//
/// \file B1SteppingAction.cc
/// \brief Implementation of the B1SteppingAction class
#include "B1SteppingAction.hh"
#include "B1EventAction.hh"
#include "B1DetectorConstruction.hh"
#include "G4Step.hh"
#include "G4Event.hh"
#include "G4RunManager.hh"
#include "G4UnitsTable.hh"
#include "G4LogicalVolume.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1SteppingAction* B1SteppingAction::fgInstance = 0;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1SteppingAction* B1SteppingAction::Instance()
{
// Static acces function via G4RunManager
return fgInstance;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1SteppingAction::B1SteppingAction()
B1SteppingAction::B1SteppingAction(B1EventAction* eventAction)
: G4UserSteppingAction(),
fVolume(0),
fEnergy(0.)
{
fgInstance = this;
}
fEventAction(eventAction),
fScoringVolume(0)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
B1SteppingAction::~B1SteppingAction()
{
fgInstance = 0;
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B1SteppingAction::UserSteppingAction(const G4Step* step)
{
if (!fScoringVolume) {
const B1DetectorConstruction* detectorConstruction
= static_cast<const B1DetectorConstruction*>
(G4RunManager::GetRunManager()->GetUserDetectorConstruction());
fScoringVolume = detectorConstruction->GetScoringVolume();
}
// get volume of the current step
G4LogicalVolume* volume
= step->GetPreStepPoint()->GetTouchableHandle()
->GetVolume()->GetLogicalVolume();
// check if we are in scoring volume
if (volume != fVolume ) return;
if (volume != fScoringVolume) return;
// collect energy and track length step by step
G4double edep = step->GetTotalEnergyDeposit();
fEnergy += edep;
// collect energy deposited in this step
G4double edepStep = step->GetTotalEnergyDeposit();
fEventAction->AddEdep(edepStep);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void B1SteppingAction::Reset()
{
fEnergy = 0.;
}