Import Geant4 9.1.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.14 2006/10/26 10:18:59 maire Exp $
|
||||
$Id: History,v 1.16 2007/11/07 17:22:15 maire Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -6,7 +6,7 @@ $Id: History,v 1.14 2006/10/26 10:18:59 maire Exp $
|
||||
=========================================================
|
||||
|
||||
TestEm11 History file
|
||||
--------------------
|
||||
---------------------
|
||||
This file should be used by the G4 example coordinator to briefly
|
||||
summarize all major modifications introduced in the code and keep
|
||||
track of all tags.
|
||||
@@ -15,6 +15,13 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
07-11-07 mma (testem11-V09-00-01)
|
||||
- HistoManager/HistoMessenger : print selected histos on ascii file
|
||||
|
||||
12-08-07 mma (testem11-V09-00-00)
|
||||
- add histo 8 : energy profile as function of x/range. Same logic as TestEm12
|
||||
- add macro sandia.mac
|
||||
|
||||
25-10-06 mma (testem11-V08-01-02)
|
||||
- GNUmakefile : LOADLIBS
|
||||
- remove PhysicsLists 52 and 71
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: README,v 1.5 2006/05/15 14:41:29 maire Exp $
|
||||
$Id: README,v 1.7 2007/11/07 17:22:15 maire Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -94,7 +94,7 @@ $Id: README,v 1.5 2006/05/15 14:41:29 maire Exp $
|
||||
|
||||
In order to control the accuracy of the deposition, the maximum step size
|
||||
of charged particles is computed automatically from the binning of
|
||||
histogram 1.
|
||||
histogram 1 and 8 (see HistoManager).
|
||||
|
||||
As an example, this limitation is implemented as a 'full' process :
|
||||
see StepMax class and its Messenger. The 'StepMax process' is registered
|
||||
@@ -115,7 +115,9 @@ $Id: README,v 1.5 2006/05/15 14:41:29 maire Exp $
|
||||
5 : projected range of the primary track
|
||||
6 : total track length of charged secondary tracks
|
||||
7 : step size of charged secondary tracks
|
||||
|
||||
8 : longitudinal energy profile (in MeV.cm2/g), as a function of x/r0
|
||||
where r0 is the range of the primary particle
|
||||
|
||||
The histograms are managed by the HistoManager class and its Messenger.
|
||||
The histos can be individually activated with the command :
|
||||
/testem/histo/setHisto id nbBins valMin valMax unit
|
||||
@@ -126,6 +128,10 @@ $Id: README,v 1.5 2006/05/15 14:41:29 maire Exp $
|
||||
|
||||
It is possible to choose the format of the histogram file (hbook, root, XML)
|
||||
with the command /testem/histo/setFileType (hbook by default)
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
/testem/histo/printHisto id
|
||||
All selected histos will be written on a file name.ascii (default testem11)
|
||||
|
||||
Note that, by default, histograms are disabled. To activate them, uncomment
|
||||
the flag G4ANALYSIS_USE in GNUmakefile.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: TestEm11.cc,v 1.3 2006/06/29 16:39:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -1,42 +1,57 @@
|
||||
|
||||
*************************************************************
|
||||
Geant4 version Name: geant4-09-00-cand-03 (29-June-2007)
|
||||
Geant4 version Name: global-V09-00-02 (14-December-2007)
|
||||
Copyright : Geant4 Collaboration
|
||||
Reference : NIM A 506 (2003), 250-303
|
||||
WWW : http://cern.ch/geant4
|
||||
*************************************************************
|
||||
|
||||
|
||||
***** Table : Nb of materials = 9 *****
|
||||
***** Table : Nb of materials = 13 *****
|
||||
|
||||
Material: G4_Al density: 2.699 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 8.896 cm
|
||||
Material: G4_Al density: 2.699 g/cm3 RadL: 8.896 cm Imean: 166.000 eV
|
||||
---> Element: Al (Al) Z = 13.0 N = 27.0 A = 26.98 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
Material: G4_Si density: 2.330 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 9.366 cm
|
||||
Material: G4_Si density: 2.330 g/cm3 RadL: 9.366 cm Imean: 173.000 eV
|
||||
---> Element: Si (Si) Z = 14.0 N = 28.1 A = 28.09 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
Material: G4_Fe density: 7.874 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 1.757 cm
|
||||
Material: G4_Fe density: 7.874 g/cm3 RadL: 1.757 cm Imean: 286.000 eV
|
||||
---> Element: Fe (Fe) Z = 26.0 N = 55.8 A = 55.85 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
Material: G4_Ge density: 5.323 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 2.301 cm
|
||||
Material: G4_Ge density: 5.323 g/cm3 RadL: 2.301 cm Imean: 350.000 eV
|
||||
---> Element: Ge (Ge) Z = 32.0 N = 72.6 A = 72.61 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
Material: G4_W density: 19.300 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 3.504 mm
|
||||
Material: G4_Mo density: 10.220 g/cm3 RadL: 9.591 mm Imean: 424.000 eV
|
||||
---> Element: Mo (Mo) Z = 42.0 N = 95.9 A = 95.93 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
Material: G4_Ta density: 16.654 g/cm3 RadL: 4.094 mm Imean: 718.000 eV
|
||||
---> Element: Ta (Ta) Z = 73.0 N = 180.9 A = 180.95 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
Material: G4_W density: 19.300 g/cm3 RadL: 3.504 mm Imean: 727.000 eV
|
||||
---> Element: W (W) Z = 74.0 N = 183.8 A = 183.84 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
Material: G4_Au density: 19.320 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 3.344 mm
|
||||
Material: G4_Au density: 19.320 g/cm3 RadL: 3.344 mm Imean: 790.000 eV
|
||||
---> Element: Au (Au) Z = 79.0 N = 197.0 A = 196.97 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
Material: G4_Pb density: 11.350 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 5.613 mm
|
||||
Material: G4_Pb density: 11.350 g/cm3 RadL: 5.613 mm Imean: 823.000 eV
|
||||
---> Element: Pb (Pb) Z = 82.0 N = 207.2 A = 207.22 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
Material: G4_AIR density: 1.205 mg/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 303.921 m
|
||||
Material: G4_PbWO4 density: 8.280 g/cm3 RadL: 8.925 mm Imean: 541.543 eV
|
||||
---> Element: O (O) Z = 8.0 N = 16.0 A = 16.00 g/mole ElmMassFraction: 14.06 % ElmAbundance 66.67 %
|
||||
---> Element: Pb (Pb) Z = 82.0 N = 207.2 A = 207.22 g/mole ElmMassFraction: 45.54 % ElmAbundance 16.67 %
|
||||
---> Element: W (W) Z = 74.0 N = 183.8 A = 183.84 g/mole ElmMassFraction: 40.40 % ElmAbundance 16.67 %
|
||||
|
||||
Material: G4_SODIUM_IODIDE density: 3.667 g/cm3 RadL: 2.588 cm Imean: 452.000 eV
|
||||
---> Element: Na (Na) Z = 11.0 N = 23.0 A = 22.99 g/mole ElmMassFraction: 15.34 % ElmAbundance 50.00 %
|
||||
---> Element: I (I) Z = 53.0 N = 126.9 A = 126.90 g/mole ElmMassFraction: 84.66 % ElmAbundance 50.00 %
|
||||
|
||||
Material: G4_AIR density: 1.205 mg/cm3 RadL: 303.921 m Imean: 85.700 eV temperature: 273.15 K pressure: 1.00 atm
|
||||
---> Element: C (C) Z = 6.0 N = 12.0 A = 12.01 g/mole ElmMassFraction: 0.01 % ElmAbundance 0.02 %
|
||||
---> Element: N (N) Z = 7.0 N = 14.0 A = 14.01 g/mole ElmMassFraction: 75.53 % ElmAbundance 78.44 %
|
||||
---> Element: O (O) Z = 8.0 N = 16.0 A = 16.00 g/mole ElmMassFraction: 23.18 % ElmAbundance 21.07 %
|
||||
---> Element: Ar (Ar) Z = 18.0 N = 39.9 A = 39.95 g/mole ElmMassFraction: 1.28 % ElmAbundance 0.47 %
|
||||
|
||||
Material: Water density: 1.000 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 36.083 cm
|
||||
Material: Water density: 1.000 g/cm3 RadL: 36.083 cm Imean: 75.000 eV
|
||||
---> Element: H (H) Z = 1.0 N = 1.0 A = 1.01 g/mole ElmMassFraction: 11.19 % ElmAbundance 66.67 %
|
||||
---> Element: O (O) Z = 8.0 N = 16.0 A = 16.00 g/mole ElmMassFraction: 88.81 % ElmAbundance 33.33 %
|
||||
|
||||
@@ -74,12 +89,12 @@ Registered filter factories:
|
||||
/run/verbose 2
|
||||
#
|
||||
/testem/det/setMat G4_Si
|
||||
/testem/det/setSizeX 1 mm
|
||||
/testem/det/setSizeX 1 mm
|
||||
/testem/det/setSizeYZ 1 mm
|
||||
#
|
||||
/testem/phys/addPhysics standard # em physics
|
||||
/testem/phys/addPhysics standard
|
||||
PhysicsList::AddPhysicsList: <standard>
|
||||
###/testem/phys/addPhysics penelope # em physics
|
||||
###/testem/phys/addPhysics penelope # em physics
|
||||
#
|
||||
/run/initialize
|
||||
userDetector->Construct() start.
|
||||
@@ -99,16 +114,15 @@ PhysicsList::SetCuts:CutLength : 1 mm
|
||||
#
|
||||
/testem/histo/setFileType hbook
|
||||
/testem/histo/setFileName testem11
|
||||
/testem/histo/setHisto 1 100 0. 1. mm #edep profile
|
||||
/testem/histo/setHisto 1 100 0. 1. mm
|
||||
----> SetHisto 1: Edep (MeV/mm) along absorber (mm); 100 bins from 0 mm to 1 mm
|
||||
stepMax = 10 um
|
||||
/testem/histo/setHisto 2 102 0. 510. keV #total Edep
|
||||
/testem/histo/setHisto 2 102 0. 510. keV
|
||||
----> SetHisto 2: total Energy deposited in absorber (keV); 102 bins from 0 keV to 510 keV
|
||||
/testem/histo/setHisto 3 100 0. 2. mm #track length
|
||||
/testem/histo/setHisto 3 100 0. 2. mm
|
||||
----> SetHisto 3: true track length of the primary particle (mm); 100 bins from 0 mm to 2 mm
|
||||
/testem/histo/setHisto 4 100 0. 200. um #step length
|
||||
/testem/histo/setHisto 4 100 0. 200. um
|
||||
----> SetHisto 4: true step size of the primary particle (um); 100 bins from 0 um to 200 um
|
||||
/testem/histo/setHisto 5 100 0. 1. mm #proj range
|
||||
/testem/histo/setHisto 5 100 0. 1. mm
|
||||
----> SetHisto 5: projected range of the primary particle (mm); 100 bins from 0 mm to 1 mm
|
||||
#
|
||||
/testem/event/printModulo 10000
|
||||
@@ -138,7 +152,7 @@ eIoni: tables are built for e-
|
||||
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)= 1, dRoverRange= 0.2, integral: 1
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1
|
||||
CSDA range table up to 1 GeV in 70 bins.
|
||||
|
||||
eBrem: tables are built for e-
|
||||
@@ -152,7 +166,7 @@ eIoni: tables are built for e+
|
||||
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)= 1, dRoverRange= 0.2, integral: 1
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1
|
||||
CSDA range table up to 1 GeV in 70 bins.
|
||||
|
||||
eBrem: tables are built for e+
|
||||
@@ -176,7 +190,7 @@ hIoni: tables are built for proton
|
||||
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)= 1, dRoverRange= 0.2, integral: 1
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1
|
||||
CSDA range table up to 1 GeV in 70 bins.
|
||||
|
||||
msc: Model variant of multiple scattering for GenericIon
|
||||
@@ -191,7 +205,7 @@ ionIoni: tables are built for GenericIon
|
||||
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.1, integral: 1
|
||||
Step function: finalRange(mm)= 0.1, dRoverRange= 0.1, integral: 1, fluct: 1
|
||||
CSDA range table up to 1 GeV in 70 bins.
|
||||
|
||||
hIoni: tables are built for anti_proton
|
||||
@@ -200,7 +214,7 @@ hIoni: tables are built for anti_proton
|
||||
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)= 1, dRoverRange= 0.2, integral: 1
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1
|
||||
CSDA range table up to 1 GeV in 70 bins.
|
||||
|
||||
msc: Model variant of multiple scattering for mu+
|
||||
@@ -213,7 +227,7 @@ muIoni: tables are built for mu+
|
||||
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)= 1, dRoverRange= 0.2, integral: 1
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1
|
||||
CSDA range table up to 1 GeV in 70 bins.
|
||||
|
||||
muBrems: tables are built for mu+
|
||||
@@ -231,7 +245,7 @@ muIoni: tables are built for mu-
|
||||
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)= 1, dRoverRange= 0.2, integral: 1
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1
|
||||
CSDA range table up to 1 GeV in 70 bins.
|
||||
|
||||
muBrems: tables are built for mu-
|
||||
@@ -250,7 +264,7 @@ hIoni: tables are built for pi+
|
||||
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)= 1, dRoverRange= 0.2, integral: 1
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1
|
||||
CSDA range table up to 1 GeV in 70 bins.
|
||||
|
||||
msc: Model variant of multiple scattering for pi-
|
||||
@@ -264,7 +278,7 @@ hIoni: tables are built for pi-
|
||||
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)= 1, dRoverRange= 0.2, integral: 1
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1
|
||||
CSDA range table up to 1 GeV in 70 bins.
|
||||
|
||||
Region <DefaultRegionForTheWorld> -- appears in <Absorber> world volume
|
||||
@@ -295,6 +309,8 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||
Initial seed (index) = 0
|
||||
Current couple of seeds = 9876, 54321
|
||||
----------------------------------------
|
||||
|
||||
---> stepMax from HistoManager = 10 um
|
||||
Start Run processing.
|
||||
|
||||
---> Begin of Event: 0
|
||||
@@ -303,7 +319,7 @@ Start Run processing.
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 20000
|
||||
User=310.07s Real=547.62s Sys=15.53s
|
||||
User=339.3s Real=592.59s Sys=61.35s
|
||||
|
||||
======================== run summary ======================
|
||||
|
||||
@@ -311,20 +327,20 @@ Run Summary
|
||||
|
||||
============================================================
|
||||
|
||||
Total Energy deposited = 449.883 keV +- 102.538 keV
|
||||
Total Energy deposited = 449.481 keV +- 103.918 keV
|
||||
|
||||
Track length of primary track = 877.459 um +- 187.170 um
|
||||
Track length of primary track = 875.564 um +- 190.543 um
|
||||
Range from EmCalculator = 937.365 um (from full dE/dx)
|
||||
|
||||
Projected range = 337.189 um +- 204.671 um
|
||||
Projected range = 339.800 um +- 207.947 um
|
||||
|
||||
Nb of steps of primary track = 88.26 +- 18.70 Step size= 9.933 um +- 93.084 nm
|
||||
Nb of steps of primary track = 88.07 +- 19.04 Step size= 9.933 um +- 90.371 nm
|
||||
|
||||
absorbed = 78.62 % transmit = 5.64 % reflected = 15.74 %
|
||||
absorbed = 78.56 % transmit = 5.51 % reflected = 15.93 %
|
||||
|
||||
--------- Ranecu engine status ---------
|
||||
Initial seed (index) = 0
|
||||
Current couple of seeds = 1888543794, 1916470412
|
||||
Current couple of seeds = 372068914, 58752001
|
||||
----------------------------------------
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: DetectorConstruction.hh,v 1.2 2006/06/29 16:39:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: DetectorMessenger.hh,v 1.2 2006/06/29 16:39:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: EventAction.hh,v 1.2 2006/06/29 16:39:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: EventActionMessenger.hh,v 1.2 2006/06/29 16:39:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: HistoManager.hh,v 1.3 2006/06/29 16:39:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: HistoManager.hh,v 1.5 2007/11/07 17:22:15 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -44,7 +44,7 @@ namespace AIDA {
|
||||
|
||||
class HistoMessenger;
|
||||
|
||||
const G4int MaxHisto = 8;
|
||||
const G4int MaxHisto = 9;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -64,12 +64,15 @@ class HistoManager
|
||||
void FillHisto(G4int id, G4double e, G4double weight = 1.0);
|
||||
void RemoveHisto (G4int);
|
||||
void Scale (G4int, G4double);
|
||||
void PrintHisto (G4int);
|
||||
|
||||
G4bool HistoExist (G4int id) {return exist[id];}
|
||||
G4double GetHistoUnit(G4int id) {return Unit[id];}
|
||||
G4double GetBinWidth (G4int id) {return Width[id];}
|
||||
|
||||
G4double GetStepMax() {return stepMax;};
|
||||
void SetcsdaRange(G4double val) {csdaRange = val; rangeFlag = true;};
|
||||
G4double GetcsdaRange() {return csdaRange;};
|
||||
G4double ComputeStepMax(G4double);
|
||||
|
||||
private:
|
||||
|
||||
@@ -87,10 +90,16 @@ class HistoManager
|
||||
G4double Vmax [MaxHisto];
|
||||
G4double Unit [MaxHisto];
|
||||
G4double Width[MaxHisto];
|
||||
G4bool ascii[MaxHisto];
|
||||
|
||||
G4bool factoryOn;
|
||||
HistoMessenger* histoMessenger;
|
||||
|
||||
G4double stepMax;
|
||||
G4bool rangeFlag;
|
||||
G4double csdaRange;
|
||||
|
||||
private:
|
||||
void saveAscii();
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: HistoMessenger.hh,v 1.2 2006/06/29 16:39:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: HistoMessenger.hh,v 1.4 2007/11/07 17:22:16 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -42,6 +42,7 @@ class G4UIdirectory;
|
||||
class G4UIcommand;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -56,14 +57,15 @@ class HistoMessenger: public G4UImessenger
|
||||
|
||||
private:
|
||||
|
||||
HistoManager* histoManager;
|
||||
HistoManager* histoManager;
|
||||
|
||||
G4UIdirectory* histoDir;
|
||||
G4UIcmdWithAString* factoryCmd;
|
||||
G4UIcmdWithAString* typeCmd;
|
||||
G4UIcommand* histoCmd;
|
||||
G4UIcmdWithAnInteger* rmhistoCmd;
|
||||
|
||||
G4UIdirectory* histoDir;
|
||||
G4UIcmdWithAString* factoryCmd;
|
||||
G4UIcmdWithAString* typeCmd;
|
||||
G4UIcommand* histoCmd;
|
||||
G4UIcmdWithAnInteger* prhistoCmd;
|
||||
G4UIcmdWithAnInteger* rmhistoCmd;
|
||||
G4UIcmdWithADoubleAndUnit* csdaCmd;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: PhysListEmLivermore.hh,v 1.2 2006/06/29 16:39:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: PhysListEmPenelope.hh,v 1.2 2006/06/29 16:39:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: PhysListEmStandard.hh,v 1.2 2006/06/29 16:39:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: PhysicsList.hh,v 1.3 2006/06/29 16:39:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysicsListMessenger.hh,v 1.2 2006/06/29 16:39:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PrimaryGeneratorAction.hh,v 1.2 2006/06/29 16:39:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PrimaryGeneratorMessenger.hh,v 1.2 2006/06/29 16:39:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RunAction.hh,v 1.2 2006/06/29 16:39:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: RunAction.hh,v 1.3 2007/08/19 20:52:53 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -74,6 +74,8 @@ class RunAction : public G4UserRunAction
|
||||
G4int nbOfSteps, nbOfSteps2;
|
||||
G4double stepSize, stepSize2;
|
||||
G4int status[3];
|
||||
|
||||
G4double csdaRange;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: StepMax.hh,v 1.3 2006/06/29 16:39:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: StepMaxMessenger.hh,v 1.3 2006/06/29 16:40:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: SteppingAction.hh,v 1.2 2006/06/29 16:40:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: SteppingVerbose.hh,v 1.2 2006/06/29 16:40:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: TrackingAction.hh,v 1.2 2006/06/29 16:40:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: range.mac,v 1.3 2006/09/18 17:26:20 maire Exp $
|
||||
# $Id: range.mac,v 1.4 2007/08/19 20:52:53 maire Exp $
|
||||
#
|
||||
# Macro file for "TestEm11.cc"
|
||||
#
|
||||
@@ -26,9 +26,9 @@
|
||||
/process/eLoss/fluct false
|
||||
#
|
||||
/gun/particle e-
|
||||
/gun/energy 500 keV
|
||||
/gun/energy 600 keV
|
||||
#
|
||||
/testem/histo/setFileName range.std
|
||||
/testem/histo/setFileName range
|
||||
/testem/histo/setFileType hbook
|
||||
/testem/histo/setHisto 3 200 0 4 mm # csda range
|
||||
#
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# $Id: sandia.mac,v 1.1 2007/08/19 20:52:53 maire Exp $
|
||||
#
|
||||
# limit the step size from histo 8
|
||||
#
|
||||
# G.J.Lockwood et al. Sandia report SAND79-0414.UC-34a, February 1987
|
||||
# O.Kadri et al. NIM B 258 (2007) 381
|
||||
#
|
||||
/control/verbose 2
|
||||
/run/verbose 2
|
||||
#
|
||||
/testem/det/setMat G4_Al
|
||||
###/testem/det/setMat G4_Ta
|
||||
/testem/det/setSizeX 1 cm
|
||||
/testem/det/setSizeYZ 1 cm
|
||||
#
|
||||
/testem/phys/addPhysics standard # em physics
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
/gun/particle e-
|
||||
/gun/energy 500 keV
|
||||
#
|
||||
/testem/histo/setFileType hbook
|
||||
/testem/histo/setFileName Al.500keV
|
||||
/testem/histo/setHisto 8 100 0. 1.0 none #normalized Edep profile
|
||||
###/testem/histo/setHisto 8 100 0. 0.5 none
|
||||
#
|
||||
/testem/event/printModulo 10000
|
||||
#
|
||||
/run/beamOn 100000
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: DetectorConstruction.cc,v 1.6 2006/10/26 10:18:59 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: DetectorConstruction.cc,v 1.8 2007/11/07 17:22:16 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -91,9 +91,13 @@ void DetectorConstruction::DefineMaterials()
|
||||
man->FindOrBuildMaterial("G4_Si", isotopes);
|
||||
man->FindOrBuildMaterial("G4_Fe", isotopes);
|
||||
man->FindOrBuildMaterial("G4_Ge", isotopes);
|
||||
man->FindOrBuildMaterial("G4_Mo", isotopes);
|
||||
man->FindOrBuildMaterial("G4_Ta", isotopes);
|
||||
man->FindOrBuildMaterial("G4_W" , isotopes);
|
||||
man->FindOrBuildMaterial("G4_Au", isotopes);
|
||||
man->FindOrBuildMaterial("G4_Pb", isotopes);
|
||||
man->FindOrBuildMaterial("G4_Pb", isotopes);
|
||||
man->FindOrBuildMaterial("G4_PbWO4", isotopes);
|
||||
man->FindOrBuildMaterial("G4_SODIUM_IODIDE", isotopes);
|
||||
|
||||
man->FindOrBuildMaterial("G4_AIR" , isotopes);
|
||||
///man->FindOrBuildMaterial("G4_WATER", isotopes);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: DetectorMessenger.cc,v 1.2 2006/06/29 16:40:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: EventAction.cc,v 1.2 2006/06/29 16:40:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: EventActionMessenger.cc,v 1.2 2006/06/29 16:40:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: HistoManager.cc,v 1.4 2006/07/06 15:56:38 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: HistoManager.cc,v 1.6 2007/11/07 17:22:16 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -52,7 +52,7 @@ HistoManager::HistoManager()
|
||||
}
|
||||
#endif
|
||||
|
||||
fileName[0] = "testem11";
|
||||
fileName[0] = "dummy";
|
||||
fileType = "hbook";
|
||||
fileOption = "--noErrors uncompress";
|
||||
// histograms
|
||||
@@ -61,11 +61,13 @@ HistoManager::HistoManager()
|
||||
exist[k] = false;
|
||||
Unit[k] = 1.0;
|
||||
Width[k] = 1.0;
|
||||
ascii[k] = false;
|
||||
}
|
||||
|
||||
histoMessenger = new HistoMessenger(this);
|
||||
|
||||
stepMax = DBL_MAX;
|
||||
|
||||
rangeFlag = false;
|
||||
csdaRange = DBL_MAX;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -128,6 +130,7 @@ void HistoManager::save()
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
if (factoryOn) {
|
||||
saveAscii(); // Write ascii file, if any
|
||||
tree->commit(); // Writing the histograms to the file
|
||||
tree->close(); // and closing the tree (and the file)
|
||||
G4cout << "\n----> Histogram Tree is saved in " << fileName[1] << G4endl;
|
||||
@@ -164,7 +167,7 @@ void HistoManager::SetHisto(G4int ih,
|
||||
return;
|
||||
}
|
||||
|
||||
const G4String id[] = { "0", "1", "2", "3", "4", "5", "6", "7" };
|
||||
const G4String id[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8" };
|
||||
const G4String title[] =
|
||||
{ "dummy", //0
|
||||
"Edep (MeV/mm) along absorber", //1
|
||||
@@ -173,7 +176,8 @@ void HistoManager::SetHisto(G4int ih,
|
||||
"true step size of the primary particle", //4
|
||||
"projected range of the primary particle", //5
|
||||
"true track length of charged secondaries", //6
|
||||
"true step size of charged secondaries" //7
|
||||
"true step size of charged secondaries", //7
|
||||
"Edep (MeV.cm2/g) along x/r0" //8
|
||||
};
|
||||
|
||||
|
||||
@@ -197,15 +201,7 @@ void HistoManager::SetHisto(G4int ih,
|
||||
|
||||
G4cout << "----> SetHisto " << ih << ": " << titl << "; "
|
||||
<< nbins << " bins from "
|
||||
<< vmin << " " << unit << " to " << vmax << " " << unit << G4endl;
|
||||
|
||||
// compute constraint on stepMax from histos 1
|
||||
//
|
||||
G4double frac = 1.;
|
||||
if (ih == 1) {
|
||||
stepMax = frac*Width[ih];
|
||||
G4cout << " stepMax = " << G4BestUnit(stepMax,"Length") << G4endl;
|
||||
}
|
||||
<< vmin << " " << unit << " to " << vmax << " " << unit << G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -237,3 +233,68 @@ void HistoManager::Scale(G4int ih, G4double fac)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void HistoManager::PrintHisto(G4int ih)
|
||||
{
|
||||
if (ih < MaxHisto) ascii[ih] = true;
|
||||
else
|
||||
G4cout << "---> warning from HistoManager::PrintHisto() : histo " << ih
|
||||
<< "does not exist" << G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include <fstream>
|
||||
|
||||
void HistoManager::saveAscii()
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
|
||||
G4String name = fileName[0] + ".ascii";
|
||||
std::ofstream File(name, std::ios::out);
|
||||
File.setf( std::ios::scientific, std::ios::floatfield );
|
||||
|
||||
//write selected histograms
|
||||
for (G4int ih=0; ih<MaxHisto; ih++) {
|
||||
if (exist[ih] && ascii[ih]) {
|
||||
File << "\n 1D histogram " << ih << ": " << Title[ih]
|
||||
<< "\n \n \t X \t\t Y" << G4endl;
|
||||
|
||||
for (G4int iBin=0; iBin<Nbins[ih]; ++iBin) {
|
||||
File << " " << iBin << "\t"
|
||||
<< histo[ih]->binMean(iBin) << "\t"
|
||||
<< histo[ih]->binHeight(iBin)
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4double HistoManager::ComputeStepMax(G4double range)
|
||||
{
|
||||
// compute constraint on stepMax from histos 1 and 8
|
||||
//
|
||||
G4double stepMax = DBL_MAX;
|
||||
G4double frac = 1.;
|
||||
|
||||
G4int ih = 1;
|
||||
if (exist[ih]) {
|
||||
stepMax = frac*Width[ih];
|
||||
}
|
||||
|
||||
ih = 8;
|
||||
if (exist[ih]) {
|
||||
if (!rangeFlag) csdaRange = range;
|
||||
if (csdaRange > 0.) stepMax = std::min(stepMax,frac*Width[ih]*csdaRange);
|
||||
}
|
||||
|
||||
G4cout << "\n---> stepMax from HistoManager = "
|
||||
<< G4BestUnit(stepMax,"Length") << G4endl;
|
||||
|
||||
return stepMax;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: HistoMessenger.cc,v 1.3 2006/06/29 16:40:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: HistoMessenger.cc,v 1.5 2007/11/07 17:22:16 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "G4UIparameter.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4UIcmdWithAnInteger.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -82,17 +83,30 @@ HistoMessenger::HistoMessenger(HistoManager* manager)
|
||||
unit->SetDefaultValue("none");
|
||||
histoCmd->SetParameter(unit);
|
||||
|
||||
prhistoCmd = new G4UIcmdWithAnInteger("/testem/histo/printHisto",this);
|
||||
prhistoCmd->SetGuidance("print histo #id on ascii file");
|
||||
prhistoCmd->SetParameterName("id",false);
|
||||
prhistoCmd->SetRange("id>0");
|
||||
|
||||
rmhistoCmd = new G4UIcmdWithAnInteger("/testem/histo/removeHisto",this);
|
||||
rmhistoCmd->SetGuidance("desactivate histo #id");
|
||||
rmhistoCmd->SetParameterName("id",false);
|
||||
rmhistoCmd->SetRange("id>0");
|
||||
|
||||
csdaCmd = new G4UIcmdWithADoubleAndUnit("/testem/histo/setcsdaRange",this);
|
||||
csdaCmd->SetGuidance("Set csda range for normalisation");
|
||||
csdaCmd->SetParameterName("csda",false);
|
||||
csdaCmd->SetRange("csda>0.");
|
||||
csdaCmd->SetUnitCategory("Length");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
HistoMessenger::~HistoMessenger()
|
||||
{
|
||||
delete csdaCmd;
|
||||
delete rmhistoCmd;
|
||||
delete prhistoCmd;
|
||||
delete histoCmd;
|
||||
delete typeCmd;
|
||||
delete factoryCmd;
|
||||
@@ -119,9 +133,15 @@ void HistoMessenger::SetNewValue(G4UIcommand* command, G4String newValues)
|
||||
if (unit != "none") vUnit = G4UIcommand::ValueOf(unit);
|
||||
histoManager->SetHisto (ih,nbBins,vmin*vUnit,vmax*vUnit,unit);
|
||||
}
|
||||
|
||||
|
||||
if (command == prhistoCmd)
|
||||
histoManager->PrintHisto(prhistoCmd->GetNewIntValue(newValues));
|
||||
|
||||
if (command == rmhistoCmd)
|
||||
histoManager->RemoveHisto(rmhistoCmd->GetNewIntValue(newValues));
|
||||
histoManager->RemoveHisto(rmhistoCmd->GetNewIntValue(newValues));
|
||||
|
||||
if (command == csdaCmd)
|
||||
histoManager->SetcsdaRange(csdaCmd->GetNewDoubleValue(newValues));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: PhysListEmLivermore.cc,v 1.4 2006/09/18 17:26:20 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: PhysListEmPenelope.cc,v 1.3 2006/09/18 17:26:20 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: PhysListEmStandard.cc,v 1.3 2006/06/29 16:40:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysicsList.cc,v 1.5 2006/10/26 10:18:59 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PhysicsListMessenger.cc,v 1.2 2006/06/29 16:40:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PrimaryGeneratorAction.cc,v 1.2 2006/06/29 16:40:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: PrimaryGeneratorMessenger.cc,v 1.2 2006/06/29 16:40:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RunAction.cc,v 1.6 2006/06/29 16:40:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: RunAction.cc,v 1.7 2007/08/19 20:52:53 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -85,14 +85,25 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
//initialize track status
|
||||
//
|
||||
status[0] = status[1] = status[2] = 0;
|
||||
|
||||
|
||||
//get csdaRange from EmCalculator
|
||||
//
|
||||
G4EmCalculator emCalculator;
|
||||
G4Material* material = detector->GetAbsorMaterial();
|
||||
G4ParticleDefinition* particle = kinematic->GetParticleGun()
|
||||
->GetParticleDefinition();
|
||||
G4double energy = kinematic->GetParticleGun()->GetParticleEnergy();
|
||||
csdaRange = DBL_MAX;
|
||||
if (particle->GetPDGCharge() != 0.)
|
||||
csdaRange = emCalculator.GetCSDARange(energy,particle,material);
|
||||
|
||||
//histograms
|
||||
//
|
||||
histoManager->book();
|
||||
|
||||
//set StepMax from histos
|
||||
//
|
||||
G4double stepMax = histoManager->GetStepMax();
|
||||
G4double stepMax = histoManager->ComputeStepMax(csdaRange);
|
||||
physics->GetStepMaxProcess()->SetMaxStep(stepMax);
|
||||
}
|
||||
|
||||
@@ -154,10 +165,10 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
|
||||
|
||||
//compare with csda range
|
||||
//
|
||||
G4EmCalculator emCalculator;
|
||||
G4double csdaRange = 0.;
|
||||
if (particle->GetPDGCharge() != 0.)
|
||||
csdaRange = emCalculator.GetCSDARange(energy,particle,material);
|
||||
//G4EmCalculator emCalculator;
|
||||
//G4double csdaRange = 0.;
|
||||
//if (particle->GetPDGCharge() != 0.)
|
||||
// csdaRange = emCalculator.GetCSDARange(energy,particle,material);
|
||||
G4cout
|
||||
<< "\n Range from EmCalculator = " << G4BestUnit(csdaRange,"Length")
|
||||
<< " (from full dE/dx)" << G4endl;
|
||||
@@ -204,13 +215,19 @@ void RunAction::EndOfRunAction(const G4Run* aRun)
|
||||
<< " transmit = " << transmit << " %"
|
||||
<< " reflected = " << reflected << " %" << G4endl;
|
||||
|
||||
// normalize histogram of longitudinal energy profile
|
||||
// normalize histograms of longitudinal energy profile
|
||||
//
|
||||
G4int ih = 1;
|
||||
G4double binWidth = histoManager->GetBinWidth(ih);
|
||||
G4double fac = (1./(NbofEvents*binWidth))*(mm/MeV);
|
||||
histoManager->Scale(ih,fac);
|
||||
|
||||
ih = 8;
|
||||
binWidth = histoManager->GetBinWidth(ih);
|
||||
G4double range = histoManager->GetcsdaRange();
|
||||
fac = (1./(NbofEvents*binWidth*range*density))*(g/(MeV*cm2));
|
||||
histoManager->Scale(ih,fac);
|
||||
|
||||
// reset default formats
|
||||
G4cout.setf(mode,std::ios::floatfield);
|
||||
G4cout.precision(prec);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: StepMax.cc,v 1.3 2006/06/29 16:40:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: StepMaxMessenger.cc,v 1.3 2006/06/29 16:40:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: SteppingAction.cc,v 1.4 2006/09/18 17:26:20 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: SteppingAction.cc,v 1.5 2007/08/19 20:52:53 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -69,6 +69,9 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep)
|
||||
G4double x = point.x() + 0.5*detector->GetAbsorSizeX();
|
||||
histoManager->FillHisto(1, x, edep);
|
||||
|
||||
G4double r0 = histoManager->GetcsdaRange();
|
||||
if (r0 > 0.) histoManager->FillHisto(8, x/r0, edep);
|
||||
|
||||
//step size of primary particle or charged secondaries
|
||||
//
|
||||
G4double steplen = aStep->GetStepLength();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: SteppingVerbose.cc,v 1.2 2006/06/29 16:41:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: TrackingAction.cc,v 1.2 2006/06/29 16:41:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user