Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
@@ -0,0 +1,158 @@
//$Id$
///\file "electromagnetic/TestEm2/.README"
///\brief Example TestEm2 README page
/*! \page ExampleTestEm2 Example TestEm2
How to do shower profiles in an homogenous medium, with virtual
voxelisation.
\section TestEm2_s1 GEOMETRY DEFINITION
The geometry consists of a cylinder of homegenous material.
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.
Material can be choosen: Air Water lAr Al Fe BGO PbWO4 Pb.
eg:
\verbatim
/testem/det/setMat PbWO4
\endverbatim
The cylinder is virtually sliced longitudinaly (slice) and radialy (ring).
The size of the slices and rings are expressed in radiation length units
and can be changed.
eg:
\verbatim
/testem/det/setLbin 20 1. ---> 20 slices of 1. radl
/testem/det/setRbin 5 0.25 ---> 5 rings of 0.25 radl
/testem/det/update ---> rebuild the geometry
\endverbatim
(MaxBin = 500 in both directions)
An uniform magnetic field along the cylinder axis can be set.
eg:
\verbatim
/testem/det/setField 5 tesla
\endverbatim
\section TestEm2_s2 PHYSICS LISTS
Physics lists can be local (eg. in this example) or from G4 kernel
physics_lists subdirectory.
Local physics lists:
- "local" standard EM physics with current 'best' options setting.
these options are explicited in PhysListEmStandard
From geant4/source/physics_lists/builders:
- "emstandard_opt0" recommended standard EM physics for LHC
- "emstandard_opt1" best CPU performance standard physics for LHC
- "emstandard_opt2"
- "emstandard_opt3" best current advanced EM options.
analog to "local" above
Physics lists and options can be (re)set with UI commands
Please, notice that options set through G4EmProcessOPtions are global, eg
for all particle types. In G4 builders, it is shown how to set options per
particle type.
\section TestEm2_s3 AN EVENT : THE PRIMARY GENERATOR
The primary kinematic consists of a single particle which hits the
cylinder perpendicular to the input face. The type of the particle
and its energy are set in the PrimaryGeneratorAction class, and can
changed via the G4 build-in commands of G4ParticleGun class (see
the macros provided with this example).
A RUN is a set of events.
\section TestEm2_s4 VISUALIZATION
The Visualization Manager is set in the main () (see TestEm2.cc).
The initialisation of the drawing is done via the commands
/vis/.. in the macro vis.mac. In interactive session:
\verbatim
PreInit or Idle > /control/execute vis.mac
\endverbatim
The detector has a default view which is a longitudinal view of the
cylinder.
The tracks are drawn at the end of event, and erased at the end of run.
Optionaly one can choose to draw all particles, only the charged one,
or none. This command is defined in EventActionMessenger class.
\section TestEm2_s5 PHYSICS DEMO
The particle's type and the physic processes which will be available
in this example are set in PhysicsList class.
In addition a build-in interactive command (/process/inactivate proname)
allows to activate/inactivate the processes one by one.
The threshold for producing secondaries can be changed.
eg:
\verbatim
/testem/phys/setCuts 100 microm
/run/initialize
\endverbatim
The shower profiles are histogramed, if histograming is activated.
They can be also printed with the command /testem/run/verbose 1
\section TestEm2_s6 HOW TO START ?
- Execute TestEm2 in 'batch' mode from macro files
\verbatim
% TestEm2 run01.mac
\endverbatim
- Execute TestEm2 in 'interactive mode' with visualization
\verbatim
% TestEm2
....
Idle> type your commands
....
Idle> exit
\endverbatim
\section TestEm2_s7 HISTOGRAMS
TestEm2 produces several histograms:
Content of these histo:
- 1 : energy deposit per event
- 2 : charged track length per event
- 3 : neutral track length per event
- 4 : longitudinal energy profile
- 5 : rms of longitudinal energy profile
- 6 : cumulated longitudinal energy profile
- 7 : rms of cumulated longitudinal energy profile
- 8 : radial energy profile
- 9 : rms of radial energy profile
- 10 : cumulated radial energy profile
- 11 : rms of cumulated radial energy profile
To define the output file name with histograms, use the UI command :
\verbatim
/testem/histo/setFileName name
\endverbatim
The format of the histogram file can be : root (default),
hbook, xml, csv, by selecting g4nnn.hh in RunAction.hh
\subsection TestEm2_subs2 Using hbook format
Need a special treatement : the Cern Library must be installed and the
environment variable CERNLIB correctly set. Then, *before* compiling,
activate G4_USE_HBOOK in GNUmakefile and g4hbook.hh in RunAction.hh
*/
@@ -1,10 +1,58 @@
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(TestEm2)
find_package(Geant4 REQUIRED)
#----------------------------------------------------------------------------
# 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})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${Geant4_INCLUDE_DIR})
file(GLOB sources ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc)
#----------------------------------------------------------------------------
# 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(TestEm2 TestEm2.cc ${sources} ${headers})
target_link_libraries(TestEm2 ${Geant4_LIBRARIES} )
#----------------------------------------------------------------------------
# Copy all scripts to the build directory, i.e. the directory in which we
# build TestEm2. This is so that we can run the executable directly because it
# relies on these scripts being in the current working directory.
#
set(TestEm2_SCRIPTS
egs4.mac run01.mac run02.mac run03.mac TestEm2.in TestEm2.out vis.mac
)
foreach(_script ${TestEm2_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 TestEm2 DESTINATION bin)
add_executable(TestEm2 EXCLUDE_FROM_ALL TestEm2.cc ${sources})
target_link_libraries(TestEm2 ${Geant4_LIBRARIES})
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.23 2008-06-10 09:33:05 maire Exp $
# $Id: GNUmakefile,v 1.15 2008-06-11 22:15:20 maire Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -12,9 +12,10 @@ ifndef G4INSTALL
endif
.PHONY: all
all: lib bin
all: hbook lib bin
#### G4ANALYSIS_USE := true
#### G4_USE_HBOOK := true
include GNUmakefile.tools_hbook
include $(G4INSTALL)/config/architecture.gmk
@@ -22,7 +23,7 @@ include $(G4INSTALL)/config/binmake.gmk
histclean:
rm -f $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(G4TARGET)/RunAction.o
visclean:
rm -f g4*.prim g4*.eps g4*.wrl
rm -f .DAWN_*
@@ -0,0 +1,48 @@
# $Id$
# --------------------------------------------------------------
# GNUmakefile for ing4 HBOOK support.
# --------------------------------------------------------------
ifdef G4_USE_HBOOK
include $(G4INSTALL)/config/architecture.gmk
CPPFLAGS += -DG4_USE_HBOOK
EXTRALIBS += $(G4TMPDIR)/exe/close.o $(G4TMPDIR)/exe/setpawc.o $(G4TMPDIR)/exe/setntuc.o
EXTRALIBS += -L${CERNLIB}/lib -lpacklib -lmathlib -lgfortran -lcrypt
#FC=gfortran
hbook: close.o setpawc.o setntuc.o
(mv *.o $(G4TMPDIR)/exe);
close.o : $(G4BASE)/analysis/include/tools/hbook/close.f
@echo Compiling close.f
ifdef CPPVERBOSE
$(FC) -c $(G4BASE)/analysis/include/tools/hbook/close.f
else
@$(FC) -c $(G4BASE)/analysis/include/tools/hbook/close.f
endif
setpawc.o : $(G4BASE)/analysis/include/tools/hbook/setpawc.f
@echo Compiling setpawc.f
ifdef CPPVERBOSE
$(FC) -c $(G4BASE)/analysis/include/tools/hbook/setpawc.f
else
@$(FC) -c $(G4BASE)/analysis/include/tools/hbook/setpawc.f
endif
setntuc.o : $(G4BASE)/analysis/include/tools/hbook/setntuc.f
@echo Compiling setntuc.f
ifdef CPPVERBOSE
$(FC) -c $(G4BASE)/analysis/include/tools/hbook/setntuc.f
else
@$(FC) -c $(G4BASE)/analysis/include/tools/hbook/setntuc.f
endif
else
hbook:
endif
@@ -15,6 +15,30 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
19-10-12 mma (testem2-V09-05-05)
- PhysListEmStandard: use G4UrbanMsc96
12-10-12 V.Ivant (testem2-V09-05-04)
- Added statistics on number of charged and neutral steps
- Migration to the updated analysis tool and implicit units
10-10-12 mma (testem2-V09-05-03)
- add Em physics option4
- coding conventions: virtual
27-08-12 mma (testem2-V09-05-02)
- add .README
07-04-12 mma (testem2-V09-05-01)
- all classes : apply G4 coding conventions
02-03-12 mma (testem2-V09-05-00)
- HistoManager.hh and .cc : migrate to new g4tools histogramming system
Do not need aida anymore, nor G4ANALYSIS_USE
- HistoMessenger.hh and .cc : suppress fileType command
- Update Readme and all macros accordingly
- remove unused macros
08-11-11 mma (testem2-V09-04-07)
- modify SteppingVerbose for OutOfWorld
@@ -1,78 +0,0 @@
$Id: InstallAida.txt,v 1.2 2008-09-13 12:16:18 maire Exp $
-----------------------------------------------------------
--------------
Install AIDA
--------------
To use histograms, at least one of the AIDA implementations should be
available.
You can use various file formats to write histograms (hbook, root, AIDA-XML).
1 - OpenScientist (lal/in2p3)
-------------------------
OpenScientist is available at http://OpenScientist.lal.in2p3.fr.
OpenScientist_batch is a small package ( ~ 6MB), easy to install.
It provides an AIDA interface to write files in ROOT or PAW format.
Download and gunzip (for Linux system) :
http://openscientist.lal.in2p3.fr/download/16.3/osc_batch-v16r3-Linux-i386-gcc_323.zip
(or more recent version, or Windows or Mac system)
Installation:
prompt%> cd osc_batch/v16r3 (or more recent version)
prompt%> ./install
prompt%> source aida-setup.csh
(on Windows : dos%> call <<OpenScientist install path>/aida-setup.bat)
2 - RAIDA (desy)
------------
It is a ROOT based AIDA interface. It can be downloaded from
http://ilcsoft.desy.de/portal/software_packages/raida/index_eng.html
3 - iAIDA
-----
Another package including AIDA is the iAIDA package: http://iaida.dynalias.net
(an evolution of the former PI project http://cern.ch/pi)
Once you have installed iAIDA in a specified local area $MYIAIDA, it is
required to add the installation path to $PATH, i.e. for example, for
release 1.0.11 of iAIDA:
setenv PATH ${PATH}:$MYIAIDA/bin
Before running the example the command should be issued:
eval `aida-config --runtime csh`
4 - JAIDA (slac)
------------
JAIDA is an implementation of AIDA in Java. To use it, one needs Java
as well as AIDAJNI, a connector between AIDA-C++ and AIDA-Java.
Available for: Linux-g++2, Linux-g++3, WIN32-VC, SUN-CC,
Darwin-g++2, Darwin-g++3
To compile and link with JAIDA using AIDAJNI, make sure you have:
1. JAIDA version 3.2.0, see http://java.freehep.org/jaida
2. set enviroment variable JAIDA_HOME to your JAIDA installation
3. source the aida-setup script $JAIDA_HOME/bin/aida-setup.[sh|csh|win32]
4. AIDAJNI version 3.0.4 or 3.2.0, or better: see http://java.freehep.org/aidajni
5. set environment variable AIDAJNI_HOME to your AIDAJNI installation
6. set environment variable JDK_HOME to your Java Standard Development Kit (1.4.x or up).
7. source the aidajni-setup script $AIDAJNI_HOME/bin/$G4SYSTEM/aidajni-setup.[sh|csh|win32]
now execute:
source setup-analysis (.csh, .sh, .win32)
gmake clean
gmake
@@ -97,14 +97,10 @@ $Id: README,v 1.28 2010-02-22 15:41:29 maire Exp $
6- HOW TO START ?
- compile and link to generate an executable
% cd TestEm2
% gmake
- execute TestEm2 in 'batch' mode from macro files
- Execute TestEm2 in 'batch' mode from macro files
% TestEm2 run01.mac
- execute TestEm2 in 'interactive mode' with visualization
- Execute TestEm2 in 'interactive mode' with visualization
% TestEm2
....
Idle> type your commands
@@ -131,22 +127,16 @@ $Id: README,v 1.28 2010-02-22 15:41:29 maire Exp $
10 : cumulated radial energy profile
11 : rms of cumulated radial energy profile
Note that, by default, histograms are disabled. To activate them, uncomment
the flag G4ANALYSIS_USE in GNUmakefile. To define the output file name with
histograms and the type of these file the following UI commands can be used:
To define the output file name with histograms, use the UI command :
"/testem/histo/setFileName name"
"/testem/histo/setFileType type"
The following types are available: "hbook", "root", "XML"
By default the name is "testem2" and the type "root".
The format of the histogram file can be : root (default),
hbook, xml, csv, by selecting g4nnn.hh in RunAction.hh
Before compilation of the example it is optimal to clean up old files:
gmake histclean
gmake
8- USING HISTOGRAMS
To use histograms, at least one of the AIDA implementations should be
available. See InstallAida.txt
Using hbook format
------------------
Need a special treatement : the Cern Library must be installed and the
environment variable CERNLIB correctly set. Then, *before* compiling,
activate G4_USE_HBOOK in GNUmakefile and g4hbook.hh in RunAction.hh
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm2/TestEm2.cc
/// \brief Main program of the electromagnetic/TestEm2 example
//
// $Id: TestEm2.cc,v 1.15 2010-05-18 21:32:33 maire Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -4,7 +4,7 @@
############################################
*************************************************************
Geant4 version Name: geant4-09-05-ref-00 (2-December-2011)
Geant4 version Name: geant4-09-06-ref-00 (30-November-2012)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
@@ -14,34 +14,94 @@
***** Table : Nb of materials = 9 *****
Material: Water density: 1.000 g/cm3 RadL: 36.092 cm Nucl.Int.Length: 75.537 cm Imean: 78.000 eV
---> Element: Hydrogen (H) Z = 1.0 N = 1.0 A = 1.01 g/mole ElmMassFraction: 11.21 % ElmAbundance 66.67 %
---> Element: Oxygen (O) Z = 8.0 N = 16.0 A = 16.00 g/mole ElmMassFraction: 88.79 % ElmAbundance 33.33 %
---> Element: Hydrogen (H) Z = 1.0 N = 1.0 A = 1.01 g/mole
---> Isotope: H1 Z = 1 N = 1 A = 1.01 g/mole abundance: 99.99 %
---> Isotope: H2 Z = 1 N = 2 A = 2.01 g/mole abundance: 0.01 %
ElmMassFraction: 11.21 % ElmAbundance 66.67 %
---> Element: Oxygen (O) Z = 8.0 N = 16.0 A = 16.00 g/mole
---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.76 %
---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.04 %
---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.20 %
ElmMassFraction: 88.79 % ElmAbundance 33.33 %
Material: liquidArgon density: 1.390 g/cm3 RadL: 14.065 cm Nucl.Int.Length: 86.006 cm Imean: 188.000 eV
---> Element: liquidArgon ( ) Z = 18.0 N = 40.0 A = 39.95 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
---> Element: liquidArgon ( ) Z = 18.0 N = 40.0 A = 39.95 g/mole
---> Isotope: 36 Z = 18 N = 36 A = 35.97 g/mole abundance: 0.34 %
---> Isotope: 38 Z = 18 N = 38 A = 37.96 g/mole abundance: 0.06 %
---> Isotope: 40 Z = 18 N = 40 A = 39.96 g/mole abundance: 99.60 %
ElmMassFraction: 100.00 % ElmAbundance 100.00 %
Material: Aluminium density: 2.700 g/cm3 RadL: 8.893 cm Nucl.Int.Length: 38.860 cm Imean: 166.000 eV
---> Element: Aluminium ( ) Z = 13.0 N = 27.0 A = 26.98 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
---> Element: Aluminium ( ) Z = 13.0 N = 27.0 A = 26.98 g/mole
---> Isotope: 27 Z = 13 N = 27 A = 26.98 g/mole abundance: 100.00 %
ElmMassFraction: 100.00 % ElmAbundance 100.00 %
Material: Iron density: 7.870 g/cm3 RadL: 1.759 cm Nucl.Int.Length: 16.969 cm Imean: 286.000 eV
---> Element: Iron ( ) Z = 26.0 N = 55.8 A = 55.85 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
---> Element: Iron ( ) Z = 26.0 N = 55.8 A = 55.85 g/mole
---> Isotope: 54 Z = 26 N = 54 A = 53.94 g/mole abundance: 5.84 %
---> Isotope: 56 Z = 26 N = 56 A = 55.93 g/mole abundance: 91.75 %
---> Isotope: 57 Z = 26 N = 57 A = 56.94 g/mole abundance: 2.12 %
---> Isotope: 58 Z = 26 N = 58 A = 57.93 g/mole abundance: 0.28 %
ElmMassFraction: 100.00 % ElmAbundance 100.00 %
Material: Copper density: 8.960 g/cm3 RadL: 1.436 cm Nucl.Int.Length: 15.515 cm Imean: 322.000 eV
---> Element: Copper ( ) Z = 29.0 N = 63.5 A = 63.55 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
---> Element: Copper ( ) Z = 29.0 N = 63.5 A = 63.55 g/mole
---> Isotope: 63 Z = 29 N = 63 A = 62.93 g/mole abundance: 69.17 %
---> Isotope: 65 Z = 29 N = 65 A = 64.93 g/mole abundance: 30.83 %
ElmMassFraction: 100.00 % ElmAbundance 100.00 %
Material: Tungsten density: 19.350 g/cm3 RadL: 3.495 mm Nucl.Int.Length: 10.279 cm Imean: 727.000 eV
---> Element: Tungsten ( ) Z = 74.0 N = 183.8 A = 183.84 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
---> Element: Tungsten ( ) Z = 74.0 N = 183.8 A = 183.84 g/mole
---> Isotope: 180 Z = 74 N = 180 A = 179.95 g/mole abundance: 0.12 %
---> Isotope: 182 Z = 74 N = 182 A = 181.95 g/mole abundance: 26.50 %
---> Isotope: 183 Z = 74 N = 183 A = 182.95 g/mole abundance: 14.31 %
---> Isotope: 184 Z = 74 N = 184 A = 183.95 g/mole abundance: 30.64 %
---> Isotope: 186 Z = 74 N = 186 A = 185.95 g/mole abundance: 28.43 %
ElmMassFraction: 100.00 % ElmAbundance 100.00 %
Material: Lead density: 11.350 g/cm3 RadL: 5.612 mm Nucl.Int.Length: 18.258 cm Imean: 823.000 eV
---> Element: Lead ( ) Z = 82.0 N = 207.2 A = 207.19 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
---> Element: Lead ( ) Z = 82.0 N = 207.2 A = 207.19 g/mole
---> Isotope: 204 Z = 82 N = 204 A = 203.97 g/mole abundance: 1.40 %
---> Isotope: 206 Z = 82 N = 206 A = 205.97 g/mole abundance: 24.10 %
---> Isotope: 207 Z = 82 N = 207 A = 206.98 g/mole abundance: 22.10 %
---> Isotope: 208 Z = 82 N = 208 A = 207.98 g/mole abundance: 52.40 %
ElmMassFraction: 100.00 % ElmAbundance 100.00 %
Material: Uranium density: 18.950 g/cm3 RadL: 3.166 mm Nucl.Int.Length: 11.447 cm Imean: 890.000 eV
---> Element: Uranium ( ) Z = 92.0 N = 238.0 A = 238.03 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
---> Element: Uranium ( ) Z = 92.0 N = 238.0 A = 238.03 g/mole
---> Isotope: 234 Z = 92 N = 234 A = 234.04 g/mole abundance: 0.01 %
---> Isotope: 235 Z = 92 N = 235 A = 235.04 g/mole abundance: 0.72 %
---> Isotope: 238 Z = 92 N = 238 A = 238.05 g/mole abundance: 99.27 %
ElmMassFraction: 100.00 % ElmAbundance 100.00 %
Material: BGO density: 7.100 g/cm3 RadL: 1.123 cm Nucl.Int.Length: 22.788 cm Imean: 473.785 eV
---> Element: Oxygen (O) Z = 8.0 N = 16.0 A = 16.00 g/mole ElmMassFraction: 15.41 % ElmAbundance 63.16 %
---> Element: Germanium (Ge) Z = 32.0 N = 72.6 A = 72.59 g/mole ElmMassFraction: 17.48 % ElmAbundance 15.79 %
---> Element: Bismuth (Bi) Z = 83.0 N = 209.0 A = 208.98 g/mole ElmMassFraction: 67.10 % ElmAbundance 21.05 %
---> Element: Oxygen (O) Z = 8.0 N = 16.0 A = 16.00 g/mole
---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.76 %
---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.04 %
---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.20 %
ElmMassFraction: 15.41 % ElmAbundance 63.16 %
---> Element: Germanium (Ge) Z = 32.0 N = 72.6 A = 72.59 g/mole
---> Isotope: Ge70 Z = 32 N = 70 A = 69.92 g/mole abundance: 20.84 %
---> Isotope: Ge72 Z = 32 N = 72 A = 71.92 g/mole abundance: 27.54 %
---> Isotope: Ge73 Z = 32 N = 73 A = 72.92 g/mole abundance: 7.73 %
---> Isotope: Ge74 Z = 32 N = 74 A = 73.92 g/mole abundance: 36.28 %
---> Isotope: Ge76 Z = 32 N = 76 A = 75.92 g/mole abundance: 7.61 %
ElmMassFraction: 17.48 % ElmAbundance 15.79 %
---> Element: Bismuth (Bi) Z = 83.0 N = 209.0 A = 208.98 g/mole
---> Isotope: Bi209 Z = 83 N = 209 A = 208.98 g/mole abundance: 100.00 %
ElmMassFraction: 67.10 % ElmAbundance 21.05 %
/run/verbose 1
@@ -56,20 +116,26 @@ PhysicsList::AddPhysicsList: <emstandard_opt0>
Absorber is 17.8491 cm of G4_PbWO4
Material: G4_PbWO4 density: 8.280 g/cm3 RadL: 8.925 mm Nucl.Int.Length: 20.741 cm Imean: 542.741 eV
---> Element: O (O) Z = 8.0 N = 16.0 A = 16.00 g/mole
---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.76 %
---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.04 %
---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.20 % ElmMassFraction: 14.06 % ElmAbundance 66.67 %
---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.76 %
---> Isotope: O17 Z = 8 N = 17 A = 17.00 g/mole abundance: 0.04 %
---> Isotope: O18 Z = 8 N = 18 A = 18.00 g/mole abundance: 0.20 %
ElmMassFraction: 14.06 % ElmAbundance 66.67 %
---> Element: Pb (Pb) Z = 82.0 N = 207.2 A = 207.22 g/mole
---> Isotope: Pb204 Z = 82 N = 204 A = 203.97 g/mole abundance: 1.40 %
---> Isotope: Pb206 Z = 82 N = 206 A = 205.97 g/mole abundance: 24.10 %
---> Isotope: Pb207 Z = 82 N = 207 A = 206.98 g/mole abundance: 22.10 %
---> Isotope: Pb208 Z = 82 N = 208 A = 207.98 g/mole abundance: 52.40 % ElmMassFraction: 45.54 % ElmAbundance 16.67 %
---> Isotope: Pb204 Z = 82 N = 204 A = 203.97 g/mole abundance: 1.40 %
---> Isotope: Pb206 Z = 82 N = 206 A = 205.97 g/mole abundance: 24.10 %
---> Isotope: Pb207 Z = 82 N = 207 A = 206.98 g/mole abundance: 22.10 %
---> Isotope: Pb208 Z = 82 N = 208 A = 207.98 g/mole abundance: 52.40 %
ElmMassFraction: 45.54 % ElmAbundance 16.67 %
---> Element: W (W) Z = 74.0 N = 183.9 A = 183.84 g/mole
---> Isotope: W180 Z = 74 N = 180 A = 179.95 g/mole abundance: 0.12 %
---> Isotope: W182 Z = 74 N = 182 A = 181.95 g/mole abundance: 26.50 %
---> Isotope: W183 Z = 74 N = 183 A = 182.95 g/mole abundance: 14.31 %
---> Isotope: W184 Z = 74 N = 184 A = 183.95 g/mole abundance: 30.64 %
---> Isotope: W186 Z = 74 N = 186 A = 185.95 g/mole abundance: 28.43 % ElmMassFraction: 40.40 % ElmAbundance 16.67 %
---> Isotope: W180 Z = 74 N = 180 A = 179.95 g/mole abundance: 0.12 %
---> Isotope: W182 Z = 74 N = 182 A = 181.95 g/mole abundance: 26.50 %
---> Isotope: W183 Z = 74 N = 183 A = 182.95 g/mole abundance: 14.31 %
---> Isotope: W184 Z = 74 N = 184 A = 183.95 g/mole abundance: 30.64 %
---> Isotope: W186 Z = 74 N = 186 A = 185.95 g/mole abundance: 28.43 %
ElmMassFraction: 40.40 % ElmAbundance 16.67 %
PhysicsList::SetCuts:CutLength : 1 mm
/process/eLoss/verbose 1
/gun/particle e-
@@ -78,24 +144,27 @@ PhysicsList::SetCuts:CutLength : 1 mm
/run/beamOn 100
phot: for gamma SubType= 12
LambdaPrime table from 200 keV to 10 TeV in 54 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
PhotoElectric : Emin= 0 eV Emax= 10 TeV FluoActive
PhotoElectric : Emin= 0 eV Emax= 10 TeV AngularGenSauterGavrila FluoActive
compt: for gamma SubType= 13
Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1
Lambda table from 100 eV to 1 MeV in 28 bins, spline: 1
LambdaPrime table from 1 MeV to 10 TeV in 49 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
Klein-Nishina : Emin= 0 eV Emax= 10 TeV
conv: for gamma SubType= 14
Lambda tables from 1.022 MeV to 10 TeV in 77 bins, spline: 1
Lambda table from 1.022 MeV to 10 TeV in 49 bins, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
BetheHeitler : Emin= 0 eV Emax= 10 TeV
BetheHeitler : Emin= 0 eV Emax= 80 GeV
BetheHeitlerLPM : Emin= 80 GeV Emax= 10 TeV
msc: for e- SubType= 10
Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1
RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 10 TeV
UrbanMsc95 : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 10 TeV Table with 35 bins Emin= 100 MeV Emax= 10 TeV
eIoni: for e- SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
@@ -109,8 +178,20 @@ eBrem: for e- SubType= 3
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
LPM flag: 1 for E > 1 GeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV AngularGenUrban
eBremLPM : Emin= 1 GeV Emax= 10 TeV AngularGenUrban
eBremSB : Emin= 0 eV Emax= 1 GeV DipBustGen
eBremLPM : Emin= 1 GeV Emax= 10 TeV DipBustGen
CoulombScat: for e- SubType= 1
Lambda table from 100 MeV to 10 TeV in 35 bins, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 100 MeV Emax= 10 TeV
msc: for e+ SubType= 10
RangeFactor= 0.04, stepLimitType: 1, latDisplacement: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 100 MeV Table with 42 bins Emin= 100 eV Emax= 100 MeV
WentzelVIUni : Emin= 100 MeV Emax= 10 TeV Table with 35 bins Emin= 100 MeV Emax= 10 TeV
eIoni: for e+ SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
@@ -124,18 +205,23 @@ eBrem: for e+ SubType= 3
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
LPM flag: 1 for E > 1 GeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV AngularGenUrban
eBremLPM : Emin= 1 GeV Emax= 10 TeV AngularGenUrban
eBremSB : Emin= 0 eV Emax= 1 GeV DipBustGen
eBremLPM : Emin= 1 GeV Emax= 10 TeV DipBustGen
annihil: for e+ SubType= 5
===== EM models for the G4Region DefaultRegionForTheWorld ======
eplus2gg : Emin= 0 eV Emax= 10 TeV
msc: for proton SubType= 10
Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1
CoulombScat: for e+ SubType= 1
Lambda table from 100 MeV to 10 TeV in 35 bins, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc90 : Emin= 0 eV Emax= 10 TeV
eCoulombScattering : Emin= 100 MeV Emax= 10 TeV
msc: for proton 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= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
hIoni: for proton SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
@@ -160,7 +246,7 @@ hPairProd: for proton SubType= 4
msc: for GenericIon SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc90 : Emin= 0 eV Emax= 10 TeV
UrbanMsc95 : Emin= 0 eV Emax= 10 TeV
ionIoni: for GenericIon SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
@@ -171,6 +257,24 @@ ionIoni: for GenericIon SubType= 2
BraggIon : Emin= 0 eV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 10 TeV
msc: for alpha SubType= 10
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc95 : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
ionIoni: for alpha SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
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
BetheBloch : Emin= 7.9452 MeV Emax= 10 TeV
msc: for anti_proton 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= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
hIoni: for anti_proton SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
@@ -179,11 +283,22 @@ hIoni: for anti_proton SubType= 2
ICRU73QO : Emin= 0 eV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 10 TeV
msc: for kaon+ SubType= 10
Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1
hBrems: for anti_proton SubType= 3
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc90 : Emin= 0 eV Emax= 10 TeV
hBrem : Emin= 0 eV Emax= 10 TeV
hPairProd: for anti_proton SubType= 4
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
msc: for kaon+ 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= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
hIoni: for kaon+ SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
@@ -205,6 +320,11 @@ hPairProd: for kaon+ SubType= 4
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
msc: for kaon- 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= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
hIoni: for kaon- SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
@@ -225,11 +345,10 @@ hPairProd: for kaon- SubType= 4
===== EM models for the G4Region DefaultRegionForTheWorld ======
hPairProd : Emin= 0 eV Emax= 10 TeV
muMsc: for mu+ SubType= 10
Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1
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= 10 TeV
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
muIoni: for mu+ SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
@@ -253,11 +372,16 @@ muPairProd: for mu+ SubType= 4
muPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for mu+ SubType= 1
Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1
180 < Theta(degree) < 180; pLimit(GeV^1)= 0.139531
Lambda table from 100 eV to 10 TeV in 44 bins, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 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= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
muIoni: for mu- SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
@@ -280,11 +404,16 @@ muPairProd: for mu- SubType= 4
muPairProd : Emin= 0 eV Emax= 10 TeV
CoulombScat: for mu- SubType= 1
Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1
180 < Theta(degree) < 180; pLimit(GeV^1)= 0.139531
Lambda table from 100 eV to 10 TeV in 44 bins, spline: 1
180 < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
===== EM models for the G4Region DefaultRegionForTheWorld ======
eCoulombScattering : Emin= 0 eV Emax= 10 TeV
msc: for pi+ 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= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
hIoni: for pi+ SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
Lambda tables from threshold to 10 TeV in 77 bins, spline: 1
@@ -306,10 +435,9 @@ hPairProd: for pi+ SubType= 4
hPairProd : Emin= 0 eV Emax= 10 TeV
msc: for pi- SubType= 10
Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1
RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1
RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc90 : Emin= 0 eV Emax= 10 TeV
WentzelVIUni : Emin= 0 eV Emax= 10 TeV Table with 77 bins Emin= 100 eV Emax= 10 TeV
hIoni: for pi- SubType= 2
dE/dx and range tables from 100 eV to 10 TeV in 77 bins
@@ -348,6 +476,8 @@ Index : 0 used in the geometry : Yes recalculation needed : No
Initial seed (index) = 0
Current couple of seeds = 9876, 54321
----------------------------------------
----> Histogram file is opened in testem2.root
Start Run processing.
---> Begin of Event: 0
@@ -362,25 +492,31 @@ Start Run processing.
Run terminated.
Run Summary
Number of events processed : 100
User=4.82s Real=4.84s Sys=0.01s
User=5.03s Real=5.07s Sys=0s
SUMMARY
energy deposit : 95.00 % E0 +- 1.11 % E0
charged traklen: 482.36 radl +- 6.09 radl
neutral traklen: 4209.41 radl +- 134.48 radl
90.00 % confinement: radius = 2.90 radl (2.59 cm )
Mean number of charged steps: 7289.47
Mean number of neutral steps: 3921.76
energy deposit : 95.05 % E0 +- 0.85 % E0
charged traklen: 482.44 radl +- 4.72 radl
neutral traklen: 4222.91 radl +- 117.12 radl
90.00 % confinement: radius = 2.92 radl (2.61 cm )
... write Root file : testem2.root - done
... close Root file : testem2.root - done
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 482174111, 1823525018
Current couple of seeds = 1918418437, 255561390
----------------------------------------
<<<<ACCEPTANCE>>>> 100 events for Total Energy in Absorber
Edep: 0.949979 delEdep= 0.000978607 nrms= 1.19342
Erms: 0.0110614 delErms= 0.00286143 nrms= 3.48954
Edep: 0.950513 delEdep= 0.00151344 nrms= 1.84565
Erms: 0.0084966 delErms= 0.000296596 nrms= 0.361703
<<<<END>>>> IS ACCEPTED
G4 kernel has come to Quit state.
@@ -20,7 +20,6 @@
#
# histogram file
/testem/histo/setFileName egs4/93ref0
/testem/histo/setFileType root
#
/run/initialize
#
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: DetectorConstruction.hh,v 1.9 2006-06-29 16:49:29 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/include/DetectorConstruction.hh
/// \brief Definition of the DetectorConstruction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -61,44 +63,44 @@ class DetectorConstruction : public G4VUserDetectorConstruction
void SetRBining (G4ThreeVector);
void SetMagField(G4double);
G4VPhysicalVolume* Construct();
virtual G4VPhysicalVolume* Construct();
void UpdateGeometry();
const
G4VPhysicalVolume* GetEcal() {return physiEcal;};
G4Material* GetMaterial() {return myMaterial;};
G4VPhysicalVolume* GetEcal() {return fPhysiEcal;};
G4Material* GetMaterial() {return fMaterial;};
// Subdivision of absorber
G4int GetnLtot() {return nLtot;};
G4int GetnRtot() {return nRtot;};
G4double GetdLradl() {return dLradl;};
G4double GetdRradl() {return dRradl;};
G4double GetdLlength() {return dLlength;};
G4double GetdRlength() {return dRlength;};
G4double GetfullLength() {return EcalLength;};
G4double GetfullRadius() {return EcalRadius;};
G4int GetnLtot() {return fNLtot;};
G4int GetnRtot() {return fNRtot;};
G4double GetdLradl() {return fDLradl;};
G4double GetdRradl() {return fDRradl;};
G4double GetdLlength() {return fDLlength;};
G4double GetdRlength() {return fDRlength;};
G4double GetfullLength() {return fEcalLength;};
G4double GetfullRadius() {return fEcalRadius;};
private:
void DefineMaterials();
G4VPhysicalVolume* ConstructVolumes();
G4int nLtot, nRtot; // nb of bins: longitudinal and radial
G4double dLradl, dRradl; // bin thickness (in radl unit)
G4double dLlength, dRlength; // bin thickness (in length unit)
G4int fNLtot, fNRtot; // nb of bins: longitudinal and radial
G4double fDLradl, fDRradl; // bin thickness (in radl unit)
G4double fDLlength, fDRlength; // bin thickness (in length unit)
G4Material* myMaterial; //pointer to the material
G4UniformMagField* magField; //pointer to the mag field
G4Material* fMaterial; //pointer to the material
G4UniformMagField* fMagField; //pointer to the mag field
G4double EcalLength; //full length of the Calorimeter
G4double EcalRadius; //radius of the Calorimeter
G4double fEcalLength; //full length of the Calorimeter
G4double fEcalRadius; //radius of the Calorimeter
G4Tubs* solidEcal; //pointer to the solid calorimeter
G4LogicalVolume* logicEcal; //pointer to the logical calorimeter
G4VPhysicalVolume* physiEcal; //pointer to the physical calorimeter
G4Tubs* fSolidEcal; //pointer to the solid calorimeter
G4LogicalVolume* fLogicEcal; //pointer to the logical calorimeter
G4VPhysicalVolume* fPhysiEcal; //pointer to the physical calorimeter
DetectorMessenger* detectorMessenger; //pointer to the Messenger
DetectorMessenger* fDetectorMessenger; //pointer to the Messenger
};
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: DetectorMessenger.hh,v 1.6 2006-06-29 16:49:32 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/include/DetectorMessenger.hh
/// \brief Definition of the DetectorMessenger class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -50,18 +52,18 @@ public:
DetectorMessenger(DetectorConstruction* );
~DetectorMessenger();
void SetNewValue(G4UIcommand*, G4String);
virtual void SetNewValue(G4UIcommand*, G4String);
private:
DetectorConstruction* Detector;
DetectorConstruction* fDetector;
G4UIdirectory* testemDir;
G4UIdirectory* detDir;
G4UIcmdWithAString* MaterCmd;
G4UIcmdWith3Vector* LBinCmd;
G4UIcmdWith3Vector* RBinCmd;
G4UIcmdWithADoubleAndUnit* FieldCmd;
G4UIcmdWithoutParameter* UpdateCmd;
G4UIdirectory* fTestemDir;
G4UIdirectory* fDetDir;
G4UIcmdWithAString* fMaterCmd;
G4UIcmdWith3Vector* fLBinCmd;
G4UIcmdWith3Vector* fRBinCmd;
G4UIcmdWithADoubleAndUnit* fFieldCmd;
G4UIcmdWithoutParameter* fUpdateCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: EmAcceptance.hh,v 1.3 2006-06-29 16:49:35 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/include/EmAcceptance.hh
/// \brief Definition of the EmAcceptance class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -48,10 +50,10 @@ class EmAcceptance
void EmAcceptanceGauss(const G4String& title, G4int stat,
G4double avr, G4double avr0,
G4double rms, G4double limit);
G4double rms, G4double limit);
private:
G4bool isAccepted;
G4bool fIsAccepted;
};
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: EventAction.hh,v 1.3 2006-06-29 16:49:38 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/include/EventAction.hh
/// \brief Definition of the EventAction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -49,18 +51,18 @@ class EventAction : public G4UserEventAction
EventAction(RunAction*);
~EventAction();
void BeginOfEventAction(const G4Event*);
void EndOfEventAction(const G4Event*);
virtual void BeginOfEventAction(const G4Event*);
virtual void EndOfEventAction(const G4Event*);
void SetDrawFlag (G4String val) {drawFlag = val;};
void SetPrintModulo(G4int val) {printModulo = val;};
void SetDrawFlag (G4String val) {fDrawFlag = val;};
void SetPrintModulo(G4int val) {fPrintModulo = val;};
private:
RunAction* Run;
G4String drawFlag;
G4int printModulo;
EventActionMessenger* eventMessenger;
RunAction* fRun;
G4String fDrawFlag;
G4int fPrintModulo;
EventActionMessenger* fEventMessenger;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: EventActionMessenger.hh,v 1.3 2006-06-29 16:49:41 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/include/EventActionMessenger.hh
/// \brief Definition of the EventActionMessenger class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -48,14 +50,14 @@ class EventActionMessenger: public G4UImessenger
EventActionMessenger(EventAction*);
~EventActionMessenger();
void SetNewValue(G4UIcommand*, G4String);
virtual void SetNewValue(G4UIcommand*, G4String);
private:
EventAction* eventAction;
EventAction* fEventAction;
G4UIdirectory* eventDir;
G4UIcmdWithAString* DrawCmd;
G4UIcmdWithAnInteger* PrintCmd;
G4UIdirectory* fEventDir;
G4UIcmdWithAString* fDrawCmd;
G4UIcmdWithAnInteger* fPrintCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,185 @@
//
// ********************************************************************
// * 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 electromagnetic/TestEm2/include/ExG4HbookAnalysisManager.hh
/// \brief Definition of the ExG4HbookAnalysisManager class
//
// $Id$
//
/// \file ExG4HbookAnalysisManager.hh
/// \brief Definition of the ExG4HbookAnalysisManager class
// Author: Ivana Hrivnacova, 15/06/2011 (ivana@ipno.in2p3.fr)
#ifdef G4_USE_HBOOK
#ifndef ExG4HbookAnalysisManager_h
#define ExG4HbookAnalysisManager_h 1
#include "G4VAnalysisManager.hh"
#include "globals.hh"
#include <tools/hbook/wfile>
#include <tools/hbook/h1>
#include <tools/hbook/h2>
#include <tools/hbook/wntuple>
#include <vector>
#include <map>
#define setpawc setpawc_
#define setntuc setntuc_
//#define ntuc ntuc_
class ExG4HbookAnalysisManager;
namespace G4Hbook {
typedef tools::hbook::h1 G4AnaH1;
typedef ExG4HbookAnalysisManager G4AnalysisManager;
}
/// HBook Analysis manager
///
/// The class implements the G4VAnalysisManager manager for HBook.
/// It is provided separately from geant4/source/analysis in order
/// to avoid a need of linking Geant4 kernel libraries with cerblib.
class ExG4HbookAnalysisManager : public G4VAnalysisManager
{
public:
ExG4HbookAnalysisManager();
virtual ~ExG4HbookAnalysisManager();
// static methods
static ExG4HbookAnalysisManager* Instance();
// Methods to manipulate files
virtual G4bool OpenFile(const G4String& fileName);
virtual G4bool Write();
virtual G4bool CloseFile();
// Methods to create histogrammes, ntuples
virtual G4int CreateH1(const G4String& name, const G4String& title,
G4int nbins, G4double xmin, G4double xmax);
virtual G4int CreateH2(const G4String& name, const G4String& title,
G4int nxbins, G4double xmin, G4double xmax,
G4int nybins, G4double ymin, G4double ymax);
virtual void CreateNtuple(const G4String& name, const G4String& title);
virtual G4int CreateNtupleIColumn(const G4String& name);
virtual G4int CreateNtupleFColumn(const G4String& name);
virtual G4int CreateNtupleDColumn(const G4String& name);
virtual void FinishNtuple();
// Methods to fill histogrammes, ntuples
virtual G4bool FillH1(G4int id, G4double value, G4double weight = 1.0);
virtual G4bool FillH2(G4int id, G4double xvalue, G4double yvalue,
G4double weight = 1.0);
virtual G4bool FillNtupleIColumn(G4int id, G4int value);
virtual G4bool FillNtupleFColumn(G4int id, G4float value);
virtual G4bool FillNtupleDColumn(G4int id, G4double value);
virtual G4bool AddNtupleRow();
// Access methods
virtual tools::hbook::h1* GetH1(G4int id, G4bool warn = true) const;
virtual tools::hbook::h2* GetH2(G4int id, G4bool warn = true) const;
virtual tools::hbook::wntuple* GetNtuple() const;
//tools::hbook::h1* GetH1(const G4String& name, G4bool warn = true) const;
// HBOOK does not allow IDs the same IDs for H1 and H2,
// and also IDs starting from 0; thats why there is defined an offset
// with respect to the G4AnalysisManager generic Ids.
// The default values of these offsets can be changed by the user.
//
// Set the offset of HBOOK ID for H1
// ( default value = firstHistoID if firstHistoID > 0; otherwise = 1)
G4bool SetH1HbookIdOffset(G4int offset);
//
// Set the offset of HBOOK ID for H2
// ( default value = firstHistoID + 100 if firstHistoID > 0; otherwise = 101 )
G4bool SetH2HbookIdOffset(G4int offset);
//
// Set the HBOOK ID for the ntuple
// (default value = 1 )
G4bool SetNtupleHbookId(G4int ntupleId);
G4int GetH1HbookIdOffset() const;
G4int GetH2HbookIdOffset() const;
G4int GetNtupleHbookId() const;
private:
// static data members
//
static ExG4HbookAnalysisManager* fgInstance;
static const G4int fgkDefaultH2HbookIdOffset;
static const G4int fgkDefaultNtupleHbookId;
static const G4String fgkDefaultNtupleDirectoryName;
// methods
//
tools::hbook::wntuple::column<int>* GetNtupleIColumn(G4int id) const;
tools::hbook::wntuple::column<float>* GetNtupleFColumn(G4int id) const;
tools::hbook::wntuple::column<double>* GetNtupleDColumn(G4int id) const;
// data members
//
G4int fH1HbookIdOffset;
G4int fH2HbookIdOffset;
G4int fNtupleHbookId;
tools::hbook::wfile* fFile;
std::vector<tools::hbook::h1*> fH1Vector;
std::map<G4String, tools::hbook::h1*> fH1MapByName;
std::vector<tools::hbook::h2*> fH2Vector;
std::map<G4String, tools::hbook::h2*> fH2MapByName;
G4String fNtupleName;
G4String fNtupleTitle;
tools::hbook::wntuple* fNtuple;
std::map<G4int, tools::hbook::wntuple::column<int>* > fNtupleIColumnMap;
std::map<G4int, tools::hbook::wntuple::column<float>* > fNtupleFColumnMap;
std::map<G4int, tools::hbook::wntuple::column<double>* > fNtupleDColumnMap;
};
// inline functions
inline G4int ExG4HbookAnalysisManager::GetH1HbookIdOffset() const {
return fH1HbookIdOffset;
}
inline G4int ExG4HbookAnalysisManager::GetH2HbookIdOffset() const {
return fH2HbookIdOffset;
}
inline G4int ExG4HbookAnalysisManager::GetNtupleHbookId() const {
return fNtupleHbookId;
}
#endif
#endif
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm2/include/PhysListEmStandard.hh
/// \brief Definition of the PhysListEmStandard class
//
// $Id: PhysListEmStandard.hh,v 1.4 2006-06-29 16:49:50 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -46,12 +48,12 @@ class PhysListEmStandard : public G4VPhysicsConstructor
public:
// This method is dummy for physics
void ConstructParticle() {};
virtual void ConstructParticle() {};
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
void ConstructProcess();
virtual void ConstructProcess();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm2/include/PhysicsList.hh
/// \brief Definition of the PhysicsList class
//
// $Id: PhysicsList.hh,v 1.8 2006-06-29 16:49:52 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
@@ -50,28 +52,28 @@ class PhysicsList: public G4VModularPhysicsList
PhysicsList();
~PhysicsList();
void ConstructParticle();
virtual void ConstructParticle();
void SetCuts();
virtual void SetCuts();
void SetCutForGamma(G4double);
void SetCutForElectron(G4double);
void SetCutForPositron(G4double);
void AddPhysicsList(const G4String& name);
void ConstructProcess();
virtual void ConstructProcess();
void AddDecay();
void AddStepMax();
private:
G4double cutForGamma;
G4double cutForElectron;
G4double cutForPositron;
G4double fCutForGamma;
G4double fCutForElectron;
G4double fCutForPositron;
G4String emName;
G4VPhysicsConstructor* emPhysicsList;
G4String fEmName;
G4VPhysicsConstructor* fEmPhysicsList;
PhysicsListMessenger* pMessenger;
PhysicsListMessenger* fMessenger;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PhysicsListMessenger.hh,v 1.5 2006-06-29 16:49:55 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/include/PhysicsListMessenger.hh
/// \brief Definition of the PhysicsListMessenger class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -49,18 +51,18 @@ class PhysicsListMessenger: public G4UImessenger
PhysicsListMessenger(PhysicsList* );
~PhysicsListMessenger();
void SetNewValue(G4UIcommand*, G4String);
virtual void SetNewValue(G4UIcommand*, G4String);
private:
PhysicsList* pPhysicsList;
PhysicsList* fPhysicsList;
G4UIdirectory* physDir;
G4UIcmdWithADoubleAndUnit* gammaCutCmd;
G4UIcmdWithADoubleAndUnit* electCutCmd;
G4UIcmdWithADoubleAndUnit* protoCutCmd;
G4UIcmdWithADoubleAndUnit* allCutCmd;
G4UIcmdWithAString* pListCmd;
G4UIdirectory* fPhysDir;
G4UIcmdWithADoubleAndUnit* fGammaCutCmd;
G4UIcmdWithADoubleAndUnit* fElectCutCmd;
G4UIcmdWithADoubleAndUnit* fProtoCutCmd;
G4UIcmdWithADoubleAndUnit* fAllCutCmd;
G4UIcmdWithAString* fListCmd;
};
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PrimaryGeneratorAction.hh,v 1.5 2006-06-29 16:49:57 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/include/PrimaryGeneratorAction.hh
/// \brief Definition of the PrimaryGeneratorAction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -48,14 +50,14 @@ class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
~PrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event*);
G4ParticleGun* GetParticleGun() {return particleGun;};
virtual void GeneratePrimaries(G4Event*);
G4ParticleGun* GetParticleGun() {return fParticleGun;};
private:
G4ParticleGun* particleGun;
DetectorConstruction* detector;
G4ParticleGun* fParticleGun;
DetectorConstruction* fDetector;
G4ThreeVector initPos;
G4ThreeVector fInitPos;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: RunAction.hh,v 1.10 2010-02-22 15:41:29 maire Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/include/RunAction.hh
/// \brief Definition of the RunAction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -38,8 +40,11 @@
#include "G4ThreeVector.hh"
#include "globals.hh"
#include <vector>
#include "g4root.hh"
////#include "g4xml.hh"
////#include "g4hbook.hh"
#include <vector>
typedef std::vector<G4double> MyVector;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -50,12 +55,6 @@ class RunActionMessenger;
class G4Run;
namespace AIDA {
class IAnalysisFactory;
class ITree;
class IHistogram1D;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class RunAction : public G4UserRunAction
@@ -65,110 +64,97 @@ class RunAction : public G4UserRunAction
RunAction(DetectorConstruction*, PrimaryGeneratorAction*);
~RunAction();
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run*);
virtual void BeginOfRunAction(const G4Run*);
virtual void EndOfRunAction(const G4Run*);
inline void initializePerEvent();
void fillPerEvent();
inline void fillPerTrack(G4double,G4double);
inline void fillPerStep (G4double,G4int,G4int);
void InitializePerEvent();
void FillPerEvent();
inline void FillPerTrack(G4double,G4double);
inline void FillPerStep (G4double,G4int,G4int);
inline void AddStep (G4double q);
void SetVerbose(G4int val) {verbose = val;};
void SetVerbose(G4int val) {fVerbose = val;};
// Acceptance parameters
void SetEdepAndRMS(G4ThreeVector);
G4double GetAverageEdep() const {return edeptrue;};
G4double GetRMSEdep() const {return rmstrue;};
G4double GetLimitEdep() const {return limittrue;};
G4double GetAverageEdep() const {return fEdeptrue;};
G4double GetRMSEdep() const {return fRmstrue;};
G4double GetLimitEdep() const {return fLimittrue;};
// Histogram name and type
void SetHistoName(G4String& val) {histoName[0] = val;};
void SetHistoType(G4String& val) {histoType = val;};
void SetHistoName(G4String& val) {fHistoName[0] = val;};
const G4String& GetHistoName() const {return histoName[1];};
const G4String& GetHistoType() const {return histoType;};
const G4String& GetHistoName() const {return fHistoName[1];};
private:
void bookHisto();
void cleanHisto();
void BookHisto();
void CleanHisto();
private:
DetectorConstruction* Det;
PrimaryGeneratorAction* Kin;
RunActionMessenger* runMessenger;
DetectorConstruction* fDet;
PrimaryGeneratorAction* fKin;
RunActionMessenger* fRunMessenger;
G4int nLbin;
MyVector dEdL;
MyVector sumELongit;
MyVector sumE2Longit;
MyVector sumELongitCumul;
MyVector sumE2LongitCumul;
G4int f_nLbin;
MyVector f_dEdL;
MyVector fSumELongit;
MyVector fSumE2Longit;
MyVector fSumELongitCumul;
MyVector fSumE2LongitCumul;
G4int nRbin;
MyVector dEdR;
MyVector sumERadial;
MyVector sumE2Radial;
MyVector sumERadialCumul;
MyVector sumE2RadialCumul;
G4int f_nRbin;
MyVector f_dEdR;
MyVector fSumERadial;
MyVector fSumE2Radial;
MyVector fSumERadialCumul;
MyVector fSumE2RadialCumul;
G4double ChargTrLength;
G4double sumChargTrLength;
G4double sum2ChargTrLength;
G4double fChargTrLength;
G4double fSumChargTrLength;
G4double fSum2ChargTrLength;
G4double NeutrTrLength;
G4double sumNeutrTrLength;
G4double sum2NeutrTrLength;
G4double fNeutrTrLength;
G4double fSumNeutrTrLength;
G4double fSum2NeutrTrLength;
G4double edeptrue;
G4double rmstrue;
G4double limittrue;
G4double fEdeptrue;
G4double fRmstrue;
G4double fLimittrue;
G4double fChargedStep;
G4double fNeutralStep;
G4int verbose;
G4int fVerbose;
G4String histoName[2];
G4String histoType;
AIDA::IAnalysisFactory* af;
AIDA::ITree* tree;
AIDA::IHistogram1D* histo[11];
G4String fHistoName[2];
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void RunAction::initializePerEvent()
void RunAction::FillPerTrack(G4double charge, G4double trkLength)
{
//initialize arrays of energy deposit per bin
for (G4int i=0; i<nLbin; i++)
{ dEdL[i] = 0.; }
for (G4int j=0; j<nRbin; j++)
{ dEdR[j] = 0.; }
//initialize tracklength
ChargTrLength = NeutrTrLength = 0.;
if (charge != 0.) fChargTrLength += trkLength;
else fNeutrTrLength += trkLength;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void RunAction::fillPerTrack(G4double charge, G4double trkLength)
void RunAction::FillPerStep(G4double dEstep, G4int Lbin, G4int Rbin)
{
if (charge != 0.) ChargTrLength += trkLength;
else NeutrTrLength += trkLength;
f_dEdL[Lbin] += dEstep; f_dEdR[Rbin] += dEstep;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
void RunAction::fillPerStep(G4double dEstep, G4int Lbin, G4int Rbin)
inline void RunAction::AddStep(G4double q)
{
dEdL[Lbin] += dEstep; dEdR[Rbin] += dEstep;
if (q == 0.0) { fNeutralStep += 1.0; }
else { fChargedStep += 1.0; }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: RunActionMessenger.hh,v 1.4 2006-06-29 16:50:01 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/include/RunActionMessenger.hh
/// \brief Definition of the RunActionMessenger class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -49,18 +51,17 @@ class RunActionMessenger: public G4UImessenger
RunActionMessenger(RunAction*);
~RunActionMessenger();
void SetNewValue(G4UIcommand*, G4String);
virtual void SetNewValue(G4UIcommand*, G4String);
private:
RunAction* Run;
RunAction* fRun;
G4UIdirectory* runDir;
G4UIcmdWith3Vector* accCmd;
G4UIcmdWithAnInteger* verbCmd;
G4UIdirectory* fRunDir;
G4UIcmdWith3Vector* fAccCmd;
G4UIcmdWithAnInteger* fVerbCmd;
G4UIdirectory* histoDir;
G4UIdirectory* fHistoDir;
G4UIcmdWithAString* factoryCmd;
G4UIcmdWithAString* typeCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: StepMax.hh,v 1.2 2006-06-29 16:50:04 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/include/StepMax.hh
/// \brief Definition of the StepMax class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -48,26 +50,26 @@ class StepMax : public G4VDiscreteProcess
StepMax(const G4String& processName = "UserMaxStep");
~StepMax();
G4bool IsApplicable(const G4ParticleDefinition&);
virtual G4bool IsApplicable(const G4ParticleDefinition&);
void SetMaxStep(G4double);
G4double GetMaxStep() {return MaxChargedStep;};
G4double GetMaxStep() {return fMaxChargedStep;};
G4double PostStepGetPhysicalInteractionLength( const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition);
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition);
G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);
virtual G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);
G4double GetMeanFreePath(const G4Track&, G4double,G4ForceCondition*)
virtual G4double GetMeanFreePath(const G4Track&,G4double,G4ForceCondition*)
{return DBL_MAX;};
private:
G4double MaxChargedStep;
G4double fMaxChargedStep;
StepMaxMessenger* pMess;
StepMaxMessenger* fMess;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: StepMaxMessenger.hh,v 1.2 2006-06-29 16:50:07 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/include/StepMaxMessenger.hh
/// \brief Definition of the StepMaxMessenger class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -46,11 +48,11 @@ class StepMaxMessenger: public G4UImessenger
StepMaxMessenger(StepMax*);
~StepMaxMessenger();
void SetNewValue(G4UIcommand*, G4String);
virtual void SetNewValue(G4UIcommand*, G4String);
private:
StepMax* stepMax;
G4UIcmdWithADoubleAndUnit* StepMaxCmd;
StepMax* fStepMax;
G4UIcmdWithADoubleAndUnit* fStepMaxCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: SteppingAction.hh,v 1.4 2006-06-29 16:50:09 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/include/SteppingAction.hh
/// \brief Definition of the SteppingAction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -45,11 +47,11 @@ class SteppingAction : public G4UserSteppingAction
SteppingAction(DetectorConstruction*,RunAction*);
~SteppingAction();
void UserSteppingAction(const G4Step*);
virtual void UserSteppingAction(const G4Step*);
private:
DetectorConstruction* detector;
RunAction* Run;
DetectorConstruction* fDetector;
RunAction* fRun;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: SteppingVerbose.hh,v 1.3 2006-06-29 16:50:11 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/include/SteppingVerbose.hh
/// \brief Definition of the SteppingVerbose class
//
// $Id$
//
// This class manages the verbose outputs in G4SteppingManager.
// It inherits from G4SteppingVerbose.
@@ -47,8 +49,8 @@ class SteppingVerbose : public G4SteppingVerbose {
SteppingVerbose();
~SteppingVerbose();
void StepInfo();
void TrackingStarted();
virtual void StepInfo();
virtual void TrackingStarted();
};
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TrackingAction.hh,v 1.4 2006-06-29 16:50:14 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/include/TrackingAction.hh
/// \brief Definition of the TrackingAction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -44,10 +46,10 @@ class TrackingAction : public G4UserTrackingAction {
TrackingAction(RunAction*);
~TrackingAction() {};
void PostUserTrackingAction(const G4Track*);
virtual void PostUserTrackingAction(const G4Track*);
private:
RunAction* Run;
RunAction* fRun;
};
@@ -0,0 +1,42 @@
//
// ********************************************************************
// * 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 electromagnetic/TestEm2/include/g4hbook.hh
/// \brief Definition of the g4hbook class
//
// $Id$
// Author: Ivana Hrivnacova, 15/06/2011 (ivana@ipno.in2p3.fr)
#ifndef g4hbook_h
#define g4hbook_h
#include "g4hbook_defs.hh"
using namespace G4Hbook;
#endif
@@ -0,0 +1,51 @@
//
// ********************************************************************
// * 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 electromagnetic/TestEm2/include/g4hbook_defs.hh
/// \brief Definition of the g4hbook_defs class
//
// $Id$
// Author: Ivana Hrivnacova, 15/06/2011 (ivana@ipno.in2p3.fr)
#ifndef g4hbook_defs_h
#define g4hbook_defs_h
#include <tools/hbook/h1>
#include <tools/hbook/h2>
#include <tools/hbook/wntuple>
#include "ExG4HbookAnalysisManager.hh"
namespace G4Hbook {
typedef tools::hbook::h1 G4AnaH1;
typedef tools::hbook::h2 G4AnaH2;
typedef tools::hbook::wntuple G4Ntuple;
typedef ExG4HbookAnalysisManager G4AnalysisManager;
}
#endif
@@ -18,7 +18,6 @@
#
# histogram file
/testem/histo/setFileName run01
/testem/histo/setFileType root
#
/run/initialize
#
@@ -1,461 +0,0 @@
*************************************************************
Geant4 version Name: geant4-09-00-cand-05 (29-June-2007)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
*************************************************************
***** Table : Nb of materials = 10 *****
Material: Air density: 1.290 kg/m3 temperature: 273.15 K pressure: 1.00 atm RadLength: 285.161 m
---> Element: Nitrogen (N) Z = 7.0 N = 14.0 A = 14.01 g/mole ElmMassFraction: 70.00 % ElmAbundance 72.71 %
---> Element: Oxygen (O) Z = 8.0 N = 16.0 A = 16.00 g/mole ElmMassFraction: 30.00 % ElmAbundance 27.29 %
Material: Water density: 1.000 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 36.092 cm
---> Element: Hydrogen (H) Z = 1.0 N = 1.0 A = 1.01 g/mole ElmMassFraction: 11.21 % ElmAbundance 66.67 %
---> Element: Oxygen (O) Z = 8.0 N = 16.0 A = 16.00 g/mole ElmMassFraction: 88.79 % ElmAbundance 33.33 %
Material: liquidArgon density: 1.390 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 14.065 cm
---> Element: liquidArgon ( ) Z = 18.0 N = 40.0 A = 39.95 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
Material: Aluminium density: 2.700 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 8.893 cm
---> Element: Aluminium ( ) Z = 13.0 N = 27.0 A = 26.98 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
Material: Iron density: 7.870 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 1.759 cm
---> Element: Iron ( ) Z = 26.0 N = 55.9 A = 55.85 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
Material: Copper density: 8.960 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 1.436 cm
---> Element: Copper ( ) Z = 29.0 N = 63.5 A = 63.55 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
Material: Lead density: 11.350 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 5.612 mm
---> Element: Lead ( ) Z = 82.0 N = 207.2 A = 207.19 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
Material: Uranium density: 18.950 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 3.166 mm
---> Element: Uranium ( ) Z = 92.0 N = 238.0 A = 238.03 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
Material: BGO density: 7.100 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 1.123 cm
---> Element: Oxygen (O) Z = 8.0 N = 16.0 A = 16.00 g/mole ElmMassFraction: 15.41 % ElmAbundance 63.16 %
---> Element: Germanium (Ge) Z = 32.0 N = 72.6 A = 72.59 g/mole ElmMassFraction: 17.48 % ElmAbundance 15.79 %
---> Element: Bismuth (Bi) Z = 83.0 N = 209.0 A = 208.98 g/mole ElmMassFraction: 67.10 % ElmAbundance 21.05 %
Material: PbWO4 density: 8.280 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 8.924 mm
---> Element: Oxygen (O) Z = 8.0 N = 16.0 A = 16.00 g/mole ElmMassFraction: 14.07 % ElmAbundance 66.67 %
---> Element: Lead (Pb) Z = 82.0 N = 207.2 A = 207.19 g/mole ElmMassFraction: 45.53 % ElmAbundance 16.67 %
---> Element: Tungsten (W) Z = 74.0 N = 183.8 A = 183.84 g/mole ElmMassFraction: 40.40 % ElmAbundance 16.67 %
/run/verbose 2
#
/testem/det/setMat PbWO4
/testem/det/setLbin 40 0.5
/testem/det/setRbin 50 0.1
#
/testem/phys/addPhysics standard
PhysicsList::AddPhysicsList: <standard>
#
/testem/phys/setCuts 1 mm
#
# histogram file
/testem/histo/setFileName stand2
/testem/histo/setFileType hbook
#
/run/initialize
userDetector->Construct() start.
Absorber is 17.848 cm of PbWO4
Material: PbWO4 density: 8.280 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 8.924 mm
---> Element: Oxygen (O) Z = 8.0 N = 16.0 A = 16.00 g/mole ElmMassFraction: 14.07 % ElmAbundance 66.67 %
---> Element: Lead (Pb) Z = 82.0 N = 207.2 A = 207.19 g/mole ElmMassFraction: 45.53 % ElmAbundance 16.67 %
---> Element: Tungsten (W) Z = 74.0 N = 183.8 A = 183.84 g/mole ElmMassFraction: 40.40 % ElmAbundance 16.67 %
Ecal is registered to the default region.
physicsList->Construct() start.
physicsList->Construct() start.
physicsList->setCut() start.
PhysicsList::SetCuts:CutLength : 1 mm
#
/gun/particle e-
/gun/energy 5 GeV
#
/testem/event/printModulo 20
/testem/run/verbose 1
#
/run/beamOn 500
phot: Total cross sections from Sandia parametrisation.
Sampling according PhotoElectric model
compt: Total cross sections has a good parametrisation from 10 KeV to (100/Z) GeV
Sampling according Klein-Nishina model
tables are built for gamma
Lambda tables from 100 eV to 100 GeV in 90 bins.
conv: Total cross sections has a good parametrisation from 1.5 MeV to 100 GeV for all Z;
sampling secondary e+e- according Bethe-Heitler model
tables are built for gamma
Lambda tables from 1.022 MeV to 100 GeV in 100 bins.
msc: Model variant of multiple scattering for e-
Lambda tables from 100 eV to 100 TeV in 120 bins.
LateralDisplacementFlag= 1 Skin= 2
Boundary/stepping algorithm is active with RangeFactor= 0.02 Step limit type 2
### The process eBrem is added to the list of collaborative processes of eIoni
### The process eBrem is added to the list of collaborative processes of eIoni
### The process muBrems is added to the list of collaborative processes of muIoni
### The process muPairProd is added to the list of collaborative processes of muIoni
### The process muBrems is added to the list of collaborative processes of muIoni
### The process muPairProd is added to the list of collaborative processes of muIoni
eIoni: tables are built for e-
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Delta cross sections and sampling from MollerBhabha model
Good description from 1 KeV to 100 GeV.
Step function: finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1
Subcutoff sampling in 1 regions
eBrem: tables are built for e-
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Total cross sections and sampling from StandBrem model (based on the EEDL data library)
Good description from 1 KeV to 100 GeV, log scale extrapolation above 100 GeV. LPM flag 1
Subcutoff sampling in 1 regions
eIoni: tables are built for e+
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Delta cross sections and sampling from MollerBhabha model
Good description from 1 KeV to 100 GeV.
Step function: finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1
Subcutoff sampling in 1 regions
eBrem: tables are built for e+
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Total cross sections and sampling from StandBrem model (based on the EEDL data library)
Good description from 1 KeV to 100 GeV, log scale extrapolation above 100 GeV. LPM flag 1
Subcutoff sampling in 1 regions
annihil: Sampling according eplus2gg model
tables are built for e+
Lambda tables from 100 eV to 100 TeV in 120 bins.
msc: Model variant of multiple scattering for proton
Lambda tables from 100 eV to 100 TeV in 120 bins.
LateralDisplacementFlag= 1 Skin= 2
Boundary/stepping algorithm is active with RangeFactor= 0.02 Step limit type 2
hIoni: tables are built for proton
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Scaling relation is used from proton dE/dx and range.
Delta cross sections and sampling from BetheBloch model for scaled energy > 2 MeV
Parametrisation from Bragg for protons below.
Step function: finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1
Subcutoff sampling in 1 regions
msc: Model variant of multiple scattering for GenericIon
LateralDisplacementFlag= 0 Skin= 0
Boundary/stepping algorithm is active with RangeFactor= 0.2 Step limit type 1
ionIoni: tables are built for GenericIon
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Scaling relation is used from proton dE/dx and range.
Delta cross sections and sampling from BetheBloch model for scaled energy > 2 MeV
Parametrisation from BraggIon for protons below. NuclearStopping 1
Stopping Power data for 8 ion/material pairs are used.
Step function: finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1
Subcutoff sampling in 1 regions
hIoni: tables are built for anti_proton
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Scaling relation is used from proton dE/dx and range.
Delta cross sections and sampling from BetheBloch model for scaled energy > 2 MeV
Parametrisation from Bragg for protons below.
Step function: finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1
Subcutoff sampling in 1 regions
msc: Model variant of multiple scattering for mu+
Lambda tables from 100 eV to 100 TeV in 120 bins.
LateralDisplacementFlag= 1 Skin= 2
Boundary/stepping algorithm is active with RangeFactor= 0.02 Step limit type 2
muIoni: tables are built for mu+
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Bether-Bloch model for E > 0.2 MeV, parametrisation of Bragg peak below,
radiative corrections for E > 1 GeV
Step function: finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1
Subcutoff sampling in 1 regions
muBrems: tables are built for mu+
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Parametrised model
Subcutoff sampling in 1 regions
muPairProd: tables are built for mu+
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Parametrised model
Subcutoff sampling in 1 regions
muIoni: tables are built for mu-
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Bether-Bloch model for E > 0.2 MeV, parametrisation of Bragg peak below,
radiative corrections for E > 1 GeV
Step function: finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1
Subcutoff sampling in 1 regions
muBrems: tables are built for mu-
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Parametrised model
Subcutoff sampling in 1 regions
muPairProd: tables are built for mu-
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Parametrised model
Subcutoff sampling in 1 regions
hIoni: tables are built for pi+
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Scaling relation is used from proton dE/dx and range.
Delta cross sections and sampling from BetheBloch model for scaled energy > 0.297504 MeV
Parametrisation from Bragg for protons below.
Step function: finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1
Subcutoff sampling in 1 regions
msc: Model variant of multiple scattering for pi-
Lambda tables from 100 eV to 100 TeV in 120 bins.
LateralDisplacementFlag= 1 Skin= 2
Boundary/stepping algorithm is active with RangeFactor= 0.02 Step limit type 2
hIoni: tables are built for pi-
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Scaling relation is used from proton dE/dx and range.
Delta cross sections and sampling from BetheBloch model for scaled energy > 0.297504 MeV
Parametrisation from Bragg for protons below.
Step function: finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1
Subcutoff sampling in 1 regions
Region <DefaultRegionForTheWorld> -- appears in <Ecal> world volume
Root logical volume(s) : Ecal
Pointers : G4VUserRegionInformation[0], G4UserLimits[0], G4FastSimulationManager[0], G4UserSteppingAction[0]
Materials : PbWO4
Production cuts : gamma 1 mm e- 1 mm e+ 1 mm
========= Table of registered couples ==============================
Index : 0 used in the geometry : Yes recalculation needed : No
Material : PbWO4
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm
Energy thresholds : gamma 84.7768 keV e- 1.13176 MeV e+ 1.06419 MeV
Region(s) which use this couple :
DefaultRegionForTheWorld
====================================================================
Start closing geometry.
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 0 kByte
Total CPU time elapsed for geometry optimisation: 0 seconds
### Run 0 start.
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 9876, 54321
----------------------------------------
----> Histogram Tree is opened in stand2.hbook
Start Run processing.
---> Begin of Event: 0
---> Begin of Event: 20
---> Begin of Event: 40
---> Begin of Event: 60
---> Begin of Event: 80
---> Begin of Event: 100
---> Begin of Event: 120
---> Begin of Event: 140
---> Begin of Event: 160
---> Begin of Event: 180
---> Begin of Event: 200
---> Begin of Event: 220
---> Begin of Event: 240
---> Begin of Event: 260
---> Begin of Event: 280
---> Begin of Event: 300
---> Begin of Event: 320
---> Begin of Event: 340
---> Begin of Event: 360
---> Begin of Event: 380
---> Begin of Event: 400
---> Begin of Event: 420
---> Begin of Event: 440
---> Begin of Event: 460
---> Begin of Event: 480
Run terminated.
Run Summary
Number of events processed : 500
User=250.92s Real=255.48s Sys=2.42s
LATERAL PROFILE CUMULATIVE LATERAL PROFILE
bin Mean rms bin Mean rms
0.00-> 0.50 radl: 0.19% 0.10% 0-> 0.50 radl: 0.19% 0.10%
0.50-> 1.00 radl: 0.47% 0.29% 0-> 1.00 radl: 0.66% 0.35%
1.00-> 1.50 radl: 0.96% 0.55% 0-> 1.50 radl: 1.62% 0.83%
1.50-> 2.00 radl: 1.63% 0.85% 0-> 2.00 radl: 3.24% 1.58%
2.00-> 2.50 radl: 2.44% 1.16% 0-> 2.50 radl: 5.69% 2.59%
2.50-> 3.00 radl: 3.26% 1.40% 0-> 3.00 radl: 8.95% 3.81%
3.00-> 3.50 radl: 4.04% 1.55% 0-> 3.50 radl: 12.99% 5.12%
3.50-> 4.00 radl: 4.73% 1.61% 0-> 4.00 radl: 17.71% 6.43%
4.00-> 4.50 radl: 5.18% 1.61% 0-> 4.50 radl: 22.90% 7.64%
4.50-> 5.00 radl: 5.50% 1.61% 0-> 5.00 radl: 28.40% 8.77%
5.00-> 5.50 radl: 5.63% 1.51% 0-> 5.50 radl: 34.03% 9.71%
5.50-> 6.00 radl: 5.55% 1.43% 0-> 6.00 radl: 39.58% 10.45%
6.00-> 6.50 radl: 5.42% 1.35% 0-> 6.50 radl: 45.00% 10.97%
6.50-> 7.00 radl: 5.20% 1.19% 0-> 7.00 radl: 50.21% 11.26%
7.00-> 7.50 radl: 4.88% 1.13% 0-> 7.50 radl: 55.08% 11.36%
7.50-> 8.00 radl: 4.57% 1.13% 0-> 8.00 radl: 59.65% 11.26%
8.00-> 8.50 radl: 4.20% 1.04% 0-> 8.50 radl: 63.86% 11.02%
8.50-> 9.00 radl: 3.84% 1.01% 0-> 9.00 radl: 67.70% 10.64%
9.00-> 9.50 radl: 3.42% 1.00% 0-> 9.50 radl: 71.12% 10.13%
9.50->10.00 radl: 3.09% 1.01% 0->10.00 radl: 74.21% 9.54%
10.00->10.50 radl: 2.80% 1.00% 0->10.50 radl: 77.01% 8.90%
10.50->11.00 radl: 2.50% 0.98% 0->11.00 radl: 79.51% 8.22%
11.00->11.50 radl: 2.20% 0.97% 0->11.50 radl: 81.71% 7.54%
11.50->12.00 radl: 1.96% 0.89% 0->12.00 radl: 83.66% 6.88%
12.00->12.50 radl: 1.71% 0.87% 0->12.50 radl: 85.38% 6.23%
12.50->13.00 radl: 1.48% 0.83% 0->13.00 radl: 86.86% 5.58%
13.00->13.50 radl: 1.25% 0.78% 0->13.50 radl: 88.11% 4.97%
13.50->14.00 radl: 1.10% 0.71% 0->14.00 radl: 89.21% 4.39%
14.00->14.50 radl: 0.92% 0.63% 0->14.50 radl: 90.14% 3.88%
14.50->15.00 radl: 0.78% 0.57% 0->15.00 radl: 90.92% 3.44%
15.00->15.50 radl: 0.69% 0.50% 0->15.50 radl: 91.61% 3.05%
15.50->16.00 radl: 0.60% 0.44% 0->16.00 radl: 92.21% 2.70%
16.00->16.50 radl: 0.51% 0.41% 0->16.50 radl: 92.72% 2.39%
16.50->17.00 radl: 0.43% 0.38% 0->17.00 radl: 93.15% 2.10%
17.00->17.50 radl: 0.36% 0.33% 0->17.50 radl: 93.52% 1.85%
17.50->18.00 radl: 0.31% 0.27% 0->18.00 radl: 93.83% 1.67%
18.00->18.50 radl: 0.26% 0.26% 0->18.50 radl: 94.09% 1.49%
18.50->19.00 radl: 0.23% 0.23% 0->19.00 radl: 94.31% 1.34%
19.00->19.50 radl: 0.18% 0.20% 0->19.50 radl: 94.49% 1.22%
19.50->20.00 radl: 0.15% 0.17% 0->20.00 radl: 94.64% 1.12%
RADIAL PROFILE CUMULATIVE RADIAL PROFILE
bin Mean rms bin Mean rms
0.00-> 0.10 radl: 15.16% 1.60% 0-> 0.10 radl: 15.16% 1.60%
0.10-> 0.20 radl: 12.53% 1.13% 0-> 0.20 radl: 27.70% 2.20%
0.20-> 0.30 radl: 9.89% 0.86% 0-> 0.30 radl: 37.58% 2.45%
0.30-> 0.40 radl: 7.86% 0.77% 0-> 0.40 radl: 45.44% 2.59%
0.40-> 0.50 radl: 6.31% 0.69% 0-> 0.50 radl: 51.75% 2.60%
0.50-> 0.60 radl: 5.14% 0.62% 0-> 0.60 radl: 56.89% 2.52%
0.60-> 0.70 radl: 4.17% 0.55% 0-> 0.70 radl: 61.06% 2.43%
0.70-> 0.80 radl: 3.49% 0.48% 0-> 0.80 radl: 64.55% 2.33%
0.80-> 0.90 radl: 2.92% 0.43% 0-> 0.90 radl: 67.47% 2.26%
0.90-> 1.00 radl: 2.51% 0.39% 0-> 1.00 radl: 69.97% 2.17%
1.00-> 1.10 radl: 2.15% 0.37% 0-> 1.10 radl: 72.12% 2.08%
1.10-> 1.20 radl: 1.90% 0.34% 0-> 1.20 radl: 74.02% 2.00%
1.20-> 1.30 radl: 1.67% 0.33% 0-> 1.30 radl: 75.69% 1.91%
1.30-> 1.40 radl: 1.50% 0.29% 0-> 1.40 radl: 77.19% 1.85%
1.40-> 1.50 radl: 1.36% 0.28% 0-> 1.50 radl: 78.54% 1.79%
1.50-> 1.60 radl: 1.21% 0.25% 0-> 1.60 radl: 79.76% 1.75%
1.60-> 1.70 radl: 1.09% 0.24% 0-> 1.70 radl: 80.85% 1.70%
1.70-> 1.80 radl: 1.01% 0.23% 0-> 1.80 radl: 81.86% 1.67%
1.80-> 1.90 radl: 0.93% 0.23% 0-> 1.90 radl: 82.79% 1.61%
1.90-> 2.00 radl: 0.86% 0.20% 0-> 2.00 radl: 83.65% 1.57%
2.00-> 2.10 radl: 0.79% 0.20% 0-> 2.10 radl: 84.44% 1.53%
2.10-> 2.20 radl: 0.75% 0.19% 0-> 2.20 radl: 85.19% 1.48%
2.20-> 2.30 radl: 0.70% 0.19% 0-> 2.30 radl: 85.89% 1.44%
2.30-> 2.40 radl: 0.64% 0.18% 0-> 2.40 radl: 86.53% 1.42%
2.40-> 2.50 radl: 0.60% 0.16% 0-> 2.50 radl: 87.13% 1.39%
2.50-> 2.60 radl: 0.56% 0.15% 0-> 2.60 radl: 87.70% 1.38%
2.60-> 2.70 radl: 0.52% 0.15% 0-> 2.70 radl: 88.22% 1.36%
2.70-> 2.80 radl: 0.49% 0.15% 0-> 2.80 radl: 88.71% 1.34%
2.80-> 2.90 radl: 0.48% 0.15% 0-> 2.90 radl: 89.19% 1.30%
2.90-> 3.00 radl: 0.44% 0.15% 0-> 3.00 radl: 89.63% 1.27%
3.00-> 3.10 radl: 0.42% 0.13% 0-> 3.10 radl: 90.05% 1.25%
3.10-> 3.20 radl: 0.38% 0.13% 0-> 3.20 radl: 90.43% 1.23%
3.20-> 3.30 radl: 0.36% 0.12% 0-> 3.30 radl: 90.79% 1.21%
3.30-> 3.40 radl: 0.34% 0.11% 0-> 3.40 radl: 91.13% 1.19%
3.40-> 3.50 radl: 0.32% 0.11% 0-> 3.50 radl: 91.44% 1.18%
3.50-> 3.60 radl: 0.30% 0.11% 0-> 3.60 radl: 91.74% 1.18%
3.60-> 3.70 radl: 0.28% 0.11% 0-> 3.70 radl: 92.03% 1.17%
3.70-> 3.80 radl: 0.27% 0.10% 0-> 3.80 radl: 92.30% 1.16%
3.80-> 3.90 radl: 0.26% 0.10% 0-> 3.90 radl: 92.56% 1.16%
3.90-> 4.00 radl: 0.25% 0.10% 0-> 4.00 radl: 92.81% 1.16%
4.00-> 4.10 radl: 0.23% 0.09% 0-> 4.10 radl: 93.04% 1.15%
4.10-> 4.20 radl: 0.22% 0.09% 0-> 4.20 radl: 93.26% 1.15%
4.20-> 4.30 radl: 0.21% 0.09% 0-> 4.30 radl: 93.47% 1.14%
4.30-> 4.40 radl: 0.20% 0.08% 0-> 4.40 radl: 93.67% 1.13%
4.40-> 4.50 radl: 0.19% 0.08% 0-> 4.50 radl: 93.86% 1.14%
4.50-> 4.60 radl: 0.18% 0.08% 0-> 4.60 radl: 94.04% 1.14%
4.60-> 4.70 radl: 0.17% 0.07% 0-> 4.70 radl: 94.20% 1.13%
4.70-> 4.80 radl: 0.16% 0.07% 0-> 4.80 radl: 94.36% 1.12%
4.80-> 4.90 radl: 0.15% 0.08% 0-> 4.90 radl: 94.51% 1.12%
4.90-> 5.00 radl: 0.13% 0.07% 0-> 5.00 radl: 94.64% 1.12%
SUMMARY
energy deposit : 94.64 % E0 +- 1.12 % E0
charged traklen: 483.11 radl +- 5.86 radl
neutral traklen: 4441.47 radl +- 129.52 radl
90.00 % confinement: radius = 3.09 radl (2.76 cm )
----> Histogram Tree is saved in stand2.hbook
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 325646285, 1624745186
----------------------------------------
UserDetectorConstruction deleted.
UserPhysicsList deleted.
UserRunAction deleted.
UserPrimaryGenerator deleted.
G4 kernel has come to Quit state.
EventManager deleted.
Default detector region deleted.
UImanager deleted.
Units table cleared.
StateManager deleted.
RunManagerKernel is deleted.
RunManager is deleting.
@@ -1,38 +0,0 @@
# $Id: run05.mac,v 1.7 2009-09-16 18:07:30 maire Exp $
#
#
# Macro file for "TestEm2.cc"
# (can be run in batch, without graphic)
#
# PbWO4 L = 20 radl R = 5 radl; electron 5 GeV
#
/control/verbose 2
/run/verbose 2
#
/testem/phys/addPhysics local
#
/testem/phys/setCuts 1 mm
#
/run/initialize
#
/gun/particle e-
/gun/energy 100 MeV
/run/beamOn 10
#
/process/em/applyCuts true
/run/beamOn 10
/run/dumpCouples
#
#
/testem/det/setMat Water
/testem/det/setLbin 9 1.11
/testem/det/setRbin 6 0.111
/testem/det/update
/gun/position 0 0 0 cm
/run/beamOn 10
/run/dumpCouples
#
/testem/det/setMat liquidArgon
/testem/det/update
/run/beamOn 10
/run/dumpCouples
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm2/src/DetectorConstruction.cc
/// \brief Implementation of the DetectorConstruction class
//
//
// $Id: DetectorConstruction.cc,v 1.14 2009-09-16 18:07:30 maire Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -50,25 +52,26 @@
#include "G4RunManager.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorConstruction::DetectorConstruction()
:nLtot(40),nRtot(50),dLradl(0.5),dRradl(0.1),
dLlength(0.),dRlength(0.),
myMaterial(0),magField(0),
EcalLength(0.),EcalRadius(0.),
solidEcal(0),logicEcal(0),physiEcal(0)
:fNLtot(40),fNRtot(50),fDLradl(0.5),fDRradl(0.1),
fDLlength(0.),fDRlength(0.),
fMaterial(0),fMagField(0),
fEcalLength(0.),fEcalRadius(0.),
fSolidEcal(0),fLogicEcal(0),fPhysiEcal(0)
{
DefineMaterials();
SetMaterial("G4_PbWO4");
detectorMessenger = new DetectorMessenger(this);
fDetectorMessenger = new DetectorMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorConstruction::~DetectorConstruction()
{ delete detectorMessenger;}
{ delete fDetectorMessenger;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -127,10 +130,10 @@ void DetectorConstruction::DefineMaterials()
G4VPhysicalVolume* DetectorConstruction::ConstructVolumes()
{
G4double Radl = myMaterial->GetRadlen();
G4double Radl = fMaterial->GetRadlen();
dLlength = dLradl*Radl; dRlength = dRradl*Radl;
EcalLength = nLtot*dLlength; EcalRadius = nRtot*dRlength;
fDLlength = fDLradl*Radl; fDRlength = fDRradl*Radl;
fEcalLength = fNLtot*fDLlength; fEcalRadius = fNRtot*fDRlength;
// Cleanup old geometry
G4GeometryManager::GetInstance()->OpenGeometry();
@@ -141,19 +144,19 @@ G4VPhysicalVolume* DetectorConstruction::ConstructVolumes()
//
// Ecal
//
solidEcal = new G4Tubs("Ecal",0.,EcalRadius,0.5*EcalLength,0.,360*deg);
logicEcal = new G4LogicalVolume( solidEcal,myMaterial,"Ecal",0,0,0);
physiEcal = new G4PVPlacement(0,G4ThreeVector(),
logicEcal,"Ecal",0,false,0);
fSolidEcal = new G4Tubs("Ecal",0.,fEcalRadius,0.5*fEcalLength,0.,360*deg);
fLogicEcal = new G4LogicalVolume( fSolidEcal,fMaterial,"Ecal",0,0,0);
fPhysiEcal = new G4PVPlacement(0,G4ThreeVector(),
fLogicEcal,"Ecal",0,false,0);
G4cout << "Absorber is " << G4BestUnit(EcalLength,"Length")
<< " of " << myMaterial->GetName() << G4endl;
G4cout << myMaterial << G4endl;
G4cout << "Absorber is " << G4BestUnit(fEcalLength,"Length")
<< " of " << fMaterial->GetName() << G4endl;
G4cout << fMaterial << G4endl;
//
//always return the physical World
//
return physiEcal;
return fPhysiEcal;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -165,8 +168,8 @@ void DetectorConstruction::SetMaterial(const G4String& materialChoice)
G4NistManager::Instance()->FindOrBuildMaterial(materialChoice);
if (pttoMaterial) {
myMaterial = pttoMaterial;
if(logicEcal) logicEcal->SetMaterial(myMaterial);
fMaterial = pttoMaterial;
if(fLogicEcal) fLogicEcal->SetMaterial(fMaterial);
G4RunManager::GetRunManager()->PhysicsHasBeenModified();
}
}
@@ -175,26 +178,26 @@ void DetectorConstruction::SetMaterial(const G4String& materialChoice)
void DetectorConstruction::SetLBining(G4ThreeVector Value)
{
nLtot = (G4int)Value(0);
if (nLtot > MaxBin) {
fNLtot = (G4int)Value(0);
if (fNLtot > MaxBin) {
G4cout << "\n ---> warning from SetLBining: "
<< nLtot << " truncated to " << MaxBin << G4endl;
nLtot = MaxBin;
<< fNLtot << " truncated to " << MaxBin << G4endl;
fNLtot = MaxBin;
}
dLradl = Value(1);
fDLradl = Value(1);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetRBining(G4ThreeVector Value)
{
nRtot = (G4int)Value(0);
if (nRtot > MaxBin) {
fNRtot = (G4int)Value(0);
if (fNRtot > MaxBin) {
G4cout << "\n ---> warning from SetRBining: "
<< nRtot << " truncated to " << MaxBin << G4endl;
nRtot = MaxBin;
<< fNRtot << " truncated to " << MaxBin << G4endl;
fNRtot = MaxBin;
}
dRradl = Value(1);
fDRradl = Value(1);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -205,15 +208,15 @@ void DetectorConstruction::SetMagField(G4double fieldValue)
G4FieldManager* fieldMgr
= G4TransportationManager::GetTransportationManager()->GetFieldManager();
if(magField) delete magField; //delete the existing magn field
if(fMagField) delete fMagField; //delete the existing magn field
if(fieldValue!=0.) // create a new one if non nul
{ magField = new G4UniformMagField(G4ThreeVector(0.,0.,fieldValue));
fieldMgr->SetDetectorField(magField);
fieldMgr->CreateChordFinder(magField);
if(fieldValue!=0.) // create a new one if non nul
{ fMagField = new G4UniformMagField(G4ThreeVector(0.,0.,fieldValue));
fieldMgr->SetDetectorField(fMagField);
fieldMgr->CreateChordFinder(fMagField);
} else {
magField = 0;
fieldMgr->SetDetectorField(magField);
fMagField = 0;
fieldMgr->SetDetectorField(fMagField);
}
}
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: DetectorMessenger.cc,v 1.8 2006-06-29 16:50:20 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/src/DetectorMessenger.cc
/// \brief Implementation of the DetectorMessenger class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -41,78 +43,78 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
:Detector(Det)
:fDetector(Det)
{
testemDir = new G4UIdirectory("/testem/");
testemDir->SetGuidance(" detector control.");
fTestemDir = new G4UIdirectory("/testem/");
fTestemDir->SetGuidance(" detector control.");
detDir = new G4UIdirectory("/testem/det/");
detDir->SetGuidance("detector construction commands");
fDetDir = new G4UIdirectory("/testem/det/");
fDetDir->SetGuidance("detector construction commands");
MaterCmd = new G4UIcmdWithAString("/testem/det/setMat",this);
MaterCmd->SetGuidance("Select Material.");
MaterCmd->SetParameterName("material",false);
MaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fMaterCmd = new G4UIcmdWithAString("/testem/det/setMat",this);
fMaterCmd->SetGuidance("Select Material.");
fMaterCmd->SetParameterName("material",false);
fMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
LBinCmd = new G4UIcmdWith3Vector("/testem/det/setLbin",this);
LBinCmd->SetGuidance("set longitudinal bining");
LBinCmd->SetGuidance("nb of bins; bin thickness (in radl)");
LBinCmd->SetParameterName("nLtot","dLradl"," ",true);
LBinCmd->SetRange("nLtot>=1 && dLradl>0");
LBinCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fLBinCmd = new G4UIcmdWith3Vector("/testem/det/setLbin",this);
fLBinCmd->SetGuidance("set longitudinal bining");
fLBinCmd->SetGuidance("nb of bins; bin thickness (in radl)");
fLBinCmd->SetParameterName("nLtot","dLradl"," ",true);
fLBinCmd->SetRange("nLtot>=1 && dLradl>0");
fLBinCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
RBinCmd = new G4UIcmdWith3Vector("/testem/det/setRbin",this);
RBinCmd->SetGuidance("set radial bining");
RBinCmd->SetGuidance("nb of bins; bin thickness (in radl)");
RBinCmd->SetParameterName("nRtot","dRradl"," ",true);
RBinCmd->SetRange("nRtot>=1 && dRradl>0");
RBinCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fRBinCmd = new G4UIcmdWith3Vector("/testem/det/setRbin",this);
fRBinCmd->SetGuidance("set radial bining");
fRBinCmd->SetGuidance("nb of bins; bin thickness (in radl)");
fRBinCmd->SetParameterName("nRtot","dRradl"," ",true);
fRBinCmd->SetRange("nRtot>=1 && dRradl>0");
fRBinCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
FieldCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setField",this);
FieldCmd->SetGuidance("Define magnetic field.");
FieldCmd->SetGuidance("Magnetic field will be in Z direction.");
FieldCmd->SetParameterName("Bz",false);
FieldCmd->SetUnitCategory("Magnetic flux density");
FieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fFieldCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setField",this);
fFieldCmd->SetGuidance("Define magnetic field.");
fFieldCmd->SetGuidance("Magnetic field will be in Z direction.");
fFieldCmd->SetParameterName("Bz",false);
fFieldCmd->SetUnitCategory("Magnetic flux density");
fFieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
UpdateCmd = new G4UIcmdWithoutParameter("/testem/det/update",this);
UpdateCmd->SetGuidance("Update geometry.");
UpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
UpdateCmd->SetGuidance("if you changed geometrical value(s).");
UpdateCmd->AvailableForStates(G4State_Idle);
fUpdateCmd = new G4UIcmdWithoutParameter("/testem/det/update",this);
fUpdateCmd->SetGuidance("Update geometry.");
fUpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
fUpdateCmd->SetGuidance("if you changed geometrical value(s).");
fUpdateCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorMessenger::~DetectorMessenger()
{
delete MaterCmd;
delete LBinCmd;
delete RBinCmd;
delete FieldCmd;
delete UpdateCmd;
delete detDir;
delete testemDir;
delete fMaterCmd;
delete fLBinCmd;
delete fRBinCmd;
delete fFieldCmd;
delete fUpdateCmd;
delete fDetDir;
delete fTestemDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
{
if( command == MaterCmd )
{ Detector->SetMaterial(newValue);}
if( command == fMaterCmd )
{ fDetector->SetMaterial(newValue);}
if( command == LBinCmd )
{ Detector->SetLBining(LBinCmd->GetNew3VectorValue(newValue));}
if( command == fLBinCmd )
{ fDetector->SetLBining(fLBinCmd->GetNew3VectorValue(newValue));}
if( command == RBinCmd )
{ Detector->SetRBining(RBinCmd->GetNew3VectorValue(newValue));}
if( command == fRBinCmd )
{ fDetector->SetRBining(fRBinCmd->GetNew3VectorValue(newValue));}
if( command == FieldCmd )
{ Detector->SetMagField(FieldCmd->GetNewDoubleValue(newValue));}
if( command == fFieldCmd )
{ fDetector->SetMagField(fFieldCmd->GetNewDoubleValue(newValue));}
if( command == UpdateCmd )
{ Detector->UpdateGeometry();}
if( command == fUpdateCmd )
{ fDetector->UpdateGeometry();}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: EmAcceptance.cc,v 1.5 2006-06-29 16:50:22 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/src/EmAcceptance.cc
/// \brief Implementation of the Emeptance class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -47,7 +49,7 @@ void EmAcceptance::BeginOfAcceptance(const G4String& title, G4int stat)
{
G4cout << G4endl;
G4cout << "<<<<ACCEPTANCE>>>> " << stat << " events for " << title << G4endl;
isAccepted = true;
fIsAccepted = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -55,7 +57,7 @@ void EmAcceptance::BeginOfAcceptance(const G4String& title, G4int stat)
void EmAcceptance::EndOfAcceptance()
{
G4String resume = "IS ACCEPTED";
if(!isAccepted) resume = "IS NOT ACCEPTED";
if(!fIsAccepted) resume = "IS NOT ACCEPTED";
G4cout << "<<<<END>>>> " << resume << G4endl;
G4cout << G4endl;
}
@@ -69,7 +71,7 @@ void EmAcceptance::EmAcceptanceGauss(const G4String& title, G4int stat,
G4double x = std::sqrt((G4double)stat);
G4double dde = avr - avr0;
G4double de = dde*x/rms;
if(std::fabs(de) > limit) isAccepted = false;
if(std::fabs(de) > limit) fIsAccepted = false;
G4cout << title << ": " << avr << " del" << title << "= " << dde
<< " nrms= " << de << G4endl;
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: EventAction.cc,v 1.5 2010-06-07 05:40:46 perl Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/src/EventAction.cc
/// \brief Implementation of the EventAction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -39,16 +41,16 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventAction::EventAction(RunAction* run)
:Run(run),drawFlag("none"),printModulo(10000)
:fRun(run),fDrawFlag("none"),fPrintModulo(10000)
{
eventMessenger = new EventActionMessenger(this);
fEventMessenger = new EventActionMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventAction::~EventAction()
{
delete eventMessenger;
delete fEventMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -58,18 +60,18 @@ void EventAction::BeginOfEventAction(const G4Event* evt)
G4int evtNb = evt->GetEventID();
//printing survey
if (evtNb%printModulo == 0)
if (evtNb%fPrintModulo == 0)
G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
//additional initializations
Run->initializePerEvent();
fRun->InitializePerEvent();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void EventAction::EndOfEventAction(const G4Event*)
{
Run->fillPerEvent();
fRun->FillPerEvent();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm2/src/EventActionMessenger.cc
/// \brief Implementation of the EventActionMessenger class
//
// $Id: EventActionMessenger.cc,v 1.3 2006-06-29 16:50:26 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
//
@@ -42,33 +44,33 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventActionMessenger::EventActionMessenger(EventAction* EvAct)
:eventAction(EvAct)
:fEventAction(EvAct)
{
eventDir = new G4UIdirectory("/testem/event/");
eventDir->SetGuidance("event control");
fEventDir = new G4UIdirectory("/testem/event/");
fEventDir->SetGuidance("event control");
DrawCmd = new G4UIcmdWithAString("/testem/event/drawTracks",this);
DrawCmd->SetGuidance("Draw the tracks in the event");
DrawCmd->SetGuidance(" Choice : none, charged, all");
DrawCmd->SetParameterName("choice",true);
DrawCmd->SetDefaultValue("all");
DrawCmd->SetCandidates("none charged all");
DrawCmd->AvailableForStates(G4State_Idle);
fDrawCmd = new G4UIcmdWithAString("/testem/event/drawTracks",this);
fDrawCmd->SetGuidance("Draw the tracks in the event");
fDrawCmd->SetGuidance(" Choice : none, charged, all");
fDrawCmd->SetParameterName("choice",true);
fDrawCmd->SetDefaultValue("all");
fDrawCmd->SetCandidates("none charged all");
fDrawCmd->AvailableForStates(G4State_Idle);
PrintCmd = new G4UIcmdWithAnInteger("/testem/event/printModulo",this);
PrintCmd->SetGuidance("Print events modulo n");
PrintCmd->SetParameterName("EventNb",false);
PrintCmd->SetRange("EventNb>0");
PrintCmd->AvailableForStates(G4State_Idle);
fPrintCmd = new G4UIcmdWithAnInteger("/testem/event/printModulo",this);
fPrintCmd->SetGuidance("Print events modulo n");
fPrintCmd->SetParameterName("EventNb",false);
fPrintCmd->SetRange("EventNb>0");
fPrintCmd->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
EventActionMessenger::~EventActionMessenger()
{
delete DrawCmd;
delete PrintCmd;
delete eventDir;
delete fDrawCmd;
delete fPrintCmd;
delete fEventDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -76,11 +78,11 @@ EventActionMessenger::~EventActionMessenger()
void EventActionMessenger::SetNewValue(G4UIcommand* command,
G4String newValue)
{
if(command == DrawCmd)
{eventAction->SetDrawFlag(newValue);}
if(command == fDrawCmd)
{fEventAction->SetDrawFlag(newValue);}
if(command == PrintCmd)
{eventAction->SetPrintModulo(PrintCmd->GetNewIntValue(newValue));}
if(command == fPrintCmd)
{fEventAction->SetPrintModulo(fPrintCmd->GetNewIntValue(newValue));}
}
@@ -0,0 +1,805 @@
//
// ********************************************************************
// * 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 electromagnetic/TestEm2/src/ExG4HbookAnalysisManager.cc
/// \brief Implementation of the ExG4HbookAnalysisManager class
//
// $Id$
//
/// \file ExG4HbookAnalysisManager.cc
/// \brief Implementation of the ExG4HbookAnalysisManager class
// Author: Ivana Hrivnacova, 15/06/2011 (ivana@ipno.in2p3.fr)
#ifdef G4_USE_HBOOK
#include "ExG4HbookAnalysisManager.hh"
#include "G4UnitsTable.hh"
#include <iostream>
extern "C" int setpawc();
extern "C" int setntuc();
ExG4HbookAnalysisManager* ExG4HbookAnalysisManager::fgInstance = 0;
const G4int ExG4HbookAnalysisManager::fgkDefaultH2HbookIdOffset = 100;
const G4int ExG4HbookAnalysisManager::fgkDefaultNtupleHbookId = 1;
const G4String ExG4HbookAnalysisManager::fgkDefaultNtupleDirectoryName = "ntuple";
//_____________________________________________________________________________
ExG4HbookAnalysisManager* ExG4HbookAnalysisManager::Instance()
{
if ( fgInstance == 0 ) {
fgInstance = new ExG4HbookAnalysisManager();
}
return fgInstance;
}
//_____________________________________________________________________________
ExG4HbookAnalysisManager::ExG4HbookAnalysisManager()
: G4VAnalysisManager("Hbook"),
fH1HbookIdOffset(-1),
fH2HbookIdOffset(-1),
fNtupleHbookId(-1),
fFile(0),
fH1Vector(),
fH1MapByName(),
fH2Vector(),
fH2MapByName(),
fNtupleName(),
fNtupleTitle(),
fNtuple(0),
fNtupleIColumnMap(),
fNtupleFColumnMap(),
fNtupleDColumnMap()
{
if ( fgInstance ) {
G4ExceptionDescription description;
description << " "
<< "G4HbookAnalysisManager already exists."
<< "Cannot create another instance.";
G4Exception("G4HbookAnalysisManager::G4HbookAnalysisManager()",
"Analysis_F001", FatalException, description);
}
fgInstance = this;
// Initialize HBOOK :
tools::hbook::CHLIMIT(setpawc());
setntuc(); //for ntuple.
}
//_____________________________________________________________________________
ExG4HbookAnalysisManager::~ExG4HbookAnalysisManager()
{
std::vector<tools::hbook::h1*>::iterator it;
for ( it = fH1Vector.begin(); it != fH1Vector.end(); it++ ) {
delete *it;
}
std::vector<tools::hbook::h2*>::iterator it2;
for ( it2 = fH2Vector.begin(); it2 != fH2Vector.end(); it2++ ) {
delete *it2;
}
delete fNtuple;
delete fFile;
fgInstance = 0;
}
//
// private methods
//
//_____________________________________________________________________________
tools::hbook::wntuple::column<int>*
ExG4HbookAnalysisManager::GetNtupleIColumn(G4int id) const
{
std::map<G4int, tools::hbook::wntuple::column<int>* >::const_iterator it
= fNtupleIColumnMap.find(id);
if ( it == fNtupleIColumnMap.end() ) {
G4ExceptionDescription description;
description << " " << "column " << id << " does not exist.";
G4Exception("G4HbookAnalysisManager::GetNtupleIColumn()",
"Analysis_W009", JustWarning, description);
return 0;
}
return it->second;
}
//_____________________________________________________________________________
tools::hbook::wntuple::column<float>*
ExG4HbookAnalysisManager::GetNtupleFColumn(G4int id) const
{
std::map<G4int, tools::hbook::wntuple::column<float>* >::const_iterator it
= fNtupleFColumnMap.find(id);
if ( it == fNtupleFColumnMap.end() ) {
G4ExceptionDescription description;
description << " " << "column " << id << " does not exist.";
G4Exception("G4HbookAnalysisManager::GetNtupleFColumn()",
"Analysis_W009", JustWarning, description);
return 0;
}
return it->second;
}
//_____________________________________________________________________________
tools::hbook::wntuple::column<double>*
ExG4HbookAnalysisManager::GetNtupleDColumn(G4int id) const
{
std::map<G4int, tools::hbook::wntuple::column<double>* >::const_iterator it
= fNtupleDColumnMap.find(id);
if ( it == fNtupleDColumnMap.end() ) {
G4ExceptionDescription description;
description << " " << "column " << id << " does not exist.";
G4Exception("G4HbookAnalysisManager::GetNtupleDColumn()",
"Analysis_W009", JustWarning, description);
return 0;
}
return it->second;
}
//
// public methods
//
//_____________________________________________________________________________
G4bool ExG4HbookAnalysisManager::OpenFile(const G4String& fileName)
{
G4String name(fileName);
if ( name.find(".") == std::string::npos ) {
name.append(".");
name.append(GetFileType());
}
#ifdef G4VERBOSE
if ( fpVerboseL3 )
fpVerboseL3->Message("open", "analysis file", name);
#endif
tools::hbook::CHCDIR("//PAWC"," ");
unsigned int unit = 1;
fFile = new tools::hbook::wfile(std::cout, name, unit);
if ( ! fFile->is_valid() ) {
G4ExceptionDescription description;
description << " " << "Cannot open file " << fileName;
G4Exception("G4HbookAnalysisManager::OpenFile()",
"Analysis_W001", JustWarning, description);
return false;
}
// At this point, in HBOOK, we should have :
// - created a //LUN1 directory attached to the file
// - created a //PAWC/LUN1 in memory
// - be in the directory //PAWC/LUN1.
// create an "histo" HBOOK directory both in memory and in the file :
if ( fHistoDirectoryName != "" ) {
tools::hbook::CHCDIR("//PAWC/LUN1"," ");
tools::hbook::CHMDIR(fHistoDirectoryName.data()," ");
tools::hbook::CHCDIR("//LUN1"," ");
tools::hbook::CHMDIR(fHistoDirectoryName.data()," ");
}
fLockHistoDirectoryName = true;
// the five upper lines could have been done with :
//fFile->cd_home();
//fFile->mkcd("histo");
#ifdef G4VERBOSE
if ( fpVerboseL1 )
fpVerboseL1->Message("open", "analysis file", name);
#endif
return true;
}
//_____________________________________________________________________________
G4bool ExG4HbookAnalysisManager::Write()
{
#ifdef G4VERBOSE
if ( fpVerboseL3 )
fpVerboseL3->Message("write", "file", "");
#endif
// ntuple
//if ( fNtuple ) fNtuple->add_row_end();
G4bool result = fFile->write();
#ifdef G4VERBOSE
if ( fpVerboseL1 )
fpVerboseL1->Message("write", "file", "", result);
#endif
return result;
}
//_____________________________________________________________________________
G4bool ExG4HbookAnalysisManager::CloseFile()
{
#ifdef G4VERBOSE
if ( fpVerboseL3 )
fpVerboseL3->Message("close", "file", "");
#endif
//WARNING : have to delete the ntuple before closing the file.
delete fNtuple;
fNtuple = 0;
G4bool result = fFile->close();
#ifdef G4VERBOSE
if ( fpVerboseL1 )
fpVerboseL1->Message("close", "file", "", result);
#endif
return result;
}
//_____________________________________________________________________________
G4int ExG4HbookAnalysisManager::CreateH1(const G4String& name, const G4String& title,
G4int nbins, G4double xmin, G4double xmax)
{
#ifdef G4VERBOSE
if ( fpVerboseL3 )
fpVerboseL3->Message("create", "H1", name);
#endif
// Go to histograms directory
if ( fHistoDirectoryName != "" ) {
G4String histoPath = "//PAWC/LUN1/";
histoPath.append(fHistoDirectoryName.data());
tools::hbook::CHCDIR(histoPath.data()," ");
}
// Set fH1HbookIdOffset if needed
if ( fH1Vector.size() == 0 ) {
if ( fH1HbookIdOffset == -1 ) {
if ( fFirstHistoId > 0 )
fH1HbookIdOffset = 0;
else
fH1HbookIdOffset = 1;
if ( fH1HbookIdOffset > 0 ) {
G4ExceptionDescription description;
description << "H1 will be defined in HBOOK with ID = G4_firstHistoId + 1";
G4Exception("ExG4HbookAnalysisManager::CreateH1()",
"Analysis_W011", JustWarning, description);
}
}
}
// Create histogram
G4int index = fH1Vector.size();
G4int hbookIndex = fH1HbookIdOffset + fH1Vector.size() + fFirstHistoId;
tools::hbook::h1* h1 = new tools::hbook::h1(hbookIndex, title, nbins, xmin, xmax);
fH1Vector.push_back(h1);
fH1MapByName[name] = h1;
if ( fHistoDirectoryName != "" ) {
// Return to //PAWC/LUN1 :
tools::hbook::CHCDIR("//PAWC/LUN1"," ");
}
fLockFirstHistoId = true;
#ifdef G4VERBOSE
if ( fpVerboseL1 ) {
G4ExceptionDescription description;
description << " name : " << name << " hbook index : " << hbookIndex;
fpVerboseL1->Message("create", "H1", description);
}
#endif
return index + fFirstHistoId;
}
//_____________________________________________________________________________
G4int ExG4HbookAnalysisManager::CreateH2(const G4String& name, const G4String& title,
G4int nxbins, G4double xmin, G4double xmax,
G4int nybins, G4double ymin, G4double ymax)
{
#ifdef G4VERBOSE
if ( fpVerboseL3 )
fpVerboseL3->Message("create", "H2", name);
#endif
// Go to histograms directory
if ( fHistoDirectoryName != "" ) {
G4String histoPath = "//PAWC/LUN1/";
histoPath.append(fHistoDirectoryName.data());
tools::hbook::CHCDIR(histoPath.data()," ");
}
// Set fH2HbookIdOffset if needed
if ( fH2Vector.size() == 0 ) {
if ( fH2HbookIdOffset == -1 ) {
if ( fFirstHistoId > 0 )
fH2HbookIdOffset = fgkDefaultH2HbookIdOffset;
else
fH2HbookIdOffset = fgkDefaultH2HbookIdOffset + 1;
if ( fH2HbookIdOffset != fgkDefaultH2HbookIdOffset ) {
G4ExceptionDescription description;
description
<< "H2 will be defined in HBOOK with ID = "
<< fgkDefaultH2HbookIdOffset << " + G4_firstHistoId + 1";
G4Exception("ExG4HbookAnalysisManager::CreateH2()",
"Analysis_W011", JustWarning, description);
}
}
}
G4int index = fH2Vector.size();
G4int hbookIndex = fH2HbookIdOffset + fH2Vector.size() + fFirstHistoId;
tools::hbook::h2* h2
= new tools::hbook::h2(hbookIndex, title, nxbins, xmin, xmax, nybins, ymin, ymax);
fH2Vector.push_back(h2);
fH2MapByName[name] = h2;
// Return to //PAWC/LUN1 :
if ( fHistoDirectoryName != "" ) {
tools::hbook::CHCDIR("//PAWC/LUN1"," ");
}
fLockFirstHistoId = true;
#ifdef G4VERBOSE
if ( fpVerboseL1 ) {
G4ExceptionDescription description;
description << " name : " << name << " hbook index : " << hbookIndex;
fpVerboseL1->Message("create", "H2", description);
}
#endif
return index + fFirstHistoId;
}
//_____________________________________________________________________________
void ExG4HbookAnalysisManager::CreateNtuple(const G4String& name,
const G4String& title)
{
#ifdef G4VERBOSE
if ( fpVerboseL3 )
fpVerboseL3->Message("create", "ntuple", name);
#endif
if ( fNtuple ) {
G4ExceptionDescription description;
description << " "
<< "Ntuple already exists. "
<< "(Only one ntuple is currently supported.)";
G4Exception("G4HbookAnalysisManager::CreateNtuple()",
"Analysis_W006", JustWarning, description);
return;
}
// Create an "ntuple" directory both in memory and in the file
fFile->cd_home(); //go under //PAWC/LUN1
if ( fNtupleDirectoryName == "" )
fFile->mkcd(fgkDefaultNtupleDirectoryName.data());
else
fFile->mkcd(fNtupleDirectoryName.data());
// Define ntuple ID in HBOOK
if ( fNtupleHbookId == -1 ) fNtupleHbookId = fgkDefaultNtupleHbookId;
// We should be under //PAWC/LUN1/ntuple
fNtuple = new tools::hbook::wntuple(fNtupleHbookId, name);
fNtupleName = name;
fNtupleTitle = title;
#ifdef G4VERBOSE
if ( fpVerboseL1 ) {
G4ExceptionDescription description;
description << " name : " << name << " hbook index : " << fNtupleHbookId;
fpVerboseL1->Message("create", "ntuple", description);
}
#endif
}
//_____________________________________________________________________________
G4int ExG4HbookAnalysisManager::CreateNtupleIColumn(const G4String& name)
{
#ifdef G4VERBOSE
if ( fpVerboseL3 )
fpVerboseL3->Message("create", "ntuple I column", name);
#endif
G4int index = fNtuple->columns().size();
tools::hbook::wntuple::column<int>* column = fNtuple->create_column<int>(name);
fNtupleIColumnMap[index] = column;
fLockFirstNtupleColumnId = true;
#ifdef G4VERBOSE
if ( fpVerboseL1 )
fpVerboseL1->Message("create", "ntuple I column", name);
#endif
return index + fFirstNtupleColumnId;
}
//_____________________________________________________________________________
G4int ExG4HbookAnalysisManager::CreateNtupleFColumn(const G4String& name)
{
#ifdef G4VERBOSE
if ( fpVerboseL3 )
fpVerboseL3->Message("create", "ntuple F column", name);
#endif
G4int index = fNtuple->columns().size();
tools::hbook::wntuple::column<float>* column = fNtuple->create_column<float>(name);
fNtupleFColumnMap[index] = column;
fLockFirstNtupleColumnId = true;
#ifdef G4VERBOSE
if ( fpVerboseL1 )
fpVerboseL1->Message("create", "ntuple F column", name);
#endif
return index + fFirstNtupleColumnId;
}
//_____________________________________________________________________________
G4int ExG4HbookAnalysisManager::CreateNtupleDColumn(const G4String& name)
{
#ifdef G4VERBOSE
if ( fpVerboseL3 )
fpVerboseL3->Message("create", "ntuple D column", name);
#endif
G4int index = fNtuple->columns().size();
tools::hbook::wntuple::column<double>* column = fNtuple->create_column<double>(name);
fNtupleDColumnMap[index] = column;
fLockFirstNtupleColumnId = true;
#ifdef G4VERBOSE
if ( fpVerboseL1 )
fpVerboseL1->Message("create", "ntuple D column", name);
#endif
return index + fFirstNtupleColumnId;
}
//_____________________________________________________________________________
void ExG4HbookAnalysisManager::FinishNtuple()
{
#ifdef G4VERBOSE
if ( fpVerboseL3 )
fpVerboseL3->Message("finish", "ntuple", fNtupleName);
#endif
// Return to //PAWC/LUN1 :
tools::hbook::CHCDIR("//PAWC/LUN1"," ");
//fNtuple->add_row_beg();
#ifdef G4VERBOSE
if ( fpVerboseL1 )
fpVerboseL1->Message("finish", "ntuple", fNtupleName);
#endif
}
//_____________________________________________________________________________
G4bool ExG4HbookAnalysisManager::FillH1(G4int id, G4double value, G4double weight)
{
#ifdef G4VERBOSE
if ( fpVerboseL3 ) {
G4ExceptionDescription description;
description << " id " << id << " value " << value;
fpVerboseL3->Message("fill", "H1", description);
}
#endif
tools::hbook::h1* h1 = GetH1(id);
if ( ! h1 ) {
G4ExceptionDescription description;
description << " " << "histogram " << id << " does not exist.";
G4Exception("G4HbookAnalysisManager::FillH1()",
"Analysis_W007", JustWarning, description);
return false;
}
h1->fill(value, weight);
#ifdef G4VERBOSE
if ( fpVerboseL2 ) {
G4ExceptionDescription description;
description << " id " << id << " value " << value;
fpVerboseL2->Message("fill", "H1", description);
}
#endif
return true;
}
//_____________________________________________________________________________
G4bool ExG4HbookAnalysisManager::FillH2(G4int id,
G4double xvalue, G4double yvalue,
G4double weight)
{
#ifdef G4VERBOSE
if ( fpVerboseL3 ) {
G4ExceptionDescription description;
description << " id " << id
<< " xvalue " << xvalue << " yvalue " << yvalue;
fpVerboseL3->Message("fill", "H2", description);
}
#endif
tools::hbook::h2* h2 = GetH2(id);
if ( ! h2 ) {
G4ExceptionDescription description;
description << " " << "histogram " << id << " does not exist.";
G4Exception("G4HbookAnalysisManager::FillH2()",
"Analysis_W007", JustWarning, description);
return false;
}
h2->fill(xvalue, yvalue, weight);
#ifdef G4VERBOSE
if ( fpVerboseL2 ) {
G4ExceptionDescription description;
description << " id " << id
<< " xvalue " << xvalue << " yvalue " << yvalue;
fpVerboseL2->Message("fill", "H2", description);
}
#endif
return true;
}
//_____________________________________________________________________________
G4bool ExG4HbookAnalysisManager::FillNtupleIColumn(G4int id, G4int value)
{
#ifdef G4VERBOSE
if ( fpVerboseL3 ) {
G4ExceptionDescription description;
description << " id " << id << " value " << value;
fpVerboseL3->Message("fill", "ntuple I column", description);
}
#endif
tools::hbook::wntuple::column<int>* column = GetNtupleIColumn(id);
if ( ! column ) {
G4ExceptionDescription description;
description << " " << "column " << id << " does not exist.";
G4Exception("G4HbookAnalysisManager::FillNtupleIColumn()",
"Analysis_W009", JustWarning, description);
return false;
}
column->fill(value);
#ifdef G4VERBOSE
if ( fpVerboseL2 ) {
G4ExceptionDescription description;
description << " id " << id << " value " << value;
fpVerboseL2->Message("fill", "ntuple I column", description);
}
#endif
return true;
}
//_____________________________________________________________________________
G4bool ExG4HbookAnalysisManager::FillNtupleFColumn(G4int id, G4float value)
{
#ifdef G4VERBOSE
if ( fpVerboseL3 ) {
G4ExceptionDescription description;
description << " id " << id << " value " << value;
fpVerboseL3->Message("fill", "ntuple F column", description);
}
#endif
tools::hbook::wntuple::column<float>* column = GetNtupleFColumn(id);
if ( ! column ) {
G4ExceptionDescription description;
description << " " << "column " << id << " does not exist.";
G4Exception("G4HbookAnalysisManager::FillNtupleFColumn()",
"Analysis_W009", JustWarning, description);
return false;
}
column->fill(value);
#ifdef G4VERBOSE
if ( fpVerboseL2 ) {
G4ExceptionDescription description;
description << " id " << id << " value " << value;
fpVerboseL2->Message("fill", "ntuple F column", description);
}
#endif
return true;
}
//_____________________________________________________________________________
G4bool ExG4HbookAnalysisManager::FillNtupleDColumn(G4int id, G4double value)
{
#ifdef G4VERBOSE
if ( fpVerboseL3 ) {
G4ExceptionDescription description;
description << " id " << id << " value " << value;
fpVerboseL3->Message("fill", "ntuple D column", description);
}
#endif
tools::hbook::wntuple::column<double>* column = GetNtupleDColumn(id);
if ( ! column ) {
G4ExceptionDescription description;
description << " " << "column " << id << " does not exist.";
G4Exception("G4HbookAnalysisManager::FillNtupleDColumn()",
"Analysis_W009", JustWarning, description);
return false;
}
column->fill(value);
#ifdef G4VERBOSE
if ( fpVerboseL2 ) {
G4ExceptionDescription description;
description << " id " << id << " value " << value;
fpVerboseL2->Message("fill", "ntuple D column", description);
}
#endif
return true;
}
//_____________________________________________________________________________
G4bool ExG4HbookAnalysisManager::AddNtupleRow()
{
#ifdef G4VERBOSE
if ( fpVerboseL3 )
fpVerboseL3->Message("add", "ntuple row", "");
#endif
//G4cout << "Hbook: Going to add Ntuple row ..." << G4endl;
if ( ! fNtuple ) {
G4ExceptionDescription description;
description << " " << "ntuple does not exist. ";
G4Exception("G4HbookAnalysisManager::AddNtupleRow()",
"Analysis_W008", JustWarning, description);
return false;
}
//fNtuple->add_row_fast();
fNtuple->add_row();
#ifdef G4VERBOSE
if ( fpVerboseL2 )
fpVerboseL2->Message("add", "ntuple row", "");
#endif
return true;
}
//_____________________________________________________________________________
tools::hbook::h1* ExG4HbookAnalysisManager::GetH1(G4int id, G4bool warn) const
{
G4int index = id - fFirstHistoId;
if ( index < 0 || index >= G4int(fH1Vector.size()) ) {
if ( warn) {
G4ExceptionDescription description;
description << " " << "histo " << id << " does not exist.";
G4Exception("G4HbookAnalysisManager::GetH1()",
"Analysis_W007", JustWarning, description);
}
return 0;
}
return fH1Vector[index];
}
//_____________________________________________________________________________
tools::hbook::h2* ExG4HbookAnalysisManager::GetH2(G4int id, G4bool warn) const
{
G4int index = id - fFirstHistoId;
if ( index < 0 || index >= G4int(fH2Vector.size()) ) {
if ( warn) {
G4ExceptionDescription description;
description << " " << "histo " << id << " does not exist.";
G4Exception("G4HbookAnalysisManager::GetH2()",
"Analysis_W007", JustWarning, description);
}
return 0;
}
return fH2Vector[index];
}
//_____________________________________________________________________________
tools::hbook::wntuple* ExG4HbookAnalysisManager::GetNtuple() const
{
return fNtuple;
}
//_____________________________________________________________________________
G4bool ExG4HbookAnalysisManager::SetH1HbookIdOffset(G4int offset)
{
if ( fH1Vector.size() ) {
G4ExceptionDescription description;
description
<< "Cannot set H1HbookIdOffset as some H1 histogramms already exist.";
G4Exception("G4HbookAnalysisManager::SetH1HbookIdOffset()",
"Analysis_W009", JustWarning, description);
return false;
}
if ( fFirstHistoId + offset < 1 ) {
G4ExceptionDescription description;
description << "The first histogram HBOOK id must be >= 1.";
G4Exception("G4HbookAnalysisManager::SetH1HbookIdOffset()",
"Analysis_W009", JustWarning, description);
return false;
}
fH1HbookIdOffset = offset;
return true;
}
//_____________________________________________________________________________
G4bool ExG4HbookAnalysisManager::SetH2HbookIdOffset(G4int offset)
{
if ( fH2Vector.size() ) {
G4ExceptionDescription description;
description
<< "Cannot set H2HbookIdOffset as some H2 histogramms already exist.";
G4Exception("G4HbookAnalysisManager::SetH2HbookIdOffset()",
"Analysis_W009", JustWarning, description);
return false;
}
if ( fFirstHistoId + offset < 1 ) {
G4ExceptionDescription description;
description << "The first histogram HBOOK id must be >= 1.";
G4Exception("G4HbookAnalysisManager::SetH1HbookIdOffset()",
"Analysis_W009", JustWarning, description);
return false;
}
fH2HbookIdOffset = offset;
return true;
}
//_____________________________________________________________________________
G4bool ExG4HbookAnalysisManager::SetNtupleHbookId(G4int ntupleId)
{
if ( fNtuple ) {
G4ExceptionDescription description;
description
<< "Cannot set NtupleHbookId as an ntuple already exists.";
G4Exception("G4HbookAnalysisManager::SetNtupleHbookId()",
"Analysis_W010", JustWarning, description);
return false;
}
if ( ntupleId < 1 ) {
G4ExceptionDescription description;
description << "The ntuple HBOOK id must be >= 1.";
G4Exception("G4HbookAnalysisManager::SetNtupleHbookId()",
"Analysis_W010", JustWarning, description);
return false;
}
fNtupleHbookId = ntupleId;
return true;
}
#endif
@@ -23,8 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PhysListEmStandard.cc,v 1.24 2009-11-15 22:10:03 maire Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -41,6 +40,7 @@
#include "G4KleinNishinaModel.hh"
#include "G4eMultipleScattering.hh"
#include "G4UrbanMscModel96.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
@@ -65,6 +65,8 @@
#include "G4LossTableManager.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEmStandard::PhysListEmStandard(const G4String& name)
@@ -100,20 +102,29 @@ void PhysListEmStandard::ConstructProcess()
} else if (particleName == "e-") {
ph->RegisterProcess(new G4eMultipleScattering(), particle);
G4eMultipleScattering* msc = new G4eMultipleScattering();
msc -> AddEmModel(0, new G4UrbanMscModel96());
ph->RegisterProcess(msc, particle);
//
G4eIonisation* eIoni = new G4eIonisation();
eIoni->SetStepFunction(0.1, 100*um);
ph->RegisterProcess(eIoni, particle);
//
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
} else if (particleName == "e+") {
ph->RegisterProcess(new G4eMultipleScattering(), particle);
G4eMultipleScattering* msc = new G4eMultipleScattering();
msc -> AddEmModel(0, new G4UrbanMscModel96());
ph->RegisterProcess(msc, particle);
//
G4eIonisation* eIoni = new G4eIonisation();
eIoni->SetStepFunction(0.1, 100*um);
ph->RegisterProcess(eIoni, particle);
//
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
//
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
} else if (particleName == "mu+" ||
particleName == "mu-" ) {
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PhysicsList.cc,v 1.16 2009-09-16 18:07:30 maire Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/src/PhysicsList.cc
/// \brief Implementation of the PhysicsList class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -38,6 +40,7 @@
#include "G4EmStandardPhysics_option1.hh"
#include "G4EmStandardPhysics_option2.hh"
#include "G4EmStandardPhysics_option3.hh"
#include "G4EmStandardPhysics_option4.hh"
#include "G4EmLivermorePhysics.hh"
#include "G4EmPenelopePhysics.hh"
@@ -48,6 +51,7 @@
#include "G4ProcessManager.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
// Bosons
#include "G4ChargedGeantino.hh"
@@ -100,27 +104,27 @@ PhysicsList::PhysicsList() : G4VModularPhysicsList()
{
G4LossTableManager::Instance();
defaultCutValue = 1.*mm;
cutForGamma = defaultCutValue;
cutForElectron = defaultCutValue;
cutForPositron = defaultCutValue;
fCutForGamma = defaultCutValue;
fCutForElectron = defaultCutValue;
fCutForPositron = defaultCutValue;
pMessenger = new PhysicsListMessenger(this);
fMessenger = new PhysicsListMessenger(this);
SetVerboseLevel(1);
// EM physics
///emName = "emstandard_opt0";
///emPhysicsList = new G4EmStandardPhysics();
emName = "local";
emPhysicsList = new PhysListEmStandard(emName);
///fEmName = "emstandard_opt0";
///fEmPhysicsList = new G4EmStandardPhysics();
fEmName = "local";
fEmPhysicsList = new PhysListEmStandard(fEmName);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsList::~PhysicsList()
{
delete pMessenger;
delete emPhysicsList;
delete fMessenger;
delete fEmPhysicsList;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -182,7 +186,7 @@ void PhysicsList::ConstructProcess()
// electromagnetic physics list
//
emPhysicsList->ConstructProcess();
fEmPhysicsList->ConstructProcess();
// decay process
//
@@ -201,47 +205,53 @@ void PhysicsList::AddPhysicsList(const G4String& name)
G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
}
if (name == emName) return;
if (name == fEmName) return;
if (name == "local") {
emName = name;
delete emPhysicsList;
emPhysicsList = new PhysListEmStandard(name);
fEmName = name;
delete fEmPhysicsList;
fEmPhysicsList = new PhysListEmStandard(name);
} else if (name == "emstandard_opt0") {
emName = name;
delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics();
fEmName = name;
delete fEmPhysicsList;
fEmPhysicsList = new G4EmStandardPhysics();
} else if (name == "emstandard_opt1") {
emName = name;
delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics_option1();
fEmName = name;
delete fEmPhysicsList;
fEmPhysicsList = new G4EmStandardPhysics_option1();
} else if (name == "emstandard_opt2") {
emName = name;
delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics_option2();
fEmName = name;
delete fEmPhysicsList;
fEmPhysicsList = new G4EmStandardPhysics_option2();
} else if (name == "emstandard_opt3") {
emName = name;
delete emPhysicsList;
emPhysicsList = new G4EmStandardPhysics_option3();
fEmName = name;
delete fEmPhysicsList;
fEmPhysicsList = new G4EmStandardPhysics_option3();
} else if (name == "emstandard_opt4") {
fEmName = name;
delete fEmPhysicsList;
fEmPhysicsList = new G4EmStandardPhysics_option4();
} else if (name == "empenelope"){
emName = name;
delete emPhysicsList;
emPhysicsList = new G4EmPenelopePhysics();
fEmName = name;
delete fEmPhysicsList;
fEmPhysicsList = new G4EmPenelopePhysics();
} else if (name == "emlivermore"){
emName = name;
delete emPhysicsList;
emPhysicsList = new G4EmLivermorePhysics();
fEmName = name;
delete fEmPhysicsList;
fEmPhysicsList = new G4EmLivermorePhysics();
} else {
@@ -290,7 +300,7 @@ void PhysicsList::AddStepMax()
if (stepMaxProcess->IsApplicable(*particle))
{
pmanager ->AddDiscreteProcess(stepMaxProcess);
pmanager ->AddDiscreteProcess(stepMaxProcess);
}
}
}
@@ -306,9 +316,9 @@ void PhysicsList::SetCuts()
// set cut values for gamma at first and for e- second and next for e+,
// because some processes for e+/e- need cut values for gamma
SetCutValue(cutForGamma, "gamma");
SetCutValue(cutForElectron, "e-");
SetCutValue(cutForPositron, "e+");
SetCutValue(fCutForGamma, "gamma");
SetCutValue(fCutForElectron, "e-");
SetCutValue(fCutForPositron, "e+");
if (verboseLevel>0) DumpCutValuesTable();
}
@@ -317,24 +327,24 @@ void PhysicsList::SetCuts()
void PhysicsList::SetCutForGamma(G4double cut)
{
cutForGamma = cut;
SetParticleCuts(cutForGamma, G4Gamma::Gamma());
fCutForGamma = cut;
SetParticleCuts(fCutForGamma, G4Gamma::Gamma());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::SetCutForElectron(G4double cut)
{
cutForElectron = cut;
SetParticleCuts(cutForElectron, G4Electron::Electron());
fCutForElectron = cut;
SetParticleCuts(fCutForElectron, G4Electron::Electron());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::SetCutForPositron(G4double cut)
{
cutForPositron = cut;
SetParticleCuts(cutForPositron, G4Positron::Positron());
fCutForPositron = cut;
SetParticleCuts(fCutForPositron, G4Positron::Positron());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PhysicsListMessenger.cc,v 1.5 2006-06-29 16:50:41 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/src/PhysicsListMessenger.cc
/// \brief Implementation of the PhysicsListMessenger class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -39,55 +41,55 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsListMessenger::PhysicsListMessenger(PhysicsList* pPhys)
:pPhysicsList(pPhys)
:fPhysicsList(pPhys)
{
physDir = new G4UIdirectory("/testem/phys/");
physDir->SetGuidance("physics list commands");
fPhysDir = new G4UIdirectory("/testem/phys/");
fPhysDir->SetGuidance("physics list commands");
gammaCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setGCut",this);
gammaCutCmd->SetGuidance("Set gamma cut.");
gammaCutCmd->SetParameterName("Gcut",false);
gammaCutCmd->SetUnitCategory("Length");
gammaCutCmd->SetRange("Gcut>0.0");
gammaCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fGammaCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setGCut",this);
fGammaCutCmd->SetGuidance("Set gamma cut.");
fGammaCutCmd->SetParameterName("Gcut",false);
fGammaCutCmd->SetUnitCategory("Length");
fGammaCutCmd->SetRange("Gcut>0.0");
fGammaCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
electCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setECut",this);
electCutCmd->SetGuidance("Set electron cut.");
electCutCmd->SetParameterName("Ecut",false);
electCutCmd->SetUnitCategory("Length");
electCutCmd->SetRange("Ecut>0.0");
electCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fElectCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setECut",this);
fElectCutCmd->SetGuidance("Set electron cut.");
fElectCutCmd->SetParameterName("Ecut",false);
fElectCutCmd->SetUnitCategory("Length");
fElectCutCmd->SetRange("Ecut>0.0");
fElectCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
protoCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setPCut",this);
protoCutCmd->SetGuidance("Set positron cut.");
protoCutCmd->SetParameterName("Pcut",false);
protoCutCmd->SetUnitCategory("Length");
protoCutCmd->SetRange("Pcut>0.0");
protoCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fProtoCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setPCut",this);
fProtoCutCmd->SetGuidance("Set positron cut.");
fProtoCutCmd->SetParameterName("Pcut",false);
fProtoCutCmd->SetUnitCategory("Length");
fProtoCutCmd->SetRange("Pcut>0.0");
fProtoCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
allCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setCuts",this);
allCutCmd->SetGuidance("Set cut for all.");
allCutCmd->SetParameterName("cut",false);
allCutCmd->SetUnitCategory("Length");
allCutCmd->SetRange("cut>0.0");
allCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fAllCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setCuts",this);
fAllCutCmd->SetGuidance("Set cut for all.");
fAllCutCmd->SetParameterName("cut",false);
fAllCutCmd->SetUnitCategory("Length");
fAllCutCmd->SetRange("cut>0.0");
fAllCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
pListCmd = new G4UIcmdWithAString("/testem/phys/addPhysics",this);
pListCmd->SetGuidance("Add modula physics list.");
pListCmd->SetParameterName("PList",false);
pListCmd->AvailableForStates(G4State_PreInit);
fListCmd = new G4UIcmdWithAString("/testem/phys/addPhysics",this);
fListCmd->SetGuidance("Add modula physics list.");
fListCmd->SetParameterName("PList",false);
fListCmd->AvailableForStates(G4State_PreInit);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsListMessenger::~PhysicsListMessenger()
{
delete gammaCutCmd;
delete electCutCmd;
delete protoCutCmd;
delete allCutCmd;
delete pListCmd;
delete physDir;
delete fGammaCutCmd;
delete fElectCutCmd;
delete fProtoCutCmd;
delete fAllCutCmd;
delete fListCmd;
delete fPhysDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -95,25 +97,25 @@ PhysicsListMessenger::~PhysicsListMessenger()
void PhysicsListMessenger::SetNewValue(G4UIcommand* command,
G4String newValue)
{
if( command == gammaCutCmd )
{ pPhysicsList->SetCutForGamma(gammaCutCmd->GetNewDoubleValue(newValue));}
if( command == fGammaCutCmd )
{ fPhysicsList->SetCutForGamma(fGammaCutCmd->GetNewDoubleValue(newValue));}
if( command == electCutCmd )
{ pPhysicsList->SetCutForElectron(electCutCmd->GetNewDoubleValue(newValue));}
if( command == fElectCutCmd )
{ fPhysicsList->SetCutForElectron(fElectCutCmd->GetNewDoubleValue(newValue));}
if( command == protoCutCmd )
{ pPhysicsList->SetCutForPositron(protoCutCmd->GetNewDoubleValue(newValue));}
if( command == fProtoCutCmd )
{ fPhysicsList->SetCutForPositron(fProtoCutCmd->GetNewDoubleValue(newValue));}
if( command == allCutCmd )
if( command == fAllCutCmd )
{
G4double cut = allCutCmd->GetNewDoubleValue(newValue);
pPhysicsList->SetCutForGamma(cut);
pPhysicsList->SetCutForElectron(cut);
pPhysicsList->SetCutForPositron(cut);
G4double cut = fAllCutCmd->GetNewDoubleValue(newValue);
fPhysicsList->SetCutForGamma(cut);
fPhysicsList->SetCutForElectron(cut);
fPhysicsList->SetCutForPositron(cut);
}
if( command == pListCmd )
{ pPhysicsList->AddPhysicsList(newValue);}
if( command == fListCmd )
{ fPhysicsList->AddPhysicsList(newValue);}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PrimaryGeneratorAction.cc,v 1.6 2006-06-29 16:50:44 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/src/PrimaryGeneratorAction.cc
/// \brief Implementation of the PrimaryGeneratorAction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -35,28 +37,29 @@
#include "G4Event.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PrimaryGeneratorAction::PrimaryGeneratorAction (DetectorConstruction* det)
:detector(det)
:fDetector(det)
{
G4int n_particle = 1;
particleGun = new G4ParticleGun(n_particle);
fParticleGun = new G4ParticleGun(n_particle);
G4ParticleDefinition* particle
= G4ParticleTable::GetParticleTable()->FindParticle("e-");
particleGun->SetParticleDefinition(particle);
particleGun->SetParticleEnergy(5.*GeV);
particleGun->SetParticlePosition(initPos = G4ThreeVector(-1*cm,-1*cm,-1*cm));
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
fParticleGun->SetParticleDefinition(particle);
fParticleGun->SetParticleEnergy(5.*GeV);
fParticleGun->SetParticlePosition(fInitPos = G4ThreeVector(-1*cm,-1*cm,-1*cm));
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PrimaryGeneratorAction::~PrimaryGeneratorAction()
{
delete particleGun;
delete fParticleGun;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -65,11 +68,11 @@ void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
//this function is called at the begin of event
//
if (particleGun->GetParticlePosition() == initPos) {
G4double position = -0.5*(detector->GetfullLength());
particleGun->SetParticlePosition(G4ThreeVector(0.*cm,0.*cm,position));
if (fParticleGun->GetParticlePosition() == fInitPos) {
G4double position = -0.5*(fDetector->GetfullLength());
fParticleGun->SetParticlePosition(G4ThreeVector(0.*cm,0.*cm,position));
}
particleGun->GeneratePrimaryVertex(anEvent);
fParticleGun->GeneratePrimaryVertex(anEvent);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: RunAction.cc,v 1.26 2010-11-09 21:25:15 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/src/RunAction.cc
/// \brief Implementation of the RunAction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -40,151 +42,121 @@
#include "G4RunManager.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
#include <iomanip>
#include "Randomize.hh"
#ifdef G4ANALYSIS_USE
#include "AIDA/AIDA.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RunAction::RunAction(DetectorConstruction* det, PrimaryGeneratorAction* kin)
:Det(det),Kin(kin),af(0),tree(0)
:fDet(det),fKin(kin)
{
runMessenger = new RunActionMessenger(this);
fRunMessenger = new RunActionMessenger(this);
nLbin = nRbin = MaxBin;
f_nLbin = f_nRbin = MaxBin;
dEdL.resize(nLbin, 0.0);
sumELongit.resize(nLbin, 0.0);
sumELongitCumul.resize(nLbin, 0.0);
sumE2Longit.resize(nLbin, 0.0);
sumE2LongitCumul.resize(nLbin, 0.0);
f_dEdL.resize(f_nLbin, 0.0);
fSumELongit.resize(f_nLbin, 0.0);
fSumELongitCumul.resize(f_nLbin, 0.0);
fSumE2Longit.resize(f_nLbin, 0.0);
fSumE2LongitCumul.resize(f_nLbin, 0.0);
dEdR.resize(nRbin, 0.0);
sumERadial.resize(nRbin, 0.0);
sumERadialCumul.resize(nRbin, 0.0);
sumE2Radial.resize(nRbin, 0.0);
sumE2RadialCumul.resize(nRbin, 0.0);
f_dEdR.resize(f_nRbin, 0.0);
fSumERadial.resize(f_nRbin, 0.0);
fSumERadialCumul.resize(f_nRbin, 0.0);
fSumE2Radial.resize(f_nRbin, 0.0);
fSumE2RadialCumul.resize(f_nRbin, 0.0);
edeptrue = 1.;
rmstrue = 1.;
limittrue = DBL_MAX;
fEdeptrue = 1.;
fRmstrue = 1.;
fLimittrue = DBL_MAX;
fChargedStep = 0.0;
fNeutralStep = 0.0;
verbose = 0;
#ifdef G4ANALYSIS_USE
// Creating the analysis factory
af = AIDA_createAnalysisFactory();
if(!af) {
G4cout << " RunAction::RunAction() :"
<< " problem creating the AIDA analysis factory."
<< G4endl;
}
#endif
histoName[0] = "testem2";
histoType = "root";
fVerbose = 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RunAction::~RunAction()
{
delete runMessenger;
#ifdef G4ANALYSIS_USE
delete af;
#endif
delete fRunMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RunAction::bookHisto()
void RunAction::BookHisto()
{
#ifdef G4ANALYSIS_USE
if(!af) return;
// Create analysis manager
// The choice of analysis technology is done via selection of a namespace
//
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
// Open an output file
//
fHistoName[0] = "testem2";
analysisManager->OpenFile(fHistoName[0]);
analysisManager->SetVerboseLevel(1);
G4String extension = analysisManager->GetFileType();
fHistoName[1] = fHistoName[0] + "." + extension;
// Creating histograms
//
G4double Ekin = fKin->GetParticleGun()->GetParticleEnergy();
G4double dLradl = fDet->GetdLradl();
G4double dRradl = fDet->GetdRradl();
// Creating a tree mapped to an hbook file.
histoName[1] = histoName[0] + "." + histoType;
G4bool readOnly = false;
G4bool createNew = true;
G4String options = "";
AIDA::ITreeFactory* tf = af->createTreeFactory();
tree = tf->create(histoName[1], histoType, readOnly, createNew, options);
delete tf;
if(!tree) {
G4cout << "RunAction::bookHisto() :"
<< " problem creating the AIDA tree with "
<< " storeName = " << histoName[1]
<< " readOnly = " << readOnly
<< " createNew = " << createNew
<< G4endl;
return;
}
// Creating a histogram factory, whose histograms will be handled by the tree
AIDA::IHistogramFactory* hf = af->createHistogramFactory(*tree);
G4double Ekin = Kin->GetParticleGun()->GetParticleEnergy();
G4double dLradl = Det->GetdLradl();
G4double dRradl = Det->GetdRradl();
analysisManager->SetFirstHistoId(1);
analysisManager->CreateH1( "1","total energy deposit(percent of Einc)",
110,0.,110.);
histo[0] = hf->createHistogram1D( "1","total energy deposit(percent of Einc)",
110,0.,110.);
analysisManager->CreateH1( "2","total charged tracklength (radl)",
110,0.,110.*Ekin/GeV);
histo[1] = hf->createHistogram1D( "2","total charged tracklength (radl)",
110,0.,110.*Ekin/GeV);
analysisManager->CreateH1( "3","total neutral tracklength (radl)",
110,0.,1100.*Ekin/GeV);
histo[2] = hf->createHistogram1D( "3","total neutral tracklength (radl)",
110,0.,1100.*Ekin/GeV);
analysisManager->CreateH1( "4","longit energy profile (% of E inc)",
f_nLbin,0.,f_nLbin*dLradl);
analysisManager->CreateH1( "5","rms on longit Edep (% of E inc)",
f_nLbin,0.,f_nLbin*dLradl);
histo[3] = hf->createHistogram1D( "4","longit energy profile (% of E inc)",
nLbin,0.,nLbin*dLradl);
histo[4] = hf->createHistogram1D( "5","rms on longit Edep (% of E inc)",
nLbin,0.,nLbin*dLradl);
G4double Zmin=0.5*dLradl, Zmax=Zmin+f_nLbin*dLradl;
analysisManager->CreateH1( "6","cumul longit energy dep (% of E inc)",
f_nLbin,Zmin,Zmax);
analysisManager->CreateH1( "7","rms on cumul longit Edep (% of E inc)",
f_nLbin,Zmin,Zmax);
G4double Zmin=0.5*dLradl, Zmax=Zmin+nLbin*dLradl;
histo[5] = hf->createHistogram1D( "6","cumul longit energy dep (% of E inc)",
nLbin,Zmin,Zmax);
histo[6] = hf->createHistogram1D( "7","rms on cumul longit Edep (% of E inc)",
nLbin,Zmin,Zmax);
analysisManager->CreateH1( "8","radial energy profile (% of E inc)",
f_nRbin,0.,f_nRbin*dRradl);
analysisManager->CreateH1( "9","rms on radial Edep (% of E inc)",
f_nRbin,0.,f_nRbin*dRradl);
histo[7] = hf->createHistogram1D( "8","radial energy profile (% of E inc)",
nRbin,0.,nRbin*dRradl);
histo[8] = hf->createHistogram1D( "9","rms on radial Edep (% of E inc)",
nRbin,0.,nRbin*dRradl);
G4double Rmin=0.5*dRradl, Rmax=Rmin+f_nRbin*dRradl;
analysisManager->CreateH1("10","cumul radial energy dep (% of E inc)",
f_nRbin,Rmin,Rmax);
G4double Rmin=0.5*dRradl, Rmax=Rmin+nRbin*dRradl;
histo[9] = hf->createHistogram1D("10","cumul radial energy dep (% of E inc)",
nRbin,Rmin,Rmax);
histo[10]= hf->createHistogram1D("11","rms on cumul radial Edep (% of E inc)",
nRbin,Rmin,Rmax);
delete hf;
G4cout << "\n----> Histogram Tree is opened in " << histoName[1] << G4endl;
#endif
analysisManager->CreateH1("11","rms on cumul radial Edep (% of E inc)",
f_nRbin,Rmin,Rmax);
G4cout << "\n----> Histogram file is opened in " << fHistoName[1] << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RunAction::cleanHisto()
void RunAction::CleanHisto()
{
#ifdef G4ANALYSIS_USE
if(tree) {
tree->commit(); // Writing the histograms to the file
tree->close(); // and closing the tree (and the file)
G4cout << "\n----> Histogram Tree is saved in " << histoName[1] << G4endl;
delete tree;
tree = 0;
}
#endif
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
analysisManager->Write();
analysisManager->CloseFile();
delete G4AnalysisManager::Instance();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -194,72 +166,88 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
// save Rndm status
G4RunManager::GetRunManager()->SetRandomNumberStore(true);
////G4RunManager::GetRunManager()->SetRandomNumberStore(true);
CLHEP::HepRandom::showEngineStatus();
nLbin = Det->GetnLtot();
nRbin = Det->GetnRtot();
fChargedStep = 0.0;
fNeutralStep = 0.0;
f_nLbin = fDet->GetnLtot();
f_nRbin = fDet->GetnRtot();
//initialize arrays of cumulative energy deposition
//
for (G4int i=0; i<nLbin; i++)
sumELongit[i]=sumE2Longit[i]=sumELongitCumul[i]=sumE2LongitCumul[i]=0.;
for (G4int i=0; i<f_nLbin; i++)
fSumELongit[i]=fSumE2Longit[i]=fSumELongitCumul[i]=fSumE2LongitCumul[i]=0.;
for (G4int j=0; j<nRbin; j++)
sumERadial[j]=sumE2Radial[j]=sumERadialCumul[j]=sumE2RadialCumul[j]=0.;
for (G4int j=0; j<f_nRbin; j++)
fSumERadial[j]=fSumE2Radial[j]=fSumERadialCumul[j]=fSumE2RadialCumul[j]=0.;
//initialize track length
sumChargTrLength=sum2ChargTrLength=sumNeutrTrLength=sum2NeutrTrLength=0.;
fSumChargTrLength=fSum2ChargTrLength=fSumNeutrTrLength=fSum2NeutrTrLength=0.;
//histograms
//
if (aRun->GetRunID() == 0) bookHisto();
if (aRun->GetRunID() == 0) BookHisto();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RunAction::fillPerEvent()
void RunAction::InitializePerEvent()
{
//initialize arrays of energy deposit per bin
for (G4int i=0; i<f_nLbin; i++)
{ f_dEdL[i] = 0.; }
for (G4int j=0; j<f_nRbin; j++)
{ f_dEdR[j] = 0.; }
//initialize tracklength
fChargTrLength = fNeutrTrLength = 0.;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RunAction::FillPerEvent()
{
//accumulate statistic
//
G4double dLCumul = 0.;
for (G4int i=0; i<nLbin; i++)
for (G4int i=0; i<f_nLbin; i++)
{
sumELongit[i] += dEdL[i];
sumE2Longit[i] += dEdL[i]*dEdL[i];
dLCumul += dEdL[i];
sumELongitCumul[i] += dLCumul;
sumE2LongitCumul[i] += dLCumul*dLCumul;
fSumELongit[i] += f_dEdL[i];
fSumE2Longit[i] += f_dEdL[i]*f_dEdL[i];
dLCumul += f_dEdL[i];
fSumELongitCumul[i] += dLCumul;
fSumE2LongitCumul[i] += dLCumul*dLCumul;
}
G4double dRCumul = 0.;
for (G4int j=0; j<nRbin; j++)
for (G4int j=0; j<f_nRbin; j++)
{
sumERadial[j] += dEdR[j];
sumE2Radial[j] += dEdR[j]*dEdR[j];
dRCumul += dEdR[j];
sumERadialCumul[j] += dRCumul;
sumE2RadialCumul[j] += dRCumul*dRCumul;
fSumERadial[j] += f_dEdR[j];
fSumE2Radial[j] += f_dEdR[j]*f_dEdR[j];
dRCumul += f_dEdR[j];
fSumERadialCumul[j] += dRCumul;
fSumE2RadialCumul[j] += dRCumul*dRCumul;
}
sumChargTrLength += ChargTrLength;
sum2ChargTrLength += ChargTrLength*ChargTrLength;
sumNeutrTrLength += NeutrTrLength;
sum2NeutrTrLength += NeutrTrLength*NeutrTrLength;
fSumChargTrLength += fChargTrLength;
fSum2ChargTrLength += fChargTrLength*fChargTrLength;
fSumNeutrTrLength += fNeutrTrLength;
fSum2NeutrTrLength += fNeutrTrLength*fNeutrTrLength;
#ifdef G4ANALYSIS_USE
//fill histograms
//
if(tree) {
G4double Ekin=Kin->GetParticleGun()->GetParticleEnergy();
G4double mass=Kin->GetParticleGun()->GetParticleDefinition()->GetPDGMass();
G4double radl=Det->GetMaterial()->GetRadlen();
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
histo[0]->fill(100.*dLCumul/(Ekin+mass));
histo[1]->fill(ChargTrLength/radl);
histo[2]->fill(NeutrTrLength/radl);
}
#endif
G4double Ekin=fKin->GetParticleGun()->GetParticleEnergy();
G4double mass=fKin->GetParticleGun()->GetParticleDefinition()->GetPDGMass();
G4double radl=fDet->GetMaterial()->GetRadlen();
analysisManager->FillH1(1, 100.*dLCumul/(Ekin+mass));
analysisManager->FillH1(2, fChargTrLength/radl);
analysisManager->FillH1(3, fNeutrTrLength/radl);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -269,70 +257,67 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
//compute and print statistic
//
G4int NbOfEvents = aRun->GetNumberOfEvent();
G4double kinEnergy = Kin->GetParticleGun()->GetParticleEnergy();
G4double kinEnergy = fKin->GetParticleGun()->GetParticleEnergy();
assert(NbOfEvents*kinEnergy > 0);
G4double mass=Kin->GetParticleGun()->GetParticleDefinition()->GetPDGMass();
G4double norme = 100./(NbOfEvents*(kinEnergy+mass));
fChargedStep /= G4double(NbOfEvents);
fNeutralStep /= G4double(NbOfEvents);
G4double mass=fKin->GetParticleGun()->GetParticleDefinition()->GetPDGMass();
G4double norme = 100./(NbOfEvents*(kinEnergy+mass));
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
//longitudinal
//
G4double dLradl = Det->GetdLradl();
G4double dLradl = fDet->GetdLradl();
MyVector MeanELongit(nLbin), rmsELongit(nLbin);
MyVector MeanELongitCumul(nLbin), rmsELongitCumul(nLbin);
MyVector MeanELongit(f_nLbin), rmsELongit(f_nLbin);
MyVector MeanELongitCumul(f_nLbin), rmsELongitCumul(f_nLbin);
G4int i;
for (i=0; i<nLbin; i++)
for (i=0; i<f_nLbin; i++)
{
MeanELongit[i] = norme*sumELongit[i];
rmsELongit[i] = norme*std::sqrt(std::fabs(NbOfEvents*sumE2Longit[i]
- sumELongit[i]*sumELongit[i]));
MeanELongit[i] = norme*fSumELongit[i];
rmsELongit[i] = norme*std::sqrt(std::fabs(NbOfEvents*fSumE2Longit[i]
- fSumELongit[i]*fSumELongit[i]));
MeanELongitCumul[i] = norme*sumELongitCumul[i];
rmsELongitCumul[i] = norme*std::sqrt(std::fabs(NbOfEvents*sumE2LongitCumul[i]
- sumELongitCumul[i]*sumELongitCumul[i]));
MeanELongitCumul[i] = norme*fSumELongitCumul[i];
rmsELongitCumul[i] = norme*std::sqrt(std::fabs(NbOfEvents*fSumE2LongitCumul[i]
- fSumELongitCumul[i]*fSumELongitCumul[i]));
#ifdef G4ANALYSIS_USE
if(tree) {
G4double bin = (i+0.5)*dLradl;
histo[3]->fill(bin,MeanELongit[i]/dLradl);
histo[4]->fill(bin, rmsELongit[i]/dLradl);
bin = (i+1)*dLradl;
histo[5]->fill(bin,MeanELongitCumul[i]);
histo[6]->fill(bin, rmsELongitCumul[i]);
}
#endif
G4double bin = (i+0.5)*dLradl;
analysisManager->FillH1(4, bin,MeanELongit[i]/dLradl);
analysisManager->FillH1(5, bin, rmsELongit[i]/dLradl);
bin = (i+1)*dLradl;
analysisManager->FillH1(6, bin,MeanELongitCumul[i]);
analysisManager->FillH1(7, bin, rmsELongitCumul[i]);
}
//radial
//
G4double dRradl = Det->GetdRradl();
G4double dRradl = fDet->GetdRradl();
MyVector MeanERadial(nRbin), rmsERadial(nRbin);
MyVector MeanERadialCumul(nRbin), rmsERadialCumul(nRbin);
MyVector MeanERadial(f_nRbin), rmsERadial(f_nRbin);
MyVector MeanERadialCumul(f_nRbin), rmsERadialCumul(f_nRbin);
for (i=0; i<nRbin; i++)
for (i=0; i<f_nRbin; i++)
{
MeanERadial[i] = norme*sumERadial[i];
rmsERadial[i] = norme*std::sqrt(std::fabs(NbOfEvents*sumE2Radial[i]
- sumERadial[i]*sumERadial[i]));
MeanERadial[i] = norme*fSumERadial[i];
rmsERadial[i] = norme*std::sqrt(std::fabs(NbOfEvents*fSumE2Radial[i]
- fSumERadial[i]*fSumERadial[i]));
MeanERadialCumul[i] = norme*sumERadialCumul[i];
rmsERadialCumul[i] = norme*std::sqrt(std::fabs(NbOfEvents*sumE2RadialCumul[i]
- sumERadialCumul[i]*sumERadialCumul[i]));
MeanERadialCumul[i] = norme*fSumERadialCumul[i];
rmsERadialCumul[i] = norme*std::sqrt(std::fabs(NbOfEvents*fSumE2RadialCumul[i]
- fSumERadialCumul[i]*fSumERadialCumul[i]));
#ifdef G4ANALYSIS_USE
if(tree) {
G4double bin = (i+0.5)*dRradl;
histo[7]->fill(bin,MeanERadial[i]/dRradl);
histo[8]->fill(bin, rmsERadial[i]/dRradl);
bin = (i+1)*dRradl;
histo[9] ->fill(bin,MeanERadialCumul[i]);
histo[10]->fill(bin, rmsERadialCumul[i]);
}
#endif
G4double bin = (i+0.5)*dRradl;
analysisManager->FillH1(8, bin,MeanERadial[i]/dRradl);
analysisManager->FillH1(9, bin, rmsERadial[i]/dRradl);
bin = (i+1)*dRradl;
analysisManager->FillH1(10, bin,MeanERadialCumul[i]);
analysisManager->FillH1(11, bin, rmsERadialCumul[i]);
}
//find Moliere confinement
@@ -340,26 +325,26 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
const G4double EMoliere = 90.;
G4double iMoliere = 0.;
if ((MeanERadialCumul[0] <= EMoliere) &&
(MeanERadialCumul[nRbin-1] >= EMoliere)) {
(MeanERadialCumul[f_nRbin-1] >= EMoliere)) {
G4int imin = 0;
while( (imin < nRbin-1) && (MeanERadialCumul[imin] < EMoliere) ) imin++;
while( (imin < f_nRbin-1) && (MeanERadialCumul[imin] < EMoliere) ) imin++;
G4double ratio = (EMoliere - MeanERadialCumul[imin]) /
(MeanERadialCumul[imin+1] - MeanERadialCumul[imin]);
iMoliere = 1. + imin + ratio;
}
}
//track length
//
norme = 1./(NbOfEvents*(Det->GetMaterial()->GetRadlen()));
G4double MeanChargTrLength = norme*sumChargTrLength;
norme = 1./(NbOfEvents*(fDet->GetMaterial()->GetRadlen()));
G4double MeanChargTrLength = norme*fSumChargTrLength;
G4double rmsChargTrLength =
norme*std::sqrt(std::fabs(NbOfEvents*sum2ChargTrLength
- sumChargTrLength*sumChargTrLength));
norme*std::sqrt(std::fabs(NbOfEvents*fSum2ChargTrLength
- fSumChargTrLength*fSumChargTrLength));
G4double MeanNeutrTrLength = norme*sumNeutrTrLength;
G4double MeanNeutrTrLength = norme*fSumNeutrTrLength;
G4double rmsNeutrTrLength =
norme*std::sqrt(std::fabs(NbOfEvents*sum2NeutrTrLength
- sumNeutrTrLength*sumNeutrTrLength));
norme*std::sqrt(std::fabs(NbOfEvents*fSum2NeutrTrLength
- fSumNeutrTrLength*fSumNeutrTrLength));
//print
//
@@ -368,7 +353,7 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
G4cout.setf(std::ios::fixed,std::ios::floatfield);
G4int prec = G4cout.precision(2);
if (verbose) {
if (fVerbose) {
G4cout << " LOGITUDINAL PROFILE "
<< " CUMULATIVE LOGITUDINAL PROFILE" << G4endl << G4endl;
@@ -376,7 +361,7 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
G4cout << " bin " << " Mean rms "
<< " bin " << " Mean rms \n" << G4endl;
for (i=0; i<nLbin; i++)
for (i=0; i<f_nLbin; i++)
{
G4double inf=i*dLradl, sup=inf+dLradl;
@@ -398,7 +383,7 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
G4cout << " bin " << " Mean rms "
<< " bin " << " Mean rms \n" << G4endl;
for (i=0; i<nRbin; i++)
for (i=0; i<f_nRbin; i++)
{
G4double inf=i*dRradl, sup=inf+dRradl;
@@ -414,41 +399,47 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
}
G4cout << "\n SUMMARY \n" << G4endl;
G4cout << "\n"
<< " Mean number of charged steps: " << fChargedStep << G4endl;
G4cout << " Mean number of neutral steps: " << fNeutralStep
<< "\n" << G4endl;
G4cout << " energy deposit : "
<< std::setw(7) << MeanELongitCumul[nLbin-1] << " % E0 +- "
<< std::setw(7) << rmsELongitCumul[nLbin-1] << " % E0" << G4endl;
<< std::setw(7) << MeanELongitCumul[f_nLbin-1] << " % E0 +- "
<< std::setw(7) << rmsELongitCumul[f_nLbin-1] << " % E0" << G4endl;
G4cout << " charged traklen: "
<< std::setw(7) << MeanChargTrLength << " radl +- "
<< std::setw(7) << rmsChargTrLength << " radl" << G4endl;
G4cout << " neutral traklen: "
<< std::setw(7) << MeanNeutrTrLength << " radl +- "
<< std::setw(7) << rmsNeutrTrLength << " radl" << G4endl;
if (iMoliere > 0. ) {
G4double RMoliere1 = iMoliere*Det->GetdRradl();
G4double RMoliere2 = iMoliere*Det->GetdRlength();
G4double RMoliere1 = iMoliere*fDet->GetdRradl();
G4double RMoliere2 = iMoliere*fDet->GetdRlength();
G4cout << "\n " << EMoliere << " % confinement: radius = "
<< RMoliere1 << " radl ("
<< G4BestUnit( RMoliere2, "Length") << ")" << G4endl;
}
<< G4BestUnit( RMoliere2, "Length") << ")" << "\n" << G4endl;
}
G4cout.setf(mode,std::ios::floatfield);
G4cout.precision(prec);
// save histos and close AnalysisFactory
cleanHisto();
CleanHisto();
// show Rndm status
CLHEP::HepRandom::showEngineStatus();
// Acceptance
if(limittrue < DBL_MAX) {
if(fLimittrue < DBL_MAX) {
EmAcceptance acc;
acc.BeginOfAcceptance("Total Energy in Absorber",NbOfEvents);
G4double e = MeanELongitCumul[nLbin-1]/100.;
G4double r = rmsELongitCumul[nLbin-1]/100.;
acc.EmAcceptanceGauss("Edep",NbOfEvents,e,edeptrue,rmstrue,limittrue);
acc.EmAcceptanceGauss("Erms",NbOfEvents,r,rmstrue,rmstrue,2.0*limittrue);
G4double e = MeanELongitCumul[f_nLbin-1]/100.;
G4double r = rmsELongitCumul[f_nLbin-1]/100.;
acc.EmAcceptanceGauss("Edep",NbOfEvents,e,fEdeptrue,fRmstrue,fLimittrue);
acc.EmAcceptanceGauss("Erms",NbOfEvents,r,fRmstrue,fRmstrue,2.0*fLimittrue);
acc.EndOfAcceptance();
}
}
@@ -457,9 +448,9 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
void RunAction::SetEdepAndRMS(G4ThreeVector Value)
{
edeptrue = Value(0);
rmstrue = Value(1);
limittrue= Value(2);
fEdeptrue = Value(0);
fRmstrue = Value(1);
fLimittrue= Value(2);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: RunActionMessenger.cc,v 1.4 2006-06-29 16:50:50 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/src/RunActionMessenger.cc
/// \brief Implementation of the RunActionMessenger class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -40,60 +42,52 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RunActionMessenger::RunActionMessenger(RunAction* run)
:Run(run)
:fRun(run)
{
runDir = new G4UIdirectory("/testem/run/");
runDir->SetGuidance("run control");
fRunDir = new G4UIdirectory("/testem/run/");
fRunDir->SetGuidance("run control");
accCmd = new G4UIcmdWith3Vector("/testem/run/acceptance",this);
accCmd->SetGuidance("set Edep and RMS");
accCmd->SetGuidance("acceptance values for first layer");
accCmd->SetParameterName("edep","rms","limit",true);
accCmd->SetRange("edep>0 && edep<1 && rms>0");
accCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
fAccCmd = new G4UIcmdWith3Vector("/testem/run/acceptance",this);
fAccCmd->SetGuidance("set Edep and RMS");
fAccCmd->SetGuidance("acceptance values for first layer");
fAccCmd->SetParameterName("edep","rms","limit",true);
fAccCmd->SetRange("edep>0 && edep<1 && rms>0");
fAccCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
verbCmd = new G4UIcmdWithAnInteger("/testem/run/verbose",this);
verbCmd->SetGuidance("set verbose level for runAction");
verbCmd->SetParameterName("verbose",false);
fVerbCmd = new G4UIcmdWithAnInteger("/testem/run/verbose",this);
fVerbCmd->SetGuidance("set verbose level for runAction");
fVerbCmd->SetParameterName("verbose",false);
histoDir = new G4UIdirectory("/testem/histo/");
histoDir->SetGuidance("histograms control");
fHistoDir = new G4UIdirectory("/testem/histo/");
fHistoDir->SetGuidance("histograms control");
factoryCmd = new G4UIcmdWithAString("/testem/histo/setFileName",this);
factoryCmd->SetGuidance("set name for the histograms file");
typeCmd = new G4UIcmdWithAString("/testem/histo/setFileType",this);
typeCmd->SetGuidance("set type (hbook, root, XML) for the histograms file");
typeCmd->SetCandidates("hbook root XML");
factoryCmd->SetGuidance("set name for the histograms file");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
RunActionMessenger::~RunActionMessenger()
{
delete verbCmd;
delete accCmd;
delete runDir;
delete fVerbCmd;
delete fAccCmd;
delete fRunDir;
delete factoryCmd;
delete typeCmd;
delete histoDir;
delete fHistoDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RunActionMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
if (command == accCmd )
{ Run->SetEdepAndRMS(accCmd->GetNew3VectorValue(newValue));}
if (command == fAccCmd )
{ fRun->SetEdepAndRMS(fAccCmd->GetNew3VectorValue(newValue));}
if (command == verbCmd )
{ Run->SetVerbose(verbCmd->GetNewIntValue(newValue));}
if (command == fVerbCmd )
{ fRun->SetVerbose(fVerbCmd->GetNewIntValue(newValue));}
if (command == factoryCmd)
{ Run->SetHistoName(newValue);}
if (command == typeCmd)
{ Run->SetHistoType(newValue);}
{ fRun->SetHistoName(newValue);}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: StepMax.cc,v 1.2 2006-06-29 16:50:52 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/src/StepMax.cc
/// \brief Implementation of the StepMax class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -35,14 +37,14 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
StepMax::StepMax(const G4String& processName)
: G4VDiscreteProcess(processName),MaxChargedStep(DBL_MAX)
: G4VDiscreteProcess(processName),fMaxChargedStep(DBL_MAX)
{
pMess = new StepMaxMessenger(this);
fMess = new StepMaxMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
StepMax::~StepMax() { delete pMess; }
StepMax::~StepMax() { delete fMess; }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -53,7 +55,7 @@ G4bool StepMax::IsApplicable(const G4ParticleDefinition& particle)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void StepMax::SetMaxStep(G4double step) {MaxChargedStep = step;}
void StepMax::SetMaxStep(G4double step) {fMaxChargedStep = step;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -64,7 +66,7 @@ G4double StepMax::PostStepGetPhysicalInteractionLength( const G4Track&,
// condition is set to "Not Forced"
*condition = NotForced;
return MaxChargedStep;
return fMaxChargedStep;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: StepMaxMessenger.cc,v 1.2 2006-06-29 16:50:54 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/src/StepMaxMessenger.cc
/// \brief Implementation of the StepMaxMessenger class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -37,28 +39,28 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
StepMaxMessenger::StepMaxMessenger(StepMax* stepM)
:stepMax(stepM)
:fStepMax(stepM)
{
StepMaxCmd = new G4UIcmdWithADoubleAndUnit("/testem/stepMax",this);
StepMaxCmd->SetGuidance("Set max allowed step length");
StepMaxCmd->SetParameterName("mxStep",false);
StepMaxCmd->SetRange("mxStep>0.");
StepMaxCmd->SetUnitCategory("Length");
fStepMaxCmd = new G4UIcmdWithADoubleAndUnit("/testem/stepMax",this);
fStepMaxCmd->SetGuidance("Set max allowed step length");
fStepMaxCmd->SetParameterName("mxStep",false);
fStepMaxCmd->SetRange("mxStep>0.");
fStepMaxCmd->SetUnitCategory("Length");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
StepMaxMessenger::~StepMaxMessenger()
{
delete StepMaxCmd;
delete fStepMaxCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void StepMaxMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
{
if (command == StepMaxCmd)
{ stepMax->SetMaxStep(StepMaxCmd->GetNewDoubleValue(newValue));}
if (command == fStepMaxCmd)
{ fStepMax->SetMaxStep(fStepMaxCmd->GetNewDoubleValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: SteppingAction.cc,v 1.6 2006-06-29 16:50:57 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/src/SteppingAction.cc
/// \brief Implementation of the SteppingAction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -39,7 +41,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
SteppingAction::SteppingAction(DetectorConstruction* det, RunAction* run)
:detector(det),Run(run)
:fDetector(det),fRun(run)
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -54,16 +56,17 @@ void SteppingAction::UserSteppingAction(const G4Step* step)
// energy deposit
//
G4double dEStep = step->GetTotalEnergyDeposit();
fRun->AddStep(step->GetTrack()->GetDefinition()->GetPDGCharge());
if (dEStep > 0.) {
G4ThreeVector prePoint = step->GetPreStepPoint()->GetPosition();
G4ThreeVector postPoint = step->GetPostStepPoint()->GetPosition();
G4ThreeVector position = prePoint + G4UniformRand()*(postPoint - prePoint);
G4double x = position.x(), y = position.y(), z = position.z();
G4double radius = std::sqrt(x*x + y*y);
G4double offset = 0.5*detector->GetfullLength();
G4int SlideNb = int((z + offset)/detector->GetdLlength());
G4int RingNb = int(radius/detector->GetdRlength());
Run->fillPerStep(dEStep,SlideNb,RingNb);
G4double offset = 0.5*fDetector->GetfullLength();
G4int SlideNb = G4int((z + offset)/fDetector->GetdLlength());
G4int RingNb = G4int(radius/fDetector->GetdRlength());
fRun->FillPerStep(dEStep,SlideNb,RingNb);
}
}
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm2/src/SteppingVerbose.cc
/// \brief Implementation of the SteppingVerbose class
//
// $Id: SteppingVerbose.cc,v 1.1 2010-09-16 16:26:13 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -58,26 +60,26 @@ void SteppingVerbose::StepInfo()
if( verboseLevel >= 3 ){
G4cout << G4endl;
G4cout << std::setw( 5) << "#Step#" << " "
<< std::setw( 6) << "X" << " "
<< std::setw( 6) << "Y" << " "
<< std::setw( 6) << "Z" << " "
<< std::setw( 9) << "KineE" << " "
<< std::setw( 9) << "dEStep" << " "
<< std::setw(10) << "StepLeng"
<< std::setw(10) << "TrakLeng"
<< std::setw(10) << "Volume" << " "
<< std::setw(10) << "Process" << G4endl;
<< std::setw( 6) << "X" << " "
<< std::setw( 6) << "Y" << " "
<< std::setw( 6) << "Z" << " "
<< std::setw( 9) << "KineE" << " "
<< std::setw( 9) << "dEStep" << " "
<< std::setw(10) << "StepLeng"
<< std::setw(10) << "TrakLeng"
<< std::setw(10) << "Volume" << " "
<< std::setw(10) << "Process" << G4endl;
}
G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
<< std::setw(10) << fTrack->GetVolume()->GetName();
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
<< std::setw(10) << fTrack->GetVolume()->GetName();
const G4VProcess* process
= fStep->GetPostStepPoint()->GetProcessDefinedStep();
@@ -89,28 +91,28 @@ void SteppingVerbose::StepInfo()
if( verboseLevel == 2 ){
G4int tN2ndariesTot = fN2ndariesAtRestDoIt +
fN2ndariesAlongStepDoIt +
fN2ndariesPostStepDoIt;
fN2ndariesAlongStepDoIt +
fN2ndariesPostStepDoIt;
if(tN2ndariesTot>0){
G4cout << "\n :----- List of secondaries ----------------"
<< G4endl;
G4cout << "\n :----- List of secondaries ----------------"
<< G4endl;
G4cout.precision(4);
for(size_t lp1=(*fSecondary).size()-tN2ndariesTot;
for(size_t lp1=(*fSecondary).size()-tN2ndariesTot;
lp1<(*fSecondary).size(); lp1++){
G4cout << " "
<< std::setw(13)
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
<< ": energy ="
<< std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
<< " time ="
<< std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time");
G4cout << G4endl;
}
G4cout << " "
<< std::setw(13)
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName()
<< ": energy ="
<< std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
<< " time ="
<< std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetGlobalTime(),"Time");
G4cout << G4endl;
}
G4cout << " :------------------------------------------\n"
<< G4endl;
G4cout << " :------------------------------------------\n"
<< G4endl;
}
}
@@ -129,25 +131,25 @@ G4int prec = G4cout.precision(3);
G4cout << std::setw( 5) << "Step#" << " "
<< std::setw( 6) << "X" << " "
<< std::setw( 6) << "Y" << " "
<< std::setw( 6) << "Z" << " "
<< std::setw( 9) << "KineE" << " "
<< std::setw( 9) << "dEStep" << " "
<< std::setw(10) << "StepLeng"
<< std::setw(10) << "TrakLeng"
<< std::setw(10) << "Volume" << " "
<< std::setw(10) << "Process" << G4endl;
<< std::setw( 6) << "Y" << " "
<< std::setw( 6) << "Z" << " "
<< std::setw( 9) << "KineE" << " "
<< std::setw( 9) << "dEStep" << " "
<< std::setw(10) << "StepLeng"
<< std::setw(10) << "TrakLeng"
<< std::setw(10) << "Volume" << " "
<< std::setw(10) << "Process" << G4endl;
G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " "
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
<< std::setw(10) << fTrack->GetVolume()->GetName()
<< " initStep" << G4endl;
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
<< std::setw(10) << fTrack->GetVolume()->GetName()
<< " initStep" << G4endl;
}
G4cout.precision(prec);
}
@@ -23,8 +23,10 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TrackingAction.cc,v 1.3 2006-06-29 16:51:01 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
/// \file electromagnetic/TestEm2/src/TrackingAction.cc
/// \brief Implementation of the TrackingAction class
//
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -38,7 +40,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
TrackingAction::TrackingAction(RunAction* run)
:Run(run)
:fRun(run)
{ }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -49,7 +51,7 @@ void TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
G4double charge = aTrack->GetDefinition()->GetPDGCharge();
G4double TrLeng = aTrack->GetTrackLength();
Run->fillPerTrack(charge,TrLeng);
fRun->FillPerTrack(charge,TrLeng);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......