Import Geant4 10.0.0 source tree
This commit is contained in:
+13
-2
@@ -1,4 +1,4 @@
|
||||
// $Id: Doxymain.h 51000 2011-06-21 12:45:50Z ihrivnac $
|
||||
// $Id: .README 78001 2013-12-02 08:24:53Z gcosmo $
|
||||
|
||||
///\file "basic/.README"
|
||||
///\brief Geant4 Basic Examples README page
|
||||
@@ -36,7 +36,18 @@ development.
|
||||
- Scoring within layers in four ways: via user actions (a), via user own
|
||||
object (b), via G4 sensitive detector and hits (c) and via scorers (d)
|
||||
- Geant4 physics list (FTFP_BERT)
|
||||
- UI commans defined using G4GenericMessenger
|
||||
- Histograms (1D) and ntuple saved in the output file
|
||||
- Started from novice/N03 example
|
||||
|
||||
- \ref ExampleB5
|
||||
- A double-arm spectrometer with wire chambers, hodoscopes and calorimeters
|
||||
with a local constant magnetic field
|
||||
- Geometry with placements with rotation, replicas and parameterisation
|
||||
- Scoring within wire chambers, hodoscopes and calorimeters via
|
||||
G4 sensitive detector and hits
|
||||
- Geant4 physics list (FTFP_BERT) with step limiter
|
||||
- UI commans defined using G4GenericMessenger
|
||||
- Histograms (1D, 2D) and ntuple saved in the output file
|
||||
- Started from extended/analysis/A01
|
||||
|
||||
*/
|
||||
|
||||
+41
-14
@@ -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.
|
||||
|
||||
|
||||
@@ -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,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.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
@@ -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
@@ -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.
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
@@ -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......
|
||||
|
||||
@@ -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......
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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*);
|
||||
};
|
||||
|
||||
@@ -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......
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -23,39 +23,45 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B1Run.cc 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B2MagneticField.hh
|
||||
/// \brief Definition of the B2MagneticField class
|
||||
/// \file B1Run.cc
|
||||
/// \brief Implementation of the B1Run class
|
||||
|
||||
#ifndef B2MagneticField_h
|
||||
#define B2MagneticField_h 1
|
||||
|
||||
#include "G4UniformMagField.hh"
|
||||
|
||||
class G4FieldManager;
|
||||
#include "B1Run.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
/// A class for control of the Magnetic Field of the detector.
|
||||
/// The field is assumed to be uniform.
|
||||
B1Run::B1Run()
|
||||
: G4Run(),
|
||||
fEdep(0.),
|
||||
fEdep2(0.)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B1Run::~B1Run()
|
||||
{}
|
||||
|
||||
class B2MagneticField : public G4UniformMagField
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B1Run::Merge(const G4Run* run)
|
||||
{
|
||||
public:
|
||||
B2MagneticField(); // A zero field
|
||||
B2MagneticField(G4ThreeVector); // The value of the field
|
||||
virtual ~B2MagneticField();
|
||||
|
||||
//Set the field (fieldValue,0,0)
|
||||
void SetMagFieldValue(G4double fieldValue);
|
||||
void SetMagFieldValue(G4ThreeVector fieldVector);
|
||||
|
||||
protected:
|
||||
// Find the global Field Manager
|
||||
G4FieldManager* GetGlobalFieldManager(); // static
|
||||
};
|
||||
const B1Run* localRun = static_cast<const B1Run*>(run);
|
||||
fEdep += localRun->fEdep;
|
||||
fEdep2 += localRun->fEdep2;
|
||||
|
||||
G4Run::Merge(run);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
void B1Run::AddEdep (G4double edep)
|
||||
{
|
||||
fEdep += edep;
|
||||
fEdep2 += edep*edep;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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.;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//$Id$
|
||||
//$Id: .README 78001 2013-12-02 08:24:53Z gcosmo $
|
||||
|
||||
///\file "B2/.README"
|
||||
///\brief Example B2 README page
|
||||
@@ -17,11 +17,12 @@ This example simulates a simplified fixed target experiment.
|
||||
(in B2bDetectorConstruction), see also B2bChamberParameterisation class.
|
||||
|
||||
In addition, a global, uniform, and transverse magnetic field can be
|
||||
applied (see B2MagneticField and B2aDetectorMessenger,
|
||||
B2bDetectorMessenger classes) and set via interactive commands.
|
||||
applied using G4GlobalMagFieldMessenger, instantiated in
|
||||
B2aDetectorConstruction::ConstructSDandField with a non zero field value,
|
||||
or via interactive commands.
|
||||
For example:
|
||||
\verbatim
|
||||
/B2/det/setField 0.2 tesla
|
||||
/globalField/setValue 0.2 0 0 tesla
|
||||
\endverbatim
|
||||
An instance of the B2TrackerSD class is created and associated with each
|
||||
logical chamber volume (in B2a) and with the one G4LogicalVolume associated
|
||||
@@ -52,7 +53,23 @@ This example simulates a simplified fixed target experiment.
|
||||
\endverbatim
|
||||
allows the user to activate/inactivate the processes one by one.
|
||||
|
||||
\section B2_s3 PRIMARY GENERATOR
|
||||
\section B2_s3 ACTION INITALIZATION
|
||||
|
||||
A newly introduced class, B2ActionInitialization,
|
||||
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:
|
||||
B2ActionInitialization::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
|
||||
B2ActionInitialization::BuildForMaster()
|
||||
which is invoked only in multi-threading mode.
|
||||
|
||||
\section B2_s4 PRIMARY GENERATOR
|
||||
|
||||
The primary generator action class employs the G4ParticleGun.
|
||||
The primary kinematics consists of a single particle which hits the target
|
||||
@@ -60,7 +77,7 @@ This example simulates a simplified fixed target experiment.
|
||||
and its energy can be changed via the G4 built-in commands of
|
||||
the G4ParticleGun class.
|
||||
|
||||
\section B2_s4 RUNS and EVENTS
|
||||
\section B2_s5 RUNS and EVENTS
|
||||
|
||||
A run is a set of events.
|
||||
|
||||
@@ -81,7 +98,7 @@ This example simulates a simplified fixed target experiment.
|
||||
G4RunManager is also informed how to SetRandomNumberStore for storing
|
||||
initial random number seeds per run or per event.
|
||||
|
||||
\section B2_s5 USER LIMITS
|
||||
\section B2_s6 USER LIMITS
|
||||
|
||||
This example also illustrates how to introduce tracking constraints
|
||||
like maximum step length, minimum kinetic energy etc. via the G4UserLimits
|
||||
@@ -96,7 +113,7 @@ This example simulates a simplified fixed target experiment.
|
||||
/B2/det/stepMax 1.0 mm
|
||||
\endverbatim
|
||||
|
||||
\section B2_s6 DETECTOR RESPONSE
|
||||
\section B2_s7 DETECTOR RESPONSE
|
||||
|
||||
A HIT is a step per step record of all the information needed to
|
||||
simulate and analyse the detector response.
|
||||
@@ -182,7 +199,7 @@ This example simulates a simplified fixed target experiment.
|
||||
in the main () function in exampleB2a.cc
|
||||
The selection of the user command interface is then done automatically
|
||||
according to the Geant4 configuration or it can be done explicitly via
|
||||
the third argument of the G4UIExecutive constructor (see exampleB4a.cc).
|
||||
the third argument of the G4UIExecutive constructor (see exampleB2a.cc).
|
||||
|
||||
\section B2_C HOW TO RUN
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# $Id: CMakeLists.txt 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
#
|
||||
|
||||
@@ -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.
|
||||
# --------------------------------------------------------------
|
||||
@@ -14,6 +14,8 @@ endif
|
||||
.PHONY: all
|
||||
all: lib bin
|
||||
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
include $(G4INSTALL)/config/binmake.gmk
|
||||
|
||||
visclean:
|
||||
|
||||
@@ -23,21 +23,23 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: exampleB2a.cc 75214 2013-10-29 16:04:42Z gcosmo $
|
||||
//
|
||||
/// \file exampleB2a.cc
|
||||
/// \brief Main program of the B2a example
|
||||
|
||||
#include "B2aDetectorConstruction.hh"
|
||||
#include "B2PrimaryGeneratorAction.hh"
|
||||
#include "B2RunAction.hh"
|
||||
#include "B2EventAction.hh"
|
||||
|
||||
#include "G4StepLimiterBuilder.hh"
|
||||
#include "B2ActionInitialization.hh"
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
#else
|
||||
#include "G4RunManager.hh"
|
||||
#endif
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
#include "FTFP_BERT.hh"
|
||||
#include "G4StepLimiterPhysics.hh"
|
||||
|
||||
#include "Randomize.hh"
|
||||
|
||||
@@ -55,25 +57,25 @@ 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
|
||||
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MTRunManager * runManager = new G4MTRunManager;
|
||||
#else
|
||||
G4RunManager * runManager = new G4RunManager;
|
||||
#endif
|
||||
|
||||
// Set mandatory initialization classes
|
||||
|
||||
runManager->SetUserInitialization(new B2aDetectorConstruction());
|
||||
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
physicsList->RegisterPhysics(new G4StepLimiterBuilder());
|
||||
physicsList->RegisterPhysics(new G4StepLimiterPhysics());
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
// Set user action classes
|
||||
|
||||
runManager->SetUserAction(new B2PrimaryGeneratorAction());
|
||||
runManager->SetUserAction(new B2RunAction());
|
||||
runManager->SetUserAction(new B2EventAction());
|
||||
runManager->SetUserInitialization(new B2ActionInitialization());
|
||||
|
||||
// Initialize G4 kernel
|
||||
|
||||
|
||||
+3948
-12126
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,6 @@
|
||||
/gui/addMenu run Run
|
||||
/gui/addButton run "beamOn 1" "/run/beamOn 1"
|
||||
/gui/addButton run run1 "/control/execute run1.mac"
|
||||
/gui/addButton run run2 "/control/execute run2.mac"
|
||||
#
|
||||
# Gun menu :
|
||||
/gui/addMenu gun Gun
|
||||
@@ -31,14 +30,14 @@
|
||||
#
|
||||
# Field menu :
|
||||
/gui/addMenu field Field
|
||||
/gui/addButton field "off" "/B2/det/setField 0.2 tesla"
|
||||
/gui/addButton field "0.2 tesla" "/B2/det/setField 0.2 tesla"
|
||||
/gui/addButton field "2.0 tesla" "/B2/det/setField 2.0 tesla"
|
||||
/gui/addButton field "off" "/globalField/setValue 0 0 0 tesla"
|
||||
/gui/addButton field "0.2 tesla" "/globalField/setValue 0.2 0 0 tesla"
|
||||
/gui/addButton field "2.0 tesla" "/globalField/setValue 2.0 0 0 tesla"
|
||||
#
|
||||
# Viewer menu :
|
||||
/gui/addMenu viewer Viewer
|
||||
/gui/addButton viewer "Set style surface" "/vis/viewer/set/style surface"
|
||||
/gui/addButton viewer "Set style wireframe" "/vis/viewer/set/style wire"
|
||||
/gui/addButton viewer "Set style wireframe" "/vis/viewer/set/style wireframe"
|
||||
/gui/addButton viewer "Refresh viewer" "/vis/viewer/refresh"
|
||||
/gui/addButton viewer "Update viewer (interaction or end-of-file)" "/vis/viewer/update"
|
||||
/gui/addButton viewer "Flush viewer (= refresh + update)" "/vis/viewer/flush"
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B2ActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B2ActionInitialization.hh
|
||||
/// \brief Definition of the B2ActionInitialization class
|
||||
|
||||
#ifndef B2ActionInitialization_h
|
||||
#define B2ActionInitialization_h 1
|
||||
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
|
||||
class B4DetectorConstruction;
|
||||
|
||||
/// Action initialization class.
|
||||
///
|
||||
|
||||
class B2ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
B2ActionInitialization();
|
||||
virtual ~B2ActionInitialization();
|
||||
|
||||
virtual void BuildForMaster() const;
|
||||
virtual void Build() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2EventAction.hh 75214 2013-10-29 16:04:42Z gcosmo $
|
||||
//
|
||||
/// \file B2EventAction.hh
|
||||
/// \brief Definition of the B2EventAction class
|
||||
@@ -45,19 +45,8 @@ class B2EventAction : public G4UserEventAction
|
||||
|
||||
virtual void BeginOfEventAction(const G4Event* );
|
||||
virtual void EndOfEventAction(const G4Event* );
|
||||
|
||||
// Set methods
|
||||
void SetPrintModulo(G4int value);
|
||||
|
||||
private:
|
||||
G4int fPrintModulo;
|
||||
};
|
||||
|
||||
// inline functions
|
||||
|
||||
inline void B2EventAction::SetPrintModulo(G4int value) {
|
||||
fPrintModulo = value;
|
||||
}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2PrimaryGeneratorAction.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B2PrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the B2PrimaryGeneratorAction class
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2RunAction.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B2RunAction.hh
|
||||
/// \brief Definition of the B2RunAction class
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2TrackerHit.hh 69706 2013-05-13 09:12:40Z gcosmo $
|
||||
//
|
||||
/// \file B2TrackerHit.hh
|
||||
/// \brief Definition of the B2TrackerHit class
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "tls.hh"
|
||||
|
||||
/// Tracker hit class
|
||||
///
|
||||
@@ -84,22 +85,22 @@ class B2TrackerHit : public G4VHit
|
||||
|
||||
typedef G4THitsCollection<B2TrackerHit> B2TrackerHitsCollection;
|
||||
|
||||
extern G4Allocator<B2TrackerHit> B2TrackerHitAllocator;
|
||||
extern G4ThreadLocal G4Allocator<B2TrackerHit>* B2TrackerHitAllocator;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void* B2TrackerHit::operator new(size_t)
|
||||
{
|
||||
void *hit;
|
||||
hit = (void *) B2TrackerHitAllocator.MallocSingle();
|
||||
return hit;
|
||||
if(!B2TrackerHitAllocator)
|
||||
B2TrackerHitAllocator = new G4Allocator<B2TrackerHit>;
|
||||
return (void *) B2TrackerHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void B2TrackerHit::operator delete(void *hit)
|
||||
{
|
||||
B2TrackerHitAllocator.FreeSingle((B2TrackerHit*) hit);
|
||||
B2TrackerHitAllocator->FreeSingle((B2TrackerHit*) hit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2TrackerSD.hh 69706 2013-05-13 09:12:40Z gcosmo $
|
||||
//
|
||||
/// \file B2TrackerSD.hh
|
||||
/// \brief Definition of the B2TrackerSD class
|
||||
@@ -44,10 +44,9 @@ class G4HCofThisEvent;
|
||||
|
||||
/// B2Tracker sensitive detector class
|
||||
///
|
||||
/// In Initialize(), it creates one hit for each tracker volume
|
||||
///
|
||||
/// The values are accounted in hits in ProcessHits() function which is called
|
||||
/// by Geant4 kernel at each step.
|
||||
/// The hits are accounted in hits in ProcessHits() function which is called
|
||||
/// by Geant4 kernel at each step. A hit is created with each step with non zero
|
||||
/// energy deposit.
|
||||
|
||||
class B2TrackerSD : public G4VSensitiveDetector
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2aDetectorConstruction.hh 73722 2013-09-09 10:23:05Z gcosmo $
|
||||
//
|
||||
/// \file B2aDetectorConstruction.hh
|
||||
/// \brief Definition of the B2aDetectorConstruction class
|
||||
@@ -33,20 +33,18 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "tls.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4LogicalVolume;
|
||||
class G4Material;
|
||||
class G4UserLimits;
|
||||
class G4GlobalMagFieldMessenger;
|
||||
|
||||
class B2aDetectorMessenger;
|
||||
class B2MagneticField;
|
||||
|
||||
/// Detector construction class to define materials and geometry.
|
||||
///
|
||||
/// In addition a transverse uniform magnetic field is defined in
|
||||
/// SetMagField() method which can be activated via a command
|
||||
/// defined in the B2aDetectorMessenger class.
|
||||
/// Detector construction class to define materials, geometry
|
||||
/// and global uniform magnetic field.
|
||||
|
||||
class B2aDetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
@@ -56,9 +54,9 @@ class B2aDetectorConstruction : public G4VUserDetectorConstruction
|
||||
|
||||
public:
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
// Set methods
|
||||
void SetMagField(G4double );
|
||||
void SetTargetMaterial (G4String );
|
||||
void SetChamberMaterial(G4String );
|
||||
void SetMaxStep (G4double );
|
||||
@@ -81,7 +79,9 @@ class B2aDetectorConstruction : public G4VUserDetectorConstruction
|
||||
G4UserLimits* fStepLimit; // pointer to user step limits
|
||||
|
||||
B2aDetectorMessenger* fMessenger; // messenger
|
||||
B2MagneticField* fMagField; // magnetic field
|
||||
|
||||
static G4ThreadLocal G4GlobalMagFieldMessenger* fMagFieldMessenger;
|
||||
// magnetic field messenger
|
||||
|
||||
G4bool fCheckOverlaps; // option to activate checking of volumes overlaps
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2aDetectorMessenger.hh 69706 2013-05-13 09:12:40Z gcosmo $
|
||||
//
|
||||
/// \file B2aDetectorMessenger.hh
|
||||
/// \brief Definition of the B2aDetectorMessenger class
|
||||
@@ -46,7 +46,6 @@ class G4UIcmdWithADoubleAndUnit;
|
||||
/// It implements commands:
|
||||
/// - /B2/det/setTargetMaterial name
|
||||
/// - /B2/det/setChamberMaterial name
|
||||
/// - /B2/det/setField value unit
|
||||
/// - /B2/det/stepMax value unit
|
||||
|
||||
class B2aDetectorMessenger: public G4UImessenger
|
||||
@@ -66,7 +65,6 @@ class B2aDetectorMessenger: public G4UImessenger
|
||||
G4UIcmdWithAString* fTargMatCmd;
|
||||
G4UIcmdWithAString* fChamMatCmd;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* fSetFieldCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fStepMaxCmd;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Macro file for the initialization phase of "exampleN03.cc"
|
||||
# Macro file for the initialization phase of example B2
|
||||
# when running in interactive mode without visualization
|
||||
#
|
||||
# Set some default verbose
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Macro file for the initialization phase of "exampleB2.cc"
|
||||
# Macro file for the initialization phase of example B2
|
||||
# when running in interactive mode with visualization
|
||||
#
|
||||
# Set some default verbose
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
# set a magnetic field and max allowed step length
|
||||
# 3 event with printing hits
|
||||
#
|
||||
/B2/det/setField 0.2 tesla
|
||||
/globalField/verbose 1
|
||||
/globalField/setValue 0.2 0 0 tesla
|
||||
/B2/det/stepMax 1.0 mm
|
||||
/gun/energy 0.3 GeV
|
||||
/run/beamOn 3
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B2ActionInitialization.cc 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B2ActionInitialization.cc
|
||||
/// \brief Implementation of the B2ActionInitialization class
|
||||
|
||||
#include "B2ActionInitialization.hh"
|
||||
#include "B2PrimaryGeneratorAction.hh"
|
||||
#include "B2RunAction.hh"
|
||||
#include "B2EventAction.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B2ActionInitialization::B2ActionInitialization()
|
||||
: G4VUserActionInitialization()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B2ActionInitialization::~B2ActionInitialization()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2ActionInitialization::BuildForMaster() const
|
||||
{
|
||||
SetUserAction(new B2RunAction);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2ActionInitialization::Build() const
|
||||
{
|
||||
SetUserAction(new B2PrimaryGeneratorAction);
|
||||
SetUserAction(new B2RunAction);
|
||||
SetUserAction(new B2EventAction);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2EventAction.cc 75214 2013-10-29 16:04:42Z gcosmo $
|
||||
//
|
||||
/// \file B2EventAction.cc
|
||||
/// \brief Implementation of the B2EventAction class
|
||||
@@ -39,8 +39,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B2EventAction::B2EventAction()
|
||||
: G4UserEventAction(),
|
||||
fPrintModulo(1000)
|
||||
: G4UserEventAction()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -50,25 +49,13 @@ B2EventAction::~B2EventAction()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2EventAction::BeginOfEventAction(const G4Event* event)
|
||||
{
|
||||
G4int eventID = event->GetEventID();
|
||||
if ( eventID % fPrintModulo == 0) {
|
||||
G4cout << "\n---> Begin of event: " << eventID << G4endl;
|
||||
//CLHEP::HepRandom::showEngineStatus();
|
||||
}
|
||||
}
|
||||
void B2EventAction::BeginOfEventAction(const G4Event*)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2EventAction::EndOfEventAction(const G4Event* event)
|
||||
{
|
||||
// print per event (modulo n)
|
||||
|
||||
G4int eventID = event->GetEventID();
|
||||
if ( eventID % fPrintModulo == 0)
|
||||
G4cout << "---> End of event: " << eventID << G4endl;
|
||||
|
||||
// get number of stored trajectories
|
||||
|
||||
G4TrajectoryContainer* trajectoryContainer = event->GetTrajectoryContainer();
|
||||
@@ -77,6 +64,7 @@ void B2EventAction::EndOfEventAction(const G4Event* event)
|
||||
|
||||
// periodic printing
|
||||
|
||||
G4int eventID = event->GetEventID();
|
||||
if ( eventID < 100 || eventID % 100 == 0) {
|
||||
G4cout << ">>> Event: " << eventID << G4endl;
|
||||
if ( trajectoryContainer ) {
|
||||
@@ -84,7 +72,8 @@ void B2EventAction::EndOfEventAction(const G4Event* event)
|
||||
<< " trajectories stored in this event." << G4endl;
|
||||
}
|
||||
G4VHitsCollection* hc = event->GetHCofThisEvent()->GetHC(0);
|
||||
G4cout << " " << hc->GetSize() << " hits stored in this event" << G4endl;
|
||||
G4cout << " "
|
||||
<< hc->GetSize() << " hits stored in this event" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2PrimaryGeneratorAction.cc 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B2PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the B2PrimaryGeneratorAction class
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2RunAction.cc 75214 2013-10-29 16:04:42Z gcosmo $
|
||||
//
|
||||
/// \file B2RunAction.cc
|
||||
/// \brief Implementation of the B2RunAction class
|
||||
@@ -37,7 +37,10 @@
|
||||
|
||||
B2RunAction::B2RunAction()
|
||||
: G4UserRunAction()
|
||||
{}
|
||||
{
|
||||
// set printing event number per each 100 events
|
||||
G4RunManager::GetRunManager()->SetPrintProgress(1000);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -46,12 +49,9 @@ B2RunAction::~B2RunAction()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
void B2RunAction::BeginOfRunAction(const G4Run*)
|
||||
{
|
||||
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
|
||||
|
||||
//inform the runManager to save random number seed
|
||||
|
||||
G4RunManager::GetRunManager()->SetRandomNumberStore(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2TrackerHit.cc 69706 2013-05-13 09:12:40Z gcosmo $
|
||||
//
|
||||
/// \file B2TrackerHit.cc
|
||||
/// \brief Implementation of the B2TrackerHit class
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include <iomanip>
|
||||
|
||||
G4Allocator<B2TrackerHit> B2TrackerHitAllocator;
|
||||
G4ThreadLocal G4Allocator<B2TrackerHit>* B2TrackerHitAllocator=0;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2TrackerSD.cc 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B2TrackerSD.cc
|
||||
/// \brief Implementation of the B2TrackerSD class
|
||||
|
||||
@@ -23,14 +23,13 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2aDetectorConstruction.cc 77603 2013-11-26 17:11:49Z gcosmo $
|
||||
//
|
||||
/// \file B2aDetectorConstruction.cc
|
||||
/// \brief Implementation of the B2aDetectorConstruction class
|
||||
|
||||
#include "B2aDetectorConstruction.hh"
|
||||
#include "B2aDetectorMessenger.hh"
|
||||
#include "B2MagneticField.hh"
|
||||
#include "B2TrackerSD.hh"
|
||||
|
||||
#include "G4Material.hh"
|
||||
@@ -40,8 +39,8 @@
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4GlobalMagFieldMessenger.hh"
|
||||
#include "G4AutoDelete.hh"
|
||||
|
||||
#include "G4GeometryTolerance.hh"
|
||||
#include "G4GeometryManager.hh"
|
||||
@@ -53,12 +52,13 @@
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//#include "G4ios.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4ThreadLocal
|
||||
G4GlobalMagFieldMessenger* B2aDetectorConstruction::fMagFieldMessenger = 0;
|
||||
|
||||
B2aDetectorConstruction::B2aDetectorConstruction()
|
||||
:
|
||||
:G4VUserDetectorConstruction(),
|
||||
fNbOfChambers(0),
|
||||
fLogicTarget(NULL), fLogicChamber(NULL),
|
||||
fTargetMaterial(NULL), fChamberMaterial(NULL),
|
||||
@@ -66,7 +66,6 @@ B2aDetectorConstruction::B2aDetectorConstruction()
|
||||
fCheckOverlaps(true)
|
||||
{
|
||||
fMessenger = new B2aDetectorMessenger(this);
|
||||
fMagField = new B2MagneticField();
|
||||
|
||||
fNbOfChambers = 5;
|
||||
fLogicChamber = new G4LogicalVolume*[fNbOfChambers];
|
||||
@@ -77,7 +76,6 @@ B2aDetectorConstruction::B2aDetectorConstruction()
|
||||
B2aDetectorConstruction::~B2aDetectorConstruction()
|
||||
{
|
||||
delete [] fLogicChamber;
|
||||
delete fMagField;
|
||||
delete fStepLimit;
|
||||
delete fMessenger;
|
||||
}
|
||||
@@ -101,16 +99,14 @@ void B2aDetectorConstruction::DefineMaterials()
|
||||
|
||||
G4NistManager* nistManager = G4NistManager::Instance();
|
||||
|
||||
G4bool fromIsotopes = false;
|
||||
|
||||
// Air defined using NIST Manager
|
||||
nistManager->FindOrBuildMaterial("G4_AIR", fromIsotopes);
|
||||
nistManager->FindOrBuildMaterial("G4_AIR");
|
||||
|
||||
// Lead defined using NIST Manager
|
||||
fTargetMaterial = nistManager->FindOrBuildMaterial("G4_Pb", fromIsotopes);
|
||||
fTargetMaterial = nistManager->FindOrBuildMaterial("G4_Pb");
|
||||
|
||||
// Xenon gas defined using NIST Manager
|
||||
fChamberMaterial = nistManager->FindOrBuildMaterial("G4_Xe", fromIsotopes);
|
||||
fChamberMaterial = nistManager->FindOrBuildMaterial("G4_Xe");
|
||||
|
||||
// Print materials
|
||||
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
||||
@@ -215,13 +211,6 @@ G4VPhysicalVolume* B2aDetectorConstruction::DefineVolumes()
|
||||
fLogicTarget ->SetVisAttributes(boxVisAtt);
|
||||
trackerLV ->SetVisAttributes(boxVisAtt);
|
||||
|
||||
// Sensitive detectors
|
||||
|
||||
G4String trackerChamberSDname = "B2/TrackerChamberSD";
|
||||
B2TrackerSD* aTrackerSD = new B2TrackerSD(trackerChamberSDname,
|
||||
"TrackerHitsCollection");
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector( aTrackerSD );
|
||||
|
||||
// Tracker segments
|
||||
|
||||
G4cout << "There are " << fNbOfChambers << " chambers in the tracker region. "
|
||||
@@ -252,18 +241,17 @@ G4VPhysicalVolume* B2aDetectorConstruction::DefineVolumes()
|
||||
G4double rmax = rmaxFirst + copyNo * rmaxIncr;
|
||||
|
||||
G4Tubs* chamberS
|
||||
= new G4Tubs("chamber", 0, rmax, halfWidth, 0.*deg, 360.*deg);
|
||||
= new G4Tubs("Chamber_solid", 0, rmax, halfWidth, 0.*deg, 360.*deg);
|
||||
|
||||
fLogicChamber[copyNo] =
|
||||
new G4LogicalVolume(chamberS,fChamberMaterial,"Chamber",0,0,0);
|
||||
new G4LogicalVolume(chamberS,fChamberMaterial,"Chamber_LV",0,0,0);
|
||||
|
||||
fLogicChamber[copyNo]->SetSensitiveDetector( aTrackerSD );
|
||||
fLogicChamber[copyNo]->SetVisAttributes(chamberVisAtt);
|
||||
|
||||
new G4PVPlacement(0, // no rotation
|
||||
G4ThreeVector(0,0,Zposition), // at (x,y,z)
|
||||
fLogicChamber[copyNo], // its logical volume
|
||||
"Chamber", // its name
|
||||
"Chamber_PV", // its name
|
||||
trackerLV, // its mother volume
|
||||
false, // no boolean operations
|
||||
copyNo, // copy number
|
||||
@@ -297,13 +285,36 @@ G4VPhysicalVolume* B2aDetectorConstruction::DefineVolumes()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2aDetectorConstruction::ConstructSDandField()
|
||||
{
|
||||
// Sensitive detectors
|
||||
|
||||
G4String trackerChamberSDname = "B2/TrackerChamberSD";
|
||||
B2TrackerSD* aTrackerSD = new B2TrackerSD(trackerChamberSDname,
|
||||
"TrackerHitsCollection");
|
||||
// Setting aTrackerSD to all logical volumes with the same name
|
||||
// of "Chamber_LV".
|
||||
SetSensitiveDetector("Chamber_LV", aTrackerSD, true);
|
||||
|
||||
// Create global magnetic field messenger.
|
||||
// Uniform magnetic field is then created automatically if
|
||||
// the field value is not zero.
|
||||
G4ThreeVector fieldValue = G4ThreeVector();
|
||||
fMagFieldMessenger = new G4GlobalMagFieldMessenger(fieldValue);
|
||||
fMagFieldMessenger->SetVerboseLevel(1);
|
||||
|
||||
// Register the field messenger for deleting
|
||||
G4AutoDelete::Register(fMagFieldMessenger);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2aDetectorConstruction::SetTargetMaterial(G4String materialName)
|
||||
{
|
||||
G4NistManager* nistManager = G4NistManager::Instance();
|
||||
G4bool fromIsotopes = false;
|
||||
|
||||
G4Material* pttoMaterial =
|
||||
nistManager->FindOrBuildMaterial(materialName, fromIsotopes);
|
||||
nistManager->FindOrBuildMaterial(materialName);
|
||||
|
||||
if (fTargetMaterial != pttoMaterial) {
|
||||
if ( pttoMaterial ) {
|
||||
@@ -322,10 +333,9 @@ void B2aDetectorConstruction::SetTargetMaterial(G4String materialName)
|
||||
void B2aDetectorConstruction::SetChamberMaterial(G4String materialName)
|
||||
{
|
||||
G4NistManager* nistManager = G4NistManager::Instance();
|
||||
G4bool fromIsotopes = false;
|
||||
|
||||
G4Material* pttoMaterial =
|
||||
nistManager->FindOrBuildMaterial(materialName, fromIsotopes);
|
||||
nistManager->FindOrBuildMaterial(materialName);
|
||||
|
||||
if (fChamberMaterial != pttoMaterial) {
|
||||
if ( pttoMaterial ) {
|
||||
@@ -342,13 +352,6 @@ void B2aDetectorConstruction::SetChamberMaterial(G4String materialName)
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2aDetectorConstruction::SetMagField(G4double fieldValue)
|
||||
{
|
||||
fMagField->SetMagFieldValue(fieldValue);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2aDetectorConstruction::SetMaxStep(G4double maxStep)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2aDetectorMessenger.cc 69706 2013-05-13 09:12:40Z gcosmo $
|
||||
//
|
||||
/// \file B2aDetectorMessenger.cc
|
||||
/// \brief Implementation of the B2aDetectorMessenger class
|
||||
@@ -57,13 +57,6 @@ B2aDetectorMessenger::B2aDetectorMessenger(B2aDetectorConstruction* Det)
|
||||
fChamMatCmd->SetParameterName("choice",false);
|
||||
fChamMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
fSetFieldCmd = new G4UIcmdWithADoubleAndUnit("/B2/det/setField",this);
|
||||
fSetFieldCmd->SetGuidance("Define magnetic field.");
|
||||
fSetFieldCmd->SetGuidance("Magnetic field will be in X direction.");
|
||||
fSetFieldCmd->SetParameterName("Bx",false);
|
||||
fSetFieldCmd->SetUnitCategory("Magnetic flux density");
|
||||
fSetFieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
fStepMaxCmd = new G4UIcmdWithADoubleAndUnit("/B2/det/stepMax",this);
|
||||
fStepMaxCmd->SetGuidance("Define a step max");
|
||||
fStepMaxCmd->SetParameterName("stepMax",false);
|
||||
@@ -77,7 +70,6 @@ B2aDetectorMessenger::~B2aDetectorMessenger()
|
||||
{
|
||||
delete fTargMatCmd;
|
||||
delete fChamMatCmd;
|
||||
delete fSetFieldCmd;
|
||||
delete fStepMaxCmd;
|
||||
delete fB2Directory;
|
||||
delete fDetDirectory;
|
||||
@@ -93,11 +85,6 @@ void B2aDetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
if( command == fChamMatCmd )
|
||||
{ fDetectorConstruction->SetChamberMaterial(newValue);}
|
||||
|
||||
if( command == fSetFieldCmd ) {
|
||||
fDetectorConstruction
|
||||
->SetMagField(fSetFieldCmd->GetNewDoubleValue(newValue));
|
||||
}
|
||||
|
||||
if( command == fStepMaxCmd ) {
|
||||
fDetectorConstruction
|
||||
->SetMaxStep(fStepMaxCmd->GetNewDoubleValue(newValue));
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# $Id: CMakeLists.txt 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
#
|
||||
|
||||
@@ -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.
|
||||
# --------------------------------------------------------------
|
||||
@@ -14,6 +14,8 @@ endif
|
||||
.PHONY: all
|
||||
all: lib bin
|
||||
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
include $(G4INSTALL)/config/binmake.gmk
|
||||
|
||||
visclean:
|
||||
|
||||
@@ -29,15 +29,17 @@
|
||||
/// \brief Main program of the B2b example
|
||||
|
||||
#include "B2bDetectorConstruction.hh"
|
||||
#include "B2PrimaryGeneratorAction.hh"
|
||||
#include "B2RunAction.hh"
|
||||
#include "B2EventAction.hh"
|
||||
|
||||
#include "G4StepLimiterBuilder.hh"
|
||||
#include "B2ActionInitialization.hh"
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
#else
|
||||
#include "G4RunManager.hh"
|
||||
#endif
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
#include "FTFP_BERT.hh"
|
||||
#include "G4StepLimiterPhysics.hh"
|
||||
|
||||
#include "Randomize.hh"
|
||||
|
||||
@@ -55,25 +57,27 @@ 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
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MTRunManager * runManager = new G4MTRunManager;
|
||||
#else
|
||||
G4RunManager * runManager = new G4RunManager;
|
||||
#endif
|
||||
|
||||
// Set mandatory initialization classes
|
||||
|
||||
runManager->SetUserInitialization(new B2bDetectorConstruction());
|
||||
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
physicsList->RegisterPhysics(new G4StepLimiterBuilder());
|
||||
physicsList->RegisterPhysics(new G4StepLimiterPhysics());
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
// Set user action classes
|
||||
|
||||
runManager->SetUserAction(new B2PrimaryGeneratorAction());
|
||||
runManager->SetUserAction(new B2RunAction());
|
||||
runManager->SetUserAction(new B2EventAction());
|
||||
runManager->SetUserInitialization(new B2ActionInitialization());
|
||||
|
||||
// Initialize G4 kernel
|
||||
|
||||
|
||||
+2961
-9944
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,6 @@
|
||||
/gui/addMenu run Run
|
||||
/gui/addButton run "beamOn 1" "/run/beamOn 1"
|
||||
/gui/addButton run run1 "/control/execute run1.mac"
|
||||
/gui/addButton run run2 "/control/execute run2.mac"
|
||||
#
|
||||
# Gun menu :
|
||||
/gui/addMenu gun Gun
|
||||
@@ -31,14 +30,14 @@
|
||||
#
|
||||
# Field menu :
|
||||
/gui/addMenu field Field
|
||||
/gui/addButton field "off" "/B2/det/setField 0.2 tesla"
|
||||
/gui/addButton field "0.2 tesla" "/B2/det/setField 0.2 tesla"
|
||||
/gui/addButton field "2.0 tesla" "/B2/det/setField 2.0 tesla"
|
||||
/gui/addButton field "off" "/globalField/setValue 0 0 0 tesla"
|
||||
/gui/addButton field "0.2 tesla" "/globalField/setValue 0.2 0 0 tesla"
|
||||
/gui/addButton field "2.0 tesla" "/globalField/setValue 2.0 0 0 tesla"
|
||||
#
|
||||
# Viewer menu :
|
||||
/gui/addMenu viewer Viewer
|
||||
/gui/addButton viewer "Set style surface" "/vis/viewer/set/style surface"
|
||||
/gui/addButton viewer "Set style wireframe" "/vis/viewer/set/style wire"
|
||||
/gui/addButton viewer "Set style wireframe" "/vis/viewer/set/style wireframe"
|
||||
/gui/addButton viewer "Refresh viewer" "/vis/viewer/refresh"
|
||||
/gui/addButton viewer "Update viewer (interaction or end-of-file)" "/vis/viewer/update"
|
||||
/gui/addButton viewer "Flush viewer (= refresh + update)" "/vis/viewer/flush"
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B2ActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B2ActionInitialization.hh
|
||||
/// \brief Definition of the B2ActionInitialization class
|
||||
|
||||
#ifndef B2ActionInitialization_h
|
||||
#define B2ActionInitialization_h 1
|
||||
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
|
||||
class B4DetectorConstruction;
|
||||
|
||||
/// Action initialization class.
|
||||
///
|
||||
|
||||
class B2ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
B2ActionInitialization();
|
||||
virtual ~B2ActionInitialization();
|
||||
|
||||
virtual void BuildForMaster() const;
|
||||
virtual void Build() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2EventAction.hh 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B2EventAction.hh
|
||||
/// \brief Definition of the B2EventAction class
|
||||
@@ -45,19 +45,8 @@ class B2EventAction : public G4UserEventAction
|
||||
|
||||
virtual void BeginOfEventAction(const G4Event* );
|
||||
virtual void EndOfEventAction(const G4Event* );
|
||||
|
||||
// Set methods
|
||||
void SetPrintModulo(G4int value);
|
||||
|
||||
private:
|
||||
G4int fPrintModulo;
|
||||
};
|
||||
|
||||
// inline functions
|
||||
|
||||
inline void B2EventAction::SetPrintModulo(G4int value) {
|
||||
fPrintModulo = value;
|
||||
}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2PrimaryGeneratorAction.hh 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B2PrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the B2PrimaryGeneratorAction class
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2RunAction.hh 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B2RunAction.hh
|
||||
/// \brief Definition of the B2RunAction class
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2TrackerHit.hh 69505 2013-05-07 01:57:27Z asaim $
|
||||
//
|
||||
/// \file B2TrackerHit.hh
|
||||
/// \brief Definition of the B2TrackerHit class
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "tls.hh"
|
||||
|
||||
/// Tracker hit class
|
||||
///
|
||||
@@ -84,22 +85,22 @@ class B2TrackerHit : public G4VHit
|
||||
|
||||
typedef G4THitsCollection<B2TrackerHit> B2TrackerHitsCollection;
|
||||
|
||||
extern G4Allocator<B2TrackerHit> B2TrackerHitAllocator;
|
||||
extern G4ThreadLocal G4Allocator<B2TrackerHit>* B2TrackerHitAllocator;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void* B2TrackerHit::operator new(size_t)
|
||||
{
|
||||
void *hit;
|
||||
hit = (void *) B2TrackerHitAllocator.MallocSingle();
|
||||
return hit;
|
||||
if(!B2TrackerHitAllocator)
|
||||
B2TrackerHitAllocator = new G4Allocator<B2TrackerHit>;
|
||||
return (void *) B2TrackerHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void B2TrackerHit::operator delete(void *hit)
|
||||
{
|
||||
B2TrackerHitAllocator.FreeSingle((B2TrackerHit*) hit);
|
||||
B2TrackerHitAllocator->FreeSingle((B2TrackerHit*) hit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2TrackerSD.hh 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B2TrackerSD.hh
|
||||
/// \brief Definition of the B2TrackerSD class
|
||||
@@ -44,10 +44,9 @@ class G4HCofThisEvent;
|
||||
|
||||
/// B2Tracker sensitive detector class
|
||||
///
|
||||
/// In Initialize(), it creates one hit for each tracker volume
|
||||
///
|
||||
/// The values are accounted in hits in ProcessHits() function which is called
|
||||
/// by Geant4 kernel at each step.
|
||||
/// The hits are accounted in hits in ProcessHits() function which is called
|
||||
/// by Geant4 kernel at each step. A hit is created with each step with non zero
|
||||
/// energy deposit.
|
||||
|
||||
class B2TrackerSD : public G4VSensitiveDetector
|
||||
{
|
||||
|
||||
@@ -43,6 +43,7 @@ class G4Trap;
|
||||
class G4Cons;
|
||||
class G4Orb;
|
||||
class G4Sphere;
|
||||
class G4Ellipsoid;
|
||||
class G4Torus;
|
||||
class G4Para;
|
||||
class G4Hype;
|
||||
@@ -76,17 +77,30 @@ class B2bChamberParameterisation : public G4VPVParameterisation
|
||||
|
||||
private: // Dummy declarations to get rid of warnings ...
|
||||
|
||||
void ComputeDimensions (G4Box&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Trd&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Trap&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Cons&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Sphere&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Orb&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Torus&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Para&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Hype&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Polycone&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Polyhedra&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Box&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Trd&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Trap&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Cons&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Sphere&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Orb&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Ellipsoid&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Torus&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Para&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Hype&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Polycone&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions (G4Polyhedra&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -33,20 +33,18 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "tls.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4LogicalVolume;
|
||||
class G4Material;
|
||||
class G4UserLimits;
|
||||
class G4GlobalMagFieldMessenger;
|
||||
|
||||
class B2bDetectorMessenger;
|
||||
class B2MagneticField;
|
||||
|
||||
/// Detector construction class to define materials and geometry.
|
||||
///
|
||||
/// In addition a transverse uniform magnetic field is defined in
|
||||
/// SetMagField() method which can be activated via a command
|
||||
/// defined in the B2bDetectorMessenger class.
|
||||
/// Detector construction class to define materials, geometry
|
||||
/// and global uniform magnetic field.
|
||||
|
||||
class B2bDetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
@@ -56,9 +54,9 @@ class B2bDetectorConstruction : public G4VUserDetectorConstruction
|
||||
|
||||
public:
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
// Set methods
|
||||
void SetMagField(G4double );
|
||||
void SetTargetMaterial (G4String );
|
||||
void SetChamberMaterial(G4String );
|
||||
void SetMaxStep (G4double );
|
||||
@@ -76,10 +74,12 @@ class B2bDetectorConstruction : public G4VUserDetectorConstruction
|
||||
G4Material* fTargetMaterial; // pointer to the target material
|
||||
G4Material* fChamberMaterial; // pointer to the chamber material
|
||||
|
||||
G4UserLimits* fStepLimit; // pointer to user step limits
|
||||
G4UserLimits* fStepLimit; // pointer to user step limits
|
||||
|
||||
B2bDetectorMessenger* fMessenger; // messenger
|
||||
B2MagneticField* fMagField; // magnetic field
|
||||
B2bDetectorMessenger* fMessenger; // detector messenger
|
||||
|
||||
static G4ThreadLocal G4GlobalMagFieldMessenger* fMagFieldMessenger;
|
||||
// magnetic field messenger
|
||||
|
||||
G4bool fCheckOverlaps; // option to activate checking of volumes overlaps
|
||||
};
|
||||
|
||||
@@ -46,7 +46,6 @@ class G4UIcmdWithADoubleAndUnit;
|
||||
/// It implements commands:
|
||||
/// - /B2/det/setTargetMaterial name
|
||||
/// - /B2/det/setChamberMaterial name
|
||||
/// - /B2/det/setField value unit
|
||||
/// - /B2/det/stepMax value unit
|
||||
|
||||
class B2bDetectorMessenger: public G4UImessenger
|
||||
@@ -66,7 +65,6 @@ class B2bDetectorMessenger: public G4UImessenger
|
||||
G4UIcmdWithAString* fTargMatCmd;
|
||||
G4UIcmdWithAString* fChamMatCmd;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* fSetFieldCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fStepMaxCmd;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Macro file for the initialization phase of "exampleN03.cc"
|
||||
# Macro file for the initialization phase of example B2
|
||||
# when running in interactive mode without visualization
|
||||
#
|
||||
# Set some default verbose
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Macro file for the initialization phase of "exampleB2.cc"
|
||||
# Macro file for the initialization phase of example B2
|
||||
# when running in interactive mode with visualization
|
||||
#
|
||||
# Set some default verbose
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
# set a magnetic field and max allowed step length
|
||||
# 3 event with printing hits
|
||||
#
|
||||
/B2/det/setField 0.2 tesla
|
||||
/globalField/verbose 1
|
||||
/globalField/setValue 0.2 0 0 tesla
|
||||
/B2/det/stepMax 1.0 mm
|
||||
/gun/energy 0.3 GeV
|
||||
/run/beamOn 3
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B2ActionInitialization.cc 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B2ActionInitialization.cc
|
||||
/// \brief Implementation of the B2ActionInitialization class
|
||||
|
||||
#include "B2ActionInitialization.hh"
|
||||
#include "B2PrimaryGeneratorAction.hh"
|
||||
#include "B2RunAction.hh"
|
||||
#include "B2EventAction.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B2ActionInitialization::B2ActionInitialization()
|
||||
: G4VUserActionInitialization()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B2ActionInitialization::~B2ActionInitialization()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2ActionInitialization::BuildForMaster() const
|
||||
{
|
||||
SetUserAction(new B2RunAction);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2ActionInitialization::Build() const
|
||||
{
|
||||
SetUserAction(new B2PrimaryGeneratorAction);
|
||||
SetUserAction(new B2RunAction);
|
||||
SetUserAction(new B2EventAction);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2EventAction.cc 69652 2013-05-10 09:05:11Z ihrivnac $
|
||||
//
|
||||
/// \file B2EventAction.cc
|
||||
/// \brief Implementation of the B2EventAction class
|
||||
@@ -39,8 +39,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B2EventAction::B2EventAction()
|
||||
: G4UserEventAction(),
|
||||
fPrintModulo(1000)
|
||||
: G4UserEventAction()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -50,25 +49,13 @@ B2EventAction::~B2EventAction()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2EventAction::BeginOfEventAction(const G4Event* event)
|
||||
{
|
||||
G4int eventID = event->GetEventID();
|
||||
if ( eventID % fPrintModulo == 0) {
|
||||
G4cout << "\n---> Begin of event: " << eventID << G4endl;
|
||||
//CLHEP::HepRandom::showEngineStatus();
|
||||
}
|
||||
}
|
||||
void B2EventAction::BeginOfEventAction(const G4Event*)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2EventAction::EndOfEventAction(const G4Event* event)
|
||||
{
|
||||
// print per event (modulo n)
|
||||
|
||||
G4int eventID = event->GetEventID();
|
||||
if ( eventID % fPrintModulo == 0)
|
||||
G4cout << "---> End of event: " << eventID << G4endl;
|
||||
|
||||
// get number of stored trajectories
|
||||
|
||||
G4TrajectoryContainer* trajectoryContainer = event->GetTrajectoryContainer();
|
||||
@@ -77,6 +64,7 @@ void B2EventAction::EndOfEventAction(const G4Event* event)
|
||||
|
||||
// periodic printing
|
||||
|
||||
G4int eventID = event->GetEventID();
|
||||
if ( eventID < 100 || eventID % 100 == 0) {
|
||||
G4cout << ">>> Event: " << eventID << G4endl;
|
||||
if ( trajectoryContainer ) {
|
||||
@@ -84,7 +72,8 @@ void B2EventAction::EndOfEventAction(const G4Event* event)
|
||||
<< " trajectories stored in this event." << G4endl;
|
||||
}
|
||||
G4VHitsCollection* hc = event->GetHCofThisEvent()->GetHC(0);
|
||||
G4cout << " " << hc->GetSize() << " hits stored in this event" << G4endl;
|
||||
G4cout << " "
|
||||
<< hc->GetSize() << " hits stored in this event" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2PrimaryGeneratorAction.cc 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B2PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the B2PrimaryGeneratorAction class
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2RunAction.cc 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B2RunAction.cc
|
||||
/// \brief Implementation of the B2RunAction class
|
||||
@@ -37,7 +37,10 @@
|
||||
|
||||
B2RunAction::B2RunAction()
|
||||
: G4UserRunAction()
|
||||
{}
|
||||
{
|
||||
// set printing event number per each 100 events
|
||||
G4RunManager::GetRunManager()->SetPrintProgress(1000);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -46,12 +49,9 @@ B2RunAction::~B2RunAction()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
void B2RunAction::BeginOfRunAction(const G4Run*)
|
||||
{
|
||||
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
|
||||
|
||||
//inform the runManager to save random number seed
|
||||
|
||||
G4RunManager::GetRunManager()->SetRandomNumberStore(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2TrackerHit.cc 69505 2013-05-07 01:57:27Z asaim $
|
||||
//
|
||||
/// \file B2TrackerHit.cc
|
||||
/// \brief Implementation of the B2TrackerHit class
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include <iomanip>
|
||||
|
||||
G4Allocator<B2TrackerHit> B2TrackerHitAllocator;
|
||||
G4ThreadLocal G4Allocator<B2TrackerHit>* B2TrackerHitAllocator=0;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B2TrackerSD.cc 66536 2012-12-19 14:32:36Z ihrivnac $
|
||||
//
|
||||
/// \file B2TrackerSD.cc
|
||||
/// \brief Implementation of the B2TrackerSD class
|
||||
|
||||
@@ -44,6 +44,7 @@ B2bChamberParameterisation::B2bChamberParameterisation(
|
||||
G4double widthChamber,
|
||||
G4double lengthInitial,
|
||||
G4double lengthFinal )
|
||||
: G4VPVParameterisation()
|
||||
{
|
||||
fNoChambers = noChambers;
|
||||
fStartZ = startZ;
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "B2bDetectorConstruction.hh"
|
||||
#include "B2bDetectorMessenger.hh"
|
||||
#include "B2bChamberParameterisation.hh"
|
||||
#include "B2MagneticField.hh"
|
||||
#include "B2TrackerSD.hh"
|
||||
|
||||
#include "G4Material.hh"
|
||||
@@ -42,8 +41,8 @@
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4PVParameterised.hh"
|
||||
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4GlobalMagFieldMessenger.hh"
|
||||
#include "G4AutoDelete.hh"
|
||||
|
||||
#include "G4GeometryTolerance.hh"
|
||||
#include "G4GeometryManager.hh"
|
||||
@@ -55,28 +54,27 @@
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//#include "G4ios.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4ThreadLocal
|
||||
G4GlobalMagFieldMessenger* B2bDetectorConstruction::fMagFieldMessenger = 0;
|
||||
|
||||
B2bDetectorConstruction::B2bDetectorConstruction()
|
||||
:
|
||||
:G4VUserDetectorConstruction(),
|
||||
fLogicTarget(NULL), fLogicChamber(NULL),
|
||||
fTargetMaterial(NULL), fChamberMaterial(NULL),
|
||||
fStepLimit(NULL),
|
||||
fStepLimit(NULL),
|
||||
fCheckOverlaps(true)
|
||||
{
|
||||
fMessenger = new B2bDetectorMessenger(this);
|
||||
fMagField = new B2MagneticField();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B2bDetectorConstruction::~B2bDetectorConstruction()
|
||||
{
|
||||
delete fMagField;
|
||||
delete fStepLimit;
|
||||
delete fMessenger;
|
||||
delete fMessenger;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -98,16 +96,14 @@ void B2bDetectorConstruction::DefineMaterials()
|
||||
|
||||
G4NistManager* nistManager = G4NistManager::Instance();
|
||||
|
||||
G4bool fromIsotopes = false;
|
||||
|
||||
// Air defined using NIST Manager
|
||||
nistManager->FindOrBuildMaterial("G4_AIR", fromIsotopes);
|
||||
nistManager->FindOrBuildMaterial("G4_AIR");
|
||||
|
||||
// Lead defined using NIST Manager
|
||||
fTargetMaterial = nistManager->FindOrBuildMaterial("G4_Pb", fromIsotopes);
|
||||
fTargetMaterial = nistManager->FindOrBuildMaterial("G4_Pb");
|
||||
|
||||
// Xenon gas defined using NIST Manager
|
||||
fChamberMaterial = nistManager->FindOrBuildMaterial("G4_Xe", fromIsotopes);
|
||||
fChamberMaterial = nistManager->FindOrBuildMaterial("G4_Xe");
|
||||
|
||||
// Print materials
|
||||
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
||||
@@ -242,14 +238,6 @@ G4VPhysicalVolume* B2bDetectorConstruction::DefineVolumes()
|
||||
<< fChamberMaterial->GetName() << "\nThe distance between chamber is "
|
||||
<< chamberSpacing/cm << " cm" << G4endl;
|
||||
|
||||
// Sensitive detectors
|
||||
|
||||
G4String trackerChamberSDname = "B2/TrackerChamberSD";
|
||||
B2TrackerSD* aTrackerSD = new B2TrackerSD(trackerChamberSDname,
|
||||
"TrackerHitsCollection");
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector( aTrackerSD );
|
||||
fLogicChamber->SetSensitiveDetector( aTrackerSD );
|
||||
|
||||
// Visualization attributes
|
||||
|
||||
G4VisAttributes* boxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
@@ -286,13 +274,34 @@ G4VPhysicalVolume* B2bDetectorConstruction::DefineVolumes()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2bDetectorConstruction::ConstructSDandField()
|
||||
{
|
||||
// Sensitive detectors
|
||||
|
||||
G4String trackerChamberSDname = "B2/TrackerChamberSD";
|
||||
B2TrackerSD* aTrackerSD = new B2TrackerSD(trackerChamberSDname,
|
||||
"TrackerHitsCollection");
|
||||
SetSensitiveDetector( fLogicChamber, aTrackerSD );
|
||||
|
||||
// Create global magnetic field messenger.
|
||||
// Uniform magnetic field is then created automatically if
|
||||
// the field value is not zero.
|
||||
G4ThreeVector fieldValue = G4ThreeVector();
|
||||
fMagFieldMessenger = new G4GlobalMagFieldMessenger(fieldValue);
|
||||
fMagFieldMessenger->SetVerboseLevel(1);
|
||||
|
||||
// Register the field messenger for deleting
|
||||
G4AutoDelete::Register(fMagFieldMessenger);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2bDetectorConstruction::SetTargetMaterial(G4String materialName)
|
||||
{
|
||||
G4NistManager* nistManager = G4NistManager::Instance();
|
||||
G4bool fromIsotopes = false;
|
||||
|
||||
G4Material* pttoMaterial =
|
||||
nistManager->FindOrBuildMaterial(materialName, fromIsotopes);
|
||||
nistManager->FindOrBuildMaterial(materialName);
|
||||
|
||||
if (fTargetMaterial != pttoMaterial) {
|
||||
if ( pttoMaterial ) {
|
||||
@@ -311,10 +320,9 @@ void B2bDetectorConstruction::SetTargetMaterial(G4String materialName)
|
||||
void B2bDetectorConstruction::SetChamberMaterial(G4String materialName)
|
||||
{
|
||||
G4NistManager* nistManager = G4NistManager::Instance();
|
||||
G4bool fromIsotopes = false;
|
||||
|
||||
G4Material* pttoMaterial =
|
||||
nistManager->FindOrBuildMaterial(materialName, fromIsotopes);
|
||||
nistManager->FindOrBuildMaterial(materialName);
|
||||
|
||||
if (fChamberMaterial != pttoMaterial) {
|
||||
if ( pttoMaterial ) {
|
||||
@@ -330,13 +338,6 @@ void B2bDetectorConstruction::SetChamberMaterial(G4String materialName)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2bDetectorConstruction::SetMagField(G4double fieldValue)
|
||||
{
|
||||
fMagField->SetMagFieldValue(fieldValue);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B2bDetectorConstruction::SetMaxStep(G4double maxStep)
|
||||
{
|
||||
if ((fStepLimit)&&(maxStep>0.)) fStepLimit->SetMaxAllowedStep(maxStep);
|
||||
|
||||
@@ -57,13 +57,6 @@ B2bDetectorMessenger::B2bDetectorMessenger(B2bDetectorConstruction* Det)
|
||||
fChamMatCmd->SetParameterName("choice",false);
|
||||
fChamMatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
fSetFieldCmd = new G4UIcmdWithADoubleAndUnit("/B2/det/setField",this);
|
||||
fSetFieldCmd->SetGuidance("Define magnetic field.");
|
||||
fSetFieldCmd->SetGuidance("Magnetic field will be in X direction.");
|
||||
fSetFieldCmd->SetParameterName("Bx",false);
|
||||
fSetFieldCmd->SetUnitCategory("Magnetic flux density");
|
||||
fSetFieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
fStepMaxCmd = new G4UIcmdWithADoubleAndUnit("/B2/det/stepMax",this);
|
||||
fStepMaxCmd->SetGuidance("Define a step max");
|
||||
fStepMaxCmd->SetParameterName("stepMax",false);
|
||||
@@ -77,7 +70,6 @@ B2bDetectorMessenger::~B2bDetectorMessenger()
|
||||
{
|
||||
delete fTargMatCmd;
|
||||
delete fChamMatCmd;
|
||||
delete fSetFieldCmd;
|
||||
delete fStepMaxCmd;
|
||||
delete fB2Directory;
|
||||
delete fDetDirectory;
|
||||
@@ -93,11 +85,6 @@ void B2bDetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
if( command == fChamMatCmd )
|
||||
{ fDetectorConstruction->SetChamberMaterial(newValue);}
|
||||
|
||||
if( command == fSetFieldCmd ) {
|
||||
fDetectorConstruction
|
||||
->SetMagField(fSetFieldCmd->GetNewDoubleValue(newValue));
|
||||
}
|
||||
|
||||
if( command == fStepMaxCmd ) {
|
||||
fDetectorConstruction
|
||||
->SetMaxStep(fStepMaxCmd->GetNewDoubleValue(newValue));
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# $Id: CMakeLists.txt 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
|
||||
#---Adding example B2 subdirectories explicitly
|
||||
# and a custom target to for building all example B2 options ----------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.97 2010-09-30 09:05:24 gcosmo Exp $
|
||||
# $Id: GNUmakefile 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
SUBDIR = B2a B2b
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.64 2010-06-06 04:05:29 perl Exp $
|
||||
$Id: History 78054 2013-12-03 08:26:31Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -15,6 +15,68 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
02 December 2013 Ivana Hrivnacova
|
||||
- Fixed gui.mac:
|
||||
corrected wireframe parameter, removed run2.mac from gui
|
||||
|
||||
30/11/13 I. Hrivnacova
|
||||
- Fixed B2a/gui.mac
|
||||
|
||||
28/11/13 I. Hrivnacova (exampleB2-V09-06-12)
|
||||
- Clean-up macros (fixed B2a/gui.mac, removed obsolete comments)
|
||||
|
||||
26/11/13 I. Hrivnacova (exampleB2-V09-06-11)
|
||||
- Fixed deleting fMagFieldMessenger with use of G4AutoDelete utility
|
||||
|
||||
12/11/13 I. Hrivnacova (exampleB2-V09-06-10)
|
||||
- Avoid long lines
|
||||
|
||||
29/10/13 I. Hrivnacova (exampleB2-V09-06-09)
|
||||
- Using G4RunManager::SetPrintProgress()
|
||||
- Removed SetNumberOfThreads(4) from main (use Geant4 default)
|
||||
- Fixed deleting fMagFieldMessenger in DetectorConstruction
|
||||
- Updated README
|
||||
|
||||
10/09/13 I. Hrivnacova (exampleB2-V09-06-08)
|
||||
- Removed "tcsh" selection from G4UIExecutive in exampleB2b.cc
|
||||
(unwantedly introduced with previous update)
|
||||
|
||||
04/09/13 I. Hrivnacova (exampleB2-V09-06-07)
|
||||
- Magnetic field classes (B2MagneticField, B2FieldMessenger) replaced
|
||||
with use of new G4GlobalMagFieldMessenger class.
|
||||
|
||||
27/08/13 G.Cosmo (exampleB2-V09-06-06)
|
||||
- Added G4Ellipsoid among solids enabled for parameterisation in B2b.
|
||||
|
||||
14/08/13 P. Gumplinger (exampleB2-V09-06-05)
|
||||
- Removed static comment in B2MagneticField.hh for GetGlobalFieldManager.
|
||||
|
||||
26/06/13 G. Cosmo (exampleB2-V09-06-04)
|
||||
- Fixed use of G4Random instead of HepRandom in B2b.
|
||||
|
||||
04/06/13 I. Hrivnacova (exampleB2-V09-06-03)
|
||||
- Fixed reference to B2ActionInitialization in README and .README
|
||||
|
||||
04/06/13 P. Gumplinger (exampleB2-V09-06-02)
|
||||
- add section about ACTION INITALIZATION to README and .README
|
||||
|
||||
10/05/13 I. Hrivnacova (exampleB2-V09-06-01)
|
||||
- Minor fixes in documentation
|
||||
- Added initialization of base class in constructors where missing
|
||||
|
||||
09/05/13 M. Asai
|
||||
- Migration to multi-threading
|
||||
|
||||
28/02/13 I. Hrivnacova
|
||||
- When building materials with NistManager
|
||||
do not set fromIsotopes argument (which was set to false),
|
||||
as since 9.6 all materials have to be built from isotopes.
|
||||
Thanks to V. Ivantchenko for pointing at this.
|
||||
|
||||
02/02/13 V.Ivanchenko (exampleB2-V09-06-00)
|
||||
- Renamed G4StepLimiterBuilder by G4StepLimiterPhysics
|
||||
- minor fix of GNUmakefile
|
||||
|
||||
18/09/12 I. Hrivnacova
|
||||
- Updated vis.mac (on suggestions by John Al.):
|
||||
- Activating drawing hits in vis.mac macros
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id$
|
||||
$Id: README 78001 2013-12-02 08:24:53Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -20,11 +20,12 @@ $Id$
|
||||
(in B2bDetectorConstruction), see also B2bChamberParameterisation class.
|
||||
|
||||
In addition, a global, uniform, and transverse magnetic field can be
|
||||
applied (see B2MagneticField and B2aDetectorMessenger,
|
||||
B2bDetectorMessenger classes) and set via interactive commands.
|
||||
applied using G4GlobalMagFieldMessenger, instantiated in
|
||||
B2[a,b]DetectorConstruction::ConstructSDandField with a non zero field value,
|
||||
or via interactive commands.
|
||||
For example:
|
||||
|
||||
/B2/det/setField 0.2 tesla
|
||||
/globalField/setValue 0.2 0 0 tesla
|
||||
|
||||
An instance of the B2TrackerSD class is created and associated with each
|
||||
logical chamber volume (in B2a) and with the one G4LogicalVolume associated
|
||||
@@ -52,7 +53,23 @@ $Id$
|
||||
/process/(in)activate processName
|
||||
allows the user to activate/inactivate the processes one by one.
|
||||
|
||||
3- PRIMARY GENERATOR
|
||||
3- ACTION INITALIZATION
|
||||
|
||||
A newly introduced class, B2ActionInitialization,
|
||||
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:
|
||||
B2ActionInitialization::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 has is created also in the method
|
||||
B2ActionInitialization::BuildForMaster()
|
||||
which is invoked only in multi-threading mode.
|
||||
|
||||
4- PRIMARY GENERATOR
|
||||
|
||||
The primary generator action class employs the G4ParticleGun.
|
||||
The primary kinematics consists of a single particle which hits the target
|
||||
@@ -60,7 +77,7 @@ $Id$
|
||||
and its energy can be changed via the G4 built-in commands of
|
||||
the G4ParticleGun class.
|
||||
|
||||
4- RUNS and EVENTS
|
||||
5- RUNS and EVENTS
|
||||
|
||||
A run is a set of events.
|
||||
|
||||
@@ -81,7 +98,7 @@ $Id$
|
||||
G4RunManager is also informed how to SetRandomNumberStore for storing
|
||||
initial random number seeds per run or per event.
|
||||
|
||||
5- USER LIMITS
|
||||
6- USER LIMITS
|
||||
|
||||
This example also illustrates how to introduce tracking constraints
|
||||
like maximum step length, minimum kinetic energy etc. via the G4UserLimits
|
||||
@@ -94,7 +111,7 @@ $Id$
|
||||
|
||||
/B2/det/stepMax 1.0 mm
|
||||
|
||||
6- DETECTOR RESPONSE
|
||||
7- DETECTOR RESPONSE
|
||||
|
||||
A HIT is a step per step record of all the information needed to
|
||||
simulate and analyse the detector response.
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
/gui/addMenu run Run
|
||||
/gui/addButton run "beamOn 1" "/run/beamOn 1"
|
||||
/gui/addButton run run1 "/control/execute run1.mac"
|
||||
/gui/addButton run run2 "/control/execute run2.mac"
|
||||
#
|
||||
# Gun menu :
|
||||
/gui/addMenu gun Gun
|
||||
@@ -31,14 +30,14 @@
|
||||
#
|
||||
# Field menu :
|
||||
/gui/addMenu field Field
|
||||
/gui/addButton field "off" "/B2/det/setField 0.2 tesla"
|
||||
/gui/addButton field "0.2 tesla" "/B2/det/setField 0.2 tesla"
|
||||
/gui/addButton field "2.0 tesla" "/B2/det/setField 2.0 tesla"
|
||||
/gui/addButton field "off" "/globalField/setValue 0 0 0 tesla"
|
||||
/gui/addButton field "0.2 tesla" "/globalField/setValue 0.2 0 0 tesla"
|
||||
/gui/addButton field "2.0 tesla" "/globalField/setValue 2.0 0 0 tesla"
|
||||
#
|
||||
# Viewer menu :
|
||||
/gui/addMenu viewer Viewer
|
||||
/gui/addButton viewer "Set style surface" "/vis/viewer/set/style surface"
|
||||
/gui/addButton viewer "Set style wireframe" "/vis/viewer/set/style wire"
|
||||
/gui/addButton viewer "Set style wireframe" "/vis/viewer/set/style wireframe"
|
||||
/gui/addButton viewer "Refresh viewer" "/vis/viewer/refresh"
|
||||
/gui/addButton viewer "Update viewer (interaction or end-of-file)" "/vis/viewer/update"
|
||||
/gui/addButton viewer "Flush viewer (= refresh + update)" "/vis/viewer/flush"
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
# set a magnetic field and max allowed step length
|
||||
# 3 event with printing hits
|
||||
#
|
||||
/B2/det/setField 0.2 tesla
|
||||
/globalField/verbose 1
|
||||
/globalField/setValue 0.2 0 0 tesla
|
||||
/B2/det/stepMax 1.0 mm
|
||||
/gun/energy 0.3 GeV
|
||||
/run/beamOn 3
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//$Id$
|
||||
//$Id: .README 78001 2013-12-02 08:24:53Z gcosmo $
|
||||
|
||||
///\file "B3/.README"
|
||||
///\brief Example B3 README page
|
||||
@@ -42,10 +42,27 @@
|
||||
the G4RADIOACTIVEDATA envirnoment variable.
|
||||
|
||||
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>.
|
||||
|
||||
\section B3_s3 ACTION INITALIZATION
|
||||
|
||||
\section B3_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:
|
||||
B3ActionInitialization::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
|
||||
B3ActionInitialization::BuildForMaster()
|
||||
which is invoked only in multi-threading mode.
|
||||
|
||||
\section B3_s4 PRIMARY GENERATOR
|
||||
|
||||
The default particle beam is an ion (F18), at rest, randomly distributed
|
||||
within a zone inside a patient and is defined in
|
||||
@@ -53,22 +70,25 @@
|
||||
The type of a primary particle can be changed with G4ParticleGun commands
|
||||
(see run2.mac).
|
||||
|
||||
\section B3_s4 DETECTOR RESPONSE : scorers
|
||||
\section B3_s5 DETECTOR RESPONSE : scorers
|
||||
|
||||
A 'good' event is an event in which an identical energy of 511 keV is
|
||||
deposited in two separate Crystals. A count of the number of such events
|
||||
corresponds to a measure of the efficiency of the PET system.
|
||||
The total dose deposited in a patient during a run is also computed.
|
||||
|
||||
Scorers are defined in DetectorConstruction::CreateScorers(). There are
|
||||
Scorers are defined in DetectorConstruction::ConstructSDandField(). There are
|
||||
two G4MultiFunctionalDetector objects: one for the Crystal (EnergyDeposit),
|
||||
and one for the Patient (DoseDeposit)
|
||||
|
||||
EventAction::EndOfEventAction() collects informations event per event
|
||||
B3Run::RecordEvent() collects informations event per event
|
||||
from the hits collections, and accumulates statistic for
|
||||
RunAction::EndOfRunAction().
|
||||
|
||||
In multi-threading mode the statistics accumulated per workers is merged
|
||||
to the master in Run::Merge().
|
||||
|
||||
\section B3_s5 STACKING ACTION
|
||||
\section B3_s6 STACKING ACTION
|
||||
|
||||
Beta decay of Fluor generates a neutrino. One wishes not to track this
|
||||
neutrino; therefore one kills it immediately, before created particles
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# $Id: CMakeLists.txt 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
#
|
||||
|
||||
@@ -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.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.132 2010-12-01 05:56:40 allison Exp $
|
||||
$Id: History 75217 2013-10-29 16:09:26Z gcosmo $
|
||||
--------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -15,6 +15,41 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
29/10/13 I. Hrivnacova (exampleB3-V09-06-06)
|
||||
- Removed SetNumberOfThreads(4) from main (use Geant4 default)
|
||||
- Updated README
|
||||
|
||||
09/09/13 M.Asai (exampleB3-V09-06-05)
|
||||
- B3PrimaryGeneratorAction.cc : Change G4ParticleTable::GetIon() to
|
||||
G4IonTable::GetIon(), as the former method becomes obsolete.
|
||||
|
||||
13/06/13 mma (exampleB3-V09-06-04)
|
||||
Fixes for MT:
|
||||
- Set sensitive detector via SetSensitiveDetector(..)
|
||||
- Get hits collection IDs in B3Run::RecordEvent (and not B3Run constructor)
|
||||
- Add a test for primary generator action in B3RunAction::EndOfRunAction()
|
||||
as it does not exist on master
|
||||
|
||||
05/06/13 mma (exampleB3-V09-06-03)
|
||||
- add section about ACTION INITALIZATION to README and .README
|
||||
|
||||
01/06/13 mma (exampleB3-V09-06-02)
|
||||
- Migration for MT:
|
||||
forgotten to add B3Run
|
||||
|
||||
31/05/13 mma (exampleB3-V09-06-01)
|
||||
- Migration for MT:
|
||||
Added B3ActionInitialization, B3Run
|
||||
Removed B3EventAction
|
||||
and updated actions classes accordingly.
|
||||
README files still need to be updated.
|
||||
|
||||
28/02/13 I. Hrivnacova
|
||||
- When building materials with NistManager
|
||||
do not set fromIsotopes argument (which was set to false),
|
||||
as since 9.6 all materials have to be built from isotopes.
|
||||
Thanks to V. Ivantchenko for pointing at this.
|
||||
|
||||
21/11/11 I. Hrivnacova
|
||||
- Improved vis.mac
|
||||
- Removed alternative detector construction class
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id$
|
||||
$Id: README 78001 2013-12-02 08:24:53Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -46,9 +46,25 @@ $Id$
|
||||
|
||||
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
|
||||
|
||||
3- PRIMARY GENERATOR
|
||||
http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides
|
||||
/InstallationGuide/html/ch03s03.html
|
||||
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:
|
||||
B3ActionInitialization::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
|
||||
B3ActionInitialization::BuildForMaster()
|
||||
which is invoked only in multi-threading mode.
|
||||
|
||||
4- PRIMARY GENERATOR
|
||||
|
||||
The default particle beam is an ion (F18), at rest, randomly distributed
|
||||
within a zone inside a patient and is defined in
|
||||
@@ -56,22 +72,25 @@ $Id$
|
||||
The type of a primary particle can be changed with G4ParticleGun commands
|
||||
(see run2.mac).
|
||||
|
||||
4- DETECTOR RESPONSE: scorers
|
||||
5- DETECTOR RESPONSE: scorers
|
||||
|
||||
A 'good' event is an event in which an identical energy of 511 keV is
|
||||
deposited in two separate Crystals. A count of the number of such events
|
||||
corresponds to a measure of the efficiency of the PET system.
|
||||
The total dose deposited in a patient during a run is also computed.
|
||||
|
||||
Scorers are defined in DetectorConstruction::CreateScorers(). There are
|
||||
Scorers are defined in DetectorConstruction::ConstructSDandField(). There are
|
||||
two G4MultiFunctionalDetector objects: one for the Crystal (EnergyDeposit),
|
||||
and one for the Patient (DoseDeposit)
|
||||
|
||||
EventAction::EndOfEventAction() collects informations event per event
|
||||
from the hits collections, and accumulates statistic for
|
||||
B3Run::RecordEvent(), called at end of event, collects informations
|
||||
event per event from the hits collections, and accumulates statistic for
|
||||
RunAction::EndOfRunAction().
|
||||
|
||||
In multi-threading mode the statistics accumulated per workers is merged
|
||||
to the master in Run::Merge().
|
||||
|
||||
5- STACKING ACTION
|
||||
6- STACKING ACTION
|
||||
|
||||
Beta decay of Fluor generates a neutrino. One wishes not to track this
|
||||
neutrino; therefore one kills it immediately, before created particles
|
||||
|
||||
@@ -23,22 +23,24 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: exampleB3.cc 75217 2013-10-29 16:09:26Z gcosmo $
|
||||
//
|
||||
/// \file exampleB3.cc
|
||||
/// \brief Main program of the B3 example
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
#else
|
||||
#include "G4RunManager.hh"
|
||||
#endif
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
|
||||
#include "Randomize.hh"
|
||||
|
||||
#include "B3DetectorConstruction.hh"
|
||||
#include "B3PhysicsList.hh"
|
||||
#include "B3PrimaryGeneratorAction.hh"
|
||||
#include "B3RunAction.hh"
|
||||
#include "B3EventAction.hh"
|
||||
#include "B3StackingAction.hh"
|
||||
#include "B3ActionInitialization.hh"
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
#include "G4VisExecutive.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
|
||||
//
|
||||
@@ -66,16 +72,9 @@ int main(int argc,char** argv)
|
||||
//
|
||||
runManager->SetUserInitialization(new B3PhysicsList);
|
||||
|
||||
// Set user action classes
|
||||
// Set user action initialization
|
||||
//
|
||||
runManager->SetUserAction(new B3PrimaryGeneratorAction);
|
||||
//
|
||||
B3RunAction* runAction = new B3RunAction();
|
||||
runManager->SetUserAction(runAction);
|
||||
//
|
||||
runManager->SetUserAction(new B3EventAction(runAction));
|
||||
//
|
||||
runManager->SetUserAction(new B3StackingAction);
|
||||
runManager->SetUserInitialization(new B3ActionInitialization());
|
||||
|
||||
// Initialize G4 kernel
|
||||
//
|
||||
|
||||
@@ -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
|
||||
@@ -56,7 +56,9 @@ Checking overlaps for volume Patient ... OK!
|
||||
|
||||
***** Table : Nb of materials = 3 *****
|
||||
|
||||
Material: Lu2SiO5 density: 7.400 g/cm3 RadL: 1.143 cm Nucl.Int.Length: 20.922 cm Imean: 418.807 eV
|
||||
Material: Lu2SiO5 density: 7.400 g/cm3 RadL: 1.143 cm Nucl.Int.Length: 20.915 cm
|
||||
Imean: 418.807 eV
|
||||
|
||||
---> Element: Lu (Lu) Z = 71.0 N = 175.0 A = 174.97 g/mole
|
||||
---> Isotope: Lu175 Z = 71 N = 175 A = 174.94 g/mole abundance: 97.41 %
|
||||
---> Isotope: Lu176 Z = 71 N = 176 A = 175.94 g/mole abundance: 2.59 %
|
||||
@@ -75,7 +77,9 @@ Checking overlaps for volume Patient ... OK!
|
||||
ElmMassFraction: 17.47 % ElmAbundance 62.50 %
|
||||
|
||||
|
||||
Material: G4_AIR density: 1.205 mg/cm3 RadL: 303.921 m Nucl.Int.Length: 710.261 m Imean: 85.700 eV temperature: 273.15 K pressure: 1.00 atm
|
||||
Material: G4_AIR density: 1.205 mg/cm3 RadL: 303.921 m Nucl.Int.Length: 710.137 m
|
||||
Imean: 85.700 eV temperature: 273.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: C (C) Z = 6.0 N = 12.0 A = 12.01 g/mole
|
||||
---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.93 %
|
||||
---> Isotope: C13 Z = 6 N = 13 A = 13.00 g/mole abundance: 1.07 %
|
||||
@@ -92,14 +96,16 @@ Checking overlaps for volume Patient ... OK!
|
||||
---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.20 %
|
||||
ElmMassFraction: 23.18 % ElmAbundance 21.07 %
|
||||
|
||||
---> Element: Ar (Ar) Z = 18.0 N = 39.9 A = 39.95 g/mole
|
||||
---> Element: Ar (Ar) Z = 18.0 N = 40.0 A = 39.95 g/mole
|
||||
---> Isotope: Ar36 Z = 18 N = 36 A = 35.97 g/mole abundance: 0.34 %
|
||||
---> Isotope: Ar38 Z = 18 N = 38 A = 37.96 g/mole abundance: 0.06 %
|
||||
---> Isotope: Ar40 Z = 18 N = 40 A = 39.96 g/mole abundance: 99.60 %
|
||||
ElmMassFraction: 1.28 % ElmAbundance 0.47 %
|
||||
|
||||
|
||||
Material: G4_BRAIN_ICRP density: 1.040 g/cm3 RadL: 35.403 cm Nucl.Int.Length: 72.293 cm Imean: 73.300 eV
|
||||
Material: G4_BRAIN_ICRP density: 1.040 g/cm3 RadL: 35.403 cm Nucl.Int.Length: 72.275 cm
|
||||
Imean: 73.300 eV
|
||||
|
||||
---> Element: H (H) Z = 1.0 N = 1.0 A = 1.01 g/mole
|
||||
---> Isotope: H1 Z = 1 N = 1 A = 1.01 g/mole abundance: 99.99 %
|
||||
---> Isotope: H2 Z = 1 N = 2 A = 2.01 g/mole abundance: 0.01 %
|
||||
@@ -163,12 +169,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)
|
||||
@@ -204,11 +208,11 @@ Available colours:
|
||||
/run/beamOn 10000
|
||||
### Run 0 start.
|
||||
|
||||
---> Begin of event: 0
|
||||
---> end of event: 0
|
||||
|
||||
--------------------End of Run------------------------------
|
||||
The run was 10000 F18[0.0] Nb of 'good' e+ annihilations: 1266
|
||||
Total dose in patient : 310.47 picoGy
|
||||
--------------------End of Global Run-----------------------
|
||||
The run was 10000 events Nb of 'good' e+ annihilations: 1237
|
||||
Total dose in patient : 304.105 picoGy
|
||||
------------------------------------------------------------
|
||||
|
||||
Graphics systems deleted.
|
||||
|
||||
+17
-22
@@ -23,39 +23,34 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B3ActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B2MagneticField.hh
|
||||
/// \brief Definition of the B2MagneticField class
|
||||
/// \file B3ActionInitialization.hh
|
||||
/// \brief Definition of the B3ActionInitialization class
|
||||
|
||||
#ifndef B2MagneticField_h
|
||||
#define B2MagneticField_h 1
|
||||
#ifndef B3ActionInitialization_h
|
||||
#define B3ActionInitialization_h 1
|
||||
|
||||
#include "G4UniformMagField.hh"
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
|
||||
class G4FieldManager;
|
||||
/// Action initialization class.
|
||||
///
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
/// A class for control of the Magnetic Field of the detector.
|
||||
/// The field is assumed to be uniform.
|
||||
|
||||
class B2MagneticField : public G4UniformMagField
|
||||
class B3ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
B2MagneticField(); // A zero field
|
||||
B2MagneticField(G4ThreeVector); // The value of the field
|
||||
virtual ~B2MagneticField();
|
||||
|
||||
//Set the field (fieldValue,0,0)
|
||||
void SetMagFieldValue(G4double fieldValue);
|
||||
void SetMagFieldValue(G4ThreeVector fieldVector);
|
||||
|
||||
protected:
|
||||
// Find the global Field Manager
|
||||
G4FieldManager* GetGlobalFieldManager(); // static
|
||||
B3ActionInitialization();
|
||||
virtual ~B3ActionInitialization();
|
||||
|
||||
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: B3DetectorConstruction.hh 71323 2013-06-13 16:54:23Z gcosmo $
|
||||
//
|
||||
/// \file B3DetectorConstruction.hh
|
||||
/// \brief Definition of the B3DetectorConstruction class
|
||||
@@ -50,14 +50,11 @@ class B3DetectorConstruction : public G4VUserDetectorConstruction
|
||||
|
||||
public:
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
private:
|
||||
void DefineMaterials();
|
||||
void CreateScorers();
|
||||
|
||||
G4LogicalVolume* fLogicCryst;
|
||||
G4LogicalVolume* fLogicPatient;
|
||||
|
||||
G4bool fCheckOverlaps;
|
||||
};
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B3PhysicsList.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B3PhysicsList.hh
|
||||
/// \brief Definition of the B3PhysicsList class
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B3PrimaryGeneratorAction.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B3PrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the B3PrimaryGeneratorAction class
|
||||
|
||||
@@ -23,39 +23,41 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B3Run.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B3EventAction.hh
|
||||
/// \brief Definition of the B3EventAction class
|
||||
/// \file B3Run.hh
|
||||
/// \brief Definition of the B3Run class
|
||||
|
||||
#ifndef B3EventAction_h
|
||||
#define B3EventAction_h 1
|
||||
#ifndef B3Run_h
|
||||
#define B3Run_h 1
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "G4Run.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class B3RunAction;
|
||||
|
||||
/// Event action class
|
||||
/// Run class
|
||||
///
|
||||
/// In EndOfEventAction() there is collected information event per event
|
||||
/// from Hits Collections, and accumulated statistic for
|
||||
/// B3RunAction::EndOfRunAction().
|
||||
/// In RecordEvent() there is collected information event per event
|
||||
/// from Hits Collections, and accumulated statistic for the run
|
||||
|
||||
class B3EventAction : public G4UserEventAction
|
||||
class B3Run : public G4Run
|
||||
{
|
||||
public:
|
||||
B3EventAction(B3RunAction* runAction);
|
||||
virtual ~B3EventAction();
|
||||
B3Run();
|
||||
virtual ~B3Run();
|
||||
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
virtual void RecordEvent(const G4Event*);
|
||||
virtual void Merge(const G4Run*);
|
||||
|
||||
public:
|
||||
G4int GetNbGoodEvents() const { return fGoodEvents; }
|
||||
G4double GetSumDose() const { return fSumDose; }
|
||||
|
||||
private:
|
||||
B3RunAction* fRunAct;
|
||||
G4int fCollID_cryst;
|
||||
G4int fCollID_patient;
|
||||
G4int fPrintModulo;
|
||||
G4int fPrintModulo;
|
||||
G4int fGoodEvents;
|
||||
G4double fSumDose;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B3RunAction.hh 70599 2013-06-03 11:14:56Z gcosmo $
|
||||
//
|
||||
/// \file B3RunAction.hh
|
||||
/// \brief Definition of the B3RunAction class
|
||||
@@ -43,16 +43,10 @@ class B3RunAction : public G4UserRunAction
|
||||
public:
|
||||
B3RunAction();
|
||||
virtual ~B3RunAction();
|
||||
|
||||
|
||||
virtual G4Run* GenerateRun();
|
||||
virtual void BeginOfRunAction(const G4Run*);
|
||||
virtual void EndOfRunAction(const G4Run*);
|
||||
|
||||
void CountEvents() { fGoodEvents++;};
|
||||
void SumDose(G4double dose) { fSumDose += dose;};
|
||||
|
||||
public:
|
||||
G4int fGoodEvents;
|
||||
G4double fSumDose;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B3StackingAction.hh 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B3StackingAction.hh
|
||||
/// \brief Definition of the B3StackingAction class
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: run1.mac,v 1.6 2002-12-16 16:37:25 maire Exp $
|
||||
# $Id: run1.mac 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
#
|
||||
# Macro file of "exampleB3.cc"
|
||||
#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: run2.mac,v 1.6 2002-12-16 16:37:25 maire Exp $
|
||||
# $Id: run2.mac 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
#
|
||||
# Macro file of "exampleB3.cc"
|
||||
#
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: B3ActionInitialization.cc 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B3ActionInitialization.cc
|
||||
/// \brief Implementation of the B3ActionInitialization class
|
||||
|
||||
#include "B3ActionInitialization.hh"
|
||||
#include "B3PrimaryGeneratorAction.hh"
|
||||
#include "B3RunAction.hh"
|
||||
#include "B3StackingAction.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B3ActionInitialization::B3ActionInitialization()
|
||||
: G4VUserActionInitialization()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B3ActionInitialization::~B3ActionInitialization()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B3ActionInitialization::BuildForMaster() const
|
||||
{
|
||||
SetUserAction(new B3RunAction);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B3ActionInitialization::Build() const
|
||||
{
|
||||
SetUserAction(new B3PrimaryGeneratorAction);
|
||||
SetUserAction(new B3RunAction);
|
||||
SetUserAction(new B3StackingAction);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B3DetectorConstruction.cc 71323 2013-06-13 16:54:23Z gcosmo $
|
||||
//
|
||||
/// \file B3DetectorConstruction.cc
|
||||
/// \brief Implementation of the B3DetectorConstruction class
|
||||
@@ -50,7 +50,6 @@
|
||||
|
||||
B3DetectorConstruction::B3DetectorConstruction()
|
||||
: G4VUserDetectorConstruction(),
|
||||
fLogicCryst(0),fLogicPatient(0),
|
||||
fCheckOverlaps(true)
|
||||
{
|
||||
DefineMaterials();
|
||||
@@ -99,7 +98,7 @@ G4VPhysicalVolume* B3DetectorConstruction::Construct()
|
||||
G4double detector_dZ = nb_rings*cryst_dX;
|
||||
//
|
||||
G4NistManager* nist = G4NistManager::Instance();
|
||||
G4Material* default_mat = nist->FindOrBuildMaterial("G4_AIR", false);
|
||||
G4Material* default_mat = nist->FindOrBuildMaterial("G4_AIR");
|
||||
G4Material* cryst_mat = nist->FindOrBuildMaterial("Lu2SiO5");
|
||||
|
||||
//
|
||||
@@ -145,10 +144,10 @@ G4VPhysicalVolume* B3DetectorConstruction::Construct()
|
||||
G4double dX = cryst_dX - gap, dY = cryst_dY - gap;
|
||||
G4Box* solidCryst = new G4Box("crystal", dX/2, dY/2, cryst_dZ/2);
|
||||
|
||||
fLogicCryst =
|
||||
G4LogicalVolume* logicCryst =
|
||||
new G4LogicalVolume(solidCryst, //its solid
|
||||
cryst_mat, //its material
|
||||
"crystal"); //its name
|
||||
"CrystalLV"); //its name
|
||||
|
||||
// place crystals within a ring
|
||||
//
|
||||
@@ -162,7 +161,7 @@ G4VPhysicalVolume* B3DetectorConstruction::Construct()
|
||||
G4Transform3D transform = G4Transform3D(rotm,position);
|
||||
|
||||
new G4PVPlacement(transform, //rotation,position
|
||||
fLogicCryst, //its logical volume
|
||||
logicCryst, //its logical volume
|
||||
"crystal", //its name
|
||||
logicRing, //its mother volume
|
||||
false, //no boolean operation
|
||||
@@ -214,22 +213,22 @@ G4VPhysicalVolume* B3DetectorConstruction::Construct()
|
||||
//
|
||||
G4double patient_radius = 8*cm;
|
||||
G4double patient_dZ = 10*cm;
|
||||
G4Material* patient_mat = nist->FindOrBuildMaterial("G4_BRAIN_ICRP", false);
|
||||
G4Material* patient_mat = nist->FindOrBuildMaterial("G4_BRAIN_ICRP");
|
||||
|
||||
G4Tubs* solidPatient =
|
||||
new G4Tubs("Patient", 0., patient_radius, 0.5*patient_dZ, 0., twopi);
|
||||
|
||||
fLogicPatient =
|
||||
G4LogicalVolume* logicPatient =
|
||||
new G4LogicalVolume(solidPatient, //its solid
|
||||
patient_mat, //its material
|
||||
"Patient"); //its name
|
||||
"PatientLV"); //its name
|
||||
|
||||
//
|
||||
// place patient in world
|
||||
//
|
||||
new G4PVPlacement(0, //no rotation
|
||||
G4ThreeVector(), //at (0,0,0)
|
||||
fLogicPatient, //its logical volume
|
||||
logicPatient, //its logical volume
|
||||
"Patient", //its name
|
||||
logicWorld, //its mother volume
|
||||
false, //no boolean operation
|
||||
@@ -243,11 +242,7 @@ G4VPhysicalVolume* B3DetectorConstruction::Construct()
|
||||
|
||||
// Print materials
|
||||
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
||||
|
||||
//
|
||||
CreateScorers();
|
||||
|
||||
//
|
||||
|
||||
//always return the physical World
|
||||
//
|
||||
return physWorld;
|
||||
@@ -255,26 +250,23 @@ G4VPhysicalVolume* B3DetectorConstruction::Construct()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B3DetectorConstruction::CreateScorers()
|
||||
void B3DetectorConstruction::ConstructSDandField()
|
||||
{
|
||||
G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
||||
SDman->SetVerboseLevel(2);
|
||||
G4SDManager::GetSDMpointer()->SetVerboseLevel(1);
|
||||
|
||||
// declare crystal as a MultiFunctionalDetector scorer
|
||||
//
|
||||
G4MultiFunctionalDetector* cryst = new G4MultiFunctionalDetector("crystal");
|
||||
G4VPrimitiveScorer* primitiv1 = new G4PSEnergyDeposit("edep");
|
||||
cryst->RegisterPrimitive(primitiv1);
|
||||
SDman->AddNewDetector(cryst);
|
||||
fLogicCryst->SetSensitiveDetector(cryst);
|
||||
SetSensitiveDetector("CrystalLV",cryst);
|
||||
|
||||
// declare patient as a MultiFunctionalDetector scorer
|
||||
//
|
||||
G4MultiFunctionalDetector* patient = new G4MultiFunctionalDetector("patient");
|
||||
G4VPrimitiveScorer* primitiv2 = new G4PSDoseDeposit("dose");
|
||||
patient->RegisterPrimitive(primitiv2);
|
||||
SDman->AddNewDetector(patient);
|
||||
fLogicPatient->SetSensitiveDetector(patient);
|
||||
SetSensitiveDetector("PatientLV",patient);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: B3PhysicsList.cc 68058 2013-03-13 14:47:43Z gcosmo $
|
||||
//
|
||||
/// \file B3PhysicsList.cc
|
||||
/// \brief Implementation of the B3PhysicsList class
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user