Import Geant4 1.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:34:16 +02:00
parent ca1c8cb059
commit 103bda00c8
2654 changed files with 29719 additions and 20203 deletions
+31 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.37 1999/12/07 11:33:51 stesting Exp $
$Id: History,v 1.42 2000/02/18 13:23:04 stesting Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,36 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
14th February 2000 Michel Maire (tag examples-V01-00-01a by John Allison)
- Changed cout to G4cout in extended/electromagnetic/TestEm2/src/Em2DetectorConstruction.cc
13th February 2000 John Allison (examples-V01-00-01)
- Updated N03 and N04.EMtest.out for geant4-01-00-ref-04-tags6.
24th January 2000 John Allison
- N02/03: Limited printing in ExNnnEventAction::EndOfEventAction to first
100 events and then every 100.
21st January 2000 John Allison
- Added large_N.in files in examples/novice.
- Temporarily reduced no of events in N04 due to slow 10 Tev muons.
20th January 2000 John Allison
- Tagged extended/electromagnetic testem-V01-00-00.
o implemented G4NOHIST (Michel Maire).
o new TestEm6 (low energy): TestEm6.in contains protons, anti_protons,
ionC12 (Vladimir Ivanchenko).
13th January 2000 John Allison (examples-V01-00-00)
- N02, N03: Introduced ExN0nSteppingVerbose (Michel Maire).
- N04: Introduced 10 TeV mu- in exampleN04.EMtest.in (John Apostolakis).
- N05, N06: (Gabriele Cosmo):
Replaced #include "G4Timer.hh" by class G4Timer in ExN0nRunAction.hh.
Added #include "G4Timer.hh" as first #include in ExN0nRunAction.cc.
- Updated PersistentEx01.out and PersistentEx02.out for geant4-01-00-ref-01/2.
- N02, N03, N04, N04.EMtest, N05, N06: updated .out files for -ref-02.
- N04.EMtest.in: reduced number of events from 100 to 10 for 10 TeV mu-.
7th December 1999 John Allison (examples-V00-01-19)
- Updated novice .out files to geant4-01-00.
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.1 1999/10/11 13:07:23 maire Exp $
# $Id: GNUmakefile,v 1.2 2000/01/21 12:29:24 maire Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -16,7 +16,11 @@ all: lib bin
include $(G4INSTALL)/config/architecture.gmk
LDFLAGS += -L/cern/pro/lib
LOADLIBS += -lpacklib $(FCLIBS)
ifdef G4NOHIST
CPPFLAGS += -DG4NOHIST
else
LDFLAGS += -L/cern/pro/lib
LOADLIBS += -lpacklib $(FCLIBS)
endif
include $(G4INSTALL)/config/binmake.gmk
@@ -1,4 +1,4 @@
$Id: History,v 1.2 1999/10/11 13:14:31 maire Exp $
$Id: History,v 1.3 2000/01/21 12:29:24 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,8 @@ track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
21-01-00 cppflag G4NOHIST to protect hbook histograms.
11-10-99 moved from: source/processes/electromagnetic/test
to: examples/extended/electromagnetic
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: TestEm1.cc,v 1.1.4.1 1999/12/07 20:46:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: TestEm1.cc,v 1.3 1999/12/15 14:48:48 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// --------------------------------------------------------------
@@ -30,6 +30,7 @@
#include "Em1DetectorConstruction.hh"
#include "Em1PhysicsList.hh"
#include "Em1PrimaryGeneratorAction.hh"
#include "Em1SteppingVerbose.hh"
#ifdef Em1NoOptimize
#include "Em1RunAction.hh"
@@ -47,6 +48,9 @@ int main(int argc,char** argv) {
//choose the Random engine
HepRandom::setTheEngine(new RanecuEngine);
//my Verbose output class
G4VSteppingVerbose::SetInstance(new Em1SteppingVerbose);
// Construct the default run manager
G4RunManager * runManager = new G4RunManager;
@@ -0,0 +1,20 @@
# $Id: TestEm1.in,v 1.1 2000/01/21 14:58:58 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
#
# electron 100 MeV; all processes
#
/control/verbose 2
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 2.20 mm
/calor/cutE 6.05 mum
/run/initialize
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 100 MeV
/run/beamOn 100
@@ -0,0 +1,241 @@
**********************************************
Geant4 version $Name: geant4-01-01 $
(07-Dec-99)
Copyright : Geant4 Collaboration
**********************************************
Constructing Visualization Manager....
Initialising Visualization Manager....
Registering graphics systems....
***** Table : Nb of materials = 8 *****
Material: Air density: 1.290 mg/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 285.161 m
---> Element: Nitrogen N Z = 7.0 N = 14.0 A = 14.01 g/mole fractionMass: 70.00 % Abundance 72.71 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 30.00 % Abundance 27.29 %
Material: H2liquid density: 70.800 mg/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 8.923 m
---> Element: Hydrogen H Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Water density: 1.000 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 36.092 cm
---> Element: Hydrogen H Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 11.21 % Abundance 66.67 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 88.79 % Abundance 33.33 %
Material: liquidArgon density: 1.390 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 14.065 cm
---> Element: liquidArgon Z = 18.0 N = 40.0 A = 39.95 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Aluminium density: 2.700 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 8.893 cm
---> Element: Aluminium Z = 13.0 N = 27.0 A = 26.98 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Iron density: 7.870 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 1.759 cm
---> Element: Iron Z = 26.0 N = 55.9 A = 55.85 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Lead density: 11.350 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 5.612 mm
---> Element: Lead Z = 82.0 N = 207.2 A = 207.19 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Uranium density: 18.950 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 3.861 mm
---> Element: Uranium Z = 82.0 N = 238.0 A = 238.03 g/mole fractionMass: 100.00 % Abundance 100.00 %
The Box is 20 m of Aluminium
Em1PhysicsList::SetCuts:CutLength : 1 (mm)
phot: Total cross sections from a parametrisation. Good description from 10 KeV to 50 MeV for all Z
Sandia crossSection below 50 KeV
PhysicsTables from 50 keV to 50 MeV in 100 bins.
compt: Total cross sections from a parametrisation. Good description from 10 KeV to (100/Z) GeV.
Scattered gamma energy according Klein-Nishina.
PhysicsTables from 10 keV to 1e+02 GeV in 100 bins.
conv: Total cross sections from a parametrisation. Good description from 1.5 MeV to 100 GeV for all Z.
e+e- energies according Bethe-Heitler
PhysicsTables from 1 MeV to 1e+02 GeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
eIoni: delta cross sections from Moller+Bhabha. Good description from 1 KeV to 100 GeV.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
eBrem: Total cross sections from a parametrisation. Good description from 1 KeV to 100 GeV.
log scale extrapolation above 100 GeV
Gamma energy sampled from a parametrised formula.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
annihil: Total cross section from Heilter formula (annihilation into 2 photons).
gamma energies sampled according Heitler
PhysicsTables from 10 keV to 10 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
hIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+02 TeV in 150 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
MuIoni: knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+03 PeV in 100 bins.
MuBrems: theoretical cross section
Good description up to 1000 TeV.
PhysicsTables from 1 GeV to 1e+03 PeV in 100 bins.
MuPairProd: theoretical cross sections
Good description up to 1000 TeV.
PhysicsTables from 1 GeV to 1e+03 PeV in 50 bins.
============= The cut Energy ==============================
gamma e- mu- proton neutron
Cut in range 1 mm 1 mm 1 mm 1 mm 1 mm
Cut in energy
Air 990 eV 990 eV 48.4 keV 83.2 keV 990 eV
H2liquid 990 eV 108 keV 1.23 MeV 3.18 MeV 990 eV
Water 2.9 keV 347 keV 3.39 MeV 8.95 MeV 990 eV
liquidArgon 6.18 keV 343 keV 3.24 MeV 8.32 MeV 990 eV
Aluminium 6.89 keV 597 keV 5.02 MeV 13.1 MeV 990 eV
Iron 20.8 keV 1.28 MeV 8.52 MeV 22 MeV 990 eV
Lead 101 keV 1.38 MeV 8.52 MeV 20.9 MeV 990 eV
Uranium 110 keV 1.92 MeV 10.5 MeV 26.1 MeV 990 eV
===================================================
# $Id: TestEm1.out,v 1.1 2000/01/21 14:58:58 maire Exp $
#
# Macro file for "TestEm1.cc"
# (can be run in batch, without graphic)
#
# electron 100 MeV; all processes
#
#
/process/eLoss/StepFunction 0.183 170 micrometer
/calor/cutG 2.20 mm
/calor/cutE 6.05 mum
/run/initialize
Em1PhysicsList::SetCuts:CutLength : 1 (mm)
phot: Total cross sections from a parametrisation. Good description from 10 KeV to 50 MeV for all Z
Sandia crossSection below 50 KeV
PhysicsTables from 50 keV to 50 MeV in 100 bins.
compt: Total cross sections from a parametrisation. Good description from 10 KeV to (100/Z) GeV.
Scattered gamma energy according Klein-Nishina.
PhysicsTables from 10 keV to 1e+02 GeV in 100 bins.
conv: Total cross sections from a parametrisation. Good description from 1.5 MeV to 100 GeV for all Z.
e+e- energies according Bethe-Heitler
PhysicsTables from 1 MeV to 1e+02 GeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
eIoni: delta cross sections from Moller+Bhabha. Good description from 1 KeV to 100 GeV.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
eBrem: Total cross sections from a parametrisation. Good description from 1 KeV to 100 GeV.
log scale extrapolation above 100 GeV
Gamma energy sampled from a parametrised formula.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
annihil: Total cross section from Heilter formula (annihilation into 2 photons).
gamma energies sampled according Heitler
PhysicsTables from 10 keV to 10 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
hIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+02 TeV in 150 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
MuIoni: knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+03 PeV in 100 bins.
MuBrems: theoretical cross section
Good description up to 1000 TeV.
PhysicsTables from 1 GeV to 1e+03 PeV in 100 bins.
MuPairProd: theoretical cross sections
Good description up to 1000 TeV.
PhysicsTables from 1 GeV to 1e+03 PeV in 50 bins.
============= The cut Energy ==============================
gamma e- mu- proton neutron
Cut in range 2.2 mm 6.05 mum 1 mm 1 mm 1 mm
Cut in energy
Air 990 eV 990 eV 48.4 keV 83.2 keV 990 eV
H2liquid 990 eV 990 eV 1.23 MeV 3.18 MeV 990 eV
Water 4.06 keV 3.27 keV 3.39 MeV 8.95 MeV 990 eV
liquidArgon 9.08 keV 3.98 keV 3.24 MeV 8.32 MeV 990 eV
Aluminium 9.99 keV 9.97 keV 5.02 MeV 13.1 MeV 990 eV
Iron 31.1 keV 43.3 keV 8.52 MeV 22 MeV 990 eV
Lead 124 keV 42.8 keV 8.52 MeV 20.9 MeV 990 eV
Uranium 143 keV 53.4 keV 10.5 MeV 26.1 MeV 990 eV
===================================================
#
/run/verbose 2
/event/drawTracks none
#
/gun/particle e-
/gun/energy 100 MeV
/run/beamOn 100
### Run 0 start.
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 9876, 54321
----------------------------------------
Start closing geometry.
Start Run processing.
---> Begin of Event: 0
Run terminated.
Run Summary
Number of events processed : 100
User=11s Real=13s Sys=1.6s
nb tracks/event neutral: 24.64 charged: 642.10
nb steps/event neutral: 135.32 charged: 1276.54
nb of process calls per event:
eIoni eBrem phot compt conv annihil
1253.39 21.62 23.11 110.68 1.53 1.53
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 1096809697, 1350310764
----------------------------------------
Graphics systems deleted.
VisManager deleting.
G4 kernel has come to Quit state.
Deletion of G4 kernel class start.
UserDetectorConstruction deleted.
UserPhysicsList deleted.
UserRunAction deleted.
UserPrimaryGenerator deleted.
EventManager deleted.
UImanager deleted.
StateManager deleted.
RunManager is deleting.
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1DetectorConstruction.hh,v 1.1.4.1 1999/12/07 20:46:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1DetectorConstruction.hh,v 1.2 1999/12/15 14:48:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1DetectorMessenger.hh,v 1.1.4.1 1999/12/07 20:46:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1DetectorMessenger.hh,v 1.2 1999/12/15 14:48:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1EventAction.hh,v 1.1.4.1 1999/12/07 20:46:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1EventAction.hh,v 1.2 1999/12/15 14:48:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1EventActionMessenger.hh,v 1.1.4.1 1999/12/07 20:46:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1EventActionMessenger.hh,v 1.2 1999/12/15 14:48:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1PhysicsList.hh,v 1.1.4.1 1999/12/07 20:46:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1PhysicsList.hh,v 1.2 1999/12/15 14:48:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1PhysicsListMessenger.hh,v 1.1.4.1 1999/12/07 20:46:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1PhysicsListMessenger.hh,v 1.2 1999/12/15 14:48:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1PrimaryGeneratorAction.hh,v 1.1.4.1 1999/12/07 20:46:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1PrimaryGeneratorAction.hh,v 1.2 1999/12/15 14:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1RunAction.hh,v 1.1.4.1 1999/12/07 20:46:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1RunAction.hh,v 1.3 2000/01/21 12:29:25 maire Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -24,8 +24,11 @@
class G4Run;
class Em1RunActionMessenger;
class HepTupleManager;
class HepHistogram;
#ifndef G4NOHIST
class HepTupleManager;
class HepHistogram;
#endif
class Em1RunAction : public G4UserRunAction
{
@@ -43,12 +46,14 @@ class Em1RunAction : public G4UserRunAction
void CountSteps1(G4int ns) { NbOfSteps1 += ns;}
void CountProcesses(G4String);
public:
HepHistogram* GetHisto(G4int id) {return histo[id];}
public:
void SetRndmFreq(G4int val) {saveRndm = val;}
G4int GetRndmFreq() {return saveRndm;}
G4int GetRndmFreq() {return saveRndm;}
#ifndef G4NOHIST
HepHistogram* GetHisto(G4int id) {return histo[id];}
#endif
private:
void bookHisto();
void cleanHisto();
@@ -57,12 +62,14 @@ class Em1RunAction : public G4UserRunAction
G4int NbOfTraks0, NbOfTraks1;
G4int NbOfSteps0, NbOfSteps1;
ProcessesCount* ProcCounter;
Em1RunActionMessenger* runMessenger;
G4int saveRndm;
#ifndef G4NOHIST
HepTupleManager* hbookManager;
HepHistogram* histo[3];
Em1RunActionMessenger* runMessenger;
G4int saveRndm;
#endif
};
#endif
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1RunActionMessenger.hh,v 1.1.4.1 1999/12/07 20:46:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1RunActionMessenger.hh,v 1.2 1999/12/15 14:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1SteppingAction.hh,v 1.1.4.1 1999/12/07 20:46:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1SteppingAction.hh,v 1.2 1999/12/15 14:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -0,0 +1,47 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1SteppingVerbose.hh,v 1.2 1999/12/15 14:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
//---------------------------------------------------------------
//
// Em1SteppingVerbose.hh
//
// Description:
// This class manages the vervose outputs in G4SteppingManager.
//
//
// Contact:
// Questions and comments to this code should be sent to
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
//
//---------------------------------------------------------------
class Em1SteppingVerbose;
#ifndef Em1SteppingVerbose_h
#define Em1SteppingVerbose_h 1
#include "G4SteppingVerbose.hh"
class Em1SteppingVerbose : public G4SteppingVerbose {
public:
// Constructor/Destructor
Em1SteppingVerbose();
~Em1SteppingVerbose();
//
void StepInfo();
void TrackingStarted();
//
};
#endif
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1TrackingAction.hh,v 1.1.4.1 1999/12/07 20:46:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1TrackingAction.hh,v 1.2 1999/12/15 14:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1VisManager.hh,v 1.1.4.1 1999/12/07 20:46:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1VisManager.hh,v 1.2 1999/12/15 14:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -6,8 +6,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: ProcessesCount.hh,v 1.1.2.1.2.1 1999/12/07 20:46:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: ProcessesCount.hh,v 1.3 1999/12/15 14:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// -----------------------------------------------------------------
@@ -38,4 +38,7 @@
/tracking/storeTrajectory 1
/event/drawTracks all
#
# Flush visualization
/vis/viewer/update
#
/run/verbose 2
@@ -6,8 +6,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1DetectorConstruction.cc,v 1.1.4.1 1999/12/07 20:46:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1DetectorConstruction.cc,v 1.2 1999/12/15 14:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -122,7 +122,7 @@ a = 238.03*g/mole;
G4Material* U = new G4Material(name="Uranium" , z=82., a, density);
G4cout << *(G4Material::GetMaterialTable()) << endl;
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
//default materials of the calorimeter
aMaterial = Al;
@@ -169,7 +169,7 @@ G4VPhysicalVolume* Em1DetectorConstruction::ConstructVolumes()
void Em1DetectorConstruction::PrintParameters()
{
G4cout << "\n The Box is " << G4BestUnit(BoxSize,"Length")
<< " of " << aMaterial->GetName() << endl;
<< " of " << aMaterial->GetName() << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1DetectorMessenger.cc,v 1.1.4.1 1999/12/07 20:46:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1DetectorMessenger.cc,v 1.2 1999/12/15 14:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1EventAction.cc,v 1.1.4.1 1999/12/07 20:46:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1EventAction.cc,v 1.2 1999/12/15 14:48:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -48,7 +48,7 @@ void Em1EventAction::BeginOfEventAction(const G4Event* evt)
{
G4int evtNb = evt->GetEventID();
if (evtNb%printModulo == 0)
G4cout << "\n---> Begin of Event: " << evtNb << endl;
G4cout << "\n---> Begin of Event: " << evtNb << G4endl;
TotalEnergyDeposit = 0.;}
@@ -58,7 +58,7 @@ void Em1EventAction::EndOfEventAction(const G4Event* evt)
{
if (drawFlag != "none") G4cout << " Energy deposit: "
<< G4BestUnit(TotalEnergyDeposit,"Energy")
<< endl;
<< G4endl;
if (G4VVisManager::GetConcreteInstance())
{
@@ -81,7 +81,7 @@ void Em1EventAction::EndOfEventAction(const G4Event* evt)
G4int evtNb = evt->GetEventID();
if (evtNb%printModulo == 0)
{
G4cout << "\n---> End of Event: " << evtNb << endl;
G4cout << "\n---> End of Event: " << evtNb << G4endl;
HepRandom::showEngineStatus();
}
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1EventActionMessenger.cc,v 1.1.4.1 1999/12/07 20:46:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1EventActionMessenger.cc,v 1.2 1999/12/15 14:48:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1PhysicsList.cc,v 1.1.4.1 1999/12/07 20:46:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1PhysicsList.cc,v 1.2 1999/12/15 14:48:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -227,7 +227,7 @@ void Em1PhysicsList::SetCuts()
{
if (verboseLevel >0){
G4cout << "Em1PhysicsList::SetCuts:";
G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << endl;
G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
}
// set cut values for gamma at first and for e- second and next for e+,
@@ -314,10 +314,10 @@ void Em1PhysicsList::GetRange(G4double val)
G4double cut;
part = theParticleTable->FindParticle("e-");
cut = G4EnergyLossTables::GetRange(part,val,currMat);
G4cout << "material : " << currMat->GetName() << endl;
G4cout << "particle : " << part->GetParticleName() << endl;
G4cout << "energy : " << val / keV << " (keV)" << endl;
G4cout << "range : " << cut / mm << " (mm)" << endl;
G4cout << "material : " << currMat->GetName() << G4endl;
G4cout << "particle : " << part->GetParticleName() << G4endl;
G4cout << "energy : " << val / keV << " (keV)" << G4endl;
G4cout << "range : " << cut / mm << " (mm)" << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1PhysicsListMessenger.cc,v 1.1.4.1 1999/12/07 20:46:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1PhysicsListMessenger.cc,v 1.2 1999/12/15 14:48:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1PrimaryGeneratorAction.cc,v 1.1.4.1 1999/12/07 20:46:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1PrimaryGeneratorAction.cc,v 1.2 1999/12/15 14:48:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1RunAction.cc,v 1.1.4.1 1999/12/07 20:46:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1RunAction.cc,v 1.4 2000/01/21 12:29:26 maire Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -20,17 +20,23 @@
#include "G4UImanager.hh"
#include "G4VVisManager.hh"
#include "G4ios.hh"
#include <iomanip.h>
#include "g4std/iomanip"
#include "Randomize.hh"
#include "CLHEP/Hist/HBookFile.h"
#ifndef G4NOHIST
#include "CLHEP/Hist/HBookFile.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em1RunAction::Em1RunAction()
:hbookManager(NULL)
{runMessenger = new Em1RunActionMessenger(this);
saveRndm = 1;
#ifndef G4NOHIST
hbookManager = NULL;
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -44,27 +50,31 @@ Em1RunAction::~Em1RunAction()
void Em1RunAction::bookHisto()
{
#ifndef G4NOHIST
hbookManager = new HBookFile("testem1.histo", 68);
// booking histograms
histo[0] = hbookManager->histogram("track length (mm) of a charged particle",100,0.,50*cm);
histo[1] = hbookManager->histogram("Nb of steps per track (charged particle)",100,0.,100.);
histo[2] = hbookManager->histogram("step length (mm) charged particle",100,0.,10*mm);
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em1RunAction::cleanHisto()
{
#ifndef G4NOHIST
delete [] histo;
delete hbookManager;
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em1RunAction::BeginOfRunAction(const G4Run* aRun)
{
G4cout << "### Run " << aRun->GetRunID() << " start." << endl;
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
// save Rndm status
if (saveRndm > 0)
@@ -82,8 +92,7 @@ void Em1RunAction::BeginOfRunAction(const G4Run* aRun)
if (G4VVisManager::GetConcreteInstance())
{
G4UImanager* UI = G4UImanager::GetUIpointer();
UI->ApplyCommand("/vis/clear/view");
UI->ApplyCommand("/vis/draw/current");
UI->ApplyCommand("/vis/scene/notifyHandlers");
}
}
@@ -109,28 +118,28 @@ void Em1RunAction::EndOfRunAction(const G4Run* aRun)
{ //nb of tracks and steps per event
G4double dNbOfEvents = double(NbOfEvents);
G4long oldform = G4cout.setf(ios::fixed,ios::floatfield);
G4long oldform = G4cout.setf(G4std::ios::fixed,G4std::ios::floatfield);
G4int oldprec = G4cout.precision(2);
G4cout << "\n nb tracks/event"
<< " neutral: " << setw(7) << NbOfTraks0/dNbOfEvents
<< " charged: " << setw(7) << NbOfTraks1/dNbOfEvents
<< " neutral: " << G4std::setw(7) << NbOfTraks0/dNbOfEvents
<< " charged: " << G4std::setw(7) << NbOfTraks1/dNbOfEvents
<< "\n nb steps/event"
<< " neutral: " << setw(7) << NbOfSteps0/dNbOfEvents
<< " charged: " << setw(7) << NbOfSteps1/dNbOfEvents
<< endl;
<< " neutral: " << G4std::setw(7) << NbOfSteps0/dNbOfEvents
<< " charged: " << G4std::setw(7) << NbOfSteps1/dNbOfEvents
<< G4endl;
//frequency of processes call
G4cout << "\n nb of process calls per event: \n ";
for (G4int i=0; i< ProcCounter->entries();i++)
G4cout << setw(9) << (*ProcCounter)[i]->GetName();
G4cout << G4std::setw(9) << (*ProcCounter)[i]->GetName();
G4cout << "\n ";
for (G4int j=0; j< ProcCounter->entries();j++)
G4cout << setw(9) << ((*ProcCounter)[j]->GetCounter())/dNbOfEvents;
G4cout << endl;
G4cout << G4std::setw(9) << ((*ProcCounter)[j]->GetCounter())/dNbOfEvents;
G4cout << G4endl;
G4cout.setf(oldform,ios::floatfield);
G4cout.setf(oldform,G4std::ios::floatfield);
G4cout.precision(oldprec);
}
@@ -138,16 +147,18 @@ void Em1RunAction::EndOfRunAction(const G4Run* aRun)
//draw the events
if (G4VVisManager::GetConcreteInstance())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/show/view");
// writing histogram file
hbookManager->write();
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
// save Rndm status
if (saveRndm == 1)
{ HepRandom::showEngineStatus();
HepRandom::saveEngineStatus("endOfRun.rndm");
}
}
#ifndef G4NOHIST
// writing histogram file
hbookManager->write();
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1RunActionMessenger.cc,v 1.1.4.1 1999/12/07 20:46:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1RunActionMessenger.cc,v 1.2 1999/12/15 14:48:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -63,7 +63,7 @@ void Em1RunActionMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
Em1Run->SetRndmFreq(RndmSaveCmd->GetNewIntValue(newValue));
if (command == RndmReadCmd)
{ G4cout << "\n---> rndm status restored from file: " << newValue << endl;
{ G4cout << "\n---> rndm status restored from file: " << newValue << G4endl;
HepRandom::restoreEngineStatus(newValue);
HepRandom::showEngineStatus();
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1SteppingAction.cc,v 1.1.4.1 1999/12/07 20:46:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1SteppingAction.cc,v 1.3 2000/01/21 12:29:26 maire Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -19,7 +19,9 @@
#include "G4SteppingManager.hh"
#include "G4VProcess.hh"
#include "CLHEP/Hist/HBookFile.h"
#ifndef G4NOHIST
#include "CLHEP/Hist/HBookFile.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -44,7 +46,10 @@ void Em1SteppingAction::UserSteppingAction(const G4Step* aStep)
G4double charge = aStep->GetTrack()->GetDefinition()->GetPDGCharge();
G4double steplen = aStep->GetStepLength();
if (charge != 0.) runAction->GetHisto(2)->accumulate(steplen);
#ifndef G4NOHIST
if (charge != 0.) runAction->GetHisto(2)->accumulate(steplen);
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,170 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1SteppingVerbose.cc,v 1.2 1999/12/15 14:48:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
//---------------------------------------------------------------
//
// Em1SteppingVerbose.cc
//
// Description:
// Implementation of the Em1SteppingVerbose class
// Contact:
// Questions and comments to this code should be sent to
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
//
//---------------------------------------------------------------
#include "Em1SteppingVerbose.hh"
#include "G4SteppingManager.hh"
#include "G4UnitsTable.hh"
////////////////////////////////////////////////
Em1SteppingVerbose::Em1SteppingVerbose()
////////////////////////////////////////////////
{
}
//////////////////////////////////////////////////
Em1SteppingVerbose::~Em1SteppingVerbose()
//////////////////////////////////////////////////
{
}
/////////////////////////////////////////
void Em1SteppingVerbose::StepInfo()
/////////////////////////////////////////
{
CopyState();
G4int prec = G4cout.precision(3);
if( verboseLevel >= 1 ){
if( verboseLevel >= 4 ) VerboseTrack();
if( verboseLevel >= 3 ){
G4cout << G4endl;
G4cout << G4std::setw( 5) << "#Step#" << " "
<< G4std::setw( 6) << "X" << " "
<< G4std::setw( 6) << "Y" << " "
<< G4std::setw( 6) << "Z" << " "
<< G4std::setw( 9) << "KineE" << " "
<< G4std::setw( 9) << "dEStep" << " "
<< G4std::setw(10) << "StepLeng"
<< G4std::setw(10) << "TrakLeng"
<< G4std::setw(10) << "NextVolu"
<< G4std::setw(10) << "Process" << G4endl;
}
G4cout << G4std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
// if( fStepStatus != fWorldBoundary){
if( fTrack->GetNextVolume() != 0 ) {
G4cout << G4std::setw(10) << fTrack->GetNextVolume()->GetName();
} else {
G4cout << G4std::setw(10) << "OutOfWorld";
}
if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != NULL){
G4cout << G4std::setw(10) << fStep->GetPostStepPoint()->GetProcessDefinedStep()
->GetProcessName();
} else {
G4cout << "User Limit";
}
G4cout << G4endl;
if( verboseLevel == 2 ){
G4int tN2ndariesTot = fN2ndariesAtRestDoIt +
fN2ndariesAlongStepDoIt +
fN2ndariesPostStepDoIt;
if(tN2ndariesTot>0){
G4cout << " :----- List of 2ndaries - "
<< "#SpawnInStep=" << G4std::setw(3) << tN2ndariesTot
<< "(Rest=" << G4std::setw(2) << fN2ndariesAtRestDoIt
<< ",Along=" << G4std::setw(2) << fN2ndariesAlongStepDoIt
<< ",Post=" << G4std::setw(2) << fN2ndariesPostStepDoIt
<< "), "
<< "#SpawnTotal=" << G4std::setw(3) << (*fSecondary).entries()
<< " ---------------"
<< G4endl;
for(G4int lp1=(*fSecondary).entries()-tN2ndariesTot;
lp1<(*fSecondary).entries(); lp1++){
G4cout << " : "
<< G4std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length")
<< G4std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length")
<< G4std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length")
<< G4std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
<< G4std::setw(10)
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName();
G4cout << G4endl;
}
G4cout << " :-----------------------------"
<< "----------------------------------"
<< "-- EndOf2ndaries Info ---------------"
<< G4endl;
}
}
}
G4cout.precision(prec);
}
////////////////////////////////////////////////
void Em1SteppingVerbose::TrackingStarted()
////////////////////////////////////////////////
{
CopyState();
G4int prec = G4cout.precision(3);
if( verboseLevel > 0 ){
G4cout << G4std::setw( 5) << "Step#" << " "
<< G4std::setw( 6) << "X" << " "
<< G4std::setw( 6) << "Y" << " "
<< G4std::setw( 6) << "Z" << " "
<< G4std::setw( 9) << "KineE" << " "
<< G4std::setw( 9) << "dEStep" << " "
<< G4std::setw(10) << "StepLeng"
<< G4std::setw(10) << "TrakLeng"
<< G4std::setw(10) << "NextVolu"
<< G4std::setw(10) << "Process" << G4endl;
G4cout << G4std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
if(fTrack->GetNextVolume()){
G4cout << G4std::setw(10) << fTrack->GetNextVolume()->GetName() << " ";
} else {
G4cout << G4std::setw(10) << "OutOfWorld" << " ";
}
G4cout << G4std::setw(10) << "initStep" << G4endl;
}
G4cout.precision(prec);
}
@@ -6,8 +6,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1TrackingAction.cc,v 1.1.4.1 1999/12/07 20:46:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1TrackingAction.cc,v 1.3 2000/01/21 12:29:26 maire Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -18,8 +18,10 @@
#include "Em1RunAction.hh"
#include "G4Track.hh"
#include "CLHEP/Hist/HBookFile.h"
#ifndef G4NOHIST
#include "CLHEP/Hist/HBookFile.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -40,8 +42,10 @@ void Em1TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
if (aTrack->GetDefinition()->GetPDGCharge() == 0.)
{runAction->CountTraks0(1); runAction->CountSteps0(nbSteps);}
else {runAction->CountTraks1(1); runAction->CountSteps1(nbSteps);
#ifndef G4NOHIST
runAction->GetHisto(0)->accumulate(Trleng);
runAction->GetHisto(1)->accumulate((float)nbSteps);
#endif
}
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em1VisManager.cc,v 1.1.4.1 1999/12/07 20:46:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em1VisManager.cc,v 1.2 1999/12/15 14:48:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// John Allison 24th January 1998.
@@ -131,7 +131,7 @@ void Em1VisManager::RegisterGraphicsSystems () {
if (fVerbose > 0) {
G4cout <<
"\nYou have successfully chosen to use the following graphics systems."
<< endl;
<< G4endl;
PrintAvailableGraphicsSystems ();
}
}
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.1 1999/10/11 15:08:23 maire Exp $
# $Id: GNUmakefile,v 1.2 2000/01/21 10:56:13 maire Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -16,7 +16,11 @@ all: lib bin
include $(G4INSTALL)/config/architecture.gmk
LDFLAGS += -L/cern/pro/lib
LOADLIBS += -lpacklib $(FCLIBS)
ifdef G4NOHIST
CPPFLAGS += -DG4NOHIST
else
LDFLAGS += -L/cern/pro/lib
LOADLIBS += -lpacklib $(FCLIBS)
endif
include $(G4INSTALL)/config/binmake.gmk
@@ -1,4 +1,4 @@
$Id: README,v 1.1 1999/10/11 15:08:24 maire Exp $
$Id: README,v 1.2 2000/01/21 10:56:13 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -87,8 +87,7 @@ $Id: README,v 1.1 1999/10/11 15:08:24 maire Exp $
7- HISTOGRAMS
Testem2 produces several histo which are saved as testem2.histo
under the control of the command /run/save on
TestEm2 produces several histo which are saved as testem2.histo
Content of these histo:
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: TestEm2.cc,v 1.1.4.1 1999/12/07 20:46:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: TestEm2.cc,v 1.3 1999/12/15 14:48:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Comments
//
@@ -29,12 +29,16 @@
#include "Em2EventAction.hh"
#include "Em2TrackingAction.hh"
#include "Em2SteppingAction.hh"
#include "Em2SteppingVerbose.hh"
int main(int argc,char** argv) {
//choose the Random engine
HepRandom::setTheEngine(new RanecuEngine);
//my Verbose output class
G4VSteppingVerbose::SetInstance(new Em2SteppingVerbose);
// Construct the default run manager
G4RunManager * runManager = new G4RunManager;
@@ -0,0 +1,29 @@
# $Id: TestEm2.in,v 1.1 2000/01/21 14:40:57 maire Exp $
#
# Macro file for "TestEm2.cc"
# (can be run in batch, without graphic)
#
# H2O L = 9.97 radl R = 0.665 radl; electron 1 GeV
#
# Experimental results: Electron-induced cascade showers
# J&H Crannel - Phys. Rev. 184-2 - August69
#
/control/verbose 2
#
/calor/setMat Water
/calor/setLbin 9 1.11
/calor/setRbin 6 0.111
/calor/update
#
/run/particle/setCut 5.0 mm
/run/initialize
#
/run/verbose 2
/event/drawTracks none
/event/printModulo 20
#
/gun/particle electron
/gun/energy 1 GeV
/run/beamOn 100
@@ -0,0 +1,335 @@
**********************************************
Geant4 version $Name: geant4-01-01 $
(07-Dec-99)
Copyright : Geant4 Collaboration
**********************************************
Constructing Visualization Manager....
Initialising Visualization Manager....
Registering graphics systems....
***** Table : Nb of materials = 8 *****
Material: Air density: 1.290 mg/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 285.161 m
---> Element: Nitrogen N Z = 7.0 N = 14.0 A = 14.01 g/mole fractionMass: 70.00 % Abundance 72.71 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 30.00 % Abundance 27.29 %
Material: Water density: 1.000 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 36.092 cm
---> Element: Hydrogen H Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 11.21 % Abundance 66.67 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 88.79 % Abundance 33.33 %
Material: lAr density: 1.390 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 14.065 cm
---> Element: lAr Z = 18.0 N = 40.0 A = 39.95 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Al density: 2.700 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 8.893 cm
---> Element: Al Z = 13.0 N = 27.0 A = 26.98 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Fe density: 7.870 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 1.759 cm
---> Element: Fe Z = 26.0 N = 55.9 A = 55.85 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: BGO density: 7.100 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 1.123 cm
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 15.41 % Abundance 63.16 %
---> Element: Germanium Ge Z = 32.0 N = 72.6 A = 72.59 g/mole fractionMass: 17.48 % Abundance 15.79 %
---> Element: Bismuth Bi Z = 83.0 N = 209.0 A = 208.98 g/mole fractionMass: 67.10 % Abundance 21.05 %
Material: PbWO4 density: 8.280 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 8.924 mm
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 14.07 % Abundance 66.67 %
---> Element: Lead Pb Z = 82.0 N = 207.2 A = 207.19 g/mole fractionMass: 45.53 % Abundance 16.67 %
---> Element: Tungsten W Z = 74.0 N = 183.8 A = 183.84 g/mole fractionMass: 40.40 % Abundance 16.67 %
Material: Lead density: 11.350 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 5.612 mm
---> Element: Lead Pb Z = 82.0 N = 207.2 A = 207.19 g/mole fractionMass: 100.00 % Abundance 100.00 %
Absorber is 17.848 cm of PbWO4
Em2PhysicsList::SetCuts:CutLength : 1 (mm)
phot: Total cross sections from a parametrisation. Good description from 10 KeV to 50 MeV for all Z
Sandia crossSection below 50 KeV
PhysicsTables from 50 keV to 50 MeV in 100 bins.
compt: Total cross sections from a parametrisation. Good description from 10 KeV to (100/Z) GeV.
Scattered gamma energy according Klein-Nishina.
PhysicsTables from 10 keV to 1e+02 GeV in 100 bins.
conv: Total cross sections from a parametrisation. Good description from 1.5 MeV to 100 GeV for all Z.
e+e- energies according Bethe-Heitler
PhysicsTables from 1 MeV to 1e+02 GeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
eIoni: delta cross sections from Moller+Bhabha. Good description from 1 KeV to 100 GeV.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
eBrem: Total cross sections from a parametrisation. Good description from 1 KeV to 100 GeV.
log scale extrapolation above 100 GeV
Gamma energy sampled from a parametrised formula.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
annihil: Total cross section from Heilter formula (annihilation into 2 photons).
gamma energies sampled according Heitler
PhysicsTables from 10 keV to 10 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
hIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+02 TeV in 150 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
MuIoni: knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+03 PeV in 100 bins.
MuBrems: theoretical cross section
Good description up to 1000 TeV.
PhysicsTables from 1 GeV to 1e+03 PeV in 100 bins.
MuPairProd: theoretical cross sections
Good description up to 1000 TeV.
PhysicsTables from 1 GeV to 1e+03 PeV in 50 bins.
============= The cut Energy ==============================
gamma e- mu- proton neutron
Cut in range 1 mm 1 mm 1 mm 1 mm 1 mm
Cut in energy
Air 990 eV 990 eV 48.4 keV 83.2 keV 990 eV
Water 2.9 keV 347 keV 3.39 MeV 8.95 MeV 990 eV
lAr 6.18 keV 343 keV 3.24 MeV 8.32 MeV 990 eV
Al 6.89 keV 597 keV 5.02 MeV 13.1 MeV 990 eV
Fe 20.8 keV 1.28 MeV 8.52 MeV 22 MeV 990 eV
BGO 77.7 keV 1.03 MeV 7.17 MeV 18.1 MeV 990 eV
PbWO4 84.8 keV 1.13 MeV 7.63 MeV 19.2 MeV 990 eV
Lead 101 keV 1.38 MeV 8.52 MeV 20.9 MeV 990 eV
===================================================
# $Id: TestEm2.out,v 1.1 2000/01/21 14:40:57 maire Exp $
#
# Macro file for "TestEm2.cc"
# (can be run in batch, without graphic)
#
# H2O L = 9.97 radl R = 0.665 radl; electron 1 GeV
#
# Experimental results: Electron-induced cascade showers
# J&H Crannel - Phys. Rev. 184-2 - August69
#
#
/calor/setMat Water
/calor/setLbin 9 1.11
/calor/setRbin 6 0.111
/calor/update
Absorber is 3.60564 m of Water
#
/run/particle/setCut 5.0 mm
/run/initialize
Em2PhysicsList::SetCuts:CutLength : 5 (mm)
phot: Total cross sections from a parametrisation. Good description from 10 KeV to 50 MeV for all Z
Sandia crossSection below 50 KeV
PhysicsTables from 50 keV to 50 MeV in 100 bins.
compt: Total cross sections from a parametrisation. Good description from 10 KeV to (100/Z) GeV.
Scattered gamma energy according Klein-Nishina.
PhysicsTables from 10 keV to 1e+02 GeV in 100 bins.
conv: Total cross sections from a parametrisation. Good description from 1.5 MeV to 100 GeV for all Z.
e+e- energies according Bethe-Heitler
PhysicsTables from 1 MeV to 1e+02 GeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
eIoni: delta cross sections from Moller+Bhabha. Good description from 1 KeV to 100 GeV.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
eBrem: Total cross sections from a parametrisation. Good description from 1 KeV to 100 GeV.
log scale extrapolation above 100 GeV
Gamma energy sampled from a parametrised formula.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
annihil: Total cross section from Heilter formula (annihilation into 2 photons).
gamma energies sampled according Heitler
PhysicsTables from 10 keV to 10 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
hIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+02 TeV in 150 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
MuIoni: knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+03 PeV in 100 bins.
MuBrems: theoretical cross section
Good description up to 1000 TeV.
PhysicsTables from 1 GeV to 1e+03 PeV in 100 bins.
MuPairProd: theoretical cross sections
Good description up to 1000 TeV.
PhysicsTables from 1 GeV to 1e+03 PeV in 50 bins.
============= The cut Energy ==============================
gamma e- mu- proton neutron
Cut in range 5 mm 5 mm 5 mm 5 mm 5 mm
Cut in energy
Air 990 eV 3.24 keV 156 keV 326 keV 990 eV
Water 5.78 keV 1.16 MeV 8.21 MeV 22 MeV 990 eV
lAr 13.6 keV 1.16 MeV 8.01 MeV 20.9 MeV 990 eV
Al 14.6 keV 2.31 MeV 12.5 MeV 32.6 MeV 990 eV
Fe 46.4 keV 6.11 MeV 21.5 MeV 54.7 MeV 990 eV
BGO 126 keV 4.72 MeV 18.1 MeV 45.7 MeV 990 eV
PbWO4 137 keV 5.34 MeV 19.4 MeV 48.3 MeV 990 eV
Lead 204 keV 6.83 MeV 22 MeV 54 MeV 990 eV
===================================================
#
/run/verbose 2
/event/drawTracks none
/event/printModulo 20
#
/gun/particle electron
/gun/energy 1 GeV
/run/beamOn 100
### Run 0 start.
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 9876, 54321
----------------------------------------
Start closing geometry.
Start Run processing.
---> Begin Of Event: 0
---> Begin Of Event: 20
---> Begin Of Event: 40
---> Begin Of Event: 60
G4ParticleChangeForMSC::CheckIt : the Momentum Change is not unit vector !!
Difference: 1.5e-09
G4ParticleChangeForMSC::CheckIt
pointer : 0x140618e58
-----------------------------------------------
G4ParticleChange Information
-----------------------------------------------
# of 2ndaries : 0
-----------------------------------------------
Energy Deposit (MeV): 0
Track Status : Alive
True Path Length (mm) : 6.91
Stepping Control : 0
Event Biasing : not used
Position - x (mm) : 59.8
Position - y (mm) : -38.6
Position - z (mm) : 877
Momentum Direction - x : 0.414
Momentum Direction - y : 0.0309
Momentum Direction - z : 0.91
G4ParticleChange::CheckIt : the Momentum Change is not unit vector !!
Difference: 1.51e-09
G4ParticleChange::CheckIt
pointer : 0x1405d2cc0
-----------------------------------------------
G4ParticleChange Information
-----------------------------------------------
# of 2ndaries : 0
-----------------------------------------------
Energy Deposit (MeV): 0
Track Status : Alive
True Path Length (mm) : 0
Stepping Control : 0
Event Biasing : not used
Mass (GeV) : 0
Charge (eplus) : 0
Position - x (mm) : 62.1
Position - y (mm) : -38.4
Position - z (mm) : 882
Time (ns) : 9.01
Proper Time (ns) : 0.00338
Momentum Direct - x : 0.414
Momentum Direct - y : 0.0309
Momentum Direct - z : 0.91
Kinetic Energy (MeV): 5.15
Polarization - x : 0
Polarization - y : 0
Polarization - z : 0
Touchable (pointer) : 0x1402b2bc0
---> Begin Of Event: 80
Run terminated.
Run Summary
Number of events processed : 100
User=19.2s Real=22.9s Sys=3.42s
LATERAL PROFILE CUMULATIVE LATERAL PROFILE
bin Mean rms bin Mean rms
0.00-> 1.11 radl: 13.46% 6.25% 0-> 1.11 radl: 13.46% 6.25%
1.11-> 2.22 radl: 24.71% 10.53% 0-> 2.22 radl: 38.17% 14.12%
2.22-> 3.33 radl: 23.98% 10.63% 0-> 3.33 radl: 62.15% 18.49%
3.33-> 4.44 radl: 13.68% 8.06% 0-> 4.44 radl: 75.83% 17.78%
4.44-> 5.55 radl: 8.09% 7.22% 0-> 5.55 radl: 83.93% 16.08%
5.55-> 6.66 radl: 5.50% 6.39% 0-> 6.66 radl: 89.43% 11.95%
6.66-> 7.77 radl: 3.04% 6.08% 0-> 7.77 radl: 92.46% 7.12%
7.77-> 8.88 radl: 1.87% 3.88% 0-> 8.88 radl: 94.33% 4.60%
8.88-> 9.99 radl: 0.90% 2.07% 0-> 9.99 radl: 95.23% 3.78%
RADIAL PROFILE CUMULATIVE RADIAL PROFILE
bin Mean rms bin Mean rms
0.00-> 0.11 radl: 69.28% 9.17% 0-> 0.11 radl: 69.28% 9.17%
0.11-> 0.22 radl: 15.05% 6.43% 0-> 0.22 radl: 84.33% 5.88%
0.22-> 0.33 radl: 5.41% 3.14% 0-> 0.33 radl: 89.74% 4.73%
0.33-> 0.44 radl: 2.67% 1.88% 0-> 0.44 radl: 92.41% 4.14%
0.44-> 0.56 radl: 1.66% 1.53% 0-> 0.56 radl: 94.07% 3.85%
0.56-> 0.67 radl: 1.16% 1.18% 0-> 0.67 radl: 95.23% 3.78%
SUMMARY
energy deposit : 95.23 % E0 +- 3.78 % E0
charged traklen: 13.61 radl +- 0.55 radl
neutral traklen: 192.88 radl +- 17.42 radl
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 2146177415, 212514321
----------------------------------------
Graphics systems deleted.
VisManager deleting.
G4 kernel has come to Quit state.
Deletion of G4 kernel class start.
UserDetectorConstruction deleted.
UserPhysicsList deleted.
UserRunAction deleted.
UserPrimaryGenerator deleted.
EventManager deleted.
UImanager deleted.
StateManager deleted.
RunManager is deleting.
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2DetectorConstruction.hh,v 1.1.4.1 1999/12/07 20:46:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2DetectorConstruction.hh,v 1.2 1999/12/15 14:48:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2DetectorMessenger.hh,v 1.1.4.1 1999/12/07 20:46:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2DetectorMessenger.hh,v 1.2 1999/12/15 14:48:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2EventAction.hh,v 1.1.4.1 1999/12/07 20:46:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2EventAction.hh,v 1.2 1999/12/15 14:48:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2EventActionMessenger.hh,v 1.1.4.1 1999/12/07 20:46:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2EventActionMessenger.hh,v 1.2 1999/12/15 14:48:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2PhysicsList.hh,v 1.1.4.1 1999/12/07 20:46:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2PhysicsList.hh,v 1.2 1999/12/15 14:48:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2PrimaryGeneratorAction.hh,v 1.1.4.1 1999/12/07 20:46:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2PrimaryGeneratorAction.hh,v 1.2 1999/12/15 14:48:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2RunAction.hh,v 1.1.2.1.2.1 1999/12/07 20:46:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2RunAction.hh,v 1.4 2000/01/21 10:56:14 maire Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -35,8 +35,10 @@ class Em2RunActionMessenger;
class G4Run;
class HepTupleManager;
class HepHistogram;
#ifndef G4NOHIST
class HepTupleManager;
class HepHistogram;
#endif
class Em2RunAction : public G4UserRunAction
{
@@ -54,7 +56,6 @@ class Em2RunAction : public G4UserRunAction
inline void fillPerStep (G4double,G4int,G4int);
inline void particleFlux(G4ParticleDefinition*,G4int);
void SetSaveFlag (G4String val) {saveFlag = val;}
void SetRndmFreq(G4int val) {saveRndm = val;}
G4int GetRndmFreq() {return saveRndm;}
@@ -93,16 +94,18 @@ class Em2RunAction : public G4UserRunAction
G4double NeutrTrLength;
G4double sumNeutrTrLength;
G4double sum2NeutrTrLength;
Em2RunActionMessenger* runMessenger;
G4int saveRndm;
#ifndef G4NOHIST
HepTupleManager* hbookManager;
HepHistogram *histo1, *histo2, *histo3;
HepHistogram *histo4, *histo5, *histo6;
HepHistogram *histo7, *histo8, *histo9;
HepHistogram *hist10, *hist11, *hist12;
#endif
Em2RunActionMessenger* runMessenger;
G4String saveFlag;
G4int saveRndm;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2RunActionMessenger.hh,v 1.1.4.1 1999/12/07 20:46:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2RunActionMessenger.hh,v 1.3 2000/01/21 10:56:15 maire Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -36,7 +36,6 @@ class Em2RunActionMessenger: public G4UImessenger
private:
Em2RunAction* Em2Run;
G4UIcmdWithAString* SaveCmd;
G4UIdirectory* RndmDir;
G4UIcmdWithAnInteger* RndmSaveCmd;
G4UIcmdWithAString* RndmReadCmd;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2SteppingAction.hh,v 1.1.4.1 1999/12/07 20:46:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2SteppingAction.hh,v 1.2 1999/12/15 14:49:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -0,0 +1,47 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2SteppingVerbose.hh,v 1.2 1999/12/15 14:49:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
//---------------------------------------------------------------
//
// Em2SteppingVerbose.hh
//
// Description:
// This class manages the vervose outputs in G4SteppingManager.
//
//
// Contact:
// Questions and comments to this code should be sent to
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
//
//---------------------------------------------------------------
class Em2SteppingVerbose;
#ifndef Em2SteppingVerbose_h
#define Em2SteppingVerbose_h 1
#include "G4SteppingVerbose.hh"
class Em2SteppingVerbose : public G4SteppingVerbose {
public:
// Constructor/Destructor
Em2SteppingVerbose();
~Em2SteppingVerbose();
//
void StepInfo();
void TrackingStarted();
//
};
#endif
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2TrackingAction.hh,v 1.1.4.1 1999/12/07 20:46:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2TrackingAction.hh,v 1.2 1999/12/15 14:49:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2VisManager.hh,v 1.1.4.1 1999/12/07 20:46:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2VisManager.hh,v 1.2 1999/12/15 14:49:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -32,4 +32,7 @@
/tracking/storeTrajectory 1
/event/drawTracks charged
#
# Flush visualization
/vis/viewer/update
#
/run/verbose 2
@@ -1,4 +1,4 @@
# $Id: run01.mac,v 1.1 1999/10/11 15:08:26 maire Exp $
# $Id: run01.mac,v 1.2 2000/01/21 10:56:13 maire Exp $
#
# Macro file for "TestEm2.cc"
# (can be run in batch, without graphic)
@@ -13,7 +13,6 @@
/run/verbose 2
/event/drawTracks none
/event/printModulo 10
/run/save on
#
/gun/particle electron
/gun/energy 5 GeV
@@ -1,4 +1,4 @@
# $Id: run02.mac,v 1.1 1999/10/11 15:08:26 maire Exp $
# $Id: run02.mac,v 1.2 2000/01/21 10:56:14 maire Exp $
#
# Macro file for "TestEm2.cc"
# (can be run in batch, without graphic)
@@ -21,7 +21,6 @@
/run/verbose 2
/event/drawTracks none
/event/printModulo 10
/run/save on
#
/gun/particle electron
/gun/energy 1 GeV
@@ -1,4 +1,4 @@
# $Id: run03.mac,v 1.1 1999/10/11 15:08:26 maire Exp $
# $Id: run03.mac,v 1.2 2000/01/21 10:56:14 maire Exp $
#
# Macro file for "TestEm2.cc"
# (can be run in batch, without graphic)
@@ -21,7 +21,6 @@
/run/verbose 2
/event/drawTracks none
/event/printModulo 10
/run/save on
#
/gun/particle electron
/gun/energy 1 GeV
@@ -1,4 +1,4 @@
# $Id: run04.mac,v 1.1 1999/10/11 15:08:27 maire Exp $
# $Id: run04.mac,v 1.2 2000/01/21 10:56:14 maire Exp $
#
# Macro file for "TestEm2.cc"
# (can be run in batch, without graphic)
@@ -20,7 +20,6 @@
/run/verbose 2
/event/drawTracks none
/event/printModulo 10
/run/save on
#
/gun/particle electron
/gun/energy 30 GeV
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2DetectorConstruction.cc,v 1.1.4.1 1999/12/07 20:46:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2DetectorConstruction.cc,v 1.3 2000/02/14 14:09:16 maire Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -142,7 +142,7 @@ void Em2DetectorConstruction::DefineMaterials()
G4Material* pb = new G4Material(name="Lead", density, ncomponents=1);
pb->AddElement(Pb, fractionmass=1.0);
G4cout << *(G4Material::GetMaterialTable()) << endl;
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
//choose material
myMaterial = PbWO;
@@ -186,8 +186,8 @@ G4VPhysicalVolume* Em2DetectorConstruction::ConstructVolumes()
physiRing,false,0);
cout << "Absorber is " << G4BestUnit(EcalLength,"Length")
<< " of " << myMaterial->GetName() << endl;
G4cout << "Absorber is " << G4BestUnit(EcalLength,"Length")
<< " of " << myMaterial->GetName() << G4endl;
G4VisAttributes* VisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2DetectorMessenger.cc,v 1.1.4.1 1999/12/07 20:46:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2DetectorMessenger.cc,v 1.2 1999/12/15 14:49:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2EventAction.cc,v 1.1.4.1 1999/12/07 20:46:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2EventAction.cc,v 1.2 1999/12/15 14:49:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -47,7 +47,7 @@ void Em2EventAction::BeginOfEventAction(const G4Event* evt)
{
G4int evtNb = evt->GetEventID();
if (evtNb%printModulo == 0)
G4cout << "\n---> Begin Of Event: " << evtNb << endl;
G4cout << "\n---> Begin Of Event: " << evtNb << G4endl;
Em2Run->initializePerEvent();
}
@@ -78,7 +78,7 @@ void Em2EventAction::EndOfEventAction(const G4Event* evt)
G4int evtNb = evt->GetEventID();
if (evtNb%printModulo == 0)
{
G4cout << "\n---> End of Event: " << evtNb << endl;
G4cout << "\n---> End of Event: " << evtNb << G4endl;
HepRandom::showEngineStatus();
}
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2EventActionMessenger.cc,v 1.1.4.1 1999/12/07 20:46:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2EventActionMessenger.cc,v 1.2 1999/12/15 14:49:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2PhysicsList.cc,v 1.1.4.1 1999/12/07 20:46:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2PhysicsList.cc,v 1.2 1999/12/15 14:49:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -212,7 +212,7 @@ void Em2PhysicsList::SetCuts()
{
if (verboseLevel >0){
G4cout << "Em2PhysicsList::SetCuts:";
G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << endl;
G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
}
// set cut values for gamma at first and for e- second and next for e+,
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2PrimaryGeneratorAction.cc,v 1.1.4.1 1999/12/07 20:46:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2PrimaryGeneratorAction.cc,v 1.2 1999/12/15 14:49:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,9 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2RunAction.cc,v 1.1.4.1 1999/12/07 20:46:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// $Id: Em2RunAction.cc,v 1.4 2000/01/21 10:56:15 maire Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -25,17 +24,20 @@
#include "G4ios.hh"
#include "G4UnitsTable.hh"
#include <iomanip.h>
#include "g4std/iomanip"
#include <assert.h>
#include "Randomize.hh"
#include "CLHEP/Hist/HBookFile.h"
#ifndef G4NOHIST
#include "CLHEP/Hist/HBookFile.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Em2RunAction::Em2RunAction(Em2DetectorConstruction* det,
Em2PrimaryGeneratorAction* kin)
:Em2Det(det),Em2Kin(kin),hbookManager(NULL)
:Em2Det(det),Em2Kin(kin)
{
nLbin = Em2Det->GetnLtot();
dEdL = *new MyVector(nLbin);
@@ -56,8 +58,12 @@ Em2RunAction::Em2RunAction(Em2DetectorConstruction* det,
sumE2RadialCumul = *new MyVector(nRbin);
runMessenger = new Em2RunActionMessenger(this);
saveFlag = "off";
saveRndm = 1;
saveRndm = 1;
#ifndef G4NOHIST
hbookManager = NULL;
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -72,6 +78,7 @@ Em2RunAction::~Em2RunAction()
void Em2RunAction::bookHisto()
{
#ifndef G4NOHIST
hbookManager = new HBookFile("TestEm2.histo", 68);
assert (hbookManager != 0);
@@ -115,24 +122,27 @@ void Em2RunAction::bookHisto()
nRbin,Rmin,Rmax);
hist12 = hbookManager->histogram("rms on cumul radial Edep (% of E inc)",
nRbin,Rmin,Rmax);
nRbin,Rmin,Rmax);
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em2RunAction::cleanHisto()
{
#ifndef G4NOHIST
delete histo1; delete histo2; delete histo3;
delete histo4; delete histo5; delete histo6;
delete histo7; delete histo8; delete histo9;
delete hist10; delete hist11; delete hist12;
delete hbookManager;
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em2RunAction::BeginOfRunAction(const G4Run* aRun)
{
G4cout << "### Run " << aRun->GetRunID() << " start." << endl;
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
// save Rndm status
if (saveRndm > 0)
@@ -183,8 +193,7 @@ void Em2RunAction::BeginOfRunAction(const G4Run* aRun)
if (G4VVisManager::GetConcreteInstance())
{
G4UImanager* UI = G4UImanager::GetUIpointer();
UI->ApplyCommand("/vis/clear/view");
UI->ApplyCommand("/vis/draw/current");
UI->ApplyCommand("/vis/scene/notifyHandlers");
}
}
@@ -219,6 +228,7 @@ void Em2RunAction::fillPerEvent()
sumNeutrTrLength += NeutrTrLength;
sum2NeutrTrLength += NeutrTrLength*NeutrTrLength;
#ifndef G4NOHIST
//fill histograms
//
G4double Ekin=Em2Kin->GetParticleGun()->GetParticleEnergy();
@@ -227,7 +237,8 @@ void Em2RunAction::fillPerEvent()
histo1->accumulate(100.*dLCumul/(Ekin+mass));
histo2->accumulate(ChargTrLength/radl);
histo3->accumulate(NeutrTrLength/radl);
histo3->accumulate(NeutrTrLength/radl);
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -235,7 +246,7 @@ void Em2RunAction::fillPerEvent()
void Em2RunAction::EndOfRunAction(const G4Run* aRun)
{
if (G4VVisManager::GetConcreteInstance())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/show/view");
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
//compute and print statistic
//
@@ -267,7 +278,8 @@ void Em2RunAction::EndOfRunAction(const G4Run* aRun)
gammaFlux (i) /= NbOfEvents;
electronFlux(i) /= NbOfEvents;
positronFlux(i) /= NbOfEvents;
#ifndef G4NOHIST
bin = i*dLradl;
histo4->accumulate(bin,MeanELongit(i)/dLradl);
bin = (i+1)*dLradl;
@@ -276,7 +288,8 @@ void Em2RunAction::EndOfRunAction(const G4Run* aRun)
histo7->accumulate(bin, gammaFlux(i));
histo8->accumulate(bin, electronFlux(i));
histo9->accumulate(bin, positronFlux(i));
histo9->accumulate(bin, positronFlux(i));
#endif
}
//radial
@@ -296,12 +309,13 @@ void Em2RunAction::EndOfRunAction(const G4Run* aRun)
rmsERadialCumul(i) = norme*sqrt(abs(NbOfEvents*sumE2RadialCumul(i)
- sumERadialCumul(i)*sumERadialCumul(i)));
#ifndef G4NOHIST
bin = i*dRradl;
hist10->accumulate(bin,MeanERadial(i)/dRradl);
bin = (i+1)*dRradl;
hist11->accumulate(bin,MeanERadialCumul(i));
hist12->accumulate(bin, rmsERadialCumul(i));
hist12->accumulate(bin, rmsERadialCumul(i));
#endif
}
//track length
@@ -318,72 +332,74 @@ void Em2RunAction::EndOfRunAction(const G4Run* aRun)
//print
//
G4long oldform = G4cout.setf(ios::fixed,ios::floatfield);
G4long oldform = G4cout.setf(G4std::ios::fixed,G4std::ios::floatfield);
G4int oldprec = G4cout.precision(2);
G4cout << " LATERAL PROFILE "
<< " CUMULATIVE LATERAL PROFILE" << endl << endl;
<< " CUMULATIVE LATERAL PROFILE" << G4endl << G4endl;
G4cout << " bin " << " Mean rms "
<< " bin " << " Mean rms \n" << endl;
<< " bin " << " Mean rms \n" << G4endl;
for (i=0; i<nLbin; i++)
{
G4double inf=i*dLradl, sup=inf+dLradl;
G4cout << setw(8) << inf << "->" << setw(5) << sup << " radl: "
<< setw(7) << MeanELongit(i) << "% "
<< setw(9) << rmsELongit(i) << "% "
<< " 0->" << setw(5) << sup << " radl: "
<< setw(7) << MeanELongitCumul(i) << "% "
<< setw(7) << rmsELongitCumul(i) << "% "
<<endl;
G4cout << G4std::setw(8) << inf << "->" << G4std::setw(5) << sup << " radl: "
<< G4std::setw(7) << MeanELongit(i) << "% "
<< G4std::setw(9) << rmsELongit(i) << "% "
<< " 0->" << G4std::setw(5) << sup << " radl: "
<< G4std::setw(7) << MeanELongitCumul(i) << "% "
<< G4std::setw(7) << rmsELongitCumul(i) << "% "
<<G4endl;
}
G4cout << endl << endl << endl;
G4cout << G4endl << G4endl << G4endl;
G4cout << " RADIAL PROFILE "
<< " CUMULATIVE RADIAL PROFILE" << endl << endl;
<< " CUMULATIVE RADIAL PROFILE" << G4endl << G4endl;
G4cout << " bin " << " Mean rms "
<< " bin " << " Mean rms \n" << endl;
<< " bin " << " Mean rms \n" << G4endl;
for (i=0; i<nRbin; i++)
{
G4double inf=i*dRradl, sup=inf+dRradl;
G4cout << setw(8) << inf << "->" << setw(5) << sup << " radl: "
<< setw(7) << MeanERadial(i) << "% "
<< setw(9) << rmsERadial(i) << "% "
<< " 0->" << setw(5) << sup << " radl: "
<< setw(7) << MeanERadialCumul(i) << "% "
<< setw(7) << rmsERadialCumul(i) << "% "
<<endl;
G4cout << G4std::setw(8) << inf << "->" << G4std::setw(5) << sup << " radl: "
<< G4std::setw(7) << MeanERadial(i) << "% "
<< G4std::setw(9) << rmsERadial(i) << "% "
<< " 0->" << G4std::setw(5) << sup << " radl: "
<< G4std::setw(7) << MeanERadialCumul(i) << "% "
<< G4std::setw(7) << rmsERadialCumul(i) << "% "
<<G4endl;
}
G4cout << endl;
G4cout << setw(37) << "SUMMARY" << endl;
G4cout << setw(42) << "energy deposit : "
<< setw(7) << MeanELongitCumul(nLbin-1) << " % E0 +- "
<< setw(7) << rmsELongitCumul(nLbin-1) << " % E0" << endl;
G4cout << setw(42) << "charged traklen: "
<< setw(7) << MeanChargTrLength << " radl +- "
<< setw(7) << rmsChargTrLength << " radl" << endl;
G4cout << setw(42) << "neutral traklen: "
<< setw(7) << MeanNeutrTrLength << " radl +- "
<< setw(7) << rmsNeutrTrLength << " radl" << endl;
G4cout << G4endl;
G4cout << G4std::setw(37) << "SUMMARY" << G4endl;
G4cout << G4std::setw(42) << "energy deposit : "
<< G4std::setw(7) << MeanELongitCumul(nLbin-1) << " % E0 +- "
<< G4std::setw(7) << rmsELongitCumul(nLbin-1) << " % E0" << G4endl;
G4cout << G4std::setw(42) << "charged traklen: "
<< G4std::setw(7) << MeanChargTrLength << " radl +- "
<< G4std::setw(7) << rmsChargTrLength << " radl" << G4endl;
G4cout << G4std::setw(42) << "neutral traklen: "
<< G4std::setw(7) << MeanNeutrTrLength << " radl +- "
<< G4std::setw(7) << rmsNeutrTrLength << " radl" << G4endl;
G4cout.setf(oldform,ios::floatfield);
G4cout.setf(oldform,G4std::ios::floatfield);
G4cout.precision(oldprec);
// Write histogram file
if (saveFlag == "on") hbookManager->write();
// save Rndm status
if (saveRndm == 1)
{ HepRandom::showEngineStatus();
HepRandom::saveEngineStatus("endOfRun.rndm");
}
}
#ifndef G4NOHIST
// Write histogram file
hbookManager->write();
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2RunActionMessenger.cc,v 1.1.4.1 1999/12/07 20:46:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2RunActionMessenger.cc,v 1.3 2000/01/21 10:56:16 maire Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -27,15 +27,7 @@
Em2RunActionMessenger::Em2RunActionMessenger(Em2RunAction* run)
:Em2Run(run)
{
SaveCmd = new G4UIcmdWithAString("/run/save",this);
SaveCmd->SetGuidance("Save run statistic (histo)");
SaveCmd->SetGuidance(" Choice : on,off(default)");
SaveCmd->SetParameterName("choice",true);
SaveCmd->SetDefaultValue("on");
SaveCmd->SetCandidates("on off");
SaveCmd->AvailableForStates(Idle);
{
RndmDir = new G4UIdirectory("/rndm/");
RndmDir->SetGuidance("Rndm status control.");
@@ -60,21 +52,18 @@ Em2RunActionMessenger::Em2RunActionMessenger(Em2RunAction* run)
Em2RunActionMessenger::~Em2RunActionMessenger()
{
delete SaveCmd;
delete RndmSaveCmd; delete RndmReadCmd; delete RndmDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void Em2RunActionMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
if (command == SaveCmd) Em2Run->SetSaveFlag(newValue);
{
if (command == RndmSaveCmd)
Em2Run->SetRndmFreq(RndmSaveCmd->GetNewIntValue(newValue));
if (command == RndmReadCmd)
{ G4cout << "\n---> rndm status restored from file: " << newValue << endl;
{ G4cout << "\n---> rndm status restored from file: " << newValue << G4endl;
HepRandom::restoreEngineStatus(newValue);
HepRandom::showEngineStatus();
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2SteppingAction.cc,v 1.1.4.1 1999/12/07 20:46:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2SteppingAction.cc,v 1.2 1999/12/15 14:49:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -0,0 +1,170 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2SteppingVerbose.cc,v 1.2 1999/12/15 14:49:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
//---------------------------------------------------------------
//
// Em2SteppingVerbose.cc
//
// Description:
// Implementation of the Em2SteppingVerbose class
// Contact:
// Questions and comments to this code should be sent to
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
//
//---------------------------------------------------------------
#include "Em2SteppingVerbose.hh"
#include "G4SteppingManager.hh"
#include "G4UnitsTable.hh"
////////////////////////////////////////////////
Em2SteppingVerbose::Em2SteppingVerbose()
////////////////////////////////////////////////
{
}
//////////////////////////////////////////////////
Em2SteppingVerbose::~Em2SteppingVerbose()
//////////////////////////////////////////////////
{
}
/////////////////////////////////////////
void Em2SteppingVerbose::StepInfo()
/////////////////////////////////////////
{
CopyState();
G4int prec = G4cout.precision(3);
if( verboseLevel >= 1 ){
if( verboseLevel >= 4 ) VerboseTrack();
if( verboseLevel >= 3 ){
G4cout << G4endl;
G4cout << G4std::setw( 5) << "#Step#" << " "
<< G4std::setw( 6) << "X" << " "
<< G4std::setw( 6) << "Y" << " "
<< G4std::setw( 6) << "Z" << " "
<< G4std::setw( 9) << "KineE" << " "
<< G4std::setw( 9) << "dEStep" << " "
<< G4std::setw(10) << "StepLeng"
<< G4std::setw(10) << "TrakLeng"
<< G4std::setw(10) << "NextVolu"
<< G4std::setw(10) << "Process" << G4endl;
}
G4cout << G4std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
// if( fStepStatus != fWorldBoundary){
if( fTrack->GetNextVolume() != 0 ) {
G4cout << G4std::setw(10) << fTrack->GetNextVolume()->GetName();
} else {
G4cout << G4std::setw(10) << "OutOfWorld";
}
if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != NULL){
G4cout << G4std::setw(10) << fStep->GetPostStepPoint()->GetProcessDefinedStep()
->GetProcessName();
} else {
G4cout << "User Limit";
}
G4cout << G4endl;
if( verboseLevel == 2 ){
G4int tN2ndariesTot = fN2ndariesAtRestDoIt +
fN2ndariesAlongStepDoIt +
fN2ndariesPostStepDoIt;
if(tN2ndariesTot>0){
G4cout << " :----- List of 2ndaries - "
<< "#SpawnInStep=" << G4std::setw(3) << tN2ndariesTot
<< "(Rest=" << G4std::setw(2) << fN2ndariesAtRestDoIt
<< ",Along=" << G4std::setw(2) << fN2ndariesAlongStepDoIt
<< ",Post=" << G4std::setw(2) << fN2ndariesPostStepDoIt
<< "), "
<< "#SpawnTotal=" << G4std::setw(3) << (*fSecondary).entries()
<< " ---------------"
<< G4endl;
for(G4int lp1=(*fSecondary).entries()-tN2ndariesTot;
lp1<(*fSecondary).entries(); lp1++){
G4cout << " : "
<< G4std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length")
<< G4std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length")
<< G4std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length")
<< G4std::setw(6)
<< G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
<< G4std::setw(10)
<< (*fSecondary)[lp1]->GetDefinition()->GetParticleName();
G4cout << G4endl;
}
G4cout << " :-----------------------------"
<< "----------------------------------"
<< "-- EndOf2ndaries Info ---------------"
<< G4endl;
}
}
}
G4cout.precision(prec);
}
////////////////////////////////////////////////
void Em2SteppingVerbose::TrackingStarted()
////////////////////////////////////////////////
{
CopyState();
G4int prec = G4cout.precision(3);
if( verboseLevel > 0 ){
G4cout << G4std::setw( 5) << "Step#" << " "
<< G4std::setw( 6) << "X" << " "
<< G4std::setw( 6) << "Y" << " "
<< G4std::setw( 6) << "Z" << " "
<< G4std::setw( 9) << "KineE" << " "
<< G4std::setw( 9) << "dEStep" << " "
<< G4std::setw(10) << "StepLeng"
<< G4std::setw(10) << "TrakLeng"
<< G4std::setw(10) << "NextVolu"
<< G4std::setw(10) << "Process" << G4endl;
G4cout << G4std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
<< G4std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length")
<< G4std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
if(fTrack->GetNextVolume()){
G4cout << G4std::setw(10) << fTrack->GetNextVolume()->GetName() << " ";
} else {
G4cout << G4std::setw(10) << "OutOfWorld" << " ";
}
G4cout << G4std::setw(10) << "initStep" << G4endl;
}
G4cout.precision(prec);
}
@@ -6,8 +6,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2TrackingAction.cc,v 1.1.4.1 1999/12/07 20:46:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2TrackingAction.cc,v 1.2 1999/12/15 14:49:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em2VisManager.cc,v 1.1.4.1 1999/12/07 20:46:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em2VisManager.cc,v 1.2 1999/12/15 14:49:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// John Allison 24th January 1998.
@@ -131,7 +131,7 @@ void Em2VisManager::RegisterGraphicsSystems () {
if (fVerbose > 0) {
G4cout <<
"\nYou have successfully chosen to use the following graphics systems."
<< endl;
<< G4endl;
PrintAvailableGraphicsSystems ();
}
}
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.1 1999/10/11 16:55:33 maire Exp $
# $Id: GNUmakefile,v 1.2 2000/01/21 09:11:04 maire Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -16,7 +16,11 @@ all: lib bin
include $(G4INSTALL)/config/architecture.gmk
LDFLAGS += -L/cern/pro/lib
LOADLIBS += -lpacklib $(FCLIBS)
ifdef G4NOHIST
CPPFLAGS += -DG4NOHIST
else
LDFLAGS += -L/cern/pro/lib
LOADLIBS += -lpacklib $(FCLIBS)
endif
include $(G4INSTALL)/config/binmake.gmk
@@ -1,4 +1,4 @@
$Id: README,v 1.1 1999/10/11 16:55:33 maire Exp $
$Id: README,v 1.2 2000/01/21 09:11:04 maire Exp $
-------------------------------------------------------------------
=========================================================
@@ -114,7 +114,6 @@ $Id: README,v 1.1 1999/10/11 16:55:33 maire Exp $
7- NTUPLE
Testem3 produce an Ntuple which is saved as testem3.histo
under the control of the command /run/save on
Content of this Ntuple:
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: TestEm3.cc,v 1.1.4.1 1999/12/07 20:46:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: TestEm3.cc,v 1.3 1999/12/15 14:49:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Comments
//
@@ -28,13 +28,16 @@
#include "Em3RunAction.hh"
#include "Em3EventAction.hh"
#include "Em3SteppingAction.hh"
#include "Em3SteppingVerbose.hh"
int main(int argc,char** argv) {
//choose the Random engine
HepRandom::setTheEngine(new RanecuEngine);
//my Verbose output class
G4VSteppingVerbose::SetInstance(new Em3SteppingVerbose);
// Construct the default run manager
G4RunManager * runManager = new G4RunManager;
@@ -0,0 +1,19 @@
# $Id: TestEm3.in,v 1.1 2000/01/21 14:28:44 maire Exp $
#
# Macro file for "exampleN03.cc"
# (can be run in batch, without graphic)
#
# Lead-liquidArgon 50 layers; electron 1 GeV
#
/control/verbose 2
#
#/run/particle/setCut 0.5 mm
#/run/initialize
#
/run/verbose 2
/event/drawTracks none
/event/printModulo 50
#
/gun/particle e-
/gun/energy 1 GeV
/run/beamOn 100
@@ -0,0 +1,227 @@
**********************************************
Geant4 version $Name: geant4-01-01 $
(07-Dec-99)
Copyright : Geant4 Collaboration
**********************************************
Constructing Visualization Manager....
Initialising Visualization Manager....
Registering graphics systems....
***** Table : Nb of materials = 18 *****
Material: Aluminium density: 2.700 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 8.893 cm
---> Element: Aluminium Z = 13.0 N = 27.0 A = 26.98 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: liquidArgon density: 1.390 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 14.065 cm
---> Element: liquidArgon Z = 18.0 N = 40.0 A = 39.95 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Iron density: 7.700 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 1.797 cm
---> Element: Iron Z = 26.0 N = 55.9 A = 55.85 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Copper density: 8.960 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 1.436 cm
---> Element: Copper Z = 29.0 N = 63.5 A = 63.55 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Tungsten density: 19.300 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 3.504 mm
---> Element: Tungsten Z = 74.0 N = 183.8 A = 183.85 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Lead density: 11.350 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 5.612 mm
---> Element: Lead Z = 82.0 N = 207.2 A = 207.19 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Uranium density: 18.950 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 3.166 mm
---> Element: Uranium Z = 92.0 N = 238.0 A = 238.03 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Water density: 1.000 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 36.092 cm
---> Element: Hydrogen H Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 11.21 % Abundance 66.67 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 88.79 % Abundance 33.33 %
Material: Scintillator density: 1.032 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 42.549 cm
---> Element: Carbon C Z = 6.0 N = 12.0 A = 12.01 g/mole fractionMass: 91.45 % Abundance 47.37 %
---> Element: Hydrogen H Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 8.55 % Abundance 52.63 %
Material: Silicium density: 2.330 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 9.368 cm
---> Element: Silicon Si Z = 14.0 N = 28.1 A = 28.09 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: quartz density: 2.200 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 12.295 cm
---> Element: Silicon Si Z = 14.0 N = 28.1 A = 28.09 g/mole fractionMass: 46.75 % Abundance 33.33 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 53.25 % Abundance 66.67 %
Material: NemaG10 density: 1.700 g/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 18.733 cm
---> Element: Silicon Si Z = 14.0 N = 28.1 A = 28.09 g/mole fractionMass: 28.33 % Abundance 11.11 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 32.27 % Abundance 22.22 %
---> Element: Carbon C Z = 6.0 N = 12.0 A = 12.01 g/mole fractionMass: 36.34 % Abundance 33.33 %
---> Element: Hydrogen H Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 3.06 % Abundance 33.33 %
Material: Air density: 1.290 mg/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 285.161 m
---> Element: Nitrogen N Z = 7.0 N = 14.0 A = 14.01 g/mole fractionMass: 70.00 % Abundance 72.71 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 30.00 % Abundance 27.29 %
Material: Aerogel density: 200.000 mg/cm3 temperature: 273.15 K pressure: 1.00 atm RadLength: 1.493 m
---> Element: Silicon Si Z = 14.0 N = 28.1 A = 28.09 g/mole fractionMass: 29.22 % Abundance 11.12 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 66.49 % Abundance 44.42 %
---> Element: Hydrogen H Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 4.19 % Abundance 44.37 %
---> Element: Carbon C Z = 6.0 N = 12.0 A = 12.01 g/mole fractionMass: 0.10 % Abundance 0.09 %
Material: CarbonicGas density: 27.000 mg/cm3 temperature: 325.00 K pressure: 50.00 atm RadLength: 13.406 m
---> Element: Carbon C Z = 6.0 N = 12.0 A = 12.01 g/mole fractionMass: 27.29 % Abundance 33.33 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 72.71 % Abundance 66.67 %
Material: WaterSteam density: 0.300 mg/cm3 temperature: 500.00 K pressure: 2.00 atm RadLength: 1.203 km
---> Element: Hydrogen H Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 11.21 % Abundance 66.67 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 88.79 % Abundance 33.33 %
Material: Galactic density: 0.000 mg/cm3 temperature: 2.73 K pressure: 0.00 atm RadLength: 6317232936888469300000.000 km
---> Element: Galactic Z = 1.0 N = 1.0 A = 1.01 g/mole fractionMass: 100.00 % Abundance 100.00 %
Material: Beam density: 0.010 mg/cm3 temperature: 273.15 K pressure: 0.02 atm RadLength: 36.786 km
---> Element: Nitrogen N Z = 7.0 N = 14.0 A = 14.01 g/mole fractionMass: 70.00 % Abundance 72.71 %
---> Element: Oxygen O Z = 8.0 N = 16.0 A = 16.00 g/mole fractionMass: 30.00 % Abundance 27.29 %
-------------------------------------------------------------
---> The calorimeter is 50 layers of:
Lead: 2.3 mm
liquidArgon: 5.7 mm
-------------------------------------------------------------
Em3PhysicsList::SetCuts:CutLength : 5e+02 mum
phot: Total cross sections from a parametrisation. Good description from 10 KeV to 50 MeV for all Z
Sandia crossSection below 50 KeV
PhysicsTables from 50 keV to 50 MeV in 100 bins.
compt: Total cross sections from a parametrisation. Good description from 10 KeV to (100/Z) GeV.
Scattered gamma energy according Klein-Nishina.
PhysicsTables from 10 keV to 1e+02 GeV in 100 bins.
conv: Total cross sections from a parametrisation. Good description from 1.5 MeV to 100 GeV for all Z.
e+e- energies according Bethe-Heitler
PhysicsTables from 1 MeV to 1e+02 GeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
eIoni: delta cross sections from Moller+Bhabha. Good description from 1 KeV to 100 GeV.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
eBrem: Total cross sections from a parametrisation. Good description from 1 KeV to 100 GeV.
log scale extrapolation above 100 GeV
Gamma energy sampled from a parametrised formula.
PhysicsTables from 1 keV to 1e+02 TeV in 100 bins.
annihil: Total cross section from Heilter formula (annihilation into 2 photons).
gamma energies sampled according Heitler
PhysicsTables from 10 keV to 10 TeV in 100 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
hIoni: Knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+02 TeV in 150 bins.
msc: Tables of transport mean free paths.
New model of MSC , computes the lateral
displacement of the particle , too.
PhysicsTables from 1e+02 eV to 1e+02 TeV in 100 bins.
MuIoni: knock-on electron cross sections .
Good description above the mean excitation energy.
delta ray energy sampled from differential Xsection.
PhysicsTables from 1 keV to 1e+03 PeV in 100 bins.
MuBrems: theoretical cross section
Good description up to 1000 TeV.
PhysicsTables from 1 GeV to 1e+03 PeV in 100 bins.
MuPairProd: theoretical cross sections
Good description up to 1000 TeV.
PhysicsTables from 1 GeV to 1e+03 PeV in 50 bins.
============= The cut Energy ==============================
gamma e- mu- proton neutron
Cut in range 500 mum 500 mum 500 mum 500 mum 500 mum
Cut in energy
Aluminium 4.96 keV 365 keV 3.43 MeV 8.84 MeV 990 eV
liquidArgon 4.4 keV 217 keV 2.2 MeV 5.54 MeV 990 eV
Iron 14.2 keV 709 keV 5.68 MeV 14.5 MeV 990 eV
Copper 17.1 keV 782 keV 6.04 MeV 15.4 MeV 990 eV
Tungsten 87.5 keV 1.22 MeV 7.92 MeV 19.7 MeV 990 eV
Lead 81.5 keV 763 keV 5.68 MeV 13.8 MeV 990 eV
Uranium 105 keV 1.13 MeV 7.44 MeV 18.3 MeV 990 eV
Water 2.18 keV 223 keV 2.31 MeV 6.04 MeV 990 eV
Scintillator 1.83 keV 226 keV 2.34 MeV 6.11 MeV 990 eV
Silicium 4.96 keV 335 keV 3.18 MeV 8.21 MeV 990 eV
quartz 4.01 keV 330 keV 3.18 MeV 8.21 MeV 990 eV
NemaG10 3.07 keV 292 keV 2.88 MeV 7.54 MeV 990 eV
Air 990 eV 990 eV 27.2 keV 29.6 keV 990 eV
Aerogel 1.27 keV 79.2 keV 863 keV 2.07 MeV 990 eV
CarbonicGas 990 eV 8.52 keV 255 keV 534 keV 990 eV
WaterSteam 990 eV 990 eV 5.97 keV 4.34 keV 990 eV
Galactic 990 eV 990 eV 990 eV 990 eV 990 eV
Beam 990 eV 990 eV 990 eV 990 eV 990 eV
===================================================
# $Id: TestEm3.out,v 1.1 2000/01/21 14:28:45 maire Exp $
#
# Macro file for "exampleN03.cc"
# (can be run in batch, without graphic)
#
# Lead-liquidArgon 50 layers; electron 1 GeV
#
#
#/run/particle/setCut 0.5 mm
#/run/initialize
#
/run/verbose 2
/event/drawTracks none
/event/printModulo 50
#
/gun/particle e-
/gun/energy 1 GeV
/run/beamOn 100
### Run 0 start.
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 9876, 54321
----------------------------------------
Start closing geometry.
Start Run processing.
---> Begin Of Event: 0
---> Begin Of Event: 50
Run terminated.
Run Summary
Number of events processed : 100
User=39s Real=46s Sys=6.9s
-------------------------------------------------------------
total energy dep total tracklen
Absorber0 ( Lead) : 808.32 MeV +- 15.02 MeV 52.43 cm +- 1.21 cm
Absorber1 ( liquidArgon) : 179.35 MeV +- 12.84 MeV 89.37 cm +- 6.43 cm
-------------------------------------------------------------
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 197041347, 1893777350
----------------------------------------
Graphics systems deleted.
VisManager deleting.
G4 kernel has come to Quit state.
Deletion of G4 kernel class start.
UserDetectorConstruction deleted.
UserPhysicsList deleted.
UserRunAction deleted.
UserPrimaryGenerator deleted.
G4SDManager deleted.
EventManager deleted.
UImanager deleted.
StateManager deleted.
RunManager is deleting.
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3CalorHit.hh,v 1.1.4.1 1999/12/07 20:46:59 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3CalorHit.hh,v 1.2 1999/12/15 14:49:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3CalorimeterSD.hh,v 1.1.4.1 1999/12/07 20:47:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3CalorimeterSD.hh,v 1.2 1999/12/15 14:49:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3DetectorConstruction.hh,v 1.1.4.1 1999/12/07 20:47:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3DetectorConstruction.hh,v 1.2 1999/12/15 14:49:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3DetectorMessenger.hh,v 1.1.4.1 1999/12/07 20:47:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3DetectorMessenger.hh,v 1.2 1999/12/15 14:49:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3EventAction.hh,v 1.1.4.1 1999/12/07 20:47:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3EventAction.hh,v 1.2 1999/12/15 14:49:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3EventActionMessenger.hh,v 1.1.4.1 1999/12/07 20:47:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3EventActionMessenger.hh,v 1.2 1999/12/15 14:49:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3PhysicsList.hh,v 1.1.4.1 1999/12/07 20:47:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3PhysicsList.hh,v 1.2 1999/12/15 14:49:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3PrimaryGeneratorAction.hh,v 1.1.4.1 1999/12/07 20:47:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3PrimaryGeneratorAction.hh,v 1.2 1999/12/15 14:49:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3PrimaryGeneratorMessenger.hh,v 1.1.4.1 1999/12/07 20:47:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3PrimaryGeneratorMessenger.hh,v 1.2 1999/12/15 14:49:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3RunAction.hh,v 1.1.4.1 1999/12/07 20:47:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3RunAction.hh,v 1.3 2000/01/21 09:11:06 maire Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -26,8 +26,10 @@
class G4Run;
class Em3RunActionMessenger;
class HepTupleManager;
class HepTuple;
#ifndef G4NOHIST
class HepTupleManager;
class HepTuple;
#endif
class Em3RunAction : public G4UserRunAction
{
@@ -41,12 +43,13 @@ class Em3RunAction : public G4UserRunAction
void fillPerEvent(G4int,G4double,G4double);
HepTuple* GetnTuple() {return ntuple;}
void SetSaveFlag(G4String val) {saveFlag = val;}
void SetRndmFreq(G4int val) {saveRndm = val;}
G4int GetRndmFreq() {return saveRndm;}
#ifndef G4NOHIST
HepTuple* GetnTuple() {return ntuple;}
#endif
private:
void bookHisto();
@@ -54,14 +57,15 @@ class Em3RunAction : public G4UserRunAction
G4double sumEAbs[MaxAbsor], sum2EAbs[MaxAbsor];
G4double sumLAbs[MaxAbsor], sum2LAbs[MaxAbsor];
HepTupleManager* hbookManager;
HepTuple* ntuple;
Em3DetectorConstruction* Detector;
Em3RunActionMessenger* runMessenger;
G4String saveFlag;
G4int saveRndm;
G4int saveRndm;
#ifndef G4NOHIST
HepTupleManager* hbookManager;
HepTuple* ntuple;
#endif
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3RunActionMessenger.hh,v 1.1.4.1 1999/12/07 20:47:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3RunActionMessenger.hh,v 1.3 2000/01/21 09:11:06 maire Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -37,7 +37,6 @@ class Em3RunActionMessenger: public G4UImessenger
private:
Em3RunAction* Em3Run;
G4UIcmdWithAString* SaveCmd;
G4UIdirectory* RndmDir;
G4UIcmdWithAnInteger* RndmSaveCmd;
G4UIcmdWithAString* RndmReadCmd;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3SteppingAction.hh,v 1.1.4.1 1999/12/07 20:47:00 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3SteppingAction.hh,v 1.2 1999/12/15 14:49:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -0,0 +1,47 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3SteppingVerbose.hh,v 1.2 1999/12/15 14:49:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
//---------------------------------------------------------------
//
// Em3SteppingVerbose.hh
//
// Description:
// This class manages the vervose outputs in G4SteppingManager.
//
//
// Contact:
// Questions and comments to this code should be sent to
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
//
//---------------------------------------------------------------
class Em3SteppingVerbose;
#ifndef Em3SteppingVerbose_h
#define Em3SteppingVerbose_h 1
#include "G4SteppingVerbose.hh"
class Em3SteppingVerbose : public G4SteppingVerbose {
public:
// Constructor/Destructor
Em3SteppingVerbose();
~Em3SteppingVerbose();
//
void StepInfo();
void TrackingStarted();
//
};
#endif
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3VisManager.hh,v 1.1.4.1 1999/12/07 20:47:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3VisManager.hh,v 1.2 1999/12/15 14:49:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -29,4 +29,6 @@
# if too many tracks cause core dump => storeTrajectory 0
/tracking/storeTrajectory 1
/event/drawTracks all
#
# Flush visualization
/vis/viewer/update
@@ -1,4 +1,4 @@
# $Id: run01.mac,v 1.1 1999/10/11 16:55:34 maire Exp $
# $Id: run01.mac,v 1.2 2000/01/21 09:11:04 maire Exp $
#
# Macro file for "exampleN03.cc"
# (can be run in batch, without graphic)
@@ -13,7 +13,6 @@
/run/verbose 2
/event/drawTracks none
/event/printModulo 100
/run/save on
#
/gun/particle e-
/gun/energy 1 GeV
@@ -1,4 +1,4 @@
# $Id: run02.mac,v 1.1 1999/10/11 16:55:34 maire Exp $
# $Id: run02.mac,v 1.2 2000/01/21 09:11:04 maire Exp $
#
# Macro file for "TestEm3.cc"
# (can be run in batch, without graphic)
@@ -20,7 +20,6 @@
/run/verbose 2
/event/drawTracks none
/event/printModulo 100
#/run/save on
#
/gun/particle e-
/gun/energy 1 GeV
@@ -1,4 +1,4 @@
# $Id: run03.mac,v 1.1 1999/10/11 16:55:34 maire Exp $
# $Id: run03.mac,v 1.2 2000/01/21 09:11:04 maire Exp $
#
# Macro file for "TestEm3.cc"
# (can be run in batch, without graphic)
@@ -24,7 +24,6 @@
/run/verbose 2
/event/drawTracks none
/event/printModulo 10
#/run/save on
#
/gun/particle e-
/gun/energy 6 GeV
@@ -1,4 +1,4 @@
# $Id: run04.mac,v 1.1 1999/10/11 16:55:35 maire Exp $
# $Id: run04.mac,v 1.2 2000/01/21 09:11:05 maire Exp $
#
# Macro file for "TestEm3.cc"
# (can be run in batch, without graphic)
@@ -25,7 +25,6 @@
/run/verbose 2
/event/drawTracks none
/event/printModulo 10
#/run/save on
#
/gun/particle e-
/gun/energy 6 GeV
@@ -1,4 +1,4 @@
# $Id: run05.mac,v 1.1 1999/10/11 16:55:35 maire Exp $
# $Id: run05.mac,v 1.2 2000/01/21 09:11:05 maire Exp $
#
# Macro file for "TestEm3.cc"
# (can be run in batch, without graphic)
@@ -25,7 +25,6 @@
/run/verbose 2
/event/drawTracks none
/event/printModulo 10
#/run/save on
#
/gun/particle e-
/gun/energy 6 GeV
@@ -1,4 +1,4 @@
# $Id: run06.mac,v 1.1 1999/10/11 16:55:35 maire Exp $
# $Id: run06.mac,v 1.2 2000/01/21 09:11:05 maire Exp $
#
# Macro file for "TestEm3.cc"
# (can be run in batch, without graphic)
@@ -25,7 +25,6 @@
/run/verbose 2
/event/drawTracks none
/event/printModulo 10
#/run/save on
#
/gun/particle e-
/gun/energy 6 GeV
@@ -1,4 +1,4 @@
# $Id: run07.mac,v 1.1 1999/10/11 16:55:35 maire Exp $
# $Id: run07.mac,v 1.2 2000/01/21 09:11:05 maire Exp $
#
# Macro file for "TestEm3.cc"
# (can be run in batch, without graphic)
@@ -21,7 +21,6 @@
/run/verbose 2
/event/drawTracks none
/event/printModulo 100
#/run/save on
#
/gun/particle proton
/gun/energy 500 MeV
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3CalorHit.cc,v 1.1.4.1 1999/12/07 20:47:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3CalorHit.cc,v 1.2 1999/12/15 14:49:02 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3CalorimeterSD.cc,v 1.1.4.1 1999/12/07 20:47:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3CalorimeterSD.cc,v 1.2 1999/12/15 14:49:03 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -79,13 +79,13 @@ G4bool Em3CalorimeterSD::ProcessHits(G4Step* aStep,G4TouchableHistory* ROhist)
calHit->AddAbs(AbsorNo,edep,stepl);
HitID[LayerNumber] = CalCollection->insert(calHit) - 1;
if (verboseLevel>0)
G4cout << " New Calorimeter Hit on layer: " << LayerNumber << endl;
G4cout << " New Calorimeter Hit on layer: " << LayerNumber << G4endl;
}
else
{
(*CalCollection)[HitID[LayerNumber]]->AddAbs(AbsorNo,edep,stepl);
if (verboseLevel>0)
G4cout << " Energy added to Layer: " << LayerNumber << endl;
G4cout << " Energy added to Layer: " << LayerNumber << G4endl;
}
return true;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3DetectorConstruction.cc,v 1.1.4.1 1999/12/07 20:47:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3DetectorConstruction.cc,v 1.2 1999/12/15 14:49:03 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -238,7 +238,7 @@ G4Material* beam = new G4Material(name="Beam", density, ncomponents=1,
kStateGas,temperature,pressure);
beam->AddMaterial(Air, fractionmass=1.);
G4cout << *(G4Material::GetMaterialTable()) << endl;
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
//default materials of the calorimeter
AbsorMaterial[0] = Pb;
@@ -381,8 +381,8 @@ void Em3DetectorConstruction::PrintCalorParameters()
<< "\n ---> The calorimeter is " << NbOfLayers << " layers of:";
for (G4int i=0; i<NbOfAbsor; i++)
{
G4cout << "\n \t" << setw(12) << AbsorMaterial[i]->GetName() <<": "
<< setw(6) << G4BestUnit(AbsorThickness[i],"Length");
G4cout << "\n \t" << G4std::setw(12) << AbsorMaterial[i]->GetName() <<": "
<< G4std::setw(6) << G4BestUnit(AbsorThickness[i],"Length");
}
G4cout << "\n-------------------------------------------------------------\n";
}
@@ -396,7 +396,7 @@ void Em3DetectorConstruction::SetNbOfAbsor(G4int ival)
if (ival < 1 || ival > MaxAbsor)
{ G4cout << "\n ---> warning from SetNbOfAbsor: "
<< ival << " must be at least 1 and and most " << MaxAbsor
<< ". Command refused" << endl;
<< ". Command refused" << G4endl;
return;
}
NbOfAbsor = ival;
@@ -409,7 +409,7 @@ void Em3DetectorConstruction::SetAbsorMaterial(G4int ival,G4String material)
//
if (ival >= NbOfAbsor)
{ G4cout << "\n --->warning from SetAbsorMaterial: absor number "
<< ival << " out of range. Command refused" << endl;
<< ival << " out of range. Command refused" << G4endl;
return;
}
@@ -425,12 +425,12 @@ void Em3DetectorConstruction::SetAbsorThickness(G4int ival,G4double val)
//
if (ival >= NbOfAbsor)
{ G4cout << "\n --->warning from SetAbsorThickness: absor number "
<< ival << " out of range. Command refused" << endl;
<< ival << " out of range. Command refused" << G4endl;
return;
}
if (val <= DBL_MIN)
{ G4cout << "\n --->warning from SetAbsorThickness: thickness "
<< val << " out of range. Command refused" << endl;
<< val << " out of range. Command refused" << G4endl;
return;
}
AbsorThickness[ival] = val;
@@ -444,7 +444,7 @@ void Em3DetectorConstruction::SetCalorSizeYZ(G4double val)
//
if (val <= DBL_MIN)
{ G4cout << "\n --->warning from SetCalorSizeYZ: thickness "
<< val << " out of range. Command refused" << endl;
<< val << " out of range. Command refused" << G4endl;
return;
}
CalorSizeYZ = val;
@@ -458,7 +458,7 @@ void Em3DetectorConstruction::SetNbOfLayers(G4int ival)
//
if (ival < 1)
{ G4cout << "\n --->warning from SetNbOfLayers: "
<< ival << " must be at least 1. Command refused" << endl;
<< ival << " must be at least 1. Command refused" << G4endl;
return;
}
NbOfLayers = ival;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3DetectorMessenger.cc,v 1.1.4.1 1999/12/07 20:47:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3DetectorMessenger.cc,v 1.2 1999/12/15 14:49:03 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -123,7 +123,7 @@ void Em3DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
G4int num; G4double tick;
char mat[30],unts[30];
const char* t = newValue;
istrstream is((char*)t);
G4std::istrstream is((char*)t);
is >> num >> mat >> tick >> unts;
G4String material=mat, unt=unts;
tick *= G4UIcommand::ValueOf(unt);
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: Em3EventAction.cc,v 1.1.2.1.2.1 1999/12/07 20:47:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: Em3EventAction.cc,v 1.4 2000/01/21 09:11:06 maire Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
@@ -35,7 +35,9 @@
#include "G4UnitsTable.hh"
#include "Randomize.hh"
#include "CLHEP/Hist/HBookFile.h"
#ifndef G4NOHIST
#include "CLHEP/Hist/HBookFile.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -59,7 +61,7 @@ void Em3EventAction::BeginOfEventAction(const G4Event* evt)
{
G4int evtNb = evt->GetEventID();
if (evtNb%printModulo == 0)
G4cout << "\n---> Begin Of Event: " << evtNb << endl;
G4cout << "\n---> Begin Of Event: " << evtNb << G4endl;
if (calorimeterCollID==-1)
{
@@ -77,10 +79,13 @@ void Em3EventAction::EndOfEventAction(const G4Event* evt)
G4int NbHits=0;
G4int NbOfAbsor=Detector->GetNbOfAbsor();
G4double totEAbs, totLAbs;
HepTuple* ntuple=Em3Run->GetnTuple();
char str1[6], str2[6];
strcpy(str1,"EAbs");strcpy(str2,"LAbs");
#ifndef G4NOHIST
HepTuple* ntuple=Em3Run->GetnTuple();
#endif
if (HCE) CHC = (Em3CalorHitsCollection*)(HCE->GetHC(calorimeterCollID));
if (CHC)
@@ -94,14 +99,18 @@ void Em3EventAction::EndOfEventAction(const G4Event* evt)
totLAbs += (*CHC)[j]->GetTrakAbs(k);
}
Em3Run->fillPerEvent(k,totEAbs,totLAbs);
#ifndef G4NOHIST
//fill ntuple
//
str1[4] = str2[4] = (char)((int)('0') + k);
ntuple->column(str1,totEAbs);
ntuple->column(str2,totLAbs);
#endif
}
ntuple->dumpData();
#ifndef G4NOHIST
ntuple->dumpData();
#endif
}
if (G4VVisManager::GetConcreteInstance())
@@ -125,7 +134,7 @@ void Em3EventAction::EndOfEventAction(const G4Event* evt)
G4int evtNb = evt->GetEventID();
if (evtNb%printModulo == 0)
{
G4cout << "\n---> End of Event: " << evtNb << endl;
G4cout << "\n---> End of Event: " << evtNb << G4endl;
HepRandom::showEngineStatus();
}
}

Some files were not shown because too many files have changed in this diff Show More