Import Geant4 9.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:37:50 +02:00
parent a8e9364cea
commit 96c8bcd0af
6923 changed files with 198390 additions and 41849 deletions
@@ -1,4 +1,4 @@
$Id: History,v 1.13 2007/04/27 10:38:11 maire Exp $
$Id: History,v 1.15 2007/11/09 17:35:06 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -15,6 +15,13 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
09-11-07 mma (testem12-V09-00-01)
- HistoManager/HistoMessenger : print selected histos on ascii file
16-08-07 mma (testem12-V09-00-00)
- HistoManager : modify the way to get csdaRange from G4EmCalculator
and compute stepMax for histo 8
27-04-07 mma (testem12-V08-02-01)
- HistoManager : by default, get csdaRange from G4EmCalculator
@@ -1,4 +1,4 @@
$Id: README,v 1.5 2006/05/15 14:42:19 maire Exp $
$Id: README,v 1.7 2007/11/09 17:35:06 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -93,7 +93,7 @@ $Id: README,v 1.5 2006/05/15 14:42:19 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
histograms 1 and 8.
histograms 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
@@ -127,7 +127,11 @@ $Id: README,v 1.5 2006/05/15 14:42:19 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 testem12)
Note that, by default, histograms are disabled. To activate them, uncomment
the flag G4ANALYSIS_USE in GNUmakefile.
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: TestEm12.cc,v 1.4 2006/06/29 16:41:58 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,6 +1,6 @@
*************************************************************
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
@@ -9,31 +9,31 @@
***** Table : Nb of materials = 8 *****
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_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_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_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: G4_WATER H_2O density: 1.000 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 36.083 cm
Material: G4_WATER H_2O 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 %
@@ -71,10 +71,10 @@ Registered filter factories:
/run/verbose 2
#
/testem/det/setMat G4_WATER
/testem/det/setRadius 3 cm
/testem/det/setRadius 3 cm
/testem/det/setNbOfLayers 1
#
/testem/phys/addPhysics standard # em physics
/testem/phys/addPhysics standard
PhysicsList::AddPhysicsList: <standard>
#
/run/initialize
@@ -97,21 +97,19 @@ PhysicsList::SetCuts:CutLength : 1 mm
#
/testem/histo/setFileType hbook
/testem/histo/setFileName testem12
/testem/histo/setHisto 1 120 0. 2.4 cm #edep profile
/testem/histo/setHisto 1 120 0. 2.4 cm
----> SetHisto 1: dE/dr (MeV/mm) along radius (cm); 120 bins from 0 cm to 2.4 cm
stepMax = 200 um
/testem/histo/setHisto 2 180 0. 4.5 MeV #total Edep
/testem/histo/setHisto 2 180 0. 4.5 MeV
----> SetHisto 2: total Energy deposited in absorber (MeV); 180 bins from 0 MeV to 4.5 MeV
/testem/histo/setHisto 3 100 0. 3. cm #true track length
/testem/histo/setHisto 3 100 0. 3. cm
----> SetHisto 3: true track length of the primary particle (cm); 100 bins from 0 cm to 3 cm
/testem/histo/setHisto 4 100 0. 500. um #true step length
/testem/histo/setHisto 4 100 0. 500. um
----> SetHisto 4: true step size of the primary particle (um); 100 bins from 0 um to 500 um
/testem/histo/setHisto 5 200 -3. 3. cm #proj range
/testem/histo/setHisto 5 200 -3. 3. cm
----> SetHisto 5: projected range of the primary particle (cm); 200 bins from -3 cm to 3 cm
/testem/histo/setcsdaRange 2.037 cm
/testem/histo/setHisto 8 120 0. 1.2 none #normalized edep profile
/testem/histo/setcsdaRange 2.037 cm
/testem/histo/setHisto 8 120 0. 1.2 none
----> SetHisto 8: d(E/E0)/d(r/r0) along r/r0; 120 bins from 0 none to 1.2 none
stepMax = 200 um
#
/testem/event/printModulo 1000
#
@@ -140,7 +138,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-
@@ -154,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+
@@ -178,7 +176,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
@@ -193,7 +191,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
@@ -202,7 +200,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+
@@ -215,7 +213,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+
@@ -233,7 +231,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-
@@ -252,7 +250,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-
@@ -266,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.
Region <DefaultRegionForTheWorld> -- appears in <Absorber> world volume
@@ -297,6 +295,8 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Initial seed (index) = 0
Current couple of seeds = 9876, 54321
----------------------------------------
---> stepMax from HistoManager = 2e+02 um
Start Run processing.
---> Begin of Event: 0
@@ -321,7 +321,7 @@ Start Run processing.
Run terminated.
Run Summary
Number of events processed : 10000
User=1100.88s Real=1232.71s Sys=6.51s
User=1241.43s Real=1366.2s Sys=7.54s
======================== run summary ======================
@@ -329,18 +329,18 @@ Run Summary
============================================================
Total Energy deposited = 3.937 MeV +- 224.228 keV
Total Energy deposited = 3.939 MeV +- 214.508 keV
Track length of primary track = 2.014 cm +- 2.811 mm
Track length of primary track = 2.016 cm +- 2.774 mm
Range from EmCalculator = 2.021 cm (from full dE/dx)
Projected range = 1.309 cm +- 4.369 mm
Projected range = 1.314 cm +- 4.196 mm
Nb of steps of primary track = 238.58 +- 31.12 Step size= 84.405 um +- 4.561 um
Nb of steps of primary track = 238.44 +- 30.73 Step size= 84.539 um +- 4.514 um
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 2089723964, 1269053900
Current couple of seeds = 1657344995, 1592221949
----------------------------------------
Graphics systems deleted.
Visualization Manager deleting...
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: DetectorConstruction.hh,v 1.2 2006/06/29 16:42:01 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:42: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: EventAction.hh,v 1.2 2006/06/29 16:42: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: EventActionMessenger.hh,v 1.2 2006/06/29 16:42:08 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.4 2007/04/27 10:38:11 maire Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: HistoManager.hh,v 1.6 2007/11/09 17:35:06 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -58,20 +58,21 @@ class HistoManager
void SetFileName (const G4String& name) { fileName[0] = name;};
void SetFileType (const G4String& name) { fileType = name;};
void SetFileOption (const G4String& name) { fileOption = name;};
void book(G4double);
void book();
void save();
void SetHisto (G4int,G4int,G4double,G4double,const G4String& unit="none");
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];}
void SetcsdaRange(G4double val) {csdaRange = val;};
G4double GetcsdaRange() {return csdaRange;};
G4double GetStepMax() {return stepMax;};
G4double ComputeStepMax(G4double);
private:
@@ -89,11 +90,16 @@ class HistoManager
G4double Vmax [MaxHisto];
G4double Unit [MaxHisto];
G4double Width[MaxHisto];
G4bool ascii[MaxHisto];
G4bool factoryOn;
HistoMessenger* histoMessenger;
G4bool rangeFlag;
G4double csdaRange;
G4double stepMax;
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:42:12 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: HistoMessenger.hh,v 1.3 2007/11/09 17:35:06 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -63,6 +63,7 @@ class HistoMessenger: public G4UImessenger
G4UIcmdWithAString* factoryCmd;
G4UIcmdWithAString* typeCmd;
G4UIcommand* histoCmd;
G4UIcmdWithAnInteger* prhistoCmd;
G4UIcmdWithAnInteger* rmhistoCmd;
G4UIcmdWithADoubleAndUnit* csdaCmd;
};
@@ -25,7 +25,7 @@
//
//
// $Id: PhysListEmLivermore.hh,v 1.2 2006/06/29 16:42:20 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:42:23 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:42:25 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:42:37 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:42: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: PrimaryGeneratorAction.hh,v 1.2 2006/06/29 16:42:42 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:42:44 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: RunAction.hh,v 1.4 2007/04/27 10:38:11 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: StepMax.hh,v 1.3 2006/06/29 16:42:50 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:42:52 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:42: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: SteppingVerbose.hh,v 1.2 2006/06/29 16:42:56 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:42:58 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: DetectorConstruction.cc,v 1.2 2006/06/29 16:43: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: DetectorMessenger.cc,v 1.2 2006/06/29 16:43: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: EventAction.cc,v 1.2 2006/06/29 16:43:05 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:43:07 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 2007/04/27 10:38:11 maire Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: HistoManager.cc,v 1.6 2007/11/09 17:35:06 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -61,12 +61,13 @@ HistoManager::HistoManager()
exist[k] = false;
Unit[k] = 1.0;
Width[k] = 1.0;
ascii[k] = false;
}
histoMessenger = new HistoMessenger(this);
csdaRange = 0.;
stepMax = DBL_MAX;
rangeFlag = false;
csdaRange = DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -82,7 +83,7 @@ HistoManager::~HistoManager()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void HistoManager::book(G4double range)
void HistoManager::book()
{
#ifdef G4ANALYSIS_USE
if(!af) return;
@@ -121,8 +122,6 @@ void HistoManager::book(G4double range)
if (factoryOn)
G4cout << "\n----> Histogram Tree is opened in " << fileName[1] << G4endl;
#endif
if (csdaRange == 0.) csdaRange = range;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -131,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;
@@ -202,19 +202,6 @@ void HistoManager::SetHisto(G4int ih,
G4cout << "----> SetHisto " << ih << ": " << titl << "; "
<< nbins << " bins from "
<< vmin << " " << unit << " to " << vmax << " " << unit << G4endl;
// compute constraint of stepMax from histos 1 and 8
//
G4double frac = 1.;
if (ih == 1) {
stepMax = std::min(stepMax,frac*Width[ih]);
G4cout << " stepMax = " << G4BestUnit(stepMax,"Length") << G4endl;
}
if ((ih == 8)&&(csdaRange>0.)) {
stepMax = std::min(stepMax,frac*Width[ih]*csdaRange);
G4cout << " stepMax = " << G4BestUnit(stepMax,"Length") << G4endl;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -246,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:43:11 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: HistoMessenger.cc,v 1.4 2007/11/09 17:35:06 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -83,6 +83,11 @@ 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);
@@ -101,6 +106,7 @@ HistoMessenger::~HistoMessenger()
{
delete csdaCmd;
delete rmhistoCmd;
delete prhistoCmd;
delete histoCmd;
delete typeCmd;
delete factoryCmd;
@@ -127,6 +133,9 @@ 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));
@@ -25,7 +25,7 @@
//
//
// $Id: PhysListEmLivermore.cc,v 1.3 2007/01/08 16:33:52 vnivanch 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.2 2006/06/29 16:43:22 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.cc,v 1.2 2006/06/29 16:43:25 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: PhysicsList.cc,v 1.5 2006/10/25 17:27:02 maire Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: PhysicsList.cc,v 1.6 2007/08/19 20:57:28 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -292,7 +292,7 @@ void PhysicsList::SetCuts()
G4cout << "PhysicsList::SetCuts:";
G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
}
// 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");
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: PhysicsListMessenger.cc,v 1.2 2006/06/29 16:43:30 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:43:32 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:43:34 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.7 2007/04/27 10:38:11 maire Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: RunAction.cc,v 1.8 2007/08/19 20:57:29 maire Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -89,17 +89,17 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
G4ParticleDefinition* particle = kinematic->GetParticleGun()
->GetParticleDefinition();
G4double energy = kinematic->GetParticleGun()->GetParticleEnergy();
csdaRange = 0.;
csdaRange = DBL_MAX;
if (particle->GetPDGCharge() != 0.)
csdaRange = emCalculator.GetCSDARange(energy,particle,material);
//histograms
//
histoManager->book(csdaRange);
histoManager->book();
//set StepMax from histos
//
G4double stepMax = histoManager->GetStepMax();
G4double stepMax = histoManager->ComputeStepMax(csdaRange);
physics->GetStepMaxProcess()->SetMaxStep(stepMax);
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: StepMax.cc,v 1.3 2006/06/29 16:43: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: StepMaxMessenger.cc,v 1.3 2006/06/29 16:43: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: SteppingAction.cc,v 1.4 2007/04/27 10:38:11 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: SteppingVerbose.cc,v 1.2 2006/06/29 16:43: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: TrackingAction.cc,v 1.2 2006/06/29 16:43:48 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......