Import Geant4 11.4.0 source tree
This commit is contained in:
@@ -23,9 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file exampleB3a.cc
|
||||
/// \brief Main program of the B3a example
|
||||
/// \brief Main program of the B3/B3a example
|
||||
|
||||
#include "ActionInitialization.hh"
|
||||
#include "DetectorConstruction.hh"
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-03-ref-06 (30-June-2025)
|
||||
Geant4 version Name: geant4-11-04-ref-00 (5-December-2025)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -29,7 +29,6 @@ You have successfully registered the following graphics systems.
|
||||
Registered graphics systems are:
|
||||
ASCIITree (ATree)
|
||||
DAWNFILE (DAWNFILE)
|
||||
G4HepRepFile (HepRepFile)
|
||||
RayTracer (RT)
|
||||
VRML2FILE (VRML2FILE)
|
||||
gMocrenFile (gMocrenFile)
|
||||
@@ -42,13 +41,12 @@ Registered graphics systems are:
|
||||
OpenGLStoredX (OGLSX, OGLSQt_FALLBACK, OGLSXm_FALLBACK)
|
||||
RayTracerX (RTX)
|
||||
RayTracerQt (RTQt)
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_X11_ZB (TSG_X11_ZB, TSGX11ZB)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG, OGL)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB, TSGZB)
|
||||
You may choose a graphics system (driver) with a parameter of
|
||||
the command "/vis/open" or "/vis/sceneHandler/create",
|
||||
or you may omit the driver parameter and choose at run time:
|
||||
@@ -282,7 +280,7 @@ Lowest muon/hadron kinetic energy 1 keV
|
||||
Use ICRU90 data 0
|
||||
Fluctuations of dE/dx are enabled 1
|
||||
Type of fluctuation model for leptons and hadrons Urban
|
||||
Use built-in Birks satuaration 0
|
||||
Use built-in Birks saturation 0
|
||||
Build CSDA range enabled 0
|
||||
Use cut as a final range enabled 0
|
||||
Enable angular generator interface 0
|
||||
@@ -434,7 +432,7 @@ hBrems: for proton XStype:1 SubType=3
|
||||
hPairProd: for proton XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
|
||||
Sampling table 17x1001, from 7.50618 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -515,7 +513,7 @@ hBrems: for anti_proton XStype:1 SubType=3
|
||||
hPairProd: for anti_proton XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
|
||||
Sampling table 17x1001, from 7.50618 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -547,7 +545,7 @@ hBrems: for kaon+ XStype:1 SubType=3
|
||||
hPairProd: for kaon+ XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
|
||||
Sampling table 18x1001, from 3.94942 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -579,7 +577,7 @@ hBrems: for kaon- XStype:1 SubType=3
|
||||
hPairProd: for kaon- XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
|
||||
Sampling table 18x1001, from 3.94942 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -611,7 +609,7 @@ muBrems: for mu+ XStype:1 SubType=3
|
||||
muPairProd: for mu+ XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 21x1001 from 0.85 GeV to 100 TeV
|
||||
Sampling table 21x1001, from 0.85 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
muPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -643,7 +641,7 @@ muBrems: for mu- XStype:1 SubType=3
|
||||
muPairProd: for mu- XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 21x1001 from 0.85 GeV to 100 TeV
|
||||
Sampling table 21x1001, from 0.85 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
muPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -675,7 +673,7 @@ hBrems: for pi+ XStype:1 SubType=3
|
||||
hPairProd: for pi+ XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
|
||||
Sampling table 20x1001, from 1.11656 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -707,7 +705,7 @@ hBrems: for pi- XStype:1 SubType=3
|
||||
hPairProd: for pi- XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
|
||||
Sampling table 20x1001, from 1.11656 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -743,8 +741,8 @@ Setting was ignored.
|
||||
--> Event 9000 starts.
|
||||
|
||||
--------------------End of Global Run-----------------------
|
||||
The run was 10000 events Nb of 'good' e+ annihilations: 1306
|
||||
Total dose in patient : 306.658 picoGy
|
||||
The run was 10000 events Nb of 'good' e+ annihilations: 1286
|
||||
Total dose in patient : 307.091 picoGy
|
||||
------------------------------------------------------------
|
||||
|
||||
... write file : scoring.root - done
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3a/include/ActionInitialization.hh
|
||||
/// \file ActionInitialization.hh
|
||||
/// \brief Definition of the B3a::ActionInitialization class
|
||||
|
||||
#ifndef B3aActionInitialization_h
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3a/include/DetectorConstruction.hh
|
||||
/// \file DetectorConstruction.hh
|
||||
/// \brief Definition of the B3::DetectorConstruction class
|
||||
|
||||
#ifndef B3DetectorConstruction_h
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3a/include/EventAction.hh
|
||||
/// \file EventAction.hh
|
||||
/// \brief Definition of the B3a::EventAction class
|
||||
|
||||
#ifndef B3aEventAction_h
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3a/include/PhysicsList.hh
|
||||
/// \file PhysicsList.hh
|
||||
/// \brief Definition of the B3::PhysicsList class
|
||||
|
||||
#ifndef B3PhysicsList_h
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3a/include/PrimaryGeneratorAction.hh
|
||||
/// \file PrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the B3::PrimaryGeneratorAction class
|
||||
|
||||
#ifndef B3PrimaryGeneratorAction_h
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3a/include/RunAction.hh
|
||||
/// \file RunAction.hh
|
||||
/// \brief Definition of the B3a::RunAction class
|
||||
|
||||
#ifndef B3aRunAction_h
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3a/include/StackingAction.hh
|
||||
/// \brief Definition of the B3::StackingAction class
|
||||
|
||||
#ifndef B3StackingAction_h
|
||||
#define B3StackingAction_h 1
|
||||
|
||||
#include "G4UserStackingAction.hh"
|
||||
|
||||
#include "G4ClassificationOfNewTrack.hh"
|
||||
|
||||
class G4Track;
|
||||
|
||||
namespace B3
|
||||
{
|
||||
|
||||
/// Stacking action class : manage the newly generated particles
|
||||
///
|
||||
/// One wishes do not track secondary neutrino.Therefore one kills it
|
||||
/// immediately, before created particles will put in a stack.
|
||||
|
||||
class StackingAction : public G4UserStackingAction
|
||||
{
|
||||
public:
|
||||
StackingAction() = default;
|
||||
~StackingAction() override = default;
|
||||
|
||||
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track*) override;
|
||||
};
|
||||
|
||||
} // namespace B3
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3a/src/ActionInitialization.cc
|
||||
/// \file ActionInitialization.cc
|
||||
/// \brief Implementation of the B3a::ActionInitialization class
|
||||
|
||||
#include "ActionInitialization.hh"
|
||||
@@ -32,7 +31,10 @@
|
||||
#include "EventAction.hh"
|
||||
#include "PrimaryGeneratorAction.hh"
|
||||
#include "RunAction.hh"
|
||||
#include "StackingAction.hh"
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4NeutrinoE.hh"
|
||||
#include "G4ClassificationOfNewTrack.hh"
|
||||
|
||||
using namespace B3;
|
||||
|
||||
@@ -55,7 +57,10 @@ void ActionInitialization::Build() const
|
||||
|
||||
SetUserAction(new EventAction(runAction));
|
||||
SetUserAction(new PrimaryGeneratorAction);
|
||||
SetUserAction(new StackingAction);
|
||||
|
||||
// Do not track neutrinos, but kill them immediately
|
||||
auto runManager = G4RunManager::GetRunManager();
|
||||
runManager->SetDefaultClassification(G4NeutrinoE::Definition(), fKill);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3a/src/DetectorConstruction.cc
|
||||
/// \file DetectorConstruction.cc
|
||||
/// \brief Implementation of the B3::DetectorConstruction class
|
||||
|
||||
#include "DetectorConstruction.hh"
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3a/src/EventAction.cc
|
||||
/// \file EventAction.cc
|
||||
/// \brief Implementation of the B3a::EventAction class
|
||||
|
||||
#include "EventAction.hh"
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3a/src/PhysicsList.cc
|
||||
/// \file PhysicsList.cc
|
||||
/// \brief Implementation of the B3::PhysicsList class
|
||||
|
||||
#include "PhysicsList.hh"
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3a/src/PrimaryGeneratorAction.cc
|
||||
/// \file PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the B3::PrimaryGeneratorAction class
|
||||
|
||||
#include "PrimaryGeneratorAction.hh"
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3a/src/RunAction.cc
|
||||
/// \file RunAction.cc
|
||||
/// \brief Implementation of the B3a::RunAction class
|
||||
|
||||
#include "RunAction.hh"
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3a/src/StackingAction.cc
|
||||
/// \brief Implementation of the B3::StackingAction class
|
||||
|
||||
#include "StackingAction.hh"
|
||||
|
||||
#include "G4NeutrinoE.hh"
|
||||
#include "G4Track.hh"
|
||||
|
||||
namespace B3
|
||||
{
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4ClassificationOfNewTrack StackingAction::ClassifyNewTrack(const G4Track* track)
|
||||
{
|
||||
// keep primary particle
|
||||
if (track->GetParentID() == 0) return fUrgent;
|
||||
|
||||
// kill secondary neutrino
|
||||
if (track->GetDefinition() == G4NeutrinoE::NeutrinoE())
|
||||
return fKill;
|
||||
else
|
||||
return fUrgent;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
} // namespace B3
|
||||
@@ -23,9 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file exampleB3b.cc
|
||||
/// \brief Main program of the B3b example
|
||||
/// \brief Main program of the B3/B3b example
|
||||
|
||||
#include "ActionInitialization.hh"
|
||||
#include "DetectorConstruction.hh"
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-03-ref-06 (30-June-2025)
|
||||
Geant4 version Name: geant4-11-04-ref-00 (5-December-2025)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -27,7 +27,6 @@ You have successfully registered the following graphics systems.
|
||||
Registered graphics systems are:
|
||||
ASCIITree (ATree)
|
||||
DAWNFILE (DAWNFILE)
|
||||
G4HepRepFile (HepRepFile)
|
||||
RayTracer (RT)
|
||||
VRML2FILE (VRML2FILE)
|
||||
gMocrenFile (gMocrenFile)
|
||||
@@ -40,13 +39,12 @@ Registered graphics systems are:
|
||||
OpenGLStoredX (OGLSX, OGLSQt_FALLBACK, OGLSXm_FALLBACK)
|
||||
RayTracerX (RTX)
|
||||
RayTracerQt (RTQt)
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_X11_ZB (TSG_X11_ZB, TSGX11ZB)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG, OGL)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB, TSGZB)
|
||||
You may choose a graphics system (driver) with a parameter of
|
||||
the command "/vis/open" or "/vis/sceneHandler/create",
|
||||
or you may omit the driver parameter and choose at run time:
|
||||
@@ -280,7 +278,7 @@ Lowest muon/hadron kinetic energy 1 keV
|
||||
Use ICRU90 data 0
|
||||
Fluctuations of dE/dx are enabled 1
|
||||
Type of fluctuation model for leptons and hadrons Urban
|
||||
Use built-in Birks satuaration 0
|
||||
Use built-in Birks saturation 0
|
||||
Build CSDA range enabled 0
|
||||
Use cut as a final range enabled 0
|
||||
Enable angular generator interface 0
|
||||
@@ -432,7 +430,7 @@ hBrems: for proton XStype:1 SubType=3
|
||||
hPairProd: for proton XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
|
||||
Sampling table 17x1001, from 7.50618 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -513,7 +511,7 @@ hBrems: for anti_proton XStype:1 SubType=3
|
||||
hPairProd: for anti_proton XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
|
||||
Sampling table 17x1001, from 7.50618 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -545,7 +543,7 @@ hBrems: for kaon+ XStype:1 SubType=3
|
||||
hPairProd: for kaon+ XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
|
||||
Sampling table 18x1001, from 3.94942 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -577,7 +575,7 @@ hBrems: for kaon- XStype:1 SubType=3
|
||||
hPairProd: for kaon- XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
|
||||
Sampling table 18x1001, from 3.94942 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -609,7 +607,7 @@ muBrems: for mu+ XStype:1 SubType=3
|
||||
muPairProd: for mu+ XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 21x1001 from 0.85 GeV to 100 TeV
|
||||
Sampling table 21x1001, from 0.85 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
muPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -641,7 +639,7 @@ muBrems: for mu- XStype:1 SubType=3
|
||||
muPairProd: for mu- XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 21x1001 from 0.85 GeV to 100 TeV
|
||||
Sampling table 21x1001, from 0.85 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
muPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -673,7 +671,7 @@ hBrems: for pi+ XStype:1 SubType=3
|
||||
hPairProd: for pi+ XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
|
||||
Sampling table 20x1001, from 1.11656 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -705,7 +703,7 @@ hBrems: for pi- XStype:1 SubType=3
|
||||
hPairProd: for pi- XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
|
||||
Sampling table 20x1001, from 1.11656 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 eV Emax= 100 TeV ModifiedMephi
|
||||
|
||||
@@ -743,9 +741,9 @@ Setting was ignored.
|
||||
--> Event 9000 starts.
|
||||
|
||||
--------------------End of Global Run-----------------------
|
||||
The run was 10000 events Nb of 'good' e+ annihilations: 1306
|
||||
Total dose in patient : 306.658 picoGy
|
||||
Total dose in patient : 3.06658e-10 [sigma: 1.74008e-14 | error: 0.00567435 | coeff: 0.00567435 | eff: 1 | fom: 1 | r2int: 3.2195e-05 | r2eff: 0 | hits: 10000 ] Gy
|
||||
The run was 10000 events Nb of 'good' e+ annihilations: 1286
|
||||
Total dose in patient : 307.091 picoGy
|
||||
Total dose in patient : 3.07091e-10 [sigma: 1.76579e-14 | error: 0.00575006 | coeff: 0.00575006 | eff: 1 | fom: 1 | r2int: 3.30599e-05 | r2eff: 0 | hits: 10000 ] Gy
|
||||
------------------------------------------------------------
|
||||
|
||||
... write file : scoring.root - done
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3b/include/ActionInitialization.hh
|
||||
/// \file ActionInitialization.hh
|
||||
/// \brief Definition of the B3b::ActionInitialization class
|
||||
|
||||
#ifndef B3bActionInitialization_h
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3b/include/DetectorConstruction.hh
|
||||
/// \file DetectorConstruction.hh
|
||||
/// \brief Definition of the B3::DetectorConstruction class
|
||||
|
||||
#ifndef B3DetectorConstruction_h
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3b/include/PhysicsList.hh
|
||||
/// \file PhysicsList.hh
|
||||
/// \brief Definition of the B3::PhysicsList class
|
||||
|
||||
#ifndef B3PhysicsList_h
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3b/include/PrimaryGeneratorAction.hh
|
||||
/// \file PrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the B3::PrimaryGeneratorAction class
|
||||
|
||||
#ifndef B3PrimaryGeneratorAction_h
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3b/include/Run.hh
|
||||
/// \file Run.hh
|
||||
/// \brief Definition of the B3b::Run class
|
||||
|
||||
#ifndef B3bRun_h
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3b/include/RunAction.hh
|
||||
/// \file RunAction.hh
|
||||
/// \brief Definition of the B3b::RunAction class
|
||||
|
||||
#ifndef B3bRunAction_h
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3b/include/StackingAction.hh
|
||||
/// \brief Definition of the B3::StackingAction class
|
||||
|
||||
#ifndef B3StackingAction_h
|
||||
#define B3StackingAction_h 1
|
||||
|
||||
#include "G4UserStackingAction.hh"
|
||||
|
||||
#include "G4ClassificationOfNewTrack.hh"
|
||||
|
||||
namespace B3
|
||||
{
|
||||
|
||||
/// Stacking action class : manage the newly generated particles
|
||||
///
|
||||
/// One wishes do not track secondary neutrino.Therefore one kills it
|
||||
/// immediately, before created particles will put in a stack.
|
||||
|
||||
class StackingAction : public G4UserStackingAction
|
||||
{
|
||||
public:
|
||||
StackingAction() = default;
|
||||
~StackingAction() override = default;
|
||||
|
||||
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track*) override;
|
||||
};
|
||||
|
||||
} // namespace B3
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -23,15 +23,17 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3b/src/ActionInitialization.cc
|
||||
/// \file ActionInitialization.cc
|
||||
/// \brief Implementation of the B3b::ActionInitialization class
|
||||
|
||||
#include "ActionInitialization.hh"
|
||||
|
||||
#include "PrimaryGeneratorAction.hh"
|
||||
#include "RunAction.hh"
|
||||
#include "StackingAction.hh"
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4NeutrinoE.hh"
|
||||
#include "G4ClassificationOfNewTrack.hh"
|
||||
|
||||
using namespace B3;
|
||||
|
||||
@@ -51,7 +53,10 @@ void ActionInitialization::Build() const
|
||||
{
|
||||
SetUserAction(new RunAction);
|
||||
SetUserAction(new PrimaryGeneratorAction);
|
||||
SetUserAction(new StackingAction);
|
||||
|
||||
// Do not track neutrinos, but kill them immediately
|
||||
auto runManager = G4RunManager::GetRunManager();
|
||||
runManager->SetDefaultClassification(G4NeutrinoE::Definition(), fKill);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3b/src/DetectorConstruction.cc
|
||||
/// \file DetectorConstruction.cc
|
||||
/// \brief Implementation of the B3::DetectorConstruction class
|
||||
|
||||
#include "DetectorConstruction.hh"
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3b/src/PhysicsList.cc
|
||||
/// \file PhysicsList.cc
|
||||
/// \brief Implementation of the B3::PhysicsList class
|
||||
|
||||
#include "PhysicsList.hh"
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3b/src/PrimaryGeneratorAction.cc
|
||||
/// \file PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the B3::PrimaryGeneratorAction class
|
||||
|
||||
#include "PrimaryGeneratorAction.hh"
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3b/src/Run.cc
|
||||
/// \file Run.cc
|
||||
/// \brief Implementation of the B3b::Run class
|
||||
|
||||
#include "Run.hh"
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3b/src/RunAction.cc
|
||||
/// \file RunAction.cc
|
||||
/// \brief Implementation of the B3b::RunAction class
|
||||
|
||||
#include "RunAction.hh"
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
/// \file B3/B3b/src/StackingAction.cc
|
||||
/// \brief Implementation of the B3::StackingAction class
|
||||
|
||||
#include "StackingAction.hh"
|
||||
|
||||
#include "G4NeutrinoE.hh"
|
||||
#include "G4Track.hh"
|
||||
|
||||
namespace B3
|
||||
{
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4ClassificationOfNewTrack StackingAction::ClassifyNewTrack(const G4Track* track)
|
||||
{
|
||||
// keep primary particle
|
||||
if (track->GetParentID() == 0) return fUrgent;
|
||||
|
||||
// kill secondary neutrino
|
||||
if (track->GetDefinition() == G4NeutrinoE::NeutrinoE())
|
||||
return fKill;
|
||||
else
|
||||
return fUrgent;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
} // namespace B3
|
||||
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-10-21 I. Hrivnacova (exampleB3-V11-03-00)
|
||||
- Removed StackingAction class and using new
|
||||
G4RunManager::SetDefaultClassification() for killing neutrinos
|
||||
|
||||
## 2024-08-12 I. Hrivnacova (exampleB3-V11-02-00)
|
||||
- Updated for changes in accumulables:
|
||||
use new "Register" method with shorter name
|
||||
|
||||
@@ -1,213 +0,0 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
Example B3
|
||||
----------
|
||||
|
||||
This example simulates schematically a Positron Emitted Tomography system.
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The support of gamma detection are scintillating crystals. A small number
|
||||
of such crystals are optically grouped in a matrix of crystals. In
|
||||
this example, individual crystals are not described; only the matrix of
|
||||
crystals is and it is still called 'Crystal' hereafter.
|
||||
|
||||
Crystals are circularly arranged to form a ring. Few rings make up the full
|
||||
detector (gamma camera). This is done by positionning Crystals in
|
||||
Ring with an appropriate rotation matrix. Several copies of Ring are
|
||||
then placed in the full detector.
|
||||
|
||||
The head of a patient is schematised as a homogeneous cylinder of brain
|
||||
tissue, placed at the center of full detector.
|
||||
|
||||
The Crystal material, Lu2SiO5, is not included in the G4Nist database.
|
||||
Therefore, it is explicitly built in DefineMaterials().
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
The physics list contains standard electromagnetic processes and the
|
||||
radioactiveDecay module for GenericIon. It is defined in the B3::PhysicsList
|
||||
class as a Geant4 modular physics list with registered physics builders
|
||||
provided in Geant4:
|
||||
- G4DecayPhysics - defines all particles and their decay processes
|
||||
- G4RadioactiveDecayPhysics - defines radioactiveDecay for GenericIon
|
||||
- G4EmStandardPhysics - defines all EM standard processes
|
||||
|
||||
This physics list requires data files for:
|
||||
- low energy electromagnetic processes which path is defined via
|
||||
the G4LEDATA envirnoment variable
|
||||
- nuclides properties which path is defined via
|
||||
the G4ENSDFSTATEDATA envirnoment variable
|
||||
- radioactive decay hadronic processes which path is defined via
|
||||
the G4RADIOACTIVEDATA envirnoment variable.
|
||||
|
||||
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- ACTION INITALIZATION
|
||||
|
||||
B3[a,b]::ActionInitialization class 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:
|
||||
B3[a,b]::ActionInitialization::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
|
||||
B3[a,b]::ActionInitialization::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
|
||||
B3::PrimaryGeneratorAction::GeneratePrimaries().
|
||||
The type of a primary particle can be changed with G4ParticleGun commands
|
||||
(see run2.mac).
|
||||
|
||||
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 B3::DetectorConstruction::ConstructSDandField(). There are
|
||||
two G4MultiFunctionalDetector objects: one for the Crystal (EnergyDeposit),
|
||||
and one for the Patient (DoseDeposit)
|
||||
|
||||
The scorers hits are saved in form of ntuples in a Root file using Geant4
|
||||
analysis tools. This feature is activated in the main () function with instantiating
|
||||
G4TScoreNtupleWriter.
|
||||
|
||||
Two variants of accumulation event statistics in a run are demonstrated
|
||||
in this example:
|
||||
|
||||
B3a:
|
||||
|
||||
At the end of event, the values acummulated in B3a::EventAction are passed
|
||||
in B3a::RunAction and summed over the whole run (see B3a::EventAction::EndOfevent()).
|
||||
In multi-threading mode the data accumulated in G4Accumulable objects per
|
||||
workers is merged to the master in B3a::RunAction::EndOfRunAction() and the final
|
||||
result is printed on the screen.
|
||||
|
||||
G4Accumulable<> type instead of G4double and G4int types is used for the B3a::RunAction
|
||||
data members in order to facilitate merging of the values accumulated on workers
|
||||
to the master. Currently the accumulables have to be registered to G4AccumulablesManager
|
||||
and G4AccumulablesManager::Merge() has to be called from the users code. This is planned
|
||||
to be further simplified with a closer integration of G4Accumulable classes in
|
||||
the Geant4 kernel next year.
|
||||
|
||||
B3b:
|
||||
|
||||
B3b::Run::RecordEvent(), called at end of event, collects informations
|
||||
event per event from the hits collections, and accumulates statistic for
|
||||
B3b::RunAction::EndOfRunAction().
|
||||
In addition, results for dose are accumulated in a
|
||||
standard floating-point summation and using a new lightweight statistical
|
||||
class called G4StatAnalysis. The G4StatAnalysis class records four values:
|
||||
(1) the sum, (2) sum^2, (3) number of entries, and (4) the number of entries
|
||||
less than mean * machine-epsilon (the machine epsilon is the difference
|
||||
between 1.0 and the next value representable by the floating-point type).
|
||||
From these 4 values, G4StatAnalysis provides the mean, FOM, relative error,
|
||||
standard deviation, variance, coefficient of variation, efficiency, r2int,
|
||||
and r2eff.
|
||||
|
||||
In multi-threading mode the statistics accumulated per workers is merged
|
||||
to the master in B3b::Run::Merge().
|
||||
|
||||
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
|
||||
are put in a stack.
|
||||
The function B3::StackingAction::ClassifyNewTrack() is invoked by G4 kernel
|
||||
each time a new particle is created.
|
||||
|
||||
The following paragraphs are common to all basic examples
|
||||
|
||||
A- VISUALISATION
|
||||
|
||||
The visualization manager is set via the G4VisExecutive class
|
||||
in the main() function in exampleB3.cc.
|
||||
The initialisation of the drawing is done via a set of /vis/ commands
|
||||
in the macro vis.mac. This macro is automatically read from
|
||||
the main function when the example is used in interactive running mode.
|
||||
|
||||
By default, vis.mac opens an OpenGL viewer (/vis/open OGL).
|
||||
The user can change the initial viewer by commenting out this line
|
||||
and instead uncommenting one of the other /vis/open statements, such as
|
||||
HepRepFile or DAWNFILE (which produce files that can be viewed with the
|
||||
HepRApp and DAWN viewers, respectively). Note that one can always
|
||||
open new viewers at any time from the command line. For example, if
|
||||
you already have a view in, say, an OpenGL window with a name
|
||||
"viewer-0", then
|
||||
/vis/open DAWNFILE
|
||||
then to get the same view
|
||||
/vis/viewer/copyView viewer-0
|
||||
or to get the same view *plus* scene-modifications
|
||||
/vis/viewer/set/all viewer-0
|
||||
then to see the result
|
||||
/vis/viewer/flush
|
||||
|
||||
The DAWNFILE, HepRepFile drivers are always available
|
||||
(since they require no external libraries), but the OGL driver requires
|
||||
that the Geant4 libraries have been built with the OpenGL option.
|
||||
|
||||
Since 11.1, the TSG visualization driver can also produce the "offscrean"
|
||||
file output in png, jpeg, gl2ps formats without drawing on the screen.
|
||||
It can be controlled via UI commands provided in '/vis/tsg' which are
|
||||
demonstrated in the tsg_offscreen.mac macro in example B5.
|
||||
|
||||
For more information on visualization, including information on how to
|
||||
install and run DAWN, OpenGL and HepRApp, see the visualization tutorials,
|
||||
for example,
|
||||
http://geant4.slac.stanford.edu/Presentations/vis/G4[VIS]Tutorial/G4[VIS]Tutorial.html
|
||||
(where [VIS] can be replaced by DAWN, OpenGL and HepRApp)
|
||||
|
||||
The tracks are automatically drawn at the end of each event, accumulated
|
||||
for all events and erased at the beginning of the next run.
|
||||
|
||||
B- USER INTERFACES
|
||||
|
||||
The user command interface is set via the G4UIExecutive class
|
||||
in the main() function in exampleB3.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 gui.mac macros are provided in examples B2, B4 and B5. This macro
|
||||
is automatically executed if Geant4 is built with any GUI session.
|
||||
It is also possible to customise the icons menu bar which is
|
||||
demonstrated in the icons.mac macro in example B5.
|
||||
|
||||
C- HOW TO RUN
|
||||
|
||||
- Execute exampleB3a in the 'interactive mode' with visualization
|
||||
% ./exampleB3a
|
||||
and type in the commands from run1.mac line by line:
|
||||
Idle> /control/verbose 2
|
||||
Idle> /tracking/verbose 2
|
||||
Idle> /run/beamOn 1
|
||||
Idle> ...
|
||||
Idle> exit
|
||||
or
|
||||
Idle> /control/execute run1.mac
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
- Execute exampleB3a in the 'batch' mode from macro files
|
||||
(without visualization)
|
||||
% ./exampleB3a run2.mac
|
||||
% ./exampleB3a exampleB3.in > exampleB3.out
|
||||
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
|
||||
///\file "B3/.README.txt"
|
||||
///\brief Example B3 README page
|
||||
|
||||
/*! \page ExampleB3 Example %B3
|
||||
\page ExampleB3 Example B3
|
||||
|
||||
This example simulates schematically a Positron Emitted Tomography system.
|
||||
|
||||
\section B3_s1 GEOMETRY DEFINITION
|
||||
## GEOMETRY DEFINITION
|
||||
|
||||
The support of gamma detection are scintillating crystals. A small number
|
||||
of such crystals are optically grouped in a matrix of crystals. In
|
||||
@@ -24,7 +20,7 @@
|
||||
The Crystal material, Lu2SiO5, is not included in the G4Nist database.
|
||||
Therefore, it is explicitly built in DefineMaterials().
|
||||
|
||||
\section B3_s2 PHYSICS LIST
|
||||
## PHYSICS LIST
|
||||
|
||||
The physics list contains standard electromagnetic processes and the
|
||||
radioactiveDecay module for GenericIon. It is defined in the B3::PhysicsList
|
||||
@@ -47,7 +43,7 @@
|
||||
/InstallationGuide/html/ch03s03.html">
|
||||
Geant4 Installation Guide, Chapter 3.3: Note On Geant4 Datasets </a>.
|
||||
|
||||
\section B3_s3 ACTION INITALIZATION
|
||||
## ACTION INITALIZATION
|
||||
|
||||
B3a::ActionInitialization class (see also B3b::ActionInitialization) instantiates and registers to Geant4 kernel all user action classes.
|
||||
|
||||
@@ -64,7 +60,12 @@
|
||||
(see also B3b::ActionInitialization::Build)
|
||||
which is invoked only in multi-threading mode.
|
||||
|
||||
\section B3_s4 PRIMARY GENERATOR
|
||||
Beta decay of Fluor generates a neutrino. One wishes not to track this
|
||||
neutrino; therefore one kills it immediately, before created particles
|
||||
are put in a stack. This is done via the G4RunManager::SetDefaultClassification()
|
||||
call in the Build() function.
|
||||
|
||||
## PRIMARY GENERATOR
|
||||
|
||||
The default particle beam is an ion (F18), at rest, randomly distributed
|
||||
within a zone inside a patient and is defined in
|
||||
@@ -72,7 +73,7 @@
|
||||
The type of a primary particle can be changed with G4ParticleGun commands
|
||||
(see run2.mac).
|
||||
|
||||
\section B3_s5 DETECTOR RESPONSE : scorers
|
||||
## 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
|
||||
@@ -84,13 +85,13 @@
|
||||
and one for the Patient (DoseDeposit)
|
||||
|
||||
The scorers hits are saved in form of ntuples in a Root file using Geant4
|
||||
analysis tools. This feature is activated in the main () function with instantiating
|
||||
analysis tools. This feature is activated in the main() function with instantiating
|
||||
G4TScoreNtupleWriter.
|
||||
|
||||
Two variants of accumulation event statistics in a run are demonstrated
|
||||
in this example:
|
||||
|
||||
%B3a:
|
||||
B3a:
|
||||
|
||||
At the end of event, the values acummulated in B3a::EventAction are passed
|
||||
in B3a::RunAction and summed over the whole run (see B3a::EventAction::EndOfevent()).
|
||||
@@ -105,7 +106,7 @@
|
||||
to be further simplified with a closer integration of G4Accumulable classes in
|
||||
the Geant4 kernel next year.
|
||||
|
||||
%B3b:
|
||||
B3b:
|
||||
|
||||
B3b::Run::RecordEvent(), called at end of event, collects informations
|
||||
event per event from the hits collections, and accumulates statistic for
|
||||
@@ -123,76 +124,74 @@
|
||||
In multi-threading mode the statistics accumulated per workers is merged
|
||||
to the master in B3b::Run::Merge().
|
||||
|
||||
\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
|
||||
are put in a stack.
|
||||
The function B3::StackingAction::ClassifyNewTrack() is invoked by G4 kernel
|
||||
each time a new particle is created.
|
||||
|
||||
<hr>
|
||||
|
||||
The following paragraphs are common to all basic examples
|
||||
|
||||
\section B3_A VISUALISATION
|
||||
## VISUALISATION
|
||||
|
||||
The visualization manager is set via the G4VisExecutive class
|
||||
in the main () function in exampleB3.cc.
|
||||
in the main() function in exampleB3.cc.
|
||||
The initialisation of the drawing is done via a set of /vis/ commands
|
||||
in the macro vis.mac. This macro is automatically read from
|
||||
the main function when the example is used in interactive running mode.
|
||||
|
||||
By default, vis.mac opens an OpenGL viewer (/vis/open OGL).
|
||||
The user can change the initial viewer by commenting out this line
|
||||
and instead uncommenting one of the other /vis/open statements, such as
|
||||
HepRepFile or DAWNFILE (which produce files that can be viewed with the
|
||||
HepRApp and DAWN viewers, respectively). Note that one can always
|
||||
open new viewers at any time from the command line. For example, if
|
||||
you already have a view in, say, an OpenGL window with a name
|
||||
"viewer-0", then
|
||||
\verbatim
|
||||
/vis/open DAWNFILE
|
||||
\endverbatim
|
||||
then to get the same view
|
||||
\verbatim
|
||||
/vis/viewer/copyView viewer-0
|
||||
\endverbatim
|
||||
or to get the same view *plus* scene-modifications
|
||||
\verbatim
|
||||
/vis/viewer/set/all viewer-0
|
||||
\endverbatim
|
||||
then to see the result
|
||||
\verbatim
|
||||
/vis/viewer/flush
|
||||
\endverbatim
|
||||
By default, vis.mac opens the default viewer (/vis/open).
|
||||
This chooses a graphics system (in order of priority):
|
||||
- by argument in G4VisExecutive construction.
|
||||
- by environment variable, G4VIS_DEFAULT_DRIVER.
|
||||
- by information in ~/.g4session.
|
||||
- by mode (batch/interactive) and if interactive, by your build flags.
|
||||
|
||||
The DAWNFILE, HepRepFile drivers are always available
|
||||
The user can change the initial viewer
|
||||
- with environment variable G4VIS_DEFAULT_DRIVER. The format is
|
||||
```
|
||||
<graphics-system> [<window-size-hint>]
|
||||
```
|
||||
Set this, e.g:
|
||||
- (bash) export G4VIS_DEFAULT_DRIVER=TSG
|
||||
- (tcsh) setenv G4VIS_DEFAULT_DRIVER OI
|
||||
- The window-size-hint can optionally be added, e.g:
|
||||
- (bash) export G4VIS_DEFAULT_DRIVER="RayTracerQt 1000x1000-0+0"
|
||||
- on the command line, precede the app invocation, e.g:
|
||||
- ```
|
||||
G4VIS_DEFAULT_DRIVER=Vtk ./<application-name>
|
||||
```
|
||||
- with ~/.g4session.
|
||||
|
||||
For other suggestions for G4VIS_DEFAULT_DRIVER (see list of registered
|
||||
graphics systems printed at the start):
|
||||
- DAWNFILE: to create a .prim file suitable for viewing in DAWN.
|
||||
- VRML2FILE: to create a .wrl file suitable for viewing in a VRML viewer.
|
||||
- "TSG_OFFSCREEN 1200x1200": to create an image file with TSG.
|
||||
- See the tsg_offscreen.mac in examples/basic/B5 for more commands
|
||||
to change the file format, file name, picture size, etc.
|
||||
|
||||
See "Choosing a graphics viewer" in the Application Guide for details.
|
||||
|
||||
Of course you can change the viewer by editing the /vis/open line in vis.mac.
|
||||
|
||||
Also, after the initial viewer opens, you may open a different viewer by typing
|
||||
on the command line, e.g:
|
||||
```
|
||||
/vis/open DAWNFILE
|
||||
```
|
||||
or
|
||||
```
|
||||
/vis/open RayTraceQt
|
||||
```
|
||||
(if you are using the Qt GUI).
|
||||
|
||||
The view parameters of the existing viewer are copied.
|
||||
|
||||
The DAWNFILE and similar drivers are always available
|
||||
(since they require no external libraries), but the OGL driver requires
|
||||
that the Geant4 libraries have been built with the OpenGL option.
|
||||
|
||||
Since 11.1, the TSG visualization driver can also produce the "offscrean"
|
||||
file output in png, jpeg, gl2ps formats without drawing on the screen.
|
||||
It can be controlled via UI commands provided in '/vis/tsg' which are
|
||||
demonstrated in the tsg_offscreen.mac macro in example B5.
|
||||
|
||||
For more information on visualization, including information on how to
|
||||
install and run DAWN, OpenGL and HepRApp, see the visualization tutorials,
|
||||
for example,\n
|
||||
- <a href="http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html">
|
||||
OpenGL Tutorial </a>
|
||||
- <a href="http://geant4.slac.stanford.edu/Presentations/vis/G4DAWNTutorial/G4DAWNTutorial.html">
|
||||
DAWN Tutorial </a>
|
||||
- <a href="http://geant4.slac.stanford.edu/Presentations/vis/G4HepRAppTutorial/G4HepRAppTutorial.html">
|
||||
HepRApp Tutorial </a>
|
||||
|
||||
The tracks are automatically drawn at the end of each event, accumulated
|
||||
for all events and erased at the beginning of the next run.
|
||||
|
||||
\section B3_B USER INTERFACES
|
||||
## USER INTERFACES
|
||||
|
||||
The user command interface is set via the G4UIExecutive class
|
||||
in the main () function in exampleB3.cc
|
||||
in the main() function in exampleB3.cc
|
||||
|
||||
The selection of the user command interface is then done automatically
|
||||
according to the Geant4 configuration or it can be done explicitly via
|
||||
@@ -203,10 +202,10 @@ The following paragraphs are common to all basic examples
|
||||
It is also possible to customise the icons menu bar which is
|
||||
demonstrated in the icons.mac macro in example B5.
|
||||
|
||||
\section B3_C HOW TO RUN
|
||||
## HOW TO RUN
|
||||
|
||||
- Execute exampleB3a in the 'interactive mode' with visualization
|
||||
\verbatim
|
||||
```
|
||||
% ./exampleB3a
|
||||
and type in the commands from run1.mac line by line:
|
||||
Idle> /control/verbose 2
|
||||
@@ -214,19 +213,17 @@ Idle> /tracking/verbose 2
|
||||
Idle> /run/beamOn 1
|
||||
Idle> ...
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
```
|
||||
or
|
||||
\verbatim
|
||||
```
|
||||
Idle> /control/execute run1.mac
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
```
|
||||
|
||||
- Execute exampleB3a in the 'batch' mode from macro files
|
||||
(without visualization)
|
||||
\verbatim
|
||||
```
|
||||
% ./exampleB3a run2.mac
|
||||
% ./exampleB3a exampleB3.in > exampleB3.out
|
||||
\endverbatim
|
||||
|
||||
*/
|
||||
```
|
||||
Reference in New Issue
Block a user