Import Geant4 10.5.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2018-06-29 10:58:11 +02:00
parent fe81a77428
commit 6aa23be517
1581 changed files with 124288 additions and 83758 deletions
@@ -0,0 +1,128 @@
//$Id$
///\file "optical/OpNovice2/.README.txt"
///\brief Example OpNovice2 README page
/*! \page ExampleOpNovice2 Example OpNovice2
Investigate optical properties and parameters. Details of optical
photon boundary interactions on a surface are recorded. Details
of optical photon generation and transport are recorded.
\section OpNovice2_s1 GEOMETRY DEFINITION
The geometry consists of a cube "box" with a side of 2 m inside
the world cube of side 20 m. Optical properties of the box, the world,
and the surface may be set interactively via the commands defined
in the DetectorMessenger class.
Material properties may be added using the macro commands:
\verbatim
# for the box:
/opnovice2/boxProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
/opnovice2/boxConstProperty NAME VALUE
# for the world:
/opnovice2/worldProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
/opnovice2/worldConstProperty NAME VALUE
# for the surface:
/opnovice2/surfaceProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
\verbatim
Multiple energy and value pairs may be specified for the energy-dependent
properties.
Values are in Geant4 internal units. Energy is in MeV.
Example:
\verbatim
/opnovice2/boxProperty RINDEX 0.000002 1.3 0.000005 1.32 0.000008 1.34
\verbatim
sets the refractive index of the box to 1.3 at 2 eV, 1.32 at 5 eV, and
1.34 at 8 eV.
\section OpNovice2_s2 PHYSICS LIST
The FTFP_BERT physics list is used, with electromagnetic option
EMZ (option4) and G4OpticalPhysics for the optical physics.
\section OpNovice2_s3 AN EVENT : THE PRIMARY GENERATOR
The primary kinematic consists of a single particle. The type of
the particle, its energy, position, and direction, are set
in the PrimaryGeneratorAction class, and can be changed via the G4
build-in commands of G4ParticleGun class (see the macros provided with
this example).
\section OpNovice2_s4 VISUALIZATION
The Visualization Manager is set in the main().
The initialisation of the drawing is done via the commands
/vis/... in the macro vis.mac. To get visualisation:
\verbatim
> /control/execute vis.mac
\endverbatim
or run the program with no command line arguments:
\verbatim
$ ./OpNovice2
\endverbatim
\section OpNovice2_s5 HOW TO START ?
- Execute OpNovice2 in 'batch' mode from macro files
\verbatim
% OpNovice2 surface.mac
\endverbatim
- Execute OpNovice2 in 'interactive mode' with visualization
\verbatim
% OpNovice2
....
Idle> type your commands
....
Idle> exit
\endverbatim
6- RESULTS
A table of optical photon events is printed at the end of the run.
7- HISTOGRAMS
OpNovice2 has several predefined 1D histograms :
1 : Cerenkov spectrum
2 : scintillation spectrum
3 : boundary process status
4 : X momentum dir of scattered photons with px < 0
5 : Y momentum dir of scattered photons with px < 0
6 : Z momentum dir of scattered photons with px < 0
7 : X momentum dir of scattered photons with px >= 0
8 : Y momentum dir of scattered photons with px >= 0
9 : Z momentum dir of scattered photons with px >= 0
10 : X momentum dir of Fresnel-refracted photons
11 : Y momentum dir of Fresnel-refracted photons
12 : Z momentum dir of Fresnel-refracted photons
Histograms 4-12 are recorded for photons scattered from the +X
surface of the cube. Only the first interaction is recorded.
The histograms are managed by G4Analysis classes.
The histos can be individually activated with the command:
\verbatim
/analysis/h1/set id nbBins valMin valMax unit
\endverbatim
where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
One can control the name of the histograms file with the command:
\verbatim
/analysis/setFileName name (default opnovice2)
\endverbatim
It is possible to choose the format of the histogram file : root (default),
hbook, xml, csv, by using namespace in HistoManager.hh
It is also possible to print selected histograms on an ascii file:
\verbatim
/analysis/h1/setAscii id
\endverbatim
All selected histos will be written on a file name.ascii (default opnovice2)
@@ -0,0 +1,62 @@
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(OpNovice2)
#----------------------------------------------------------------------------
# Find Geant4 package, activating all available UI and Vis drivers by default
# You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui
# to build a batch mode only executable
#
option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON)
if(WITH_GEANT4_UIVIS)
find_package(Geant4 REQUIRED ui_all vis_all)
else()
find_package(Geant4 REQUIRED)
endif()
#----------------------------------------------------------------------------
# Setup Geant4 include directories and compile definitions
#
include(${Geant4_USE_FILE})
#----------------------------------------------------------------------------
# Locate sources and headers for this project
#
include_directories(${PROJECT_SOURCE_DIR}/include
${Geant4_INCLUDE_DIR})
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
#----------------------------------------------------------------------------
# Add the executable, and link it to the Geant4 libraries
#
add_executable(OpNovice2 OpNovice2.cc ${sources} ${headers})
target_link_libraries(OpNovice2 ${Geant4_LIBRARIES} )
#----------------------------------------------------------------------------
# Copy all scripts to the build directory, i.e. the directory in which we
# build OpNovice2. This is so that we can run the executable directly because it
# relies on these scripts being in the current working directory.
#
set(OpNovice2_SCRIPTS
OpNovice2.out
OpNovice2.in
vis.mac
surface.mac
electron.mac
)
foreach(_script ${OpNovice2_SCRIPTS})
configure_file(
${PROJECT_SOURCE_DIR}/${_script}
${PROJECT_BINARY_DIR}/${_script}
COPYONLY
)
endforeach()
#----------------------------------------------------------------------------
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
#
install(TARGETS OpNovice2 DESTINATION bin)
@@ -0,0 +1,21 @@
# $Id: GNUmakefile 66335 2012-12-17 22:37:39Z gum $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := OpNovice2
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
include $(G4INSTALL)/config/binmake.gmk
visclean:
rm -f g4*.prim g4*.eps g4*.wrl
rm -f .DAWN_*
@@ -0,0 +1,36 @@
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Example OpNovice2 History file
------------------------------
This file should be used by the G4 example coordinator to briefly
summarize all major modifications introduced in the code and keep
track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
June 2, 2018 D.Sawkey (OpNovice2-V10-04-04)
- fix GNUmakefile
June 1, 2018 D.Sawkey (OpNovice2-V10-04-03)
- add GNUMakeFile
June 1, 2018 D.Sawkey (OpNovice2-V10-04-02)
- remove unused variables to fix clang warnings
May 30, 2018 D.Sawkey (OpNovice2-V10-04-01)
- add #include<numeric> to Run.cc
May 30, 2018 G.Cosmo (OpNovice2-V10-04-00)
- Retagged.
May 29, 2018 D.Sawkey (exOpTest-V10-04-01)
- rename to OpNovice2
May 24, 2018 D. Sawkey (exOpTest-V10-04-00)
- Introducing this example
@@ -0,0 +1,112 @@
//
// ********************************************************************
// * 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: LXe.cc 110190 2018-05-17 10:50:30Z allison $
//
/// \file optical/OpNovice2/OpNovice2.cc
/// \brief Main program of the optical/OpNovice2 example
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4Types.hh"
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
#else
#include "G4RunManager.hh"
#endif
#include "G4UImanager.hh"
#include "G4String.hh"
#include "FTFP_BERT.hh"
#include "G4OpticalPhysics.hh"
#include "G4EmStandardPhysics_option4.hh"
#include "DetectorConstruction.hh"
#include "ActionInitialization.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
int main(int argc, char** argv)
{
//detect interactive mode (if no arguments) and define UI session
G4UIExecutive* ui = nullptr;
if (argc == 1) ui = new G4UIExecutive(argc,argv);
#ifdef G4MULTITHREADED
G4MTRunManager * runManager = new G4MTRunManager;
G4int nThreads = std::min(G4Threading::G4GetNumberOfCores(), 4);
runManager->SetNumberOfThreads(nThreads);
G4cout << "===== OpNovice2 is started with "
<< runManager->GetNumberOfThreads() << " threads =====" << G4endl;
#else
G4RunManager * runManager = new G4RunManager;
#endif
DetectorConstruction* detector = new DetectorConstruction();
runManager->SetUserInitialization(detector);
G4VModularPhysicsList* physicsList = new FTFP_BERT;
physicsList->ReplacePhysics(new G4EmStandardPhysics_option4());
G4OpticalPhysics* opticalPhysics = new G4OpticalPhysics();
physicsList->RegisterPhysics(opticalPhysics);
runManager->SetUserInitialization(physicsList);
runManager->SetUserInitialization(new ActionInitialization());
//initialize visualization
G4VisManager* visManager = new G4VisExecutive;
visManager->Initialize();
//get the pointer to the User Interface manager
G4UImanager* UImanager = G4UImanager::GetUIpointer();
if (ui) {
//interactive mode
UImanager->ApplyCommand("/control/execute vis.mac");
ui->SessionStart();
delete ui;
}
else {
//batch mode
G4String command = "/control/execute ";
G4String fileName = argv[1];
UImanager->ApplyCommand(command+fileName);
}
// job termination
delete visManager;
delete runManager;
return 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,40 @@
/control/verbose 2
/tracking/verbose 0
/run/initialize
/opnovice2/boxProperty RINDEX 0.000002 1.3 0.000008 1.4
/opnovice2/boxProperty ABSLENGTH 0.000002 1000000 0.000005 2000000 0.000008 3000000
/opnovice2/worldProperty RINDEX 0.000002 1.01 0.000008 1.01
/opnovice2/worldProperty ABSLENGTH 0.000002 1000000 0.000005 2000000 0.000008 3000000
/opnovice2/surfaceModel unified
/opnovice2/surfaceType dielectric_dielectric
/opnovice2/surfaceFinish ground
/opnovice2/surfaceSigmaAlpha 1.1
/opnovice2/surfaceProperty SPECULARLOBECONSTANT 0.000002 .1 0.000008 .1
/opnovice2/surfaceProperty SPECULARSPIKECONSTANT 0.000002 .01 0.000008 .01
/opnovice2/surfaceProperty BACKSCATTERCONSTANT 0.000002 .05 0.000008 .05
/opnovice2/surfaceProperty REFLECTIVITY 0.000002 .99 0.000008 .99
#
/gun/particle opticalphoton
/gun/energy 3 eV
/gun/position 0 0 0 cm
/gun/direction 1 0 0
/opnovice2/gun/optPhotonPolar
#
/analysis/h1/set 3 40 -1 39
/analysis/h1/set 4 100 -1.1 1.1
/analysis/h1/set 5 100 -1.1 1.1
/analysis/h1/set 6 100 -1.1 1.1
/analysis/h1/set 7 100 -1.1 1.1
/analysis/h1/set 8 100 -1.1 1.1
/analysis/h1/set 9 100 -1.1 1.1
/analysis/h1/set 10 100 -1.1 1.1
/analysis/h1/set 11 100 -1.1 1.1
/analysis/h1/set 12 100 -1.1 1.1
/run/beamOn 100000
@@ -0,0 +1,965 @@
############################################
!!! WARNING - FPE detection is activated !!!
############################################
**************************************************************
Geant4 version Name: geant4-10-05-beta-01 (29-June-2018)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
: NIM A 835 (2016), 186-225
WWW : http://geant4.org/
**************************************************************
<<< Geant4 Physics List simulation engine: FTFP_BERT 2.0
G4VModularPhysicsList::ReplacePhysics: G4EmStandardwith type : 2 is replaces with G4EmStandard_opt4
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
Registering graphics systems...
You have successfully registered the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
OpenGLImmediateQt (OGLIQt, OGLI)
OpenGLStoredQt (OGLSQt, OGL, OGLS)
OpenGLImmediateXm (OGLIXm, OGLIQt_FALLBACK)
OpenGLStoredXm (OGLSXm, OGLSQt_FALLBACK)
OpenGLImmediateX (OGLIX, OGLIQt_FALLBACK, OGLIXm_FALLBACK)
OpenGLStoredX (OGLSX, OGLSQt_FALLBACK, OGLSXm_FALLBACK)
RayTracerX (RayTracerX)
Registering model factories...
You have successfully registered the following model factories.
Registered model factories:
generic
drawByAttribute
drawByCharge
drawByOriginVolume
drawByParticleID
drawByEncounteredVolume
Registered filter factories:
attributeFilter
chargeFilter
originVolumeFilter
particleFilter
encounteredVolumeFilter
You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none
Some /vis commands (optionally) take a string to specify colour.
"/vis/list" to see available colours.
/tracking/verbose 0
/run/initialize
opticalSurface->DumpInfo
Surface type = 1
Surface finish = 0
Surface model = 1
Surface parameter
-----------------
0
FTFP_BERT : new threshold between BERT and FTFP is over the interval
for pions : 3 to 12 GeV
for kaons : 3 to 12 GeV
for proton : 3 to 12 GeV
for neutron : 3 to 12 GeV
### Adding tracking cuts for neutron TimeCut(ns)= 10000 KinEnergyCut(MeV)= 0
### Birks coefficients used in run time
G4_WATER 0.126 mm/MeV 0.0126 g/cm^2/MeV massFactor= 85.0756 effCharge= 62.0606
/opnovice2/boxProperty RINDEX 0.000002 1.3 0.000008 1.4
The MPT for the box is now:
0: RINDEX
2e-06 1.3
8e-06 1.4
9: GROUPVEL
2e-06 218.486
8e-06 203.645
.............
/opnovice2/boxProperty ABSLENGTH 0.000002 1000000 0.000005 2000000 0.000008 3000000
The MPT for the box is now:
0: RINDEX
2e-06 1.3
8e-06 1.4
9: GROUPVEL
2e-06 218.486
8e-06 203.645
14: ABSLENGTH
2e-06 1e+06
5e-06 2e+06
8e-06 3e+06
.............
/opnovice2/worldProperty RINDEX 0.000002 1.01 0.000008 1.01
The MPT for the world is now:
0: RINDEX
2e-06 1.01
8e-06 1.01
9: GROUPVEL
2e-06 296.824
8e-06 296.824
.............
/opnovice2/worldProperty ABSLENGTH 0.000002 1000000 0.000005 2000000 0.000008 3000000
The MPT for the world is now:
0: RINDEX
2e-06 1.01
8e-06 1.01
9: GROUPVEL
2e-06 296.824
8e-06 296.824
14: ABSLENGTH
2e-06 1e+06
5e-06 2e+06
8e-06 3e+06
.............
/opnovice2/surfaceModel unified
/run/geometryModified
/opnovice2/surfaceType dielectric_dielectric
/run/geometryModified
/opnovice2/surfaceFinish ground
/run/geometryModified
/opnovice2/surfaceSigmaAlpha 1.1
/run/geometryModified
Surface sigma alpha set to: 1.1
/opnovice2/surfaceProperty SPECULARLOBECONSTANT 0.000002 .1 0.000008 .1
SPECULARLOBECONSTANT 0.000002 .1 0.000008 .1
The MPT for the surface is now:
6: SPECULARLOBECONSTANT
2e-06 0.1
8e-06 0.1
.............
/opnovice2/surfaceProperty SPECULARSPIKECONSTANT 0.000002 .01 0.000008 .01
SPECULARSPIKECONSTANT 0.000002 .01 0.000008 .01
The MPT for the surface is now:
6: SPECULARLOBECONSTANT
2e-06 0.1
8e-06 0.1
7: SPECULARSPIKECONSTANT
2e-06 0.01
8e-06 0.01
.............
/opnovice2/surfaceProperty BACKSCATTERCONSTANT 0.000002 .05 0.000008 .05
BACKSCATTERCONSTANT 0.000002 .05 0.000008 .05
The MPT for the surface is now:
6: SPECULARLOBECONSTANT
2e-06 0.1
8e-06 0.1
7: SPECULARSPIKECONSTANT
2e-06 0.01
8e-06 0.01
8: BACKSCATTERCONSTANT
2e-06 0.05
8e-06 0.05
.............
/opnovice2/surfaceProperty REFLECTIVITY 0.000002 .99 0.000008 .99
REFLECTIVITY 0.000002 .99 0.000008 .99
The MPT for the surface is now:
1: REFLECTIVITY
2e-06 0.99
8e-06 0.99
6: SPECULARLOBECONSTANT
2e-06 0.1
8e-06 0.1
7: SPECULARSPIKECONSTANT
2e-06 0.01
8e-06 0.01
8: BACKSCATTERCONSTANT
2e-06 0.05
8e-06 0.05
.............
#
/gun/particle opticalphoton
/gun/energy 3 eV
/gun/position 0 0 0 cm
/gun/direction 1 0 0
/opnovice2/gun/optPhotonPolar
#
/analysis/h1/set 3 40 -1 39
/analysis/h1/set 4 100 -1.1 1.1
/analysis/h1/set 5 100 -1.1 1.1
/analysis/h1/set 6 100 -1.1 1.1
/analysis/h1/set 7 100 -1.1 1.1
/analysis/h1/set 8 100 -1.1 1.1
/analysis/h1/set 9 100 -1.1 1.1
/analysis/h1/set 10 100 -1.1 1.1
/analysis/h1/set 11 100 -1.1 1.1
/analysis/h1/set 12 100 -1.1 1.1
/run/beamOn 100000
### === Deexcitation model UAtomDeexcitation is activated for 1 region:
DefaultRegionForTheWorld 1 1 0
### === Auger cascade flag: 1
### === Ignore cuts flag: 0
phot: for gamma SubType= 12 BuildTable= 0
LambdaPrime table from 200 keV to 100 TeV in 174 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LivermorePhElectric : Emin= 0 eV Emax= 100 TeV AngularGenSauterGavrila FluoActive
compt: for gamma SubType= 13 BuildTable= 1
Lambda table from 100 eV to 1 MeV, 20 bins per decade, spline: 1
LambdaPrime table from 1 MeV to 100 TeV in 160 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LowEPComptonModel : Emin= 0 eV Emax= 20 MeV FluoActive
KleinNishina : Emin= 20 MeV Emax= 100 TeV FluoActive
conv: for gamma SubType= 14 BuildTable= 1
Lambda table from 1.022 MeV to 100 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
PenConversion : Emin= 0 eV Emax= 80 GeV
BetheHeitlerLPM : Emin= 80 GeV Emax= 100 TeV AngularGenUrban
Rayl: for gamma SubType= 11 BuildTable= 1
Lambda table from 100 eV to 100 keV, 20 bins per decade, spline: 0
LambdaPrime table from 100 keV to 100 TeV in 180 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
LivermoreRayleigh : Emin= 0 eV Emax= 100 TeV CullenGenerator
msc: for e- SubType= 10
RangeFactor= 0.2, stepLimitType: 2, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
GoudsmitSaunderson : Emin= 0 eV Emax= 100 MeV Table with 120 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 100 TeV Table with 120 bins Emin= 100 MeV Emax= 100 TeV
eIoni: for e- SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
PenIoni : Emin= 0 eV Emax= 1 MeV
MollerBhabha : Emin= 1 MeV Emax= 100 TeV deltaVI
eBrem: for e- SubType= 3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV AngularGen2BS
eBremLPM : Emin= 1 GeV Emax= 100 TeV AngularGen2BS
ePairProd: for e- SubType= 4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
ePairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for e-, integral: 1 SubType= 1 BuildTable= 1
Lambda table from 100 MeV to 100 TeV, 20 bins per decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
msc: for e+ SubType= 10
RangeFactor= 0.2, stepLimitType: 2, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
GoudsmitSaunderson : Emin= 0 eV Emax= 100 MeV Table with 120 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 100 TeV Table with 120 bins Emin= 100 MeV Emax= 100 TeV
eIoni: for e+ SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
PenIoni : Emin= 0 eV Emax= 1 MeV
MollerBhabha : Emin= 1 MeV Emax= 100 TeV deltaVI
eBrem: for e+ SubType= 3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV AngularGen2BS
eBremLPM : Emin= 1 GeV Emax= 100 TeV AngularGen2BS
ePairProd: for e+ SubType= 4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
ePairProd : Emin= 0 eV Emax= 100 TeV
annihil: for e+, integral: 1 SubType= 5 BuildTable= 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
eplus2gg : Emin= 0 eV Emax= 100 TeV
CoulombScat: for e+, integral: 1 SubType= 1 BuildTable= 1
Lambda table from 100 MeV to 100 TeV, 20 bins per decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 100 MeV Emax= 100 TeV
msc: for proton SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 240 bins Emin= 100 eV Emax= 100 TeV
hIoni: for proton SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.01, dRoverRange= 0.1, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 2 MeV deltaVI
BetheBloch : Emin= 2 MeV Emax= 100 TeV deltaVI
hBrems: for proton SubType= 3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV
hPairProd: for proton SubType= 4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for proton, integral: 1 SubType= 1 BuildTable= 1
Lambda table from threshold to 100 TeV, 20 bins per decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
nuclearStopping: for proton SubType= 8 BuildTable= 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU49NucStopping : Emin= 0 eV Emax= 1 MeV
msc: for GenericIon SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 TeV
ionIoni: for GenericIon SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.001, dRoverRange= 0.1, integral: 1, fluct: 1, linLossLimit= 0.02
===== EM models for the G4Region DefaultRegionForTheWorld ======
ParamICRU73 : Emin= 0 eV Emax= 100 TeV deltaVI
nuclearStopping: for GenericIon SubType= 8 BuildTable= 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU49NucStopping : Emin= 0 eV Emax= 1 MeV
msc: for alpha SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 TeV Table with 240 bins Emin= 100 eV Emax= 100 TeV
ionIoni: for alpha SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.01, dRoverRange= 0.1, integral: 1, fluct: 1, linLossLimit= 0.02
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax= 7.9452 MeV deltaVI
BetheBloch : Emin= 7.9452 MeV Emax= 100 TeV deltaVI
nuclearStopping: for alpha SubType= 8 BuildTable= 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU49NucStopping : Emin= 0 eV Emax= 1 MeV
msc: for anti_proton SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 240 bins Emin= 100 eV Emax= 100 TeV
hIoni: for anti_proton SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.01, dRoverRange= 0.1, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 2 MeV deltaVI
BetheBloch : Emin= 2 MeV Emax= 100 TeV deltaVI
hBrems: for anti_proton SubType= 3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV
hPairProd: for anti_proton SubType= 4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for anti_proton, integral: 1 SubType= 1 BuildTable= 1
Lambda table from threshold to 100 TeV, 20 bins per decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
nuclearStopping: for anti_proton SubType= 8 BuildTable= 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU49NucStopping : Emin= 0 eV Emax= 1 MeV
msc: for kaon+ SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 240 bins Emin= 100 eV Emax= 100 TeV
hIoni: for kaon+ SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 1.05231 MeV deltaVI
BetheBloch : Emin= 1.05231 MeV Emax= 100 TeV deltaVI
hBrems: for kaon+ SubType= 3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV
hPairProd: for kaon+ SubType= 4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for kaon+, integral: 1 SubType= 1 BuildTable= 1
Lambda table from threshold to 100 TeV, 20 bins per decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for kaon- SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 240 bins Emin= 100 eV Emax= 100 TeV
hIoni: for kaon- SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 1.05231 MeV deltaVI
BetheBloch : Emin= 1.05231 MeV Emax= 100 TeV deltaVI
hBrems: for kaon- SubType= 3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV
hPairProd: for kaon- SubType= 4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for kaon-, integral: 1 SubType= 1 BuildTable= 1
Used Lambda table of kaon+
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for mu+ SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 240 bins Emin= 100 eV Emax= 100 TeV
muIoni: for mu+ SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 200 keV deltaVI
BetheBloch : Emin= 200 keV Emax= 1 GeV deltaVI
MuBetheBloch : Emin= 1 GeV Emax= 100 TeV
muBrems: for mu+ SubType= 3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 100 TeV
muPairProd: for mu+ SubType= 4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 21x1001 from 1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for mu+, integral: 1 SubType= 1 BuildTable= 1
Lambda table from threshold to 100 TeV, 20 bins per decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for mu- SubType= 10
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 240 bins Emin= 100 eV Emax= 100 TeV
muIoni: for mu- SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 200 keV deltaVI
BetheBloch : Emin= 200 keV Emax= 1 GeV deltaVI
MuBetheBloch : Emin= 1 GeV Emax= 100 TeV
muBrems: for mu- SubType= 3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 100 TeV
muPairProd: for mu- SubType= 4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 21x1001 from 1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for mu-, integral: 1 SubType= 1 BuildTable= 1
Used Lambda table of mu+
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for pi+ SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 240 bins Emin= 100 eV Emax= 100 TeV
hIoni: for pi+ SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 297.505 keV deltaVI
BetheBloch : Emin= 297.505 keV Emax= 100 TeV deltaVI
hBrems: for pi+ SubType= 3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV
hPairProd: for pi+ SubType= 4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for pi+, integral: 1 SubType= 1 BuildTable= 1
Lambda table from threshold to 100 TeV, 20 bins per decade, spline: 1
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
msc: for pi- SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
WentzelVIUni : Emin= 0 eV Emax= 100 TeV Table with 240 bins Emin= 100 eV Emax= 100 TeV
hIoni: for pi- SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
finalRange(mm)= 0.01, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 297.505 keV deltaVI
BetheBloch : Emin= 297.505 keV Emax= 100 TeV deltaVI
hBrems: for pi- SubType= 3
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hBrem : Emin= 0 eV Emax= 100 TeV
hPairProd: for pi- SubType= 4
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 100 TeV
CoulombScat: for pi-, integral: 1 SubType= 1 BuildTable= 1
Used Lambda table of pi+
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 100 TeV
====================================================================
HADRONIC PROCESSES SUMMARY (verbose level 1)
---------------------------------------------------
Hadronic Processes for neutron
Process: hadElastic
Model: hElasticCHIPS: 0 eV ---> 100 TeV
Cr_sctns: G4NeutronElasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: neutronInelastic
Model: FTFP: 3 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 12 GeV
Cr_sctns: G4NeutronInelasticXS: 0 eV ---> 100 TeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
Process: nCapture
Model: nRadCapture: 0 eV ---> 100 TeV
Cr_sctns: G4NeutronCaptureXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaCaptureXS: 0 eV ---> 100 TeV
Process: nKiller
---------------------------------------------------
Hadronic Processes for GenericIon
Process: ionInelastic
Model: Binary Light Ion Cascade: 0 eV /n ---> 4 GeV/n
Model: FTFP: 2 GeV/n ---> 100 TeV/n
Cr_sctns: Glauber-Gribov nucleus nucleus: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for He3
Process: hadElastic
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
Cr_sctns: Glauber-Gribov nucleus nucleus: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: He3Inelastic
Model: Binary Light Ion Cascade: 0 eV /n ---> 4 GeV/n
Model: FTFP: 2 GeV/n ---> 100 TeV/n
Cr_sctns: Glauber-Gribov nucleus nucleus: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for alpha
Process: hadElastic
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: alphaInelastic
Model: Binary Light Ion Cascade: 0 eV /n ---> 4 GeV/n
Model: FTFP: 2 GeV/n ---> 100 TeV/n
Cr_sctns: Glauber-Gribov nucleus nucleus: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for anti_He3
Process: hadElastic
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: anti_He3Inelastic
Model: FTFP: 0 eV /n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Process: hFritiofCaptureAtRest
---------------------------------------------------
Hadronic Processes for anti_alpha
Process: hadElastic
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: anti_alphaInelastic
Model: FTFP: 0 eV /n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Process: hFritiofCaptureAtRest
---------------------------------------------------
Hadronic Processes for anti_deuteron
Process: hadElastic
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: anti_deuteronInelastic
Model: FTFP: 0 eV /n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Process: hFritiofCaptureAtRest
---------------------------------------------------
Hadronic Processes for anti_neutron
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
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
---------------------------------------------------
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
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
Process: hFritiofCaptureAtRest
---------------------------------------------------
Hadronic Processes for anti_triton
Process: hadElastic
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: anti_tritonInelastic
Model: FTFP: 0 eV /n ---> 100 TeV/n
Cr_sctns: AntiAGlauber: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Process: hFritiofCaptureAtRest
---------------------------------------------------
Hadronic Processes for deuteron
Process: hadElastic
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: dInelastic
Model: Binary Light Ion Cascade: 0 eV /n ---> 4 GeV/n
Model: FTFP: 2 GeV/n ---> 100 TeV/n
Cr_sctns: Glauber-Gribov nucleus nucleus: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for e+
Process: positronNuclear
Model: G4ElectroVDNuclearModel: 0 eV ---> 1 PeV
Cr_sctns: ElectroNuclearXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for e-
Process: electronNuclear
Model: G4ElectroVDNuclearModel: 0 eV ---> 1 PeV
Cr_sctns: ElectroNuclearXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
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 kaon+
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: Glauber-Gribov: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: kaon+Inelastic
Model: FTFP: 3 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 12 GeV
Cr_sctns: Glauber-Gribov: 0 eV ---> 2.88022e+295 J
Cr_sctns: ChipsKaonPlusInelasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for kaon-
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: Glauber-Gribov: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: kaon-Inelastic
Model: FTFP: 3 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 12 GeV
Cr_sctns: Glauber-Gribov: 0 eV ---> 2.88022e+295 J
Cr_sctns: ChipsKaonMinusInelasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Process: hBertiniCaptureAtRest
---------------------------------------------------
Hadronic Processes for lambda
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: lambdaInelastic
Model: BertiniCascade: 0 eV ---> 6 GeV
Model: FTFP: 2 GeV ---> 100 TeV
Cr_sctns: ChipsHyperonInelasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for mu+
Process: muonNuclear
Model: G4MuonVDNuclearModel: 0 eV ---> 1 PeV
Cr_sctns: KokoulinMuonNuclearXS: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for mu-
Process: muonNuclear
Model: G4MuonVDNuclearModel: 0 eV ---> 1 PeV
Cr_sctns: KokoulinMuonNuclearXS: 0 eV ---> 100 TeV
Process: muMinusCaptureAtRest
---------------------------------------------------
Hadronic Processes for pi+
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 1.0001 GeV
Model: hElasticGlauber: 1 GeV ---> 100 TeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
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
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for pi-
Process: hadElastic
Model: hElasticLHEP: 0 eV ---> 1.0001 GeV
Model: hElasticGlauber: 1 GeV ---> 100 TeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
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
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
Process: hBertiniCaptureAtRest
---------------------------------------------------
Hadronic Processes for proton
Process: hadElastic
Model: hElasticCHIPS: 0 eV ---> 100 TeV
Cr_sctns: ChipsProtonElasticXS: 0 eV ---> 100 TeV
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: protonInelastic
Model: FTFP: 3 GeV ---> 100 TeV
Model: BertiniCascade: 0 eV ---> 12 GeV
Cr_sctns: Barashenkov-Glauber: 0 eV ---> 100 TeV
---------------------------------------------------
Hadronic Processes for triton
Process: hadElastic
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
Cr_sctns: GheishaElastic: 0 eV ---> 100 TeV
Process: tInelastic
Model: Binary Light Ion Cascade: 0 eV /n ---> 4 GeV/n
Model: FTFP: 2 GeV/n ---> 100 TeV/n
Cr_sctns: Glauber-Gribov nucleus nucleus: 0 eV ---> 2.88022e+295 J
Cr_sctns: GheishaInelastic: 0 eV ---> 100 TeV
================================================================
=======================================================================
====== Pre-compound/De-excitation Physics Parameters ========
=======================================================================
Type of pre-compound inverse x-section 3
Pre-compound model active 1
Pre-compound low energy (MeV) 0.1
Type of de-excitation inverse x-section 3
Type of de-excitation factory Evaporation
Number of de-excitation channels 8
Min excitation energy (keV) 0.01
Min energy per nucleon for multifragmentation (MeV) 1e+05
Level density (1/MeV) 0.1
Time limit for long lived isomeres (ns) 1e+12
Internal e- conversion flag 1
Store e- internal conversion data 0
Electron internal conversion ID 2
Correlated gamma emission flag 0
Max 2J for sampling of angular correlations 10
=======================================================================
### Run 0 start.
... open Root analysis file : opnovice2.root - done
number of event = 100000 User=1.310000s Real=1.315921s Sys=0.000000s
Run Summary
---------------------------------
Primary particle was: opticalphoton with energy 3 eV .
OpAbsorption per event: 0
Surface events (on +X surface) this run:
# of primary particles: 100000
OpAbsorption before surface: 76
Total # of surface events: 99924
Unaccounted for: 0
Surface events by process:
Fresnel refraction: 46129
Lambertian reflection: 49182
Lobe reflection: 195
Spike reflection: 593
Backscattering: 2873
Absorption: 952
Sum: 99924
Unaccounted for: 0
---------------------------------
... write Root file : opnovice2.root - done
... close Root file : opnovice2.root - done
Graphics systems deleted.
Visualization Manager deleting...
+113
View File
@@ -0,0 +1,113 @@
$Id: README 96329 2016-04-06 15:53:16Z gcosmo $
-------------------------------------------------------------------
==================================================
Geant4 - an Object-Oriented Toolkit for Simulation
==================================================
OpNovice2
---------
Investigate optical properties and parameters. Details of optical
photon boundary interactions on a surface are recorded. Details
of optical photon generation and transport are recorded.
1- GEOMETRY DEFINITION
The geometry consists of a cube "box" with a side of 2 m inside
the world cube of side 20 m. Optical properties of the box, the world,
and the surface may be set interactively via the commands defined
in the DetectorMessenger class.
Material properties may be added using the macro commands:
# for the box:
/opnovice2/boxProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
/opnovice2/boxConstProperty NAME VALUE
# for the world:
/opnovice2/worldProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
/opnovice2/worldConstProperty NAME VALUE
# for the surface:
/opnovice2/surfaceProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
Multiple energy and value pairs may be specified for the energy-dependent
properties.
Values are in Geant4 internal units. Energy is in MeV.
Example:
/opnovice2/boxProperty RINDEX 0.000002 1.3 0.000005 1.32 0.000008 1.34
sets the refractive index of the box to 1.3 at 2 eV, 1.32 at 5 eV, and
1.34 at 8 eV.
2- PHYSICS LIST
The FTFP_BERT physics list is used, with electromagnetic option
EMZ (option4) and G4OpticalPhysics for the optical physics.
3- AN EVENT : THE PRIMARY GENERATOR
The primary kinematic consists of a single particle. The type of
the particle, its energy, position, and direction, are set
in the PrimaryGeneratorAction class, and can be changed via the G4
build-in commands of G4ParticleGun class (see the macros provided with
this example).
4- VISUALIZATION
The Visualization Manager is set in the main().
The initialisation of the drawing is done via the commands
/vis/... in the macro vis.mac. To get visualisation:
> /control/execute vis.mac
or run the program with no command line arguments:
$ ./OpNovice2
5- HOW TO START ?
- Execute OpNovice2 in 'batch' mode from macro files
% OpNovice2 surface.mac
- Execute OpNovice2 in 'interactive mode' with visualization
% OpNovice2
....
Idle> type your commands
....
Idle> exit
6- RESULTS
A table of optical photon events is printed at the end of the run.
7- HISTOGRAMS
OpNovice2 has several predefined 1D histograms :
1 : Cerenkov spectrum
2 : scintillation spectrum
3 : boundary process status
4 : X momentum dir of scattered photons with px < 0
5 : Y momentum dir of scattered photons with px < 0
6 : Z momentum dir of scattered photons with px < 0
7 : X momentum dir of scattered photons with px >= 0
8 : Y momentum dir of scattered photons with px >= 0
9 : Z momentum dir of scattered photons with px >= 0
10 : X momentum dir of Fresnel-refracted photons
11 : Y momentum dir of Fresnel-refracted photons
12 : Z momentum dir of Fresnel-refracted photons
Histograms 4-12 are recorded for photons scattered from the +X
surface of the cube. Only the first interaction is recorded.
The histograms are managed by G4Analysis classes.
The histos can be individually activated with the command:
/analysis/h1/set id nbBins valMin valMax unit
where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
One can control the name of the histograms file with the command:
/analysis/setFileName name (default opnovice2)
It is possible to choose the format of the histogram file : root (default),
hbook, xml, csv, by using namespace in HistoManager.hh
It is also possible to print selected histograms on an ascii file:
/analysis/h1/setAscii id
All selected histos will be written on a file name.ascii (default opnovice2)
@@ -0,0 +1,39 @@
/control/verbose 2
/tracking/verbose 0
/opnovice2/boxProperty RAYLEIGH .000002 1 .000008 1
/opnovice2/boxProperty RINDEX .000002 1.3 .000008 1.4
/opnovice2/boxProperty ABSLENGTH .000002 1 .000005 2 .000008 3
/opnovice2/boxProperty FASTCOMPONENT .000002 1.0 .000008 1.0
/opnovice2/boxProperty SLOWCOMPONENT .000002 0.1 .000003 0.5 .000004 0.9 .000005 0.5 .000006 0.1 .000007 .5 .000008 .9
/opnovice2/boxConstProperty FASTTIMECONSTANT 0.000000001
/opnovice2/boxConstProperty SLOWTIMECONSTANT 0.000000001
/opnovice2/boxConstProperty SCINTILLATIONYIELD 5000.0
/opnovice2/boxConstProperty YIELDRATIO 0.8
/opnovice2/boxConstProperty RESOLUTIONSCALE 1
/run/initialize
/opnovice2/surfaceModel unified
/opnovice2/surfaceType dielectric_dielectric
/opnovice2/surfaceFinish ground
/opnovice2/surfaceProperty REFLECTIVITY 0.000002 .2 0.000008 .2
/opnovice2/worldProperty RINDEX 0.000002 1.01 0.000008 1.01
/opnovice2/worldProperty ABSLENGTH 0.000002 1000000 0.000005 2000000 0.000008 3000000
/analysis/h1/set 1 100 0 .000010
/analysis/h1/set 2 100 0 .000010
#
/gun/particle e-
/gun/energy 500 keV
/gun/position -1 0 0 m
/gun/direction 1 0 0
#
/run/printProgress 100
/run/beamOn 1000
@@ -0,0 +1,48 @@
//
// ********************************************************************
// * 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: ActionInitialization.hh 68058 2013-03-13 14:47:43Z gcosmo $
//
//
/// \file optical/OpNovice2/include/ActionInitialization.hh
/// \brief Definition of the ActionInitialization class
#ifndef ActionInitialization_h
#define ActionInitialization_h 1
#include "G4VUserActionInitialization.hh"
class ActionInitialization : public G4VUserActionInitialization
{
public:
ActionInitialization();
virtual ~ActionInitialization();
virtual void BuildForMaster() const;
virtual void Build() const;
};
#endif
@@ -0,0 +1,119 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/include/DetectorConstruction.hh
/// \brief Definition of the DetectorConstruction class
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef DetectorConstruction_h
#define DetectorConstruction_h 1
#include "G4OpticalSurface.hh"
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
#include "G4RunManager.hh"
class DetectorMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class DetectorConstruction : public G4VUserDetectorConstruction
{
public:
DetectorConstruction();
virtual ~DetectorConstruction();
G4VPhysicalVolume* GetTank() {return fTank;}
G4double GetTankXSize() {return fTank_x;}
G4OpticalSurface* GetSurface(void) {return fSurface;}
void SetSurfaceFinish(const G4OpticalSurfaceFinish finish) {
fSurface->SetFinish(finish);
G4RunManager::GetRunManager()->GeometryHasBeenModified();
}
G4OpticalSurfaceFinish GetSurfaceFinish(void)
{return fSurface->GetFinish();}
void SetSurfaceType(const G4SurfaceType type) {
fSurface->SetType(type);
G4RunManager::GetRunManager()->GeometryHasBeenModified();
}
void SetSurfaceModel(const G4OpticalSurfaceModel model) {
fSurface->SetModel(model);
G4RunManager::GetRunManager()->GeometryHasBeenModified();
}
G4OpticalSurfaceModel GetSurfaceModel(void)
{return fSurface->GetModel();}
void SetSurfaceSigmaAlpha(G4double v);
void AddBoxMPV(const char* c, G4MaterialPropertyVector* mpv);
void AddBoxMPCV(const char* c, G4double v);
G4MaterialPropertiesTable* GetBoxMaterialPropertiesTable()
{return fBoxMPT;}
void AddWorldMPV(const char* c, G4MaterialPropertyVector* mpv);
void AddWorldMPCV(const char* c, G4double v);
G4MaterialPropertiesTable* GetWorldMaterialPropertiesTable()
{return fWorldMPT;}
void AddSurfaceMPV(const char* c, G4MaterialPropertyVector* mpv);
G4MaterialPropertiesTable* GetSurfaceMaterialPropertiesTable()
{return fSurfaceMPT;}
virtual G4VPhysicalVolume* Construct();
private:
G4double fExpHall_x;
G4double fExpHall_y;
G4double fExpHall_z;
G4VPhysicalVolume* fTank;
G4double fTank_x;
G4double fTank_y;
G4double fTank_z;
G4OpticalSurface* fSurface;
DetectorMessenger* fDetectorMessenger;
G4MaterialPropertiesTable* fBoxMPT;
G4MaterialPropertiesTable* fWorldMPT;
G4MaterialPropertiesTable* fSurfaceMPT;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif /*DetectorConstruction_h*/
@@ -0,0 +1,86 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/include/DetectorMessenger.hh
/// \brief Definition of the DetectorMessenger class
//
// $Id: DetectorMessenger.hh 77288 2013-11-22 10:52:58Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef DetectorMessenger_h
#define DetectorMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class DetectorConstruction;
class G4UIdirectory;
class G4UIcommand;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4UIcmdWithADouble;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithoutParameter;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class DetectorMessenger: public G4UImessenger
{
public:
DetectorMessenger(DetectorConstruction* );
~DetectorMessenger();
virtual void SetNewValue(G4UIcommand*, G4String);
private:
DetectorConstruction* fDetector;
G4UIdirectory* fOpticalDir;
// the surface
G4UIcmdWithAString* fSurfaceTypeCmd;
G4UIcmdWithAString* fSurfaceFinishCmd;
G4UIcmdWithAString* fSurfaceModelCmd;
G4UIcmdWithADouble* fSurfaceSigmaAlphaCmd;
G4UIcmdWithAString* fSurfaceMatPropVectorCmd;
// the box
G4UIcmdWithAString* fBoxMatPropVectorCmd;
G4UIcmdWithAString* fBoxMatConstPropVectorCmd;
// the world
G4UIcmdWithAString* fWorldMatPropVectorCmd;
G4UIcmdWithAString* fWorldMatConstPropVectorCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,59 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/include/HistoManager.hh
/// \brief Definition of the HistoManager class
//
//
// $Id: HistoManager.hh 76464 2013-11-11 10:22:56Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef HistoManager_h
#define HistoManager_h 1
#include "globals.hh"
#include "g4root.hh"
//#include "g4xml.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class HistoManager
{
public:
HistoManager();
~HistoManager();
private:
void Book();
G4String fFileName;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/include/PrimaryGeneratorAction.hh
/// \brief Definition of the PrimaryGeneratorAction class
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PrimaryGeneratorAction_h
#define PrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "G4ParticleGun.hh"
#include "globals.hh"
class G4Event;
class PrimaryGeneratorMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
PrimaryGeneratorAction();
virtual ~PrimaryGeneratorAction();
virtual void GeneratePrimaries(G4Event*);
G4ParticleGun* GetParticleGun() {return fParticleGun;};
void SetOptPhotonPolar();
void SetOptPhotonPolar(G4double);
private:
G4ParticleGun* fParticleGun;
PrimaryGeneratorMessenger* fGunMessenger;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif /*PrimaryGeneratorAction_h*/
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/include/PrimaryGeneratorMessenger.hh
/// \brief Definition of the PrimaryGeneratorMessenger class
//
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PrimaryGeneratorMessenger_h
#define PrimaryGeneratorMessenger_h 1
#include "G4UImessenger.hh"
#include "globals.hh"
class PrimaryGeneratorAction;
class G4UIdirectory;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class PrimaryGeneratorMessenger: public G4UImessenger
{
public:
PrimaryGeneratorMessenger(PrimaryGeneratorAction* );
virtual ~PrimaryGeneratorMessenger();
virtual void SetNewValue(G4UIcommand*, G4String);
private:
PrimaryGeneratorAction* fPrimaryAction;
G4UIdirectory* fGunDir;
G4UIcmdWithADoubleAndUnit* fPolarCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,168 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/include/RunAction.hh
/// \brief Definition of the RunAction class
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef Run_h
#define Run_h 1
#include "G4OpBoundaryProcess.hh"
#include "G4Run.hh"
class G4ParticleDefinition;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class Run : public G4Run
{
public:
Run();
~Run();
void SetPrimary(G4ParticleDefinition* particle, G4double energy);
// spectrum of Cerenkov radiation
void AddCerenkovEnergy(G4double en) {fCerenkovEnergy += en;}
void AddScintillationEnergy(G4double en) {fScintEnergy += en;}
void AddCerenkov(void) {fCerenkovCount += 1;}
void AddScintillation(void) {fScintCount += 1;}
void AddRayleigh(void) {fRayleighCount += 1;}
void AddOpAbsorption(void) {fOpAbsorption += 1;}
void AddOpAbsorptionPrior(void) {fOpAbsorptionPrior += 1;}
void AddFresnelRefraction(void) {
fBoundaryProcs[FresnelRefraction] += 1;
}
void AddFresnelReflection(void) {
fBoundaryProcs[FresnelReflection] += 1;
}
void AddTransmission(void) {fBoundaryProcs[Transmission] += 1;}
void AddTotalInternalReflection(void)
{fBoundaryProcs[TotalInternalReflection] += 1;}
void AddLambertianReflection(void)
{fBoundaryProcs[LambertianReflection] += 1;}
void AddLobeReflection(void) {fBoundaryProcs[LobeReflection] += 1;}
void AddSpikeReflection(void) {fBoundaryProcs[SpikeReflection] += 1;}
void AddBackScattering(void) {fBoundaryProcs[BackScattering] += 1;}
void AddAbsorption(void) {fBoundaryProcs[Absorption] += 1;}
void AddDetection(void) {fBoundaryProcs[Detection] += 1;}
void AddNotAtBoundary(void) {fBoundaryProcs[NotAtBoundary] += 1;}
void AddSameMaterial(void) {fBoundaryProcs[SameMaterial] += 1;}
void AddStepTooSmall(void) {fBoundaryProcs[StepTooSmall] += 1;}
void AddNoRINDEX(void) {fBoundaryProcs[NoRINDEX] += 1;}
void AddTotalSurface(void) {fTotalSurface += 1;}
void AddPolishedLumirrorAirReflection(void)
{fBoundaryProcs[PolishedLumirrorAirReflection] += 1;}
void AddPolishedLumirrorGlueReflection(void)
{fBoundaryProcs[PolishedLumirrorGlueReflection] += 1;}
void AddPolishedAirReflection(void)
{fBoundaryProcs[PolishedAirReflection] += 1;}
void AddPolishedTeflonAirReflection(void)
{fBoundaryProcs[PolishedTeflonAirReflection] += 1;}
void AddPolishedTiOAirReflection(void)
{fBoundaryProcs[PolishedTiOAirReflection] += 1;}
void AddPolishedTyvekAirReflection(void)
{fBoundaryProcs[PolishedTyvekAirReflection] += 1;}
void AddPolishedVM2000AirReflection(void)
{fBoundaryProcs[PolishedVM2000AirReflection] += 1;}
void AddPolishedVM2000GlueReflection(void)
{fBoundaryProcs[PolishedVM2000GlueReflection] += 1;}
void AddEtchedLumirrorAirReflection(void)
{fBoundaryProcs[EtchedLumirrorAirReflection] += 1;}
void AddEtchedLumirrorGlueReflection(void)
{fBoundaryProcs[EtchedLumirrorGlueReflection] += 1;}
void AddEtchedAirReflection(void)
{fBoundaryProcs[EtchedAirReflection] += 1;}
void AddEtchedTeflonAirReflection(void)
{fBoundaryProcs[EtchedTeflonAirReflection] += 1;}
void AddEtchedTiOAirReflection(void)
{fBoundaryProcs[EtchedTiOAirReflection] += 1;}
void AddEtchedTyvekAirReflection(void)
{fBoundaryProcs[EtchedTyvekAirReflection] += 1;}
void AddEtchedVM2000AirReflection(void)
{fBoundaryProcs[EtchedVM2000AirReflection] += 1;}
void AddEtchedVM2000GlueReflection(void)
{fBoundaryProcs[EtchedVM2000GlueReflection] += 1;}
void AddGroundLumirrorAirReflection(void)
{fBoundaryProcs[GroundLumirrorAirReflection] += 1;}
void AddGroundLumirrorGlueReflection(void)
{fBoundaryProcs[GroundLumirrorGlueReflection] += 1;}
void AddGroundAirReflection(void)
{fBoundaryProcs[GroundAirReflection] += 1;}
void AddGroundTeflonAirReflection(void)
{fBoundaryProcs[GroundTeflonAirReflection] += 1;}
void AddGroundTiOAirReflection(void)
{fBoundaryProcs[GroundTiOAirReflection] += 1;}
void AddGroundTyvekAirReflection(void)
{fBoundaryProcs[GroundTyvekAirReflection] += 1;}
void AddGroundVM2000AirReflection(void)
{fBoundaryProcs[GroundVM2000AirReflection] += 1;}
void AddGroundVM2000GlueReflection(void)
{fBoundaryProcs[GroundVM2000GlueReflection] += 1;}
void AddDichroic(void) {fBoundaryProcs[Dichroic] += 1;}
virtual void Merge(const G4Run*);
void EndOfRun();
private:
// primary particle
G4ParticleDefinition* fParticle;
G4double fEkin;
G4double fCerenkovEnergy;
G4double fScintEnergy;
// number of particles
G4int fCerenkovCount;
G4int fScintCount;
// number of events
G4int fRayleighCount;
// non-boundary processes
G4int fOpAbsorption;
// prior to boundary:
G4int fOpAbsorptionPrior;
// boundary proc
std::vector<G4int> fBoundaryProcs;
G4int fTotalSurface;
};
#endif /* Run_h */
@@ -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. *
// ********************************************************************
//
/// \file /optical/OpNovice2/include/RunAction.hh
/// \brief Definition of the RunAction class
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef RunAction_h
#define RunAction_h 1
#include "globals.hh"
#include "G4UserRunAction.hh"
// #include "Run.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4Timer;
class Run;
class HistoManager;
class PrimaryGeneratorAction;
class RunAction : public G4UserRunAction
{
public:
RunAction(PrimaryGeneratorAction* = nullptr);
virtual ~RunAction();
virtual G4Run* GenerateRun();
virtual void BeginOfRunAction(const G4Run*);
virtual void EndOfRunAction(const G4Run*);
private:
G4Timer* fTimer;
Run* fRun;
HistoManager* fHistoManager;
PrimaryGeneratorAction* fPrimary;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif /*RunAction_h*/
@@ -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: SteppingAction.hh 69469 2013-05-05 21:42:35Z ihrivnac $
//
/// \file optical/OpNovice2/include/SteppingAction.hh
/// \brief Definition of the SteppingAction class
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef SteppingAction_h
#define SteppingAction_h 1
#include "G4UserSteppingAction.hh"
#include "globals.hh"
class SteppingAction : public G4UserSteppingAction
{
public:
SteppingAction();
virtual ~SteppingAction();
// method from the base class
virtual void UserSteppingAction(const G4Step*);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,81 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/include/TrackInformation.hh
/// \brief Definition of the TrackInformation class
//
//
// $Id: RE01TrackInformation.hh 97671 2016-06-07 08:25:00Z gcosmo $
//
#ifndef TrackInformation_h
#define TrackInformation_h 1
#include "globals.hh"
#include "G4ThreeVector.hh"
#include "G4ParticleDefinition.hh"
#include "G4Track.hh"
#include "G4Allocator.hh"
#include "G4VUserTrackInformation.hh"
class TrackInformation : public G4VUserTrackInformation
{
public:
TrackInformation();
TrackInformation(const G4Track* aTrack);
TrackInformation(const TrackInformation* aTrackInfo);
virtual ~TrackInformation();
inline void *operator new(size_t);
inline void operator delete(void *aTrackInfo);
TrackInformation& operator =(const TrackInformation& right);
void SetSourceTrackInformation(const G4Track* aTrack);
virtual void Print() const;
public:
inline G4bool GetIsFirstTankX() const {return fFirstTankX;}
inline void SetIsFirstTankX(G4bool b) {fFirstTankX = b;}
private:
G4bool fFirstTankX;
};
extern G4ThreadLocal
G4Allocator<TrackInformation> * aTrackInformationAllocator;
inline void* TrackInformation::operator new(size_t)
{
if(!aTrackInformationAllocator)
aTrackInformationAllocator = new G4Allocator<TrackInformation>;
return (void*)aTrackInformationAllocator->MallocSingle();
}
inline void TrackInformation::operator delete(void *aTrackInfo)
{ aTrackInformationAllocator->FreeSingle((TrackInformation*)aTrackInfo);}
#endif
@@ -0,0 +1,50 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/include/TrackingAction.hh
/// \brief Definition of the TrackingAction class
//
// $Id: TrackingAction.hh 66379 2012-12-18 09:46:33Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
#ifndef TrackingAction_h
#define TrackingAction_h 1
#include "G4UserTrackingAction.hh"
class TrackingAction : public G4UserTrackingAction
{
public:
TrackingAction();
virtual ~TrackingAction(){};
virtual void PreUserTrackingAction(const G4Track*);
virtual void PostUserTrackingAction(const G4Track*);
};
#endif
@@ -0,0 +1,67 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: ActionInitialization.cc 68058 2013-03-13 14:47:43Z gcosmo $
//
/// \file optical/OpNovice2/src/ActionInitialization.cc
/// \brief Implementation of the ActionInitialization class
#include "ActionInitialization.hh"
#include "PrimaryGeneratorAction.hh"
#include "RunAction.hh"
#include "SteppingAction.hh"
#include "TrackingAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ActionInitialization::ActionInitialization()
: G4VUserActionInitialization()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ActionInitialization::~ActionInitialization()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ActionInitialization::BuildForMaster() const
{
SetUserAction(new RunAction());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ActionInitialization::Build() const
{
PrimaryGeneratorAction* primary = new PrimaryGeneratorAction();
SetUserAction(primary);
SetUserAction(new RunAction(primary));
SetUserAction(new SteppingAction());
SetUserAction(new TrackingAction);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,192 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/src/DetectorConstruction.cc
/// \brief Implementation of the DetectorConstruction class
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "DetectorConstruction.hh"
#include "DetectorMessenger.hh"
#include "G4NistManager.hh"
#include "G4Material.hh"
#include "G4Element.hh"
#include "G4LogicalBorderSurface.hh"
#include "G4LogicalSkinSurface.hh"
#include "G4OpticalSurface.hh"
#include "G4Box.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorConstruction::DetectorConstruction()
: G4VUserDetectorConstruction(),
fDetectorMessenger(nullptr)
{
fExpHall_x = fExpHall_y = fExpHall_z = 10.0*m;
fTank_x = fTank_y = fTank_z = 1.0*m;
fTank = nullptr;
fSurface = nullptr;
fBoxMPT = new G4MaterialPropertiesTable();
fWorldMPT = new G4MaterialPropertiesTable();
fSurfaceMPT = new G4MaterialPropertiesTable();
fDetectorMessenger = new DetectorMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorConstruction::~DetectorConstruction()
{
delete fDetectorMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VPhysicalVolume* DetectorConstruction::Construct()
{
// ------------- Materials -------------
G4NistManager* man = G4NistManager::Instance();
G4Material* air = man->FindOrBuildMaterial("G4_AIR");
G4Material* water = man->FindOrBuildMaterial("G4_WATER");
//
// ------------ Generate & Add Material Properties Table ------------
//
water->SetMaterialPropertiesTable(fBoxMPT);
water->GetIonisation()->SetBirksConstant(0.126*mm/MeV);
air->SetMaterialPropertiesTable(fWorldMPT);
// ------------- Volumes --------------
// The experimental Hall
G4Box* world_box = new G4Box("World", fExpHall_x, fExpHall_y, fExpHall_z);
G4LogicalVolume* world_LV
= new G4LogicalVolume(world_box,air, "World", 0, 0, 0);
G4VPhysicalVolume* world_PV
= new G4PVPlacement(0, G4ThreeVector(), world_LV, "World", 0, false, 0);
// The Water Tank
G4Box* waterTank_box = new G4Box("Tank",fTank_x,fTank_y,fTank_z);
G4LogicalVolume* waterTank_log
= new G4LogicalVolume(waterTank_box,water,"Tank",0,0,0);
fTank
= new G4PVPlacement(0, G4ThreeVector(), waterTank_log, "Tank",
world_LV, false, 0);
// ------------- Surface --------------
fSurface = new G4OpticalSurface("Surface");
fSurface->SetType(dielectric_dielectric);
fSurface->SetFinish(polished);
fSurface->SetModel(unified);
fSurface->SetMaterialPropertiesTable(fSurfaceMPT);
G4LogicalBorderSurface* surface =
new G4LogicalBorderSurface("Surface",
fTank, world_PV, fSurface);
G4OpticalSurface* opticalSurface = dynamic_cast <G4OpticalSurface*>
(surface->GetSurface(fTank,world_PV)->GetSurfaceProperty());
G4cout << "opticalSurface->DumpInfo" << G4endl;
if (opticalSurface) opticalSurface->DumpInfo();
return world_PV;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetSurfaceSigmaAlpha(G4double v) {
fSurface->SetSigmaAlpha(v);
G4RunManager::GetRunManager()->GeometryHasBeenModified();
G4cout << "Surface sigma alpha set to: " << fSurface->GetSigmaAlpha()
<< G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::AddBoxMPV(const char* c,
G4MaterialPropertyVector* mpv) {
mpv->SetSpline(true);
fBoxMPT->AddProperty(c, mpv);
G4cout << "The MPT for the box is now: " << G4endl;
fBoxMPT->DumpTable();
G4cout << "............." << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::AddWorldMPV(const char* c,
G4MaterialPropertyVector* mpv) {
mpv->SetSpline(true);
fWorldMPT->AddProperty(c, mpv);
G4cout << "The MPT for the world is now: " << G4endl;
fWorldMPT->DumpTable();
G4cout << "............." << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::AddSurfaceMPV(const char* c,
G4MaterialPropertyVector* mpv) {
mpv->SetSpline(true);
fSurfaceMPT->AddProperty(c, mpv);
G4cout << "The MPT for the surface is now: " << G4endl;
fSurfaceMPT->DumpTable();
G4cout << "............." << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::AddBoxMPCV(const char* c, G4double v) {
fBoxMPT->AddConstProperty(c, v);
G4cout << "The MPT for the box is now: " << G4endl;
fBoxMPT->DumpTable();
G4cout << "............." << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::AddWorldMPCV(const char* c, G4double v) {
fWorldMPT->AddConstProperty(c, v);
G4cout << "The MPT for the world is now: " << G4endl;
fWorldMPT->DumpTable();
G4cout << "............." << G4endl;
}
@@ -0,0 +1,409 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/src/DetectorMessenger.cc
/// \brief Implementation of the DetectorMessenger class
//
// $Id: DetectorMessenger.cc 77288 2013-11-22 10:52:58Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "DetectorMessenger.hh"
#include <sstream>
#include <iostream>
#include "G4OpticalSurface.hh"
#include "DetectorConstruction.hh"
#include "G4UIdirectory.hh"
#include "G4UIcommand.hh"
#include "G4UIparameter.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithADouble.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithoutParameter.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
:G4UImessenger(),fDetector(Det)
{
fOpticalDir = new G4UIdirectory("/opnovice2/");
fOpticalDir->SetGuidance("Parameters for optical simulation.");
fSurfaceTypeCmd = new G4UIcmdWithAString("/opnovice2/surfaceType", this);
fSurfaceTypeCmd->SetGuidance("Surface type.");
fSurfaceTypeCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
fSurfaceTypeCmd->SetToBeBroadcasted(false);
fSurfaceFinishCmd = new G4UIcmdWithAString("/opnovice2/surfaceFinish", this);
fSurfaceFinishCmd->SetGuidance("Surface finish.");
fSurfaceFinishCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
fSurfaceFinishCmd->SetToBeBroadcasted(false);
fSurfaceModelCmd =
new G4UIcmdWithAString("/opnovice2/surfaceModel", this);
fSurfaceModelCmd->SetGuidance("surface model.");
fSurfaceModelCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
fSurfaceModelCmd->SetToBeBroadcasted(false);
fSurfaceSigmaAlphaCmd =
new G4UIcmdWithADouble("/opnovice2/surfaceSigmaAlpha", this);
fSurfaceSigmaAlphaCmd->SetGuidance("surface sigma alpha");
fSurfaceSigmaAlphaCmd->SetGuidance(" parameter.");
fSurfaceSigmaAlphaCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
fSurfaceSigmaAlphaCmd->SetToBeBroadcasted(false);
fSurfaceMatPropVectorCmd =
new G4UIcmdWithAString("/opnovice2/surfaceProperty", this);
fSurfaceMatPropVectorCmd->SetGuidance("Set material property vector");
fSurfaceMatPropVectorCmd->SetGuidance(" for the surface.");
fSurfaceMatPropVectorCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
fSurfaceMatPropVectorCmd->SetToBeBroadcasted(false);
fBoxMatPropVectorCmd = new G4UIcmdWithAString("/opnovice2/boxProperty", this);
fBoxMatPropVectorCmd->SetGuidance("Set material property vector for ");
fBoxMatPropVectorCmd->SetGuidance("the box.");
fBoxMatPropVectorCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
fBoxMatPropVectorCmd->SetToBeBroadcasted(false);
fBoxMatConstPropVectorCmd =
new G4UIcmdWithAString("/opnovice2/boxConstProperty", this);
fBoxMatConstPropVectorCmd->SetGuidance("Set material constant property ");
fBoxMatConstPropVectorCmd->SetGuidance("for the box.");
fBoxMatConstPropVectorCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
fBoxMatConstPropVectorCmd->SetToBeBroadcasted(false);
fWorldMatPropVectorCmd =
new G4UIcmdWithAString("/opnovice2/worldProperty", this);
fWorldMatPropVectorCmd->SetGuidance("Set material property vector ");
fWorldMatPropVectorCmd->SetGuidance("for the world.");
fWorldMatPropVectorCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
fWorldMatPropVectorCmd->SetToBeBroadcasted(false);
fWorldMatConstPropVectorCmd =
new G4UIcmdWithAString("/opnovice2/worldConstProperty", this);
fWorldMatConstPropVectorCmd->SetGuidance("Set material constant property");
fWorldMatConstPropVectorCmd->SetGuidance(" for the world.");
fWorldMatConstPropVectorCmd->
AvailableForStates(G4State_PreInit, G4State_Idle);
fWorldMatConstPropVectorCmd->SetToBeBroadcasted(false);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorMessenger::~DetectorMessenger()
{
delete fSurfaceFinishCmd;
delete fSurfaceTypeCmd;
delete fSurfaceModelCmd;
delete fSurfaceSigmaAlphaCmd;
delete fSurfaceMatPropVectorCmd;
delete fBoxMatPropVectorCmd;
delete fBoxMatConstPropVectorCmd;
delete fWorldMatPropVectorCmd;
delete fWorldMatConstPropVectorCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
// FINISH
if (command == fSurfaceFinishCmd) {
if (newValue == "polished") {
fDetector->SetSurfaceFinish(polished);
}
else if (newValue == "polishedfrontpainted") {
fDetector->SetSurfaceFinish(polishedfrontpainted);
}
else if (newValue == "polishedbackpainted") {
fDetector->SetSurfaceFinish(polishedbackpainted);
}
else if (newValue == "ground") {
fDetector->SetSurfaceFinish(ground);
}
else if (newValue == "groundfrontpainted") {
fDetector->SetSurfaceFinish(groundfrontpainted);
}
else if (newValue == "groundbackpainted") {
fDetector->SetSurfaceFinish(groundbackpainted);
}
else if (newValue == "polishedlumirrorair") {
fDetector->SetSurfaceFinish(polishedlumirrorair);
}
else if (newValue == "polishedlumirrorglue") {
fDetector->SetSurfaceFinish(polishedlumirrorglue);
}
else if (newValue == "polishedair") {
fDetector->SetSurfaceFinish(polishedair);
}
else if (newValue == "polishedteflonair") {
fDetector->SetSurfaceFinish(polishedteflonair);
}
else if (newValue == "polishedtioair") {
fDetector->SetSurfaceFinish(polishedtioair);
}
else if (newValue == "polishedtyvekair") {
fDetector->SetSurfaceFinish(polishedtyvekair);
}
else if (newValue == "polishedvm2000air") {
fDetector->SetSurfaceFinish(polishedvm2000air);
}
else if (newValue == "polishedvm2000glue") {
fDetector->SetSurfaceFinish(polishedvm2000glue);
}
else if (newValue == "etchedlumirrorair") {
fDetector->SetSurfaceFinish(etchedlumirrorair);
}
else if (newValue == "etchedlumirrorglue") {
fDetector->SetSurfaceFinish(etchedlumirrorglue);
}
else if (newValue == "etchedair") {
fDetector->SetSurfaceFinish(etchedair);
}
else if (newValue == "etchedteflonair") {
fDetector->SetSurfaceFinish(etchedteflonair);
}
else if (newValue == "etchedtioair") {
fDetector->SetSurfaceFinish(etchedtioair);
}
else if (newValue == "etchedtyvekair") {
fDetector->SetSurfaceFinish(etchedtyvekair);
}
else if (newValue == "etchedvm2000air") {
fDetector->SetSurfaceFinish(etchedvm2000air);
}
else if (newValue == "etchedvm2000glue") {
fDetector->SetSurfaceFinish(etchedvm2000glue);
}
else if (newValue == "groundlumirrorair") {
fDetector->SetSurfaceFinish(groundlumirrorair);
}
else if (newValue == "groundlumirrorglue") {
fDetector->SetSurfaceFinish(groundlumirrorglue);
}
else if (newValue == "groundair") {
fDetector->SetSurfaceFinish(groundair);
}
else if (newValue == "groundteflonair") {
fDetector->SetSurfaceFinish(groundteflonair);
}
else if (newValue == "groundtioair") {
fDetector->SetSurfaceFinish(groundtioair);
}
else if (newValue == "groundtyvekair") {
fDetector->SetSurfaceFinish(groundtyvekair);
}
else if (newValue == "groundvm2000air") {
fDetector->SetSurfaceFinish(groundvm2000air);
}
else if (newValue == "groundvm2000glue") {
fDetector->SetSurfaceFinish(groundvm2000glue);
}
// for Davis model
else if (newValue == "Rough_LUT") {
fDetector->SetSurfaceFinish(Rough_LUT);
}
else if (newValue == "RoughTeflon_LUT") {
fDetector->SetSurfaceFinish(RoughTeflon_LUT);
}
else if (newValue == "RoughESR_LUT") {
fDetector->SetSurfaceFinish(RoughESR_LUT);
}
else if (newValue == "RoughESRGrease_LUT") {
fDetector->SetSurfaceFinish(RoughESRGrease_LUT);
}
else if (newValue == "Polished_LUT") {
fDetector->SetSurfaceFinish(Polished_LUT);
}
else if (newValue == "PolishedTeflon_LUT") {
fDetector->SetSurfaceFinish(PolishedTeflon_LUT);
}
else if (newValue == "PolishedESR_LUT") {
fDetector->SetSurfaceFinish(PolishedESR_LUT);
}
else if (newValue == "PolishedESRGrease_LUT") {
fDetector->SetSurfaceFinish(PolishedESRGrease_LUT);
}
else if (newValue == "Detector_LUT") {
fDetector->SetSurfaceFinish(Detector_LUT);
}
else {
G4ExceptionDescription ed;
ed << "Invalid surface finish: " << newValue;
G4Exception("DetectorMessenger", "OpNovice2_003", FatalException,ed);
}
}
// MODEL
else if (command == fSurfaceModelCmd) {
if (newValue == "glisur") {
fDetector->SetSurfaceModel(glisur);
}
else if (newValue == "unified") {
fDetector->SetSurfaceModel(unified);
}
else if (newValue == "LUT") {
fDetector->SetSurfaceModel(LUT);
}
else if (newValue == "DAVIS") {
fDetector->SetSurfaceModel(DAVIS);
}
else if (newValue == "dichroic") {
fDetector->SetSurfaceModel(dichroic);
}
else {
G4ExceptionDescription ed;
ed << "Invalid surface model: " << newValue;
G4Exception("DetectorMessenger", "ONovice2_001",
FatalException,ed);
}
}
// TYPE
else if (command == fSurfaceTypeCmd) {
if (newValue == "dielectric_metal") {
fDetector->SetSurfaceType(dielectric_metal);
}
else if (newValue == "dielectric_dielectric") {
fDetector->SetSurfaceType(dielectric_dielectric);
}
else if (newValue == "dielectric_LUT") {
fDetector->SetSurfaceType(dielectric_LUT);
}
else if (newValue == "dielectric_LUTDAVIS") {
fDetector->SetSurfaceType(dielectric_LUTDAVIS);
}
else {
G4ExceptionDescription ed;
ed << "Invalid surface type: " << newValue;
G4Exception("DetectorMessenger", "OpNovice2_002", FatalException,ed);
}
}
else if (command == fSurfaceSigmaAlphaCmd) {
fDetector->SetSurfaceSigmaAlpha(
G4UIcmdWithADouble::GetNewDoubleValue(newValue));
}
else if (command == fBoxMatPropVectorCmd) {
// got a string. need to convert it to physics vector.
// string format is property name, then pairs of energy, value
// specify units for each value, eg 3.0*eV
// space delimited
G4MaterialPropertyVector* mpv = new G4MaterialPropertyVector();
mpv->SetSpline(true);
std::istringstream instring(newValue);
G4String prop;
instring >> prop;
while (instring) {
G4String tmp;
instring >> tmp;
if (tmp == "") { break; }
G4double en = G4UIcommand::ConvertToDouble(tmp);
instring >> tmp;
G4double val;
val = G4UIcommand::ConvertToDouble(tmp);
mpv->InsertValues(en, val);
}
const char* c = prop.c_str();
fDetector->AddBoxMPV(c, mpv);
}
else if (command == fWorldMatPropVectorCmd) {
// Convert string to physics vector
// string format is property name, then pairs of energy, value
G4MaterialPropertyVector* mpv = new G4MaterialPropertyVector();
std::istringstream instring(newValue);
G4String prop;
instring >> prop;
while (instring) {
G4String tmp;
instring >> tmp;
if (tmp == "") { break; }
G4double en = G4UIcommand::ConvertToDouble(tmp);
instring >> tmp;
G4double val;
val = G4UIcommand::ConvertToDouble(tmp);
mpv->InsertValues(en, val);
}
const char* c = prop.c_str();
fDetector->AddWorldMPV(c, mpv);
}
else if (command == fSurfaceMatPropVectorCmd) {
// Convert string to physics vector
// string format is property name, then pairs of energy, value
// space delimited
G4MaterialPropertyVector* mpv = new G4MaterialPropertyVector();
G4cout << newValue << G4endl;
std::istringstream instring(newValue);
G4String prop;
instring >> prop;
while (instring) {
G4String tmp;
instring >> tmp;
if (tmp == "") { break; }
G4double en = G4UIcommand::ConvertToDouble(tmp);
instring >> tmp;
G4double val;
val = G4UIcommand::ConvertToDouble(tmp);
mpv->InsertValues(en, val);
}
const char* c = prop.c_str();
fDetector->AddSurfaceMPV(c, mpv);
}
else if (command == fBoxMatConstPropVectorCmd) {
// Convert string to physics vector
// string format is property name, then value
// space delimited
std::istringstream instring(newValue);
G4String prop;
G4String tmp;
instring >> prop;
instring >> tmp;
G4double val = G4UIcommand::ConvertToDouble(tmp);
const char* c = prop.c_str();
fDetector->AddBoxMPCV(c, val);
}
else if (command == fWorldMatConstPropVectorCmd) {
// Convert string to physics vector
// string format is property name, then value
// space delimited
std::istringstream instring(newValue);
G4String prop;
G4String tmp;
instring >> prop;
instring >> tmp;
G4double val = G4UIcommand::ConvertToDouble(tmp);
const char* c = prop.c_str();
fDetector->AddBoxMPCV(c, val);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,96 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/src/HistoManager.cc
/// \brief Implementation of the HistoManager class
//
//
// $Id: HistoManager.cc 104417 2017-05-30 08:30:48Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "HistoManager.hh"
#include "G4UnitsTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
HistoManager::HistoManager()
: fFileName("opnovice2")
{
Book();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
HistoManager::~HistoManager()
{
delete G4AnalysisManager::Instance();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void HistoManager::Book()
{
// Create or get analysis manager
// The choice of analysis technology is done via selection of a namespace
// in HistoManager.hh
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
analysisManager->SetFileName(fFileName);
analysisManager->SetVerboseLevel(1);
analysisManager->SetActivation(true); // enable inactivation of histograms
// Define histogram indices, titles
G4int maxHisto = 12;
G4String id[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"10","11","12" };
G4String title[] = {
"dummy", // 0
"Cerenkov spectrum", // 1
"scintillation spectrum", // 2
"boundary process status", // 3
"X momentum dir of backward-going photons", // 4
"Y momentum dir of backward-going photons", // 5
"Z momentum dir of backward-going photons", // 6
"X momentum dir of forward-going photons", // 7
"Y momentum dir of forward-going photons", // 8
"Z momentum dir of forward-going photons", // 9
"X momentum dir of Fresnel-refracted photons", //10
"Y momentum dir of Fresnel-refracted photons", //11
"Z momentum dir of Fresnel-refracted photons", //12
};
// Default values (to be reset via /analysis/h1/set command)
G4int nbins = 100;
G4double vmin = 0.;
G4double vmax = 100.;
// Create all histograms as inactivated
for (G4int k=0; k <= maxHisto; ++k) {
G4int ih = analysisManager->CreateH1(id[k], title[k], nbins, vmin, vmax);
analysisManager->SetH1Activation(ih, false);
}
}
@@ -0,0 +1,116 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/src/PrimaryGeneratorAction.cc
/// \brief Implementation of the PrimaryGeneratorAction class
//
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PrimaryGeneratorAction.hh"
#include "PrimaryGeneratorMessenger.hh"
#include "Randomize.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PrimaryGeneratorAction::PrimaryGeneratorAction()
: G4VUserPrimaryGeneratorAction(),
fParticleGun(0)
{
G4int n_particle = 1;
fParticleGun = new G4ParticleGun(n_particle);
//create a messenger for this class
fGunMessenger = new PrimaryGeneratorMessenger(this);
//default kinematic
//
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
G4ParticleDefinition* particle = particleTable->FindParticle("e+");
fParticleGun->SetParticleDefinition(particle);
fParticleGun->SetParticleTime(0.0*ns);
fParticleGun->SetParticlePosition(G4ThreeVector(0.0*cm,0.0*cm,0.0*cm));
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
fParticleGun->SetParticleEnergy(500.0*keV);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PrimaryGeneratorAction::~PrimaryGeneratorAction()
{
delete fParticleGun;
delete fGunMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
fParticleGun->GeneratePrimaryVertex(anEvent);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PrimaryGeneratorAction::SetOptPhotonPolar()
{
G4double angle = G4UniformRand() * 360.0*deg;
SetOptPhotonPolar(angle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PrimaryGeneratorAction::SetOptPhotonPolar(G4double angle)
{
if (fParticleGun->GetParticleDefinition()->GetParticleName()!="opticalphoton")
{
G4cout << "--> warning from PrimaryGeneratorAction::SetOptPhotonPolar() :"
"the particleGun is not an opticalphoton" << G4endl;
return;
}
G4ThreeVector normal (1., 0., 0.);
G4ThreeVector kphoton = fParticleGun->GetParticleMomentumDirection();
G4ThreeVector product = normal.cross(kphoton);
G4double modul2 = product*product;
G4ThreeVector e_perpend (0., 0., 1.);
if (modul2 > 0.) e_perpend = (1./std::sqrt(modul2))*product;
G4ThreeVector e_paralle = e_perpend.cross(kphoton);
G4ThreeVector polar = std::cos(angle)*e_paralle + std::sin(angle)*e_perpend;
fParticleGun->SetParticlePolarization(polar);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,84 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/src/PrimaryGeneratorMessenger.cc
/// \brief Implementation of the PrimaryGeneratorMessenger class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PrimaryGeneratorMessenger.hh"
#include "PrimaryGeneratorAction.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PrimaryGeneratorMessenger::
PrimaryGeneratorMessenger(PrimaryGeneratorAction* Gun)
: G4UImessenger(),
fPrimaryAction(Gun)
{
fGunDir = new G4UIdirectory("/opnovice2/gun/");
fGunDir->SetGuidance("PrimaryGenerator control");
fPolarCmd =
new G4UIcmdWithADoubleAndUnit("/opnovice2/gun/optPhotonPolar",this);
fPolarCmd->SetGuidance("Set linear polarization");
fPolarCmd->SetGuidance(" angle w.r.t. (k,n) plane");
fPolarCmd->SetParameterName("angle",true);
fPolarCmd->SetUnitCategory("Angle");
fPolarCmd->SetDefaultValue(-360.0);
fPolarCmd->SetDefaultUnit("deg");
fPolarCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PrimaryGeneratorMessenger::~PrimaryGeneratorMessenger()
{
delete fPolarCmd;
delete fGunDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PrimaryGeneratorMessenger::SetNewValue(
G4UIcommand* command, G4String newValue)
{
if (command == fPolarCmd) {
G4double angle = fPolarCmd->GetNewDoubleValue(newValue);
if (angle == -360.0*deg) {
fPrimaryAction->SetOptPhotonPolar();
} else {
fPrimaryAction->SetOptPhotonPolar(angle);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,321 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/src/Run.cc
/// \brief Implementation of the Run class
//
// $Id: Run.cc 71376 2013-06-14 07:44:50Z maire $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include <numeric>
#include "Run.hh"
#include "G4OpBoundaryProcess.hh"
#include "G4SystemOfUnits.hh"
#include "G4UnitsTable.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Run::Run()
: G4Run()
{
fParticle = nullptr;
fEkin = -1.;
fCerenkovEnergy = 0.0;
fScintEnergy = 0.0;
fCerenkovCount = 0;
fScintCount = 0;
fRayleighCount = 0;
fOpAbsorption = 0;
fOpAbsorptionPrior = 0;
fTotalSurface = 0;
fBoundaryProcs.clear();
fBoundaryProcs.resize(40);
for (G4int i = 0; i < 40; ++i) {
fBoundaryProcs[i] = 0;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Run::~Run()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Run::SetPrimary(G4ParticleDefinition* particle, G4double energy)
{
fParticle = particle;
fEkin = energy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Run::Merge(const G4Run* run)
{
const Run* localRun = static_cast<const Run*>(run);
// pass information about primary particle
fParticle = localRun->fParticle;
fEkin = localRun->fEkin;
fCerenkovEnergy += localRun->fCerenkovEnergy;
fScintEnergy += localRun->fScintEnergy;
fCerenkovCount += localRun->fCerenkovCount;
fScintCount += localRun->fScintCount;
fRayleighCount += localRun->fRayleighCount;
fTotalSurface += localRun->fTotalSurface;
fOpAbsorption += localRun->fOpAbsorption;
fOpAbsorptionPrior += localRun->fOpAbsorptionPrior;
for (size_t i = 0; i < fBoundaryProcs.size(); ++i) {
fBoundaryProcs[i] += localRun->fBoundaryProcs[i];
}
G4Run::Merge(run);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Run::EndOfRun()
{
G4int TotNbofEvents = numberOfEvent;
if (TotNbofEvents == 0) return;
std::ios::fmtflags mode = G4cout.flags();
G4int prec = G4cout.precision(2);
G4cout << "\n Run Summary\n";
G4cout << "---------------------------------\n";
G4cout << "Primary particle was: " << fParticle->GetParticleName()
<< " with energy " << G4BestUnit(fEkin, "Energy") << "." << G4endl;
if (fParticle->GetParticleName() != "opticalphoton") {
G4cout << "Average energy of Cerenkov photons created per event: "
<< (fCerenkovEnergy/eV)/TotNbofEvents << " eV." << G4endl;
G4cout << "Average number of Cerenkov photons created per event: "
<< fCerenkovCount/TotNbofEvents << G4endl;
if (fCerenkovCount > 0) {
G4cout << " Average energy: " << (fCerenkovEnergy/eV)/fCerenkovCount
<< " eV." << G4endl;
}
G4cout << "Average energy of scintillation photons created per event: "
<< (fScintEnergy/eV)/TotNbofEvents << " eV." << G4endl;
G4cout << "Average number of scintillation photons created per event: "
<< fScintCount/TotNbofEvents << G4endl;
if (fScintCount > 0) {
G4cout << " Average energy: " << (fScintEnergy/eV)/fScintCount << " eV."
<< G4endl;
}
G4cout << "Average number of OpRayleigh scatters per event: "
<< fRayleighCount/TotNbofEvents << G4endl;
G4cout << "\n";
}
G4cout << "OpAbsorption per event: " << fOpAbsorption/TotNbofEvents
<< G4endl;
G4cout << "\nSurface events (on +X surface) this run:" << G4endl;
G4cout << "# of primary particles: " << std::setw(8) << TotNbofEvents
<< G4endl;
G4cout << "OpAbsorption before surface: " << std::setw(8)
<< fOpAbsorptionPrior << G4endl;
G4cout << "Total # of surface events: " << std::setw(8) << fTotalSurface
<< G4endl;
if (fParticle->GetParticleName() == "opticalphoton") {
G4cout << "Unaccounted for: " << std::setw(8)
<< fTotalSurface + fOpAbsorptionPrior - TotNbofEvents << G4endl;
}
G4cout << "\nSurface events by process:" << G4endl;
if (fBoundaryProcs[Transmission] > 0) {
G4cout << " Transmission: " << std::setw(8)
<< fBoundaryProcs[Transmission] << G4endl;
}
if (fBoundaryProcs[FresnelRefraction] > 0) {
G4cout << " Fresnel refraction: " << std::setw(8)
<< fBoundaryProcs[FresnelRefraction] << G4endl;
}
if (fBoundaryProcs[FresnelReflection] > 0) {
G4cout << " Fresnel reflection: " << std::setw(8)
<< fBoundaryProcs[FresnelReflection] << G4endl;
}
if (fBoundaryProcs[TotalInternalReflection] > 0) {
G4cout << " Total internal reflection: " << std::setw(8)
<< fBoundaryProcs[TotalInternalReflection] << G4endl;
}
if (fBoundaryProcs[LambertianReflection] > 0) {
G4cout << " Lambertian reflection: " << std::setw(8)
<< fBoundaryProcs[LambertianReflection] << G4endl;
}
if (fBoundaryProcs[LobeReflection] > 0) {
G4cout << " Lobe reflection: " << std::setw(8)
<< fBoundaryProcs[LobeReflection] << G4endl;
}
if (fBoundaryProcs[SpikeReflection] > 0) {
G4cout << " Spike reflection: " << std::setw(8)
<< fBoundaryProcs[SpikeReflection] << G4endl;
}
if (fBoundaryProcs[BackScattering] > 0) {
G4cout << " Backscattering: " << std::setw(8)
<< fBoundaryProcs[BackScattering] << G4endl;
}
if (fBoundaryProcs[Absorption] > 0) {
G4cout << " Absorption: " << std::setw(8)
<< fBoundaryProcs[Absorption] << G4endl;
}
if (fBoundaryProcs[Detection] > 0) {
G4cout << " Detection: " << std::setw(8)
<< fBoundaryProcs[Detection] << G4endl;
}
if (fBoundaryProcs[NotAtBoundary] > 0) {
G4cout << " Not at boundary: " << std::setw(8)
<< fBoundaryProcs[NotAtBoundary] << G4endl;
}
if (fBoundaryProcs[SameMaterial] > 0) {
G4cout << " Same material: " << std::setw(8)
<< fBoundaryProcs[SameMaterial] << G4endl;
}
if (fBoundaryProcs[StepTooSmall] > 0) {
G4cout << " Step too small: " << std::setw(8)
<< fBoundaryProcs[StepTooSmall] << G4endl;
}
if (fBoundaryProcs[NoRINDEX] > 0) {
G4cout << " No RINDEX: " << std::setw(8)
<< fBoundaryProcs[NoRINDEX] << G4endl;
}
// LBNL polished
if (fBoundaryProcs[PolishedLumirrorAirReflection] > 0) {
G4cout << " Polished Lumirror Air reflection: " << std::setw(8)
<< fBoundaryProcs[PolishedLumirrorAirReflection] << G4endl;
}
if (fBoundaryProcs[PolishedLumirrorGlueReflection] > 0) {
G4cout << " Polished Lumirror Glue reflection: " << std::setw(8)
<< fBoundaryProcs[PolishedLumirrorGlueReflection] << G4endl;
}
if (fBoundaryProcs[PolishedAirReflection] > 0) {
G4cout << " Polished Air reflection: " << std::setw(8)
<< fBoundaryProcs[PolishedAirReflection] << G4endl;
}
if (fBoundaryProcs[PolishedTeflonAirReflection] > 0) {
G4cout << " Polished Teflon Air reflection: " << std::setw(8)
<< fBoundaryProcs[PolishedTeflonAirReflection] << G4endl;
}
if (fBoundaryProcs[PolishedTiOAirReflection] > 0) {
G4cout << " Polished TiO Air reflection: " << std::setw(8)
<< fBoundaryProcs[PolishedTiOAirReflection] << G4endl;
}
if (fBoundaryProcs[PolishedTyvekAirReflection] > 0) {
G4cout << " Polished Tyvek Air reflection: " << std::setw(8)
<< fBoundaryProcs[PolishedTyvekAirReflection] << G4endl;
}
if (fBoundaryProcs[PolishedVM2000AirReflection] > 0) {
G4cout << " Polished VM2000 Air reflection: " << std::setw(8)
<< fBoundaryProcs[PolishedVM2000AirReflection] << G4endl;
}
if (fBoundaryProcs[PolishedVM2000GlueReflection] > 0) {
G4cout << " Polished VM2000 Glue reflection: " << std::setw(8)
<< fBoundaryProcs[PolishedVM2000GlueReflection] << G4endl;
}
// LBNL etched
if (fBoundaryProcs[EtchedLumirrorAirReflection] > 0) {
G4cout << " Etched Lumirror Air reflection: " << std::setw(8)
<< fBoundaryProcs[EtchedLumirrorAirReflection] << G4endl;
}
if (fBoundaryProcs[EtchedLumirrorGlueReflection] > 0) {
G4cout << " Etched Lumirror Glue reflection: " << std::setw(8)
<< fBoundaryProcs[EtchedLumirrorGlueReflection] << G4endl;
}
if (fBoundaryProcs[EtchedAirReflection] > 0) {
G4cout << " Etched Air reflection: " << std::setw(8)
<< fBoundaryProcs[EtchedAirReflection] << G4endl;
}
if (fBoundaryProcs[EtchedTeflonAirReflection] > 0) {
G4cout << " Etched Teflon Air reflection: " << std::setw(8)
<< fBoundaryProcs[EtchedTeflonAirReflection] << G4endl;
}
if (fBoundaryProcs[EtchedTiOAirReflection] > 0) {
G4cout << " Etched TiO Air reflection: " << std::setw(8)
<< fBoundaryProcs[EtchedTiOAirReflection] << G4endl;
}
if (fBoundaryProcs[EtchedTyvekAirReflection] > 0) {
G4cout << " Etched Tyvek Air reflection: " << std::setw(8)
<< fBoundaryProcs[EtchedTyvekAirReflection] << G4endl;
}
if (fBoundaryProcs[EtchedVM2000AirReflection] > 0) {
G4cout << " Etched VM2000 Air reflection: " << std::setw(8)
<< fBoundaryProcs[EtchedVM2000AirReflection] << G4endl;
}
if (fBoundaryProcs[EtchedVM2000GlueReflection] > 0) {
G4cout << " Etched VM2000 Glue reflection: " << std::setw(8)
<< fBoundaryProcs[EtchedVM2000GlueReflection] << G4endl;
}
// LBNL ground
if (fBoundaryProcs[GroundLumirrorAirReflection] > 0) {
G4cout << " Ground Lumirror Air reflection: " << std::setw(8)
<< fBoundaryProcs[GroundLumirrorAirReflection] << G4endl;
}
if (fBoundaryProcs[GroundLumirrorGlueReflection] > 0) {
G4cout << " Ground Lumirror Glue reflection: " << std::setw(8)
<< fBoundaryProcs[GroundLumirrorGlueReflection] << G4endl;
}
if (fBoundaryProcs[GroundAirReflection] > 0) {
G4cout << " Ground Air reflection: " << std::setw(8)
<< fBoundaryProcs[GroundAirReflection] << G4endl;
}
if (fBoundaryProcs[GroundTeflonAirReflection] > 0) {
G4cout << " Ground Teflon Air reflection: " << std::setw(8)
<< fBoundaryProcs[GroundTeflonAirReflection] << G4endl;
}
if (fBoundaryProcs[GroundTiOAirReflection] > 0) {
G4cout << " Ground TiO Air reflection: " << std::setw(8)
<< fBoundaryProcs[GroundTiOAirReflection] << G4endl;
}
if (fBoundaryProcs[GroundTyvekAirReflection] > 0) {
G4cout << " Ground Tyvek Air reflection: " << std::setw(8)
<< fBoundaryProcs[GroundTyvekAirReflection] << G4endl;
}
if (fBoundaryProcs[GroundVM2000AirReflection] > 0) {
G4cout << " Ground VM2000 Air reflection: " << std::setw(8)
<< fBoundaryProcs[GroundVM2000AirReflection] << G4endl;
}
if (fBoundaryProcs[GroundVM2000GlueReflection] > 0) {
G4cout << " Ground VM2000 Glue reflection: " << std::setw(8)
<< fBoundaryProcs[GroundVM2000GlueReflection] << G4endl;
}
G4int sum = std::accumulate(fBoundaryProcs.begin(), fBoundaryProcs.end(), 0);
G4cout << " Sum: " << std::setw(8) << sum << G4endl;
G4cout << " Unaccounted for: " << std::setw(8)
<< fTotalSurface - sum << G4endl;
G4cout << "---------------------------------\n";
G4cout.setf(mode, std::ios::floatfield);
G4cout.precision(prec);
}
@@ -0,0 +1,110 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/src/RunAction.cc
/// \brief Implementation of the RunAction class
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Make this appear first!
#include "G4Timer.hh"
#include "RunAction.hh"
#include "HistoManager.hh"
#include "PrimaryGeneratorAction.hh"
#include "Run.hh"
#include "G4Run.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RunAction::RunAction(PrimaryGeneratorAction* prim)
: G4UserRunAction(),
fTimer(nullptr),
fRun(nullptr),
fHistoManager(nullptr),
fPrimary(prim)
{
fTimer = new G4Timer;
fHistoManager = new HistoManager();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RunAction::~RunAction()
{
delete fTimer;
delete fHistoManager;
}
G4Run* RunAction::GenerateRun()
{
fRun = new Run();
return fRun;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RunAction::BeginOfRunAction(const G4Run* aRun)
{
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
if (fPrimary) {
G4ParticleDefinition* particle =
fPrimary->GetParticleGun()->GetParticleDefinition();
G4double energy = fPrimary->GetParticleGun()->GetParticleEnergy();
fRun->SetPrimary(particle, energy);
}
//histograms
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
if (analysisManager->IsActive()) {
analysisManager->OpenFile();
}
fTimer->Start();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RunAction::EndOfRunAction(const G4Run* aRun)
{
fTimer->Stop();
G4cout << "number of event = " << aRun->GetNumberOfEvent()
<< " " << *fTimer << G4endl;
if (isMaster) fRun->EndOfRun();
// save histograms
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
if (analysisManager->IsActive()) {
analysisManager->Write();
analysisManager->CloseFile();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,298 @@
//
// ********************************************************************
// * 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: SteppingAction.cc 71007 2013-06-09 16:14:59Z maire $
//
/// \file optical/OpNovice2/src/SteppingAction.cc
/// \brief Implementation of the SteppingAction class
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "SteppingAction.hh"
//#include "EventAction.hh"
#include "HistoManager.hh"
#include "TrackInformation.hh"
#include "Run.hh"
#include "G4Cerenkov.hh"
#include "G4Scintillation.hh"
#include "G4OpBoundaryProcess.hh"
#include "G4Step.hh"
#include "G4Track.hh"
#include "G4OpticalPhoton.hh"
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4SteppingManager.hh"
#include "G4RunManager.hh"
#include "G4ProcessManager.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
SteppingAction::SteppingAction()
: G4UserSteppingAction()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
SteppingAction::~SteppingAction()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void SteppingAction::UserSteppingAction(const G4Step* step)
{
static G4ParticleDefinition* opticalphoton =
G4OpticalPhoton::OpticalPhotonDefinition();
static G4AnalysisManager* analysisMan = G4AnalysisManager::Instance();
Run* run = static_cast<Run*>(
G4RunManager::GetRunManager()->GetNonConstCurrentRun());
G4Track* track = step->GetTrack();
G4StepPoint* endPoint = step->GetPostStepPoint();
G4StepPoint* startPoint = step->GetPreStepPoint();
G4String particleName = track->GetDynamicParticle()->
GetParticleDefinition()->GetParticleName();
TrackInformation* trackInfo =
(TrackInformation*)(track->GetUserInformation());
if (particleName == "opticalphoton") {
const G4VProcess* pds = endPoint->GetProcessDefinedStep();
if (pds->GetProcessName() == "OpAbsorption") {
run->AddOpAbsorption();
if (trackInfo->GetIsFirstTankX()) {
run->AddOpAbsorptionPrior();
}
}
else if (pds->GetProcessName() == "OpRayleigh") {
run->AddRayleigh();
}
// optical process has endpt on bdry,
if (endPoint->GetStepStatus() == fGeomBoundary) {
const G4DynamicParticle* theParticle = track->GetDynamicParticle();
G4ThreeVector oldMomentumDir = theParticle->GetMomentumDirection();
G4ThreeVector m0 = startPoint->GetMomentumDirection();
G4ThreeVector m1 = endPoint->GetMomentumDirection();
G4OpBoundaryProcessStatus theStatus = Undefined;
G4ProcessManager* OpManager =
G4OpticalPhoton::OpticalPhoton()->GetProcessManager();
G4int MAXofPostStepLoops =
OpManager->GetPostStepProcessVector()->entries();
G4ProcessVector* postStepDoItVector =
OpManager->GetPostStepProcessVector(typeDoIt);
if (trackInfo->GetIsFirstTankX()) {
G4ThreeVector momdir = endPoint->GetMomentumDirection();
G4double px1 = momdir.x();
G4double py1 = momdir.y();
G4double pz1 = momdir.z();
if (px1 < 0.) {
analysisMan->FillH1(4, px1);
analysisMan->FillH1(5, py1);
analysisMan->FillH1(6, pz1);
} else if (px1 >= 0.) {
analysisMan->FillH1(7, px1);
analysisMan->FillH1(8, py1);
analysisMan->FillH1(9, pz1);
}
trackInfo->SetIsFirstTankX(false);
run->AddTotalSurface();
for (G4int i=0; i<MAXofPostStepLoops; ++i) {
G4VProcess* currentProcess = (*postStepDoItVector)[i];
G4OpBoundaryProcess* opProc =
dynamic_cast<G4OpBoundaryProcess*>(currentProcess);
if (opProc) {
theStatus = opProc->GetStatus();
analysisMan->FillH1(3, theStatus);
if (theStatus == Transmission) {
run->AddTransmission();
}
else if (theStatus == FresnelRefraction) {
run->AddFresnelRefraction();
analysisMan->FillH1(10, px1);
analysisMan->FillH1(11, py1);
analysisMan->FillH1(12, pz1);
}
else if (theStatus == FresnelReflection) {
run->AddFresnelReflection();
}
else if (theStatus == TotalInternalReflection) {
run->AddTotalInternalReflection();
}
else if (theStatus == LambertianReflection) {
run->AddLambertianReflection();
}
else if (theStatus == LobeReflection) {
run->AddLobeReflection();
}
else if (theStatus == SpikeReflection) {
run->AddSpikeReflection();
}
else if (theStatus == BackScattering) {
run->AddBackScattering();
}
else if (theStatus == Absorption) {
run->AddAbsorption();
}
else if (theStatus == Detection) {
run->AddDetection();
}
else if (theStatus == NotAtBoundary) {
run->AddNotAtBoundary();
}
else if (theStatus == SameMaterial) {
run->AddSameMaterial();
}
else if (theStatus == StepTooSmall) {
run->AddStepTooSmall();
}
else if (theStatus == NoRINDEX) {
run->AddNoRINDEX();
}
else if (theStatus == PolishedLumirrorAirReflection) {
run->AddPolishedLumirrorAirReflection();
}
else if (theStatus == PolishedLumirrorGlueReflection) {
run->AddPolishedLumirrorGlueReflection();
}
else if (theStatus == PolishedAirReflection) {
run->AddPolishedAirReflection();
}
else if (theStatus == PolishedTeflonAirReflection) {
run->AddPolishedTeflonAirReflection();
}
else if (theStatus == PolishedTiOAirReflection) {
run->AddPolishedTiOAirReflection();
}
else if (theStatus == PolishedTyvekAirReflection) {
run->AddPolishedTyvekAirReflection();
}
else if (theStatus == PolishedVM2000AirReflection) {
run->AddPolishedVM2000AirReflection();
}
else if (theStatus == PolishedVM2000GlueReflection) {
run->AddPolishedVM2000AirReflection();
}
else if (theStatus == EtchedLumirrorAirReflection) {
run->AddEtchedLumirrorAirReflection();
}
else if (theStatus == EtchedLumirrorGlueReflection) {
run->AddEtchedLumirrorGlueReflection();
}
else if (theStatus == EtchedAirReflection) {
run->AddEtchedAirReflection();
}
else if (theStatus == EtchedTeflonAirReflection) {
run->AddEtchedTeflonAirReflection();
}
else if (theStatus == EtchedTiOAirReflection) {
run->AddEtchedTiOAirReflection();
}
else if (theStatus == EtchedTyvekAirReflection) {
run->AddEtchedTyvekAirReflection();
}
else if (theStatus == EtchedVM2000AirReflection) {
run->AddEtchedVM2000AirReflection();
}
else if (theStatus == EtchedVM2000GlueReflection) {
run->AddEtchedVM2000AirReflection();
}
else if (theStatus == GroundLumirrorAirReflection) {
run->AddGroundLumirrorAirReflection();
}
else if (theStatus == GroundLumirrorGlueReflection) {
run->AddGroundLumirrorGlueReflection();
}
else if (theStatus == GroundAirReflection) {
run->AddGroundAirReflection();
}
else if (theStatus == GroundTeflonAirReflection) {
run->AddGroundTeflonAirReflection();
}
else if (theStatus == GroundTiOAirReflection) {
run->AddGroundTiOAirReflection();
}
else if (theStatus == GroundTyvekAirReflection) {
run->AddGroundTyvekAirReflection();
}
else if (theStatus == GroundVM2000AirReflection) {
run->AddGroundVM2000AirReflection();
}
else if (theStatus == GroundVM2000GlueReflection) {
run->AddGroundVM2000AirReflection();
}
else if (theStatus == Dichroic) {
run->AddDichroic();
}
else {
G4cout << "theStatus: " << theStatus
<< " was none of the above." << G4endl;
}
}
}
}
}
}
else { // particle != opticalphoton
const std::vector<const G4Track*>* secondaries =
step->GetSecondaryInCurrentStep();
for (auto sec : *secondaries) {
if (sec->GetDynamicParticle()->GetParticleDefinition() == opticalphoton){
if (sec->GetCreatorProcess()->GetProcessName().compare("Cerenkov")==0){
G4double en = sec->GetKineticEnergy();
run->AddCerenkovEnergy(en);
run->AddCerenkov();
G4AnalysisManager::Instance()->FillH1(1, en);
}
else if (sec->GetCreatorProcess()
->GetProcessName().compare("Scintillation") == 0) {
G4double en = sec->GetKineticEnergy();
run->AddScintillationEnergy(en);
run->AddScintillation();
G4AnalysisManager::Instance()->FillH1(2, en);
}
}
}
}
return;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,87 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/src/TrackInformation.cc
/// \brief Implementation of the TrackInformation class
//
//
// $Id: TrackInformation.cc 97671 2016-06-07 08:25:00Z gcosmo $
//
#include "TrackInformation.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
G4ThreadLocal G4Allocator<TrackInformation> *
aTrackInformationAllocator = 0;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
TrackInformation::TrackInformation()
: G4VUserTrackInformation()
{
fFirstTankX = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
TrackInformation::TrackInformation(const G4Track*)
: G4VUserTrackInformation()
{
fFirstTankX = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
TrackInformation ::TrackInformation(const TrackInformation* aTrackInfo)
: G4VUserTrackInformation()
{
fFirstTankX = aTrackInfo->fFirstTankX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
TrackInformation::~TrackInformation()
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
TrackInformation& TrackInformation::operator=
(const TrackInformation& aTrackInfo)
{
fFirstTankX = aTrackInfo.fFirstTankX;
return *this;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void TrackInformation::SetSourceTrackInformation(const G4Track*)
{
fFirstTankX = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void TrackInformation::Print() const
{
G4cout
<< "first time track incident on X: " << fFirstTankX << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,77 @@
//
// ********************************************************************
// * 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 optical/OpNovice2/src/TrackingAction.cc
/// \brief Implementation of the TrackingAction class
//
// $Id: TrackingAction.cc 66379 2012-12-18 09:46:33Z gcosmo $
//
#include "TrackingAction.hh"
#include "TrackInformation.hh"
#include "G4TrackingManager.hh"
#include "G4Track.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
TrackingAction::TrackingAction()
:G4UserTrackingAction()
{;}
void TrackingAction::PreUserTrackingAction(const G4Track* aTrack)
{
// Create trajectory only for track in tracking region
TrackInformation* trackInfo =
(TrackInformation*)(aTrack->GetUserInformation());
if (!trackInfo) {
trackInfo = new TrackInformation(aTrack);
trackInfo->SetIsFirstTankX(true);
aTrack->SetUserInformation(trackInfo);
}
trackInfo->SetIsFirstTankX(true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
{
G4TrackVector* secondaries = fpTrackingManager->GimmeSecondaries();
if (secondaries)
{
TrackInformation* info =
(TrackInformation*)(aTrack->GetUserInformation());
size_t nSeco = secondaries->size();
if (nSeco > 0)
{
for(size_t i=0; i < nSeco; i++)
{
TrackInformation* infoNew = new TrackInformation(info);
(*secondaries)[i]->SetUserInformation(infoNew);
}
}
}
}
@@ -0,0 +1,40 @@
/control/verbose 2
/tracking/verbose 0
/run/initialize
/opnovice2/boxProperty RINDEX 0.000002 1.3 0.000008 1.4
/opnovice2/boxProperty ABSLENGTH 0.000002 1000000 0.000005 2000000 0.000008 3000000
/opnovice2/worldProperty RINDEX 0.000002 1.01 0.000008 1.01
/opnovice2/worldProperty ABSLENGTH 0.000002 1000000 0.000005 2000000 0.000008 3000000
/opnovice2/surfaceModel unified
/opnovice2/surfaceType dielectric_dielectric
/opnovice2/surfaceFinish ground
/opnovice2/surfaceSigmaAlpha 1.1
/opnovice2/surfaceProperty SPECULARLOBECONSTANT 0.000002 .1 0.000008 .1
/opnovice2/surfaceProperty SPECULARSPIKECONSTANT 0.000002 .01 0.000008 .01
/opnovice2/surfaceProperty BACKSCATTERCONSTANT 0.000002 .05 0.000008 .05
/opnovice2/surfaceProperty REFLECTIVITY 0.000002 .99 0.000008 .99
#
/gun/particle opticalphoton
/gun/energy 3 eV
/gun/position 0 0 0 cm
/gun/direction 1 0 0
/opnovice2/gun/optPhotonPolar
#
/analysis/h1/set 3 40 -1 39
/analysis/h1/set 4 100 -1.1 1.1
/analysis/h1/set 5 100 -1.1 1.1
/analysis/h1/set 6 100 -1.1 1.1
/analysis/h1/set 7 100 -1.1 1.1
/analysis/h1/set 8 100 -1.1 1.1
/analysis/h1/set 9 100 -1.1 1.1
/analysis/h1/set 10 100 -1.1 1.1
/analysis/h1/set 11 100 -1.1 1.1
/analysis/h1/set 12 100 -1.1 1.1
/run/beamOn 100000
+231
View File
@@ -0,0 +1,231 @@
//$Id$
///\file "optical/OpNovice2/.README.txt"
///\brief Example AnaEx01 README page
/*! \page ExampleOpNovice2 Example OpNovice2
OpNovice2
---------
Investigate optical properties and parameters. Details of optical
photon boundary interactions on a surface are recorded. Details
of optical photon generation and transport are recorded.
\section OpNovice2_s1 GEOMETRY DEFINITION
The geometry consists of a cube "box" with a side of 2 m inside
the world cube of side 20 m. Optical properties of the box, the world,
and the surface may be set interactively via the commands defined
in the DetectorMessenger class.
Material properties may be added using the macro commands:
# for the box:
/opnovice2/boxProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
/opnovice2/boxConstProperty NAME VALUE
# for the world:
/opnovice2/worldProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
/opnovice2/worldConstProperty NAME VALUE
# for the surface:
/opnovice2/surfaceProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
Multiple energy and value pairs may be specified for the energy-dependent
properties.
Values are in Geant4 internal units. Energy is in MeV.
Example:
/opnovice2/boxProperty RINDEX 0.000002 1.3 0.000005 1.32 0.000008 1.34
sets the refractive index of the box to 1.3 at 2 eV, 1.32 at 5 eV, and
1.34 at 8 eV.
\section OpNovice2_s2 PHYSICS LIST
The FTFP_BERT physics list is used, with electromagnetic option
EMZ (option4) and G4OpticalPhysics for the optical physics.
\section OpNovice2_s3 AN EVENT : THE PRIMARY GENERATOR
The primary kinematic consists of a single particle. The type of
the particle, its energy, position, and direction, are set
in the PrimaryGeneratorAction class, and can be changed via the G4
build-in commands of G4ParticleGun class (see the macros provided with
this example).
\section OpNovice2_s4 VISUALIZATION
The Visualization Manager is set in the main().
The initialisation of the drawing is done via the commands
/vis/... in the macro vis.mac. To get visualisation:
> /control/execute vis.mac
or run the program with no command line arguments:
$ ./OpNovice2
\section OpNovice2_s5 HOW TO START ?
- Execute OpNovice2 in 'batch' mode from macro files
% OpNovice2 surface.mac
- Execute OpNovice2 in 'interactive mode' with visualization
% OpNovice2
....
Idle> type your commands
....
Idle> exit
\section OpNovice2_s6 RESULTS
A table of optical photon events is printed at the end of the run.
\section OpNovice2_s7 HISTOGRAMS
OpNovice2 has several predefined 1D histograms :
1 : Cerenkov spectrum
2 : scintillation spectrum
3 : boundary process status
4 : X momentum dir of scattered photons with px < 0
5 : Y momentum dir of scattered photons with px < 0
6 : Z momentum dir of scattered photons with px < 0
7 : X momentum dir of scattered photons with px >= 0
8 : Y momentum dir of scattered photons with px >= 0
9 : Z momentum dir of scattered photons with px >= 0
10 : X momentum dir of Fresnel-refracted photons
11 : Y momentum dir of Fresnel-refracted photons
12 : Z momentum dir of Fresnel-refracted photons
Histograms 4-12 are recorded for photons scattered from the +X
surface of the cube. Only the first interaction is recorded.
The histograms are managed by G4Analysis classes.
The histos can be individually activated with the command :
/analysis/h1/set id nbBins valMin valMax unit
where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
One can control the name of the histograms file with the command:
/analysis/setFileName name (default opnovice2)
It is possible to choose the format of the histogram file : root (default),
hbook, xml, csv, by using namespace in HistoManager.hh
It is also possible to print selected histograms on an ascii file:
/analysis/h1/setAscii id
All selected histos will be written on a file name.ascii (default opnovice2)
//$Id$
///\file "analysis/AnaEx01/.README.txt"
///\brief Example AnaEx01 README page
/*! \page ExampleAnaEx01 Example AnaEx01
Examples AnaEx01, AnaEx02 and AnaEx03 show the usage of histogram and tuple
manipulations using G4Analysis, ROOT and AIDA compliant systems on the same
scenario. All analysis manipulations (histo booking, filling, saving histos
in a file, etc...) are located in one class : HistoManager, implementation of
which is different in each example. All the other classes are same in all
three examples.
This example shows the usage of histogram and tuple manipulations using
G4Analysis system.
The example is an adaptation of examples/novice/N03. It describes a simple
sampling calorimeter setup.
\section AnaEx01_s1 Detector description
The calorimeter is a box made of a given number of layers. A layer
consists of an absorber plate and of a detection gap. The layer is
replicated.
Six parameters define the calorimeter :
- the material of the absorber,
- the thickness of an absorber plate,
- the material of the detection gap,
- the thickness of a gap,
- the number of layers,
- the transverse size of the calorimeter (the input face is a square).
The default geometry is constructed in DetectorConstruction class,
but all of the above parameters can be modified interactively via
the commands defined in the DetectorMessenger class.
<pre>
|<----layer 0---------->|<----layer 1---------->|<----layer 2---------->|
| | | |
==========================================================================
|| | || | || | ||
|| | || | || | ||
beam || absorber | gap || absorber | gap || absorber | gap ||
======> || | || | || | ||
|| | || | || | ||
==========================================================================
</pre>
\section AnaEx01_s2 Physics list
The particle's type and the physic processes which will be available
in this example are set in the FTFP_BERT physics list.
\section AnaEx01_s3 Action Initialization
A newly introduced class, ActionInitialization,
instantiates and registers to Geant4 kernel all user action classes
which are defined thread-local and a run action class
which is defined both thread-local and global.
The thread-local action classes are defined in
ActionInitialization::Build()
and the global run action class is defined in
ActionInitialization::BuildForMaster().
Note that ActionInitialization::Build() is also used to
instatiate user action clasess in sequential mode.
\section AnaEx01_s4 An event : PrimaryGeneratorAction
The primary kinematic consists of a single particle which hits the
calorimeter perpendicular to the input face. The type of the particle
and its energy are set in the PrimaryGeneratorAction class, and can
be changed via the G4 build-in commands of ParticleGun class.
\section AnaEx01_s5 Histograms
AnaEx01 can produce 4 histograms :
- EAbs : total energy deposit in absorber per event
- EGap : total energy deposit in gap per event
- LAbs : total track length of charged particles in absorber per event
- LGap : total track length of charged particles in gap per event
And 2 Ntuples :
- Ntuple1:
- one row per event : EnergyAbs EnergyGap
- Ntuple2:
- one row per event : TrackLAbs TrackLGap
These histos and ntuples are booked in HistoManager and filled from
EventAction.
One can control the name of the histograms file and its format:
- default name : AnaEx01
The format of the histogram file can be : root (default),
xml, csv. Include correct g4nnn.hh in HistoManager.hh
\section AnaEx01_s7 How to build
An additional step is needed when building the example with GNUmake
due to using the extra shared directory:
\verbatim
% cd path_to_AnaEx01/AnaEx01
% gmake setup
% gmake
\endverbatim
This will copy the files from shared in the example include and src;
to remove these files:
\verbatim
% gmake clean_setup
\endverbatim
*/
@@ -0,0 +1,79 @@
#
# Macro file for the initialization phase of "OpNovice2.cc"
#
# Sets some default verbose
# and initializes the graphic.
#
/control/verbose 2
/run/verbose 2
#
/run/initialize
#
# Use this open statement to create an OpenGL view:
/vis/open OGL 600x600-0+0
#
# Use this open statement to create a .prim file suitable for
# viewing in DAWN:
#/vis/open DAWNFILE
#
# Use this open statement to create a .heprep file suitable for
# viewing in HepRApp:
#/vis/open HepRepFile
#
# Use this open statement to create a .wrl file suitable for
# viewing in a VRML viewer:
#/vis/open VRML2FILE
#
# Disable auto refresh and quieten vis messages whilst scene and
# trajectories are established:
/vis/viewer/set/autoRefresh false
/vis/verbose errors
#
# Draw geometry:
/vis/drawVolume
#
# Specify view angle:
#/vis/viewer/set/viewpointThetaPhi 90. 0.
#
# Specify zoom value:
/vis/viewer/zoom 1.5
#
# Specify style (surface or wireframe):
#/vis/viewer/set/style wireframe
#
# Draw coordinate axes:
#/vis/scene/add/axes 0 0 0 1 m
#
# Draw smooth trajectories at end of event, showing trajectory points
# as markers 2 pixels wide:
/vis/scene/add/trajectories smooth
/vis/modeling/trajectories/create/drawByCharge
/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
#
# Draw hits at end of event:
#/vis/scene/add/hits
#
# To draw only gammas:
#/vis/filtering/trajectories/create/particleFilter
#/vis/filtering/trajectories/particleFilter-0/add gamma
#
# To invert the above, drawing all particles except gammas,
# keep the above two lines but also add:
#/vis/filtering/trajectories/particleFilter-0/invert true
#
# Many other options are available with /vis/modeling and /vis/filtering.
# For example, to select colour by particle ID:
#/vis/modeling/trajectories/create/drawByParticleID
#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
#
# To superimpose all of the events from a given run:
/vis/scene/endOfEventAction accumulate
#
# Re-establish auto refreshing and verbosity:
/vis/viewer/set/autoRefresh true
/vis/verbose warnings
#
# For file-based drivers, use this to create an empty detector view:
#/vis/viewer/flush