Import Geant4 9.1.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.9 2007/04/06 16:07:53 maire Exp $
|
||||
$Id: History,v 1.12 2007/11/13 12:13:32 maire Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -15,6 +15,15 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
13-11-07 mma (testem14-V09-00-01)
|
||||
- HistoManager/HistoMessenger : print selected histos on ascii file
|
||||
|
||||
02-07-07 V.Ivant (testem14-V09-00-00)
|
||||
|
||||
24-06-07 mma (testem14-V08-03-00)
|
||||
- SteppingAction : modify logic to take into account low energy packages
|
||||
- cosmetic in TestEm14.in
|
||||
|
||||
06-04-07 mma (testem14-V08-02-00)
|
||||
- vis.mac : suppress command drawTracks
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: README,v 1.5 2006/05/15 14:43:01 maire Exp $
|
||||
$Id: README,v 1.6 2007/11/13 12:13:32 maire Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -26,7 +26,7 @@ $Id: README,v 1.5 2006/05/15 14:43:01 maire Exp $
|
||||
2- PHYSICS LIST
|
||||
|
||||
The physics list contains the standard electromagnetic processes.
|
||||
In order not to introduce 'articicial' constraints on the step size, the
|
||||
In order not to introduce 'artificial' constraints on the step size, the
|
||||
multiple scattering is not instanciated, and there is no limitation from
|
||||
the maximum energy lost per step.
|
||||
|
||||
@@ -79,6 +79,11 @@ $Id: README,v 1.5 2006/05/15 14:43:01 maire Exp $
|
||||
the commands:
|
||||
/testem/histo/setFileName name (default testem14)
|
||||
/testem/histo/setFileType name (default hbook)
|
||||
|
||||
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 testem14)
|
||||
|
||||
Note that, by default, histograms are disabled. To activate them,
|
||||
uncomment the flag G4ANALYSIS_USE in GNUmakefile.
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: TestEm14.cc,v 1.3 2006/06/29 16:44:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: TestEm14.cc,v 1.4 2007/06/23 22:23:20 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -69,12 +69,6 @@ int main(int argc,char** argv) {
|
||||
runManager->SetUserInitialization(new PhysicsList);
|
||||
runManager->SetUserAction(prim = new PrimaryGeneratorAction(det));
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
// visualization manager
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
#endif
|
||||
|
||||
HistoManager* histo = new HistoManager();
|
||||
|
||||
// set user action classes
|
||||
@@ -86,8 +80,20 @@ int main(int argc,char** argv) {
|
||||
// get the pointer to the User Interface manager
|
||||
G4UImanager* UI = G4UImanager::GetUIpointer();
|
||||
|
||||
if (argc==1) // Define UI terminal for interactive mode
|
||||
if (argc!=1) // batch mode
|
||||
{
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UI->ApplyCommand(command+fileName);
|
||||
}
|
||||
|
||||
else //define visualization and UI terminal for interactive mode
|
||||
{
|
||||
#ifdef G4VIS_USE
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
#endif
|
||||
|
||||
G4UIsession * session = 0;
|
||||
#ifdef G4UI_USE_TCSH
|
||||
session = new G4UIterminal(new G4UItcsh);
|
||||
@@ -96,19 +102,14 @@ int main(int argc,char** argv) {
|
||||
#endif
|
||||
session->SessionStart();
|
||||
delete session;
|
||||
}
|
||||
else // Batch mode
|
||||
{
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UI->ApplyCommand(command+fileName);
|
||||
}
|
||||
|
||||
// job termination
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
delete visManager;
|
||||
#endif
|
||||
delete visManager;
|
||||
#endif
|
||||
}
|
||||
|
||||
// job termination
|
||||
//
|
||||
delete histo;
|
||||
delete runManager;
|
||||
|
||||
|
||||
@@ -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,87 +9,57 @@
|
||||
|
||||
***** Table : Nb of materials = 15 *****
|
||||
|
||||
Material: Air density: 1.290 mg/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 285.161 m
|
||||
Material: Air density: 1.290 mg/cm3 RadL: 285.161 m Imean: 85.684 eV temperature: 273.15 K pressure: 1.00 atm
|
||||
---> 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: H2liquid density: 70.800 mg/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 8.923 m
|
||||
Material: H2liquid density: 70.800 mg/cm3 RadL: 8.923 m Imean: 21.800 eV
|
||||
---> Element: Hydrogen (H) Z = 1.0 N = 1.0 A = 1.01 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
Material: Water H_2O density: 1.000 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 36.092 cm
|
||||
Material: Water H_2O density: 1.000 g/cm3 RadL: 36.092 cm Imean: 75.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 %
|
||||
|
||||
Material: liquidArgon density: 1.390 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 14.065 cm
|
||||
Material: liquidArgon density: 1.390 g/cm3 RadL: 14.065 cm Imean: 187.200 eV
|
||||
---> Element: liquidArgon ( ) Z = 18.0 N = 40.0 A = 39.95 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
Material: Carbon density: 2.267 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 18.833 cm
|
||||
Material: Carbon density: 2.267 g/cm3 RadL: 18.833 cm Imean: 78.000 eV
|
||||
---> Element: Carbon ( ) Z = 6.0 N = 12.0 A = 12.01 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
|
||||
Material: Aluminium density: 2.700 g/cm3 RadL: 8.893 cm Imean: 166.400 eV
|
||||
---> Element: Aluminium ( ) Z = 13.0 N = 27.0 A = 26.98 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
Material: Silicon density: 2.330 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 9.368 cm
|
||||
Material: Silicon density: 2.330 g/cm3 RadL: 9.368 cm Imean: 173.600 eV
|
||||
---> Element: Silicon ( ) Z = 14.0 N = 28.1 A = 28.09 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
Material: Germanium density: 5.323 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 2.301 cm
|
||||
Material: Germanium density: 5.323 g/cm3 RadL: 2.301 cm Imean: 332.800 eV
|
||||
---> Element: Germanium ( ) Z = 32.0 N = 72.6 A = 72.61 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
Material: NaI density: 3.670 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 2.586 cm
|
||||
Material: NaI density: 3.670 g/cm3 RadL: 2.586 cm Imean: 452.000 eV
|
||||
---> Element: Sodium (Na) Z = 11.0 N = 23.0 A = 22.99 g/mole ElmMassFraction: 15.34 % ElmAbundance 50.00 %
|
||||
---> Element: Iodine (I) Z = 53.0 N = 126.9 A = 126.90 g/mole ElmMassFraction: 84.66 % ElmAbundance 50.00 %
|
||||
|
||||
Material: Iodine density: 4.930 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 1.720 cm
|
||||
Material: Iodine density: 4.930 g/cm3 RadL: 1.720 cm Imean: 492.900 eV
|
||||
---> Element: Iodine (I) Z = 53.0 N = 126.9 A = 126.90 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
|
||||
Material: BGO density: 7.100 g/cm3 RadL: 1.123 cm Imean: 469.142 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 %
|
||||
|
||||
Material: Iron density: 7.870 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 1.759 cm
|
||||
Material: Iron density: 7.870 g/cm3 RadL: 1.759 cm Imean: 286.000 eV
|
||||
---> Element: Iron ( ) Z = 26.0 N = 55.9 A = 55.85 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
Material: Tungsten density: 19.300 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 3.504 mm
|
||||
Material: Tungsten density: 19.300 g/cm3 RadL: 3.504 mm Imean: 725.200 eV
|
||||
---> Element: Tungsten ( ) Z = 74.0 N = 183.8 A = 183.85 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
|
||||
Material: Lead density: 11.350 g/cm3 RadL: 5.612 mm Imean: 820.000 eV
|
||||
---> 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
|
||||
Material: Uranium density: 18.950 g/cm3 RadL: 3.166 mm Imean: 892.400 eV
|
||||
---> Element: Uranium ( ) Z = 92.0 N = 238.0 A = 238.03 g/mole ElmMassFraction: 100.00 % ElmAbundance 100.00 %
|
||||
|
||||
|
||||
Visualization Manager instantiating...
|
||||
Visualization Manager initialising...
|
||||
Registering graphics systems...
|
||||
|
||||
You have successfully registered the following graphics systems.
|
||||
Current available graphics systems are:
|
||||
ASCIITree (ATree)
|
||||
DAWNFILE (DAWNFILE)
|
||||
G4HepRep (HepRepXML)
|
||||
G4HepRepFile (HepRepFile)
|
||||
RayTracer (RayTracer)
|
||||
VRML1FILE (VRML1FILE)
|
||||
VRML2FILE (VRML2FILE)
|
||||
|
||||
Registering model factories...
|
||||
|
||||
You have successfully registered the following model factories.
|
||||
Registered model factories:
|
||||
generic
|
||||
drawByCharge
|
||||
drawByParticleID
|
||||
drawByOriginVolume
|
||||
drawByAttribute
|
||||
|
||||
Registered filter factories:
|
||||
chargeFilter
|
||||
particleFilter
|
||||
originVolumeFilter
|
||||
attributeFilter
|
||||
|
||||
/run/verbose 2
|
||||
#
|
||||
/testem/det/setMat Water
|
||||
@@ -130,7 +100,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= 1, integral: 0
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 1, integral: 0, fluct: 0
|
||||
|
||||
eBrem: tables are built for e-
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
|
||||
@@ -143,7 +113,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= 1, integral: 0
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 1, integral: 0, fluct: 0
|
||||
|
||||
eBrem: tables are built for e+
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
|
||||
@@ -161,7 +131,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= 1, integral: 0
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 1, integral: 0, fluct: 0
|
||||
|
||||
ionIoni: tables are built for GenericIon
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
|
||||
@@ -171,7 +141,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)= 1, dRoverRange= 1, integral: 0
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 1, integral: 0, fluct: 0
|
||||
|
||||
hIoni: tables are built for anti_proton
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
|
||||
@@ -179,14 +149,14 @@ 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= 1, integral: 0
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 1, integral: 0, fluct: 0
|
||||
|
||||
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)= 1, dRoverRange= 1, integral: 0
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 1, integral: 0, fluct: 0
|
||||
|
||||
muBrems: tables are built for mu+
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
|
||||
@@ -203,7 +173,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= 1, integral: 0
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 1, integral: 0, fluct: 0
|
||||
|
||||
muBrems: tables are built for mu-
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
|
||||
@@ -221,7 +191,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= 1, integral: 0
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 1, integral: 0, fluct: 0
|
||||
|
||||
hIoni: tables are built for pi-
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
|
||||
@@ -229,7 +199,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= 1, integral: 0
|
||||
Step function: finalRange(mm)= 1, dRoverRange= 1, integral: 0, fluct: 0
|
||||
|
||||
Region <DefaultRegionForTheWorld> -- appears in <Water> world volume
|
||||
Root logical volume(s) : Water
|
||||
@@ -283,7 +253,7 @@ Start Run processing.
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100000
|
||||
User=32s Real=32s Sys=0s
|
||||
User=32s Real=32s Sys=0.01s
|
||||
|
||||
The run consists of 100000 gamma of 100 keV through 100 m of Water (density: 1 g/cm3 )
|
||||
|
||||
@@ -292,7 +262,7 @@ Run Summary
|
||||
MeanFreePath: 6.0496 cm +- 6.0503 cm massic: 6.0496 g/cm2
|
||||
CrossSection: 0.1653 cm^-1 massic: 0.1653 cm2/g
|
||||
|
||||
mean energy of charged secondaries: 15.218 keV mass_energy_transfer coef: 0.025156 cm2/g
|
||||
mean energy of charged secondaries: 15.209 keV mass_energy_transfer coef: 0.025141 cm2/g
|
||||
|
||||
Verification : crossSections from G4EmCalculator
|
||||
compt= 0.1623 cm2/g phot= 0.0026853 cm2/g total= 0.16498 cm2/g
|
||||
@@ -372,8 +342,6 @@ Run Summary
|
||||
Initial seed (index) = 0
|
||||
Current couple of seeds = 679237908, 105871640
|
||||
----------------------------------------
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
UserDetectorConstruction deleted.
|
||||
UserPhysicsList deleted.
|
||||
UserRunAction deleted.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: gamma.mac,v 1.2 2006/05/10 11:15:33 maire Exp $
|
||||
# $Id: gamma.mac,v 1.3 2007/06/23 22:23:20 maire Exp $
|
||||
#
|
||||
# Macro file for "TestEm14.cc"
|
||||
# (can be run in batch, without graphic)
|
||||
@@ -9,6 +9,7 @@
|
||||
/run/verbose 2
|
||||
#
|
||||
/testem/det/setMat Water
|
||||
/testem/phys/addPhysics standard
|
||||
#
|
||||
/run/initialize
|
||||
#
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: DetectorConstruction.hh,v 1.3 2006/06/29 16:44: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: DetectorMessenger.hh,v 1.3 2006/06/29 16:44: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: EventAction.hh,v 1.3 2006/06/29 16:45: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: EventActionMessenger.hh,v 1.3 2006/06/29 16:45:02 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:45:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: HistoManager.hh,v 1.4 2007/11/13 12:13:32 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -63,7 +63,8 @@ class HistoManager
|
||||
void SetHisto (G4int,G4int,G4double,G4double,const G4String& unit="none");
|
||||
void FillHisto(G4int id, G4double e, G4double weight = 1.0);
|
||||
void RemoveHisto (G4int);
|
||||
|
||||
void PrintHisto (G4int);
|
||||
|
||||
G4bool HistoExist (G4int id) {return exist[id];}
|
||||
G4double GetHistoUnit(G4int id) {return Unit[id];}
|
||||
G4double GetBinWidth (G4int id) {return Width[id];}
|
||||
@@ -84,8 +85,13 @@ class HistoManager
|
||||
G4double Vmax [MaxHisto];
|
||||
G4double Unit [MaxHisto];
|
||||
G4double Width[MaxHisto];
|
||||
G4bool ascii[MaxHisto];
|
||||
|
||||
G4bool factoryOn;
|
||||
HistoMessenger* histoMessenger;
|
||||
|
||||
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.3 2006/06/29 16:45:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: HistoMessenger.hh,v 1.4 2007/11/13 12:13:32 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -64,7 +64,8 @@ class HistoMessenger: public G4UImessenger
|
||||
G4UIcmdWithAString* optionCmd;
|
||||
G4UIcommand* histoCmd;
|
||||
G4UIcmdWithAnInteger* rmhistoCmd;
|
||||
|
||||
G4UIcmdWithAnInteger* prhistoCmd;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: PhysListEmLivermore.hh,v 1.2 2006/06/29 16:45:10 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:45: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: PhysListEmStandard.hh,v 1.3 2006/06/29 16:45:14 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:45:16 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.3 2006/06/29 16:45:18 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.3 2006/06/29 16:45: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: ProcessesCount.hh,v 1.3 2006/06/29 16:45: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: RunAction.hh,v 1.4 2006/09/06 09:56:06 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: SteppingAction.hh,v 1.4 2006/09/06 09:56:06 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: SteppingMessenger.hh,v 1.2 2006/06/29 16:45:29 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.3 2006/06/29 16:45:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// This class manages the verbose outputs in G4SteppingManager.
|
||||
// It inherits from G4SteppingVerbose.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: DetectorConstruction.cc,v 1.4 2006/06/29 16:45:33 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.3 2006/06/29 16:45:35 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.3 2006/06/29 16:45:37 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.3 2006/06/29 16:45:39 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/06/29 16:45:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: HistoManager.cc,v 1.5 2007/11/13 12:13:32 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -61,6 +61,7 @@ HistoManager::HistoManager()
|
||||
exist[k] = false;
|
||||
Unit[k] = 1.0;
|
||||
Width[k] = 1.0;
|
||||
ascii[k] = false;
|
||||
}
|
||||
|
||||
histoMessenger = new HistoMessenger(this);
|
||||
@@ -126,6 +127,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;
|
||||
@@ -213,3 +215,42 @@ void HistoManager::RemoveHisto(G4int ih)
|
||||
|
||||
//....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......
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: HistoMessenger.cc,v 1.3 2006/06/29 16:45:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: HistoMessenger.cc,v 1.4 2007/11/13 12:17:07 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -52,12 +52,12 @@ HistoMessenger::HistoMessenger(HistoManager* manager)
|
||||
factoryCmd->SetGuidance("set name for the histograms file");
|
||||
|
||||
typeCmd = new G4UIcmdWithAString("/testem/histo/setFileType",this);
|
||||
typeCmd->SetGuidance("set histograms file type");
|
||||
typeCmd->SetGuidance("set histograms file type: hbook, root, XML");
|
||||
typeCmd->SetCandidates("hbook root XML");
|
||||
|
||||
optionCmd = new G4UIcmdWithAString("/testem/histo/setFileOption",this);
|
||||
optionCmd->SetGuidance("set option for the histograms file");
|
||||
|
||||
|
||||
histoCmd = new G4UIcommand("/testem/histo/setHisto",this);
|
||||
histoCmd->SetGuidance("Set bining of the histo number ih :");
|
||||
histoCmd->SetGuidance(" nbBins; valMin; valMax; unit (of vmin and vmax)");
|
||||
@@ -85,6 +85,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);
|
||||
@@ -96,8 +101,9 @@ HistoMessenger::HistoMessenger(HistoManager* manager)
|
||||
HistoMessenger::~HistoMessenger()
|
||||
{
|
||||
delete rmhistoCmd;
|
||||
delete prhistoCmd;
|
||||
delete histoCmd;
|
||||
delete optionCmd;
|
||||
delete optionCmd;
|
||||
delete typeCmd;
|
||||
delete factoryCmd;
|
||||
delete histoDir;
|
||||
@@ -126,7 +132,10 @@ 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.2 2006/06/29 16:45:47 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.cc,v 1.2 2006/06/29 16:45:49 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.4 2006/10/24 16:54:16 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: PhysicsList.cc,v 1.4 2006/10/24 16:54:16 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.3 2006/06/29 16:45:55 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.3 2006/06/29 16:45: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: RunAction.cc,v 1.4 2006/09/06 09:56:06 maire 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/06 09:56:06 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: SteppingAction.cc,v 1.5 2007/06/23 22:23:20 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -60,17 +60,19 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep)
|
||||
{
|
||||
G4StepPoint* endPoint = aStep->GetPostStepPoint();
|
||||
G4String procName = endPoint->GetProcessDefinedStep()->GetProcessName();
|
||||
G4double stepLength = aStep->GetStepLength();
|
||||
|
||||
//count real processes (at least 1 secondary) and sum track length
|
||||
//
|
||||
G4TrackVector* secondary = fpSteppingManager->GetSecondary();
|
||||
G4TrackVector* secondary = fpSteppingManager->GetSecondary();
|
||||
G4bool transmit = (endPoint->GetStepStatus() <= fGeomBoundary);
|
||||
if ((*secondary).size() > 0) {
|
||||
runAction->CountProcesses(procName);
|
||||
runAction->SumTrack(stepLength);
|
||||
if (transmit) runAction->CountProcesses(procName);
|
||||
else {
|
||||
//count real processes and sum track length
|
||||
G4double stepLength = aStep->GetStepLength();
|
||||
G4double charge = aStep->GetTrack()->GetDefinition()->GetPDGCharge();
|
||||
if ((charge == 0.) || ((charge != 0.) && (((*secondary).size() > 0))))
|
||||
{
|
||||
runAction->CountProcesses(procName);
|
||||
runAction->SumTrack(stepLength);
|
||||
}
|
||||
}
|
||||
else if (transmit) runAction->CountProcesses(procName);
|
||||
|
||||
//plot final state (only if continuous energy loss is small enough)
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: SteppingMessenger.cc,v 1.2 2006/06/29 16:46: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.cc,v 1.3 2006/06/29 16:46:05 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