Import Geant4 5.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:57:27 +02:00
parent 330b82b769
commit 37fff30d2e
5733 changed files with 263867 additions and 74574 deletions
+5 -2
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.18 2002/06/13 17:49:26 jwellisc Exp $
# $Id: GNUmakefile,v 1.20 2002/11/18 10:31:54 hpw Exp $
# ----------------------------------------------------------------------
# GNUmakefile for processes library, Gabriele Cosmo 27-Jun-1998
# ----------------------------------------------------------------------
@@ -15,6 +15,7 @@ SUBDIRS += hadronic/cross_sections hadronic/stopping
SUBDIRS += hadronic/models/low_energy hadronic/models/high_energy
SUBDIRS += hadronic/models/neutron_hp
SUBDIRS += hadronic/models/isotope_production
SUBDIRS += hadronic/models/cascade/cascade
SUBDIRS += hadronic/models/cascade/evaporation
SUBDIRS += hadronic/models/cascade/utils
SUBDIRS += hadronic/models/chiral_inv_phase_space/body
@@ -23,6 +24,7 @@ SUBDIRS += hadronic/models/coherent_elastic
SUBDIRS += hadronic/models/generator/de_excitation
SUBDIRS += hadronic/models/generator/diffractive_string
SUBDIRS += hadronic/models/generator/high_energy
SUBDIRS += hadronic/models/generator/scattering
SUBDIRS += hadronic/models/generator/kinetic_model
SUBDIRS += hadronic/models/generator/management
SUBDIRS += hadronic/models/generator/pre_equilibrium
@@ -42,7 +44,8 @@ SUBLIBS += G4hadronic_xsect G4hadronic_stop G4hadronic_LE G4hadronic_HE
SUBLIBS += G4hadronic_neu G4hadronic_iso
SUBLIBS += G4hadronic_hetcpp_evaporation G4hadronic_hetcpp_utils
SUBLIBS += G4hadronic_body_ci G4hadronic_interface_ci G4hadronic_coherent_elastic
SUBLIBS += G4hadronic_deex G4hadronic_diffstring G4hadronic_HE_gen G4hadronic_kinetic
SUBLIBS += G4hadronic_deex G4hadronic_diffstring G4hadronic_HE_gen
SUBLIBS += G4hadronic_kinetic G4hadronic_scattering
SUBLIBS += G4hadronic_qgstring
SUBLIBS += G4hadronic_man_gen G4hadronic_preequ G4hadronic_string_common
SUBLIBS += G4hadronic_stringfrag G4hadronic_util_gen
+7 -4
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.4 1999/05/31 17:38:37 stesting Exp $
$Id: History,v 1.6 2002/12/06 19:52:06 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,13 +17,16 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Dec 06, 2002: Gabriele Cosmo (process-V04-01-01)
- Merged development with latest migration to G4ApplicationState.
Dec 4, 2002: Makoto Asai (process-V04-01-00)
- Tagged for migration to new G4ApplicationState
May 29, 1999: John Allison
- Added electromagnetic/lowenergy to GNUmakefile and
electromagnetic/GNUmakefile..
Dec 09: J.P.Wellisch
-hadronics tagged.
Sep 25: H.Kurashige.
- procman-00-02-05 has tagged
Added deleteion of all processes in the destructor of G4ProcessTable
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4Decay.hh,v 1.8 2002/02/12 02:14:03 kurasige Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4VExtDecayer.hh,v 1.3 2001/07/11 10:02:27 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// ------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4Decay.cc,v 1.15 2002/02/12 08:57:20 kurasige Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// --------------------------------------------------------------
@@ -1,4 +1,4 @@
$Id: History,v 1.148 2002/06/15 17:22:23 pia Exp $
$Id: History,v 1.163 2002/12/11 15:57:24 pia Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,9 +17,57 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
10.12-2002 MGP, tag emlowen-V04-01-09
VI G4hLowEnergyIonisation.cc - antiprotons: free electron gas
model replaces constant extension of quantum oscillator model
at low energies (< 25 keV), as for protons
28.11-2002 MGP, tag emlowen-V04-01-08
Update of G4ComptonTest and test/GNUmakefile by A. Pfeiffer
for AIDA3/Anaphe5
18.11-2002 MGP, tag emlowen-V04-01-07
Bug fix in G4BremsstrahlungParameters, to load EEDL correctly
(correction for PRS 430)
08.11-2002 MGP, tag emlowen-V04-01-06
New model for angular distribution in Rayleigh by Gerardo
Depaola and Francesco Longo; corrects PRS problem 406
08.11-2002 MGP, tag emlowen-V04-01-05
VI optimisation of tables in G4LowEnergyIonisation,
G4eLowEnergyLoss, G4hLowEnergyLoss, G4hLowEnergyIonisation
08.10-2002 MGP, tag emlowen-V04-01-04
VI G4hLowEnergyIonisation.cc - clean up fluo flag definition and init
VI G4hIonEffChargeSquare.cc - fix in charge definition
VI G4hShellCrossSection.cc - fix in shell cross section for hadrons
VI G4hLowEnergyLoss.cc - clean up inverse range table build
VI G4VeLowEnergyLoss.cc - clean up inverse range table build
VI G4hLowEnergyIonisation.cc - clean up energy ranges for models
VI G4LowEnergyIonisation.cc - remove ActivateFluorescence from
SetCut.. methods
27.08-2002 CG,VI, tag emlowen-V04-01-03
A. Mantero fix leakage in G4AtomicTransition.cc
30.07-2002 CG,VI, tag emlowen-V04-01-02
VI fix to G4LowEnergyIonisation.cc, for restricted energy loss
30.07-2002 CG,VI, tag emlowen-V04-01-01
CG fix to G4VCrossSectionHandler.cc, to fix compilation problems
on DEC-cxx non-ISO.
VI fix to G4AugerData.cc, to clean warnings on gcc-3.1 and optimise
load of data in memory.
15.06-2002 MGP, tag emlowen-V04-01-00
VI Bug fix in G4eEnergySpectrum
VI Bug fix in G4VCrossSectionHandler, connected modifications in
other handlers
15.06-2002 MGP, tag emlowen-V04-00-17
Bug fix in fluctuations in G4hLowEnergyIonisation
Removed duplicate member function to activate fluorescence
VI Bug fix in fluctuations in G4hLowEnergyIonisation
VI Removed duplicate member function to activate fluorescence
10.06-2002 MGP, tag emlowen-V04-00-16
fStopAndKill moved to fStopAndAlive in G4hLowEnergyIonisation
@@ -41,11 +89,11 @@ committal in the CVS repository !
local energy deposit)
02.06-2002 MGP, tag emlowen-V04-00-11
VNI Fixes in Bremsstrahlung - interpolation above 10 MeV
VNI Change parametrisation of e- ionisation - 24-parameters
VI Fixes in Bremsstrahlung - interpolation above 10 MeV
VI Change parametrisation of e- ionisation - 24-parameters
for each shell are used. Corresponding change is
sampling and integration
VNI Add excitation cross sections and energy
VI Add excitation cross sections and energy
New interpolation algorithm
Goes with new version of G4LEDATA G4EMLOW1.0
@@ -22,7 +22,7 @@
//
//
// $Id: G4AtomicTransitionManager.hh,v 1.2 ????
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
// Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
@@ -22,7 +22,7 @@
//
//
// $Id: G4AtomicShell.hh,v 1.2 ????
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
// Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
@@ -22,7 +22,7 @@
//
//
// $Id: G4AtomicTransition.hh,v 1.2 ????
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4AtomicTransitionManager.hh,v 1.2 ????
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
// Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
@@ -23,7 +23,7 @@
//
//
// $Id: G4AugerData.hh
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4BremsstrahlungParameters.hh,v 1.6 2001/11/29 19:01:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
// V. Ivanchenko (Vladimir.Ivantchenko@cern.ch)
@@ -22,7 +22,7 @@
//
//
// $Id: G4CompositeEMDataSet.hh,v 1.4 2002/05/28 09:15:26 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4CrossSectionHandler.hh,v 1.7 2002/05/28 09:15:26 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4CutsPerMaterialWarning.hh,v 1.1 2001/11/07 22:38:47 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4EMDataSet.hh,v 1.3 2002/05/28 09:15:26 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4FluoTransition.hh,v 1.2 ????
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4LinInterpolation.hh,v 1.2 2002/05/28 09:15:26 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4LogLogInterpolation.hh,v 1.3 2002/05/28 09:15:26 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,8 +22,8 @@
//
//
// -------------------------------------------------------------------
// $Id: G4LowEnergyBremsstrahlung.hh,v 1.28 2001/11/29 22:47:27 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4LowEnergyBremsstrahlung.hh,v 1.30 2002/07/19 17:44:43 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: A. Forti
//
@@ -21,7 +21,7 @@
// ********************************************************************
// $Id: G4LowEnergyCompton.hh,v 1.19 2001/12/13 12:04:13 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: A. Forti
// Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
@@ -22,7 +22,7 @@
//
//
// $Id: G4LowEnergyGammaConversion.hh,v 1.14 2001/10/08 07:45:33 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: A. Forti
// Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
@@ -21,8 +21,8 @@
// ********************************************************************
//
// -------------------------------------------------------------------
// $Id: G4LowEnergyIonisation.hh,v 1.36 2002/06/01 03:14:18 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4LowEnergyIonisation.hh,v 1.38 2002/07/19 17:44:43 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: A. Forti
//
@@ -93,6 +93,8 @@ protected:
G4double previousStepSize,
G4ForceCondition* condition );
protected:
virtual G4std::vector<G4DynamicParticle*>* DeexciteAtom(const G4Material* material,
G4double incidentEnergy,
G4double eLoss);
@@ -22,7 +22,7 @@
//
//
// $Id: G4LowEnergyPhotoElectric.hh,v 1.25 2002/06/01 03:14:18 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: A. Forti
// Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
@@ -22,7 +22,7 @@
//
//
// $Id: G4LowEnergyPolarizedCompton.hh,v 1.8 2002/05/31 18:11:45 flongo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// ------------------------------------------------------------
// GEANT 4 class header file
@@ -22,7 +22,7 @@
//
//
// $Id: G4LowEnergyRayleigh.hh,v 1.15 2001/10/08 07:45:35 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4RangeNoTest.hh,v 1.1 2001/10/08 07:51:41 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4RangeTest.hh,v 1.2 2002/05/28 09:15:26 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4SemiLogInterpolation.hh,v 1.3 2002/05/28 09:15:26 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4ShellData.hh,v 1.2 2002/05/28 09:15:26 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4ShellEMDataSet.hh,v 1.4 2002/05/28 09:15:26 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4VCrossSectionHandler.hh,v 1.11 2002/05/28 09:15:26 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4VDataSetAlgorithm.hh,v 1.6 2002/05/28 09:15:26 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4VEMDataSet.hh,v 1.6 2002/05/28 09:15:26 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4VRangeTest.hh,v 1.1 2001/10/08 07:51:42 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4VeLowEnergyLoss.hh,v 1.7 2001/11/23 11:45:20 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// 3.4.2000 Veronique Lefebure:
// Move utils/include/G4VEnergyLoss.hh to
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: G4eBremsstrahlungSpectrum.hh,v 1.3 2002/05/28 09:15:26 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// -------------------------------------------------------------------
//
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: G4eIonisationCrossSectionHandler.hh,v 1.4 2002/05/28 09:15:26 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// -------------------------------------------------------------------
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4eIonisationParameters.hh,v 1.6 2001/11/29 19:01:45 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
// V. Ivanchenko
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: G4eIonisationSpectrum.hh,v 1.4 2002/05/30 19:52:23 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// -------------------------------------------------------------------
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4eLowEnergyLoss.hh,v 1.8 2002/03/28 11:48:56 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// -------------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4eLowEnergyLoss.icc,v 1.4 2002/03/28 11:48:58 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
@@ -22,7 +22,7 @@
//
//
// $Id: G4hLowEnergyLoss.hh,v 1.13 2001/11/23 11:45:20 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// $Id:
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4hLowEnergyLoss.icc,v 1.2 2001/07/11 10:02:40 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// $Id:
// ---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4AtomicTransitionManager.hh,v 1.2 ????
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
// Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
@@ -22,7 +22,7 @@
//
//
// $Id: G4AtomicShell.cc,v 1.2 ????
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
// Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
@@ -22,7 +22,7 @@
//
//
// $Id: G4AtomicTransition.cc,v 1.2 ????
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4AtomicTransitionManager.cc,v 1.2 ????
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Authors: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
// Alfonso Mantero (Alfonso.Mantero@ge.infn.it)
@@ -29,11 +29,16 @@
// History:
// -----------
// Based on G4FluoData by Elena Guardincerri
//
// Modified: 30.07.02 VI Add select active Z + clean up against pedantic compiler
//
// -------------------------------------------------------------------
#include "G4AugerData.hh"
#include "G4DataVector.hh"
#include "G4Material.hh"
#include "G4Element.hh"
#include "G4ElementVector.hh"
#include "g4std/fstream"
#include "g4std/strstream"
@@ -386,7 +391,7 @@ G4std::vector<G4AugerTransition> G4AugerData::LoadData(G4int Z)
// if this is the first data of the shell, alla the colums are equal
// to the shell Id; so we skip the next colums ang go to the next row
initIds->push_back(a);
initIds->push_back((G4int)a);
file >> a;
file >> a;
file >> a;
@@ -399,11 +404,11 @@ G4std::vector<G4AugerTransition> G4AugerData::LoadData(G4int Z)
if((initIds->size()) == 1) {
initIds->push_back(a);
initIds->push_back((G4int)a);
}
else {
initIds->push_back(a);
initIds->push_back((G4int)a);
G4int augerShellId = *vectorIndex;
@@ -446,14 +451,37 @@ void G4AugerData::BuildAugerTransitionTable()
// trans_Table::iterator pos = augerTransitionTable.begin();
const G4MaterialTable* materialTable = G4Material::GetMaterialTable();
G4int nMaterials = G4Material::GetNumberOfMaterials();
G4DataVector activeZ;
activeZ.clear();
for (G4int m=0; m<nMaterials; m++) {
const G4Material* material= (*materialTable)[m];
const G4ElementVector* elementVector = material->GetElementVector();
const size_t nElements = material->GetNumberOfElements();
for (size_t iEl=0; iEl<nElements; iEl++) {
G4Element* element = (*elementVector)[iEl];
G4double Z = element->GetZ();
if (!(activeZ.contains(Z))) {
activeZ.push_back(Z);
}
}
}
for (G4int element = 6; element < 99; element++)
{
augerTransitionTable.insert(trans_Table::value_type(element,LoadData(element)));
//G4cout << "G4AugerData for Element no. " << element << " are loaded" << G4endl;
if(nMaterials == 0 || activeZ.contains(element)) {
augerTransitionTable.insert(trans_Table::value_type(element,LoadData(element)));
G4cout << "G4AugerData for Element no. " << element << " are loaded" << G4endl;
// PrintData(element);
}
}
G4cout << "AugerTransitionTable complete"<< G4endl;
@@ -145,10 +145,10 @@ G4double G4AugerTransition::AugerTransitionProbability(G4int index, G4int startS
const G4DataVector *probabilities = AugerTransitionProbabilities(startShellId);
G4DataVector::const_iterator pos = probabilities->begin();
G4double* probability = new G4double;
*probability = *(pos+index);
return *probability;
delete probability;
G4double probability; // = new G4double;
probability = *(pos+index);
return probability;
//delete probability;
}
G4int G4AugerTransition::TransitionOriginatingShellId(G4int index) const
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: G4BremsstrahlungCrossSectionHandler.cc,v 1.5 2001/10/25 14:31:20 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// -------------------------------------------------------------------
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4BremsstrahlungParameters.cc,v 1.13 2002/05/30 17:53:07 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4BremsstrahlungParameters.cc,v 1.14 2002/11/18 18:08:25 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
// V.Ivanchenko (Vladimir.Ivantchenko@cern.ch)
@@ -33,6 +33,7 @@
// 12.09.01 V.Ivanchenko Add activeZ and paramA
// 25.09.01 V.Ivanchenko Add parameter C and change interface to B
// 29.11.01 V.Ivanchenko Update parametrisation
// 18.11.02 V.Ivanchenko Fix problem of load
//
// -------------------------------------------------------------------
@@ -166,7 +167,6 @@ void G4BremsstrahlungParameters::LoadData()
data = new G4DataVector();
G4int z = 0;
G4bool used = false;
G4std::vector<G4DataVector*> a;
for (size_t j=0; j<length; j++) {
G4DataVector* aa = new G4DataVector();
@@ -203,17 +203,14 @@ void G4BremsstrahlungParameters::LoadData()
G4VEMDataSet* set = new G4EMDataSet(id,eVector,a[k],inter,1.,1.);
param[id] = set;
}
used = true;
a.clear();
for (size_t j=0; j<length; j++) {
G4DataVector* aa = new G4DataVector();
a.push_back(aa);
}
}
if(!used) {
} else {
for (size_t j=0; j<length; j++) {
a[j]->clear();
used = false;
}
}
e.clear();
@@ -22,7 +22,7 @@
//
//
// $Id: G4CompositeEMDataSet.cc,v 1.6 2002/05/28 09:20:18 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -21,14 +21,15 @@
// ********************************************************************
//
//
// $Id: G4CrossSectionHandler.cc,v 1.13 2002/05/28 09:20:18 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4CrossSectionHandler.cc,v 1.14 2002/07/19 17:32:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
// History:
// -----------
// 1 Aug 2001 MGP Created
// 1 Aug 2001 MGP Created
// 19 Jul 2002 VI Create composite data set for material
//
// -------------------------------------------------------------------
@@ -57,7 +58,7 @@ G4CrossSectionHandler::~G4CrossSectionHandler()
G4std::vector<G4VEMDataSet*>*
G4CrossSectionHandler::BuildCrossSectionsForMaterials(const G4DataVector& energyVector,
const G4DataVector* energyCuts)
const G4DataVector*)
{
G4DataVector* energies;
G4DataVector* data;
@@ -68,22 +69,42 @@ G4CrossSectionHandler::BuildCrossSectionsForMaterials(const G4DataVector& energy
G4int nMaterials = G4Material::GetNumberOfMaterials();
size_t nOfBins = energyVector.size();
const G4VDataSetAlgorithm* interpolationAlgo = CreateInterpolation();
for (G4int m=0; m<nMaterials; m++)
{
const G4Material* material= (*materialTable)[m];
energies = new G4DataVector;
data = new G4DataVector;
const G4VDataSetAlgorithm* interpolationAlgo = CreateInterpolation();
for (size_t bin=0; bin<nOfBins; bin++)
{
G4double e = energyVector[bin];
energies->push_back(e);
G4double materialCrossSection = ValueForMaterial(material,e);
data->push_back(materialCrossSection);
}
G4VEMDataSet* dataSet = new G4EMDataSet(m,energies,data,interpolationAlgo,1.,1.);
matCrossSections->push_back(dataSet);
G4int nElements = material->GetNumberOfElements();
const G4ElementVector* elementVector = material->GetElementVector();
const G4double* nAtomsPerVolume = material->GetAtomicNumDensityVector();
G4VDataSetAlgorithm* algo = interpolationAlgo->Clone();
G4VEMDataSet* setForMat = new G4CompositeEMDataSet(algo,1.,1.);
for (G4int i=0; i<nElements; i++) {
G4int Z = (G4int) (*elementVector)[i]->GetZ();
G4double density = nAtomsPerVolume[i];
energies = new G4DataVector;
data = new G4DataVector;
for (size_t bin=0; bin<nOfBins; bin++)
{
G4double e = energyVector[bin];
energies->push_back(e);
G4double cross = density*FindValue(Z,e);
data->push_back(cross);
}
G4VDataSetAlgorithm* algo1 = interpolationAlgo->Clone();
G4VEMDataSet* elSet = new G4EMDataSet(i,energies,data,algo1,1.,1.);
setForMat->AddComponent(elSet);
}
matCrossSections->push_back(setForMat);
}
return matCrossSections;
}
@@ -22,7 +22,7 @@
//
//
// $Id: G4CutsPerMaterialWarning.cc,v 1.1 2001/11/07 22:39:02 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4EMDataSet.cc,v 1.6 2002/05/28 09:20:19 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4FluoTransition.cc,v 1.2 ????
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Elena Guardincerri (Elena.Guardincerri@ge.infn.it)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4LinInterpolation.cc,v 1.2 2002/05/28 09:20:19 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4LogLogInterpolation.cc,v 1.4 2002/05/28 09:20:19 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4LowEnergyBremsstrahlung.cc,v 1.54 2001/11/29 19:01:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4LowEnergyBremsstrahlung.cc,v 1.55 2002/07/30 18:14:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// --------------------------------------------------------------
//
@@ -50,6 +50,7 @@
// 18.10.2001 MGP Revision to improve code quality
// 28.10.2001 VI Update printout
// 29.11.2001 VI New parametrisation
// 30.07.2002 VI Fix in restricted energy loss
//
// --------------------------------------------------------------
@@ -208,7 +209,6 @@ void G4LowEnergyBremsstrahlung::BuildLossTable(const G4ParticleDefinition& aPart
// the cut cannot be below lowest limit
G4double tCut = G4std::min(highKineticEnergy,
((G4Gamma::Gamma())->GetEnergyThreshold(material)));
// ((G4Gamma::Gamma())->GetCutsInEnergy())[j]);
cutForSecondaryPhotons.push_back(tCut);
const G4ElementVector* theElementVector = material->GetElementVector();
@@ -231,15 +231,13 @@ void G4LowEnergyBremsstrahlung::BuildLossTable(const G4ParticleDefinition& aPart
for (size_t iel=0; iel<NumberOfElements; iel++ ) {
G4int Z = (G4int)((*theElementVector)[iel]->GetZ());
G4double e = energySpectrum->AverageEnergy(Z, 0.0, tCut, lowEdgeEnergy);
G4double pro = energySpectrum->Probability(Z, 0.0, tCut, lowEdgeEnergy);
G4double cs= crossSectionHandler->FindValue(Z, lowEdgeEnergy);
ionloss += e * cs * pro * theAtomicNumDensityVector[iel];
ionloss += e * cs * theAtomicNumDensityVector[iel];
if(verboseLevel > 1) {
G4cout << "Z= " << Z
<< "; tCut(keV)= " << tCut/keV
<< "; E(keV)= " << lowEdgeEnergy/keV
<< "; Eav(keV)= " << e/keV
<< "; pro= " << pro
<< "; cs= " << cs
<< "; loss= " << ionloss
<< G4endl;
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: G4LowEnergyCompton.cc,v 1.33 2001/11/07 20:47:29 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: A. Forti
// Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
@@ -23,7 +23,7 @@
// --------------------------------------------------------------------
///
// $Id: G4LowEnergyGammaConversion.cc,v 1.27 2002/05/31 18:48:43 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// --------------------------------------------------------------
@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4LowEnergyIonisation.cc,v 1.85 2002/06/03 00:07:17 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4LowEnergyIonisation.cc,v 1.90 2002/10/28 09:43:49 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// --------------------------------------------------------------
//
@@ -89,6 +89,9 @@
// 31.05.02 V.Ivanchenko Add path of Fluo + Auger cuts to
// AtomicDeexcitation
// 03.06.02 MGP Restore fStopAndKill
// 19.06.02 VI Additional printout
// 30.07.02 VI Fix in restricted energy loss
// 20.09.02 VI Remove ActivateFlurescence from SetCut...
//
// --------------------------------------------------------------
@@ -208,7 +211,8 @@ void G4LowEnergyIonisation::BuildPhysicsTable(const G4ParticleDefinition& aParti
if(verboseLevel > 0) {
G4cout << "The MeanFreePath table is built"
<< G4endl;
}
if(verboseLevel > 1) theMeanFreePath->PrintData();
}
// Build common DEDX table for all ionisation processes
@@ -217,7 +221,7 @@ void G4LowEnergyIonisation::BuildPhysicsTable(const G4ParticleDefinition& aParti
if (verboseLevel > 0) {
G4cout << "G4LowEnergyIonisation::BuildPhysicsTable end"
<< G4endl;
}
}
}
@@ -270,7 +274,6 @@ void G4LowEnergyIonisation::BuildLossTable(
// the cut cannot be below lowest limit
G4double tCut = G4Electron::Electron()->GetEnergyThreshold(material);
//GetCutsInEnergy())[m];
if(tCut > highKineticEnergy) tCut = highKineticEnergy;
cutForDelta.push_back(tCut);
@@ -301,24 +304,28 @@ void G4LowEnergyIonisation::BuildLossTable(
G4double e = energySpectrum->AverageEnergy(Z, 0.0, tCut,
lowEdgeEnergy, n);
G4double pro = energySpectrum->Probability(Z, 0.0, tCut,
lowEdgeEnergy, n);
G4double cs= crossSectionHandler->FindValue(Z, lowEdgeEnergy, n);
ionloss += e * cs * pro * theAtomicNumDensityVector[iel];
if(verboseLevel > 1) {
ionloss += e * cs * theAtomicNumDensityVector[iel];
if(verboseLevel > 1 || (Z == 14 && lowEdgeEnergy>1. && lowEdgeEnergy<0.)) {
G4cout << "Z= " << Z
<< " shell= " << n
<< " E(keV)= " << lowEdgeEnergy/keV
<< " Eav(keV)= " << e/keV
<< " pro= " << pro
<< " cs= " << cs
<< " loss= " << ionloss
<< " rho= " << theAtomicNumDensityVector[iel]
<< G4endl;
}
}
G4double esp = energySpectrum->Excitation(Z, lowEdgeEnergy);
ionloss += esp * theAtomicNumDensityVector[iel];
}
if(verboseLevel > 1 || (m == 0 && lowEdgeEnergy>=1. && lowEdgeEnergy<=0.)) {
G4cout << "Sum: "
<< " E(keV)= " << lowEdgeEnergy/keV
<< " loss(MeV/mm)= " << ionloss*mm/MeV
<< G4endl;
}
aVector->PutValue(i,ionloss);
}
theLossTable->insert(aVector);
@@ -347,7 +354,7 @@ void G4LowEnergyIonisation::BuildLossTable(
G4double pro = energySpectrum->Probability(Z, 0.0, tCut,
lowEdgeEnergy, n);
G4double cs= crossSectionHandler->FindValue(Z, lowEdgeEnergy, n);
eAverage += e * cs * pro * theAtomicNumDensityVector[iel];
eAverage += e * cs * theAtomicNumDensityVector[iel];
cross += cs * pro * theAtomicNumDensityVector[iel];
if(verboseLevel > 1) {
G4cout << "Z= " << Z
@@ -687,14 +694,12 @@ void G4LowEnergyIonisation::SetCutForLowEnSecPhotons(G4double cut)
{
cutForPhotons = cut;
deexcitationManager.SetCutForSecondaryPhotons(cut);
ActivateFluorescence(true);
}
void G4LowEnergyIonisation::SetCutForLowEnSecElectrons(G4double cut)
{
cutForElectrons = cut;
deexcitationManager.SetCutForAugerElectrons(cut);
ActivateFluorescence(true);
}
void G4LowEnergyIonisation::ActivateAuger(G4bool val)
@@ -22,7 +22,7 @@
//
//
// $Id: G4LowEnergyPhotoElectric.cc,v 1.48 2002/06/14 17:39:09 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: A. Forti
// Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
@@ -22,7 +22,7 @@
//
//
// $Id: G4LowEnergyPolarizedCompton.cc,v 1.13 2002/06/02 21:27:52 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -22,8 +22,8 @@
//
// --------------------------------------------------------------------
//
// $Id: G4LowEnergyRayleigh.cc,v 1.29 2002/06/07 10:25:02 flongo Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4LowEnergyRayleigh.cc,v 1.30 2002/11/08 07:59:05 flongo Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: A. Forti
// Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
@@ -39,6 +39,7 @@
// 11.08.2001 MGP - Major revision according to a design iteration
// 06.10.2001 MGP - Added strategy to test range for secondary generation
// 05.06.2002 F.Longo and G.Depaola - bug fixed in angular distribution
// 20.10.2002 G. Depaola - Change sampling method of theta
//
// --------------------------------------------------------------------
@@ -117,15 +118,6 @@ void G4LowEnergyRayleigh::BuildPhysicsTable(const G4ParticleDefinition& photon)
G4VParticleChange* G4LowEnergyRayleigh::PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep)
{
// The scattered gamma energy is sampled according to Form Factors
// multiplied by the Rayleigh distribution with a pure rejection technique.
// EGS4 W.R. Nelson et al. The EGS4 Code System. SLAC-Report-265 , December 1985
// Expression of the angular distribution as Rayleigh distribution and
// Form factors is taken from D. E. Cullen "A simple model of photon transport"
// NIM B Phys. 101 (1995). Method of sampling with form factors is different.
// Reference to the article is from J. Stepanek New Photon, Positron
// and Electron Interaction Data for GEANT in Energy Range from 1 eV to 10 TeV
// (draft).
aParticleChange.Initialize(aTrack);
@@ -147,30 +139,36 @@ G4VParticleChange* G4LowEnergyRayleigh::PostStepDoIt(const G4Track& aTrack,
G4Material* material = aTrack.GetMaterial();
G4int Z = crossSectionHandler->SelectRandomAtom(material,photonEnergy0);
// Sample the energy of the scattered photon
// Sample the angle of the scattered photon
G4double wlPhoton = h_Planck*c_light/photonEnergy0;
G4double gReject;
G4double gReject,x,dataFormFactor;
G4double randomFormFactor;
G4double cosTheta;
G4double sinTheta;
G4double fcostheta;
do
{
G4double thetaHalf = G4UniformRand() * pi / 2.;
G4double sinThetaHalf = sin(thetaHalf);
G4double x = sinThetaHalf / (wlPhoton/cm);
G4double dataFormFactor = formFactorData->FindValue(x,Z-1);
do
{
cosTheta = 2. * G4UniformRand() - 1.;
fcostheta = ( 1. + cosTheta*cosTheta)/2.;
} while (fcostheta < G4UniformRand());
G4double sinThetaHalf = sqrt((1. - cosTheta) / 2.);
x = sinThetaHalf / (wlPhoton/cm);
if (x > 1.e+005)
dataFormFactor = formFactorData->FindValue(x,Z-1);
else
dataFormFactor = formFactorData->FindValue(0.,Z-1);
randomFormFactor = G4UniformRand() * Z * Z;
G4double theta = thetaHalf*2;
cosTheta = cos(theta);
sinTheta = sin(theta);
G4double sqrRayl = sqrt(27./32.)*(1 + cosTheta * cosTheta)*sinTheta;
gReject = sqrRayl * dataFormFactor * dataFormFactor;
sinTheta = sqrt(1. - cosTheta*cosTheta);
gReject = dataFormFactor * dataFormFactor;
} while( gReject < randomFormFactor);
// Scattered photon angles. ( Z - axis along the parent photon)
G4double phi = twopi * G4UniformRand() ;
G4double dirX = sinTheta*cos(phi);
@@ -22,7 +22,7 @@
//
//
// $Id: G4RangeTest.cc,v 1.5 2002/05/28 09:20:21 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4SemiLogInterpolation.cc,v 1.4 2002/05/28 09:20:21 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4ShellData.cc,v 1.5 2002/05/28 09:20:21 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4ShellEMDataSet.cc,v 1.8 2002/05/28 09:20:21 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -21,16 +21,17 @@
// ********************************************************************
//
//
// $Id: G4VCrossSectionHandler.cc,v 1.9 2002/05/28 09:20:21 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4VCrossSectionHandler.cc,v 1.11 2002/07/30 10:06:21 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
// History:
// -----------
// 1 Aug 2001 MGP Created
// 09.10.01 V.Ivanchenko Add FindValue with 3 parameters
// + NumberOfComponents
// 1 Aug 2001 MGP Created
// 09 Oct 2001 VI Add FindValue with 3 parameters
// + NumberOfComponents
// 19 Jul 2002 VI Create composite data set for material
//
// -------------------------------------------------------------------
@@ -453,15 +454,19 @@ G4VEMDataSet* G4VCrossSectionHandler::BuildMeanFreePathForMaterials(const G4Data
for (size_t m=0; m<nMaterials; m++)
{
energies = new G4DataVector;
energies = new G4DataVector;
data = new G4DataVector;
for (G4int bin=0; bin<nBins; bin++)
{
G4double energy = energyVector[bin];
energies->push_back(energy);
G4VEMDataSet* matCrossSet = (*crossSections)[m];
G4double materialCrossSection = matCrossSet->FindValue(energy);
G4double materialCrossSection = 0.0;
G4int nElm = matCrossSet->NumberOfComponents();
for(G4int j=0; j<nElm; j++) {
materialCrossSection += matCrossSet->GetComponent(j)->FindValue(energy);
}
if (materialCrossSection > 0.)
{
data->push_back(1./materialCrossSection);
@@ -474,7 +479,7 @@ G4VEMDataSet* G4VCrossSectionHandler::BuildMeanFreePathForMaterials(const G4Data
G4VDataSetAlgorithm* algo = CreateInterpolation();
G4VEMDataSet* dataSet = new G4EMDataSet(m,energies,data,algo,1.,1.);
materialSet->AddComponent(dataSet);
}
}
return materialSet;
}
@@ -485,33 +490,35 @@ G4int G4VCrossSectionHandler::SelectRandomAtom(const G4Material* material, G4dou
// determined by the cross sections in the data set
G4int nElements = material->GetNumberOfElements();
const G4ElementVector* elementVector = material->GetElementVector();
// Special case: the material consists of one element
if (nElements == 1)
{
G4int Z = (G4int) (*elementVector)[0]->GetZ();
G4int Z = (G4int) material->GetZ();
return Z;
}
// Composite material
G4double materialCrossSection0 = ValueForMaterial(material,e);
// size_t materialIndex = material->GetIndex();
const G4ElementVector* elementVector = material->GetElementVector();
size_t materialIndex = material->GetIndex();
// G4VEMDataSet* materialSet = crossSections[materialIndex];
// G4double materialCrossSection = materialSet->FindValue(e);
G4VEMDataSet* materialSet = (*crossSections)[materialIndex];
G4double materialCrossSection0 = 0.0;
G4DataVector cross;
cross.clear();
for ( G4int i=0; i < nElements; i++ )
{
G4double cr = materialSet->GetComponent(i)->FindValue(e);
materialCrossSection0 += cr;
cross.push_back(materialCrossSection0);
}
G4double random = G4UniformRand() * materialCrossSection0;
const G4double* nAtomsPerVolume = material->GetVecNbOfAtomsPerVolume();
G4double partialSumSigma = 0.;
for ( G4int i=0 ; i < nElements ; i++ )
for (G4int k=0 ; k < nElements ; k++ )
{
G4int Z = (G4int) (*elementVector)[i]->GetZ();
G4double crossSection = FindValue(Z,e);
partialSumSigma += nAtomsPerVolume[i] * crossSection;
if (random <= partialSumSigma) return Z;
if (random <= cross[k]) return (G4int) (*elementVector)[k]->GetZ();
}
// It should never get here
return 0;
@@ -536,27 +543,30 @@ const G4Element* G4VCrossSectionHandler::SelectRandomElement(const G4Material* m
else
{
// Composite material
G4double materialCrossSection0 = ValueForMaterial(material,e);
// size_t materialIndex = material->GetIndex();
// G4VEMDataSet* materialSet = crossSections[materialIndex];
// G4double materialCrossSection = materialSet->FindValue(e);
size_t materialIndex = material->GetIndex();
G4VEMDataSet* materialSet = (*crossSections)[materialIndex];
G4double materialCrossSection0 = 0.0;
G4DataVector cross;
cross.clear();
for (G4int i=0; i<nElements; i++)
{
G4double cr = materialSet->GetComponent(i)->FindValue(e);
materialCrossSection0 += cr;
cross.push_back(materialCrossSection0);
}
G4double random = G4UniformRand() * materialCrossSection0;
const G4double* nAtomsPerVolume = material->GetVecNbOfAtomsPerVolume();
G4double partialSumSigma = 0.;
for ( G4int i=0 ; i < nElements ; i++ )
{
G4Element* element = (*elementVector)[i];
G4int Z = (G4int) element->GetZ();
G4double crossSection = FindValue(Z,e);
partialSumSigma += nAtomsPerVolume[i] * crossSection;
if (random <= partialSumSigma) return element;
}
}
for (G4int k=0 ; k < nElements ; k++ )
{
if (random <= cross[k]) return (*elementVector)[k];
}
// It should never end up here
G4cout << "G4VCrossSectionHandler::SelectRandomElement - no element found" << G4endl;
return nullElement;
}
}
G4int G4VCrossSectionHandler::SelectRandomShell(G4int Z, G4double e) const
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VeLowEnergyLoss.cc,v 1.17 2001/11/23 11:45:29 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4VeLowEnergyLoss.cc,v 1.18 2002/09/09 08:54:08 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// --------------------------------------------------------------
@@ -503,16 +503,15 @@ G4double G4VeLowEnergyLoss::ProperTimeIntLog(G4PhysicsVector* physicsVector,
//
G4PhysicsTable* G4VeLowEnergyLoss::BuildInverseRangeTable(G4PhysicsTable* theRangeTable,
G4PhysicsTable* theRangeCoeffATable,
G4PhysicsTable* theRangeCoeffBTable,
G4PhysicsTable* theRangeCoeffCTable,
G4PhysicsTable*,
G4PhysicsTable*,
G4PhysicsTable*,
G4PhysicsTable* theInverseRangeTable,
G4double lowestKineticEnergy,
G4double highestKineticEnergy,G4int TotBin)
G4double highestKineticEnergy,G4int nbins)
// Build inverse table of the range table
{
G4double SmallestRange,BiggestRange ;
G4bool isOut ;
G4bool b;
G4int numOfMaterials = G4Material::GetNumberOfMaterials();
@@ -522,23 +521,49 @@ G4PhysicsTable* G4VeLowEnergyLoss::BuildInverseRangeTable(G4PhysicsTable* theRan
theInverseRangeTable = new G4PhysicsTable(numOfMaterials);
// loop for materials
for (G4int J=0; J<numOfMaterials; J++)
for (G4int i=0; i<numOfMaterials; i++)
{
SmallestRange = (*theRangeTable)(J)->
GetValue(lowestKineticEnergy,isOut) ;
BiggestRange = (*theRangeTable)(J)->
GetValue(highestKineticEnergy,isOut) ;
G4PhysicsLogVector* aVector;
aVector = new G4PhysicsLogVector(SmallestRange,
BiggestRange,TotBin);
InvertRangeVector(theRangeTable,
theRangeCoeffATable,
theRangeCoeffBTable,
theRangeCoeffCTable,
lowestKineticEnergy,highestKineticEnergy,TotBin,J, aVector);
G4PhysicsVector* pv = (*theRangeTable)[i];
size_t nbins = pv->GetVectorLength();
G4double elow = pv->GetLowEdgeEnergy(0);
G4double ehigh = pv->GetLowEdgeEnergy(nbins-1);
G4double rlow = pv->GetValue(elow, b);
G4double rhigh = pv->GetValue(ehigh, b);
rhigh *= exp(log(rhigh/rlow)/((G4double)(nbins-1)));
G4PhysicsLogVector* v = new G4PhysicsLogVector(rlow, rhigh, nbins);
v->PutValue(0,elow);
G4double energy1 = elow;
G4double range1 = rlow;
G4double energy2 = elow;
G4double range2 = rlow;
size_t ilow = 0;
size_t ihigh;
for (size_t j=1; j<nbins; j++) {
G4double range = v->GetLowEdgeEnergy(j);
for (ihigh=ilow+1; ihigh<nbins; ihigh++) {
energy2 = pv->GetLowEdgeEnergy(ihigh);
range2 = pv->GetValue(energy2, b);
if(range2 >= range || ihigh == nbins-1) {
ilow = ihigh - 1;
energy1 = pv->GetLowEdgeEnergy(ilow);
range1 = pv->GetValue(energy1, b);
break;
}
}
G4double e = log(energy1) + log(energy2/energy1)*log(range/range1)/log(range2/range1);
v->PutValue(j,exp(e));
}
theInverseRangeTable->insert(v);
theInverseRangeTable->insert(aVector);
}
return theInverseRangeTable ;
}
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: G4eBremsstrahlungSpectrum.cc,v 1.7 2002/05/30 17:53:09 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// -------------------------------------------------------------------
//
@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4eIonisationCrossSectionHandler.cc,v 1.7 2002/05/30 17:53:09 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4eIonisationCrossSectionHandler.cc,v 1.8 2002/07/19 17:32:50 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// -------------------------------------------------------------------
//
@@ -35,7 +35,8 @@
// Creation date: 25 Sept 2001
//
// Modifications:
// 10 Oct 2001 M.G. Pia Revision to improve code quality and consistency with design
// 10 Oct 2001 M.G. Pia Revision to improve code quality and consistency with design
// 19 Jul 2002 VI Create composite data set for material
//
// -------------------------------------------------------------------
@@ -73,7 +74,7 @@ G4std::vector<G4VEMDataSet*>* G4eIonisationCrossSectionHandler::BuildCrossSectio
const G4DataVector& energyVector,
const G4DataVector* energyCuts)
{
G4int verbose = 0;
G4std::vector<G4VEMDataSet*>* set = new G4std::vector<G4VEMDataSet*>;
G4DataVector* energies;
@@ -94,6 +95,12 @@ G4std::vector<G4VEMDataSet*>* G4eIonisationCrossSectionHandler::BuildCrossSectio
const G4double* nAtomsPerVolume = material->GetAtomicNumDensityVector();
G4int nElements = material->GetNumberOfElements();
if(verbose > 0) {
G4cout << "eIonisation CS for " << m << "th material "
<< material->GetName()
<< " eEl= " << nElements << G4endl;
}
G4double tcut = (*energyCuts)[m];
G4VDataSetAlgorithm* algo = interp->Clone();
@@ -118,14 +125,19 @@ G4std::vector<G4VEMDataSet*>* G4eIonisationCrossSectionHandler::BuildCrossSectio
G4double cross = FindValue(Z, e, n);
G4double p = theParam->Probability(Z, tcut, e, e, n);
value += cross * p * density;
/*
G4cout << "G4eIonisationCrossSectionHandler: e= " << e
<< " n= " << n
<< " cross= " << cross
<< " p= " << p
<< " value= " << value
<< G4endl;
*/
if(verbose>0 && m == 0 && e>=1. && e<=0.) {
G4cout << "G4eIonCrossSH: e(MeV)= " << e/MeV
<< " n= " << n
<< " cross= " << cross
<< " p= " << p
<< " value= " << value
<< " tcut(MeV)= " << tcut/MeV
<< " rho= " << density
<< " Z= " << Z
<< G4endl;
}
}
}
cs->push_back(value);
@@ -139,3 +151,5 @@ G4std::vector<G4VEMDataSet*>* G4eIonisationCrossSectionHandler::BuildCrossSectio
return set;
}
@@ -22,7 +22,7 @@
//
//
// $Id: G4eIonisationParameters.cc,v 1.19 2002/05/30 17:53:09 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
//
@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4eIonisationSpectrum.cc,v 1.19 2002/06/03 17:52:12 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4eIonisationSpectrum.cc,v 1.20 2002/07/19 17:32:50 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// -------------------------------------------------------------------
//
@@ -41,6 +41,7 @@
// 29.11.2001 VI New parametrisation
// 19.04.2002 VI Add protection in case of energy below binding
// 30.05.2002 VI Update to 24-parameters data
// 11.07.2002 VI Fix in integration over spectrum
//
// -------------------------------------------------------------------
//
@@ -94,13 +95,15 @@ G4double G4eIonisationSpectrum::Probability(G4int Z,
G4double x1 = G4std::min(0.5,(t0 + bindingEnergy)/energy);
G4double x2 = G4std::min(0.5,(tm + bindingEnergy)/energy);
if(verbose > 1) {
if(verbose > 1 || (Z==4 && e>= 1.0 && e<= 0.0)) {
G4cout << "G4eIonisationSpectrum::Probability: Z= " << Z
<< "; shell= " << shell
<< "; E(keV)= " << e/keV
<< "; Eb(keV)= " << bindingEnergy/keV
<< "; x1= " << x1
<< "; x2= " << x2
<< G4endl;
}
G4DataVector p;
@@ -119,12 +122,15 @@ G4double G4eIonisationSpectrum::Probability(G4int Z,
p.push_back((2.0*g - 1.0)/(g*g));
p[iMax-1] = Function(p[3], p);
if(e >= 1. && e <= 0. && Z == 4) p.push_back(0.0);
G4double val = IntSpectrum(x1, x2, p);
G4double x0 = (lowestE + bindingEnergy)/energy;
G4double nor = IntSpectrum(x0, 0.5, p);
if(verbose > 1) {
if(verbose > 1 || (Z==4 && e>= 1.0 && e<= 0.0)) {
G4cout << "tcut= " << tMin
<< "; tMax= " << tMax
<< "; x0= " << x0
@@ -137,13 +143,13 @@ G4double G4eIonisationSpectrum::Probability(G4int Z,
<< "; b= " << p[2]
<< "; c= " << p[3]
<< G4endl;
if(shell == 1) G4cout << "============" << G4endl;
}
p.clear();
if(nor > 0.0) val /= nor;
else val = 0.0;
// if(val < 0.0) val = 0.0;
return val;
}
@@ -226,7 +232,6 @@ G4double G4eIonisationSpectrum::AverageEnergy(G4int Z,
if(nor > 0.0) val /= nor;
else val = 0.0;
// if(val < 0.0) val = 0.0;
return val;
}
@@ -298,14 +303,14 @@ G4double G4eIonisationSpectrum::SampleEnergy(G4int Z,
if(aria <= aria1) {
amaj = p[4];
for (size_t j=5; j<24; j++) {
for (G4int j=5; j<iMax; j++) {
if(p[j] > amaj) amaj = p[j];
}
a1 = 1./a1;
a2 = 1./a2;
size_t i;
G4int i;
do {
x = 1./(a2 + G4UniformRand()*(a1 - a2));
@@ -313,17 +318,17 @@ G4double G4eIonisationSpectrum::SampleEnergy(G4int Z,
z2 = p[3];
dx = (p[2] - p[1]) / 3.0;
dx1= exp(log(p[3]/p[2]) / 16.0);
for (i=5; i<23; i++) {
for (i=4; i<iMax-1; i++) {
if (i <= 8) {
if (i < 7) {
z2 = z1 + dx;
} else if(22 == i) {
} else if(iMax-2 == i) {
z2 = p[3];
break;
} else {
z2 = z1*dx1;
}
if(x <= z2) break;
if(x >= z1 && x <= z2) break;
z1 = z2;
}
fun = p[i] + (x - z1) * (p[i+1] - p[i])/(z2 - z1);
@@ -398,7 +403,7 @@ G4double G4eIonisationSpectrum::IntSpectrum(G4double xMin,
G4double sum = 0.0;
if(xMin >= xMax) return sum;
G4double x1, x2, xs1, xs2, y1, y2, ys1, ys2;
G4double x1, x2, xs1, xs2, y1, y2, ys1, ys2, q;
// Integral over interpolation aria
if(xMin < p[3]) {
@@ -411,39 +416,45 @@ G4double G4eIonisationSpectrum::IntSpectrum(G4double xMin,
for (size_t i=0; i<19; i++) {
if (i <= 3) {
q = 0.0;
if (i < 3) {
x2 = x1 + dx;
} else if(18 == i) {
x2 = p[3];
} else {
x2 = x1*dx1;
}
y2 = p[5 + i];
if (xMin >= x2 || xMax <= x1) {
continue;
} else {
if (xMax <= x1) {
break;
} else if (xMin < x2) {
xs1 = x1;
xs2 = x2;
ys1 = y1;
ys2 = y2;
if (xMin > x1) {
xs1 = xMin;
ys1 += (xs1 - x1)*(y2 - y1)/(x2 - x1);
}
if (xMax < x2) {
xs2 = xMax;
ys2 += (xs2 - x2)*(y1 - y2)/(x1 - x2);
}
if (xs2 > xs1) {
sum += (ys1*xs2 - ys2*xs1)/(xs1*xs2)
if (x2 > x1) {
if (xMin > x1) {
xs1 = xMin;
ys1 += (xs1 - x1)*(y2 - y1)/(x2 - x1);
}
if (xMax < x2) {
xs2 = xMax;
ys2 += (xs2 - x2)*(y1 - y2)/(x1 - x2);
}
if (xs2 > xs1) {
q = (ys1*xs2 - ys2*xs1)/(xs1*xs2)
+ log(xs2/xs1)*(ys2 - ys1)/(xs2 - xs1);
sum += q;
if(p.size() == 26) G4cout << "i= " << i << " q= " << q << " sum= " << sum << G4endl;
}
}
}
x1 = x2;
y1 = y2;
}
}
@@ -455,14 +466,15 @@ G4double G4eIonisationSpectrum::IntSpectrum(G4double xMin,
xs1 = 1./x1;
xs2 = 1./x2;
sum += (xs1 - xs2)*(1.0 - p[0])
q = (xs1 - xs2)*(1.0 - p[0])
- p[iMax]*log(x2/x1)
+ (1. - p[iMax])*(x2 - x1)
+ 1./(1. - x2) - 1./(1. - x1)
+ p[iMax]*log((1. - x2)/(1. - x1))
+ 0.25*p[0]*(xs1*xs1 - xs2*xs2);
sum += q;
if(p.size() == 26) G4cout << "param... q= " << q << " sum= " << sum << G4endl;
// if(sum < 0.0) sum = 0.0;
return sum;
}
@@ -487,34 +499,38 @@ G4double G4eIonisationSpectrum::AverageValue(G4double xMin,
for (size_t i=0; i<19; i++) {
if (i <= 3) {
if (i < 3) {
x2 = x1 + dx;
} else if(18 == i) {
x2 = p[3];
} else {
x2 = x1*dx1;
}
y2 = p[5 + i];
if (xMin >= x2 || xMax <= x1) {
continue;
} else {
if (xMax <= x1) {
break;
} else if (xMin < x2) {
xs1 = x1;
xs2 = x2;
ys1 = y1;
ys2 = y2;
if (xMin > x1) {
xs1 = xMin;
ys1 += (xs1 - x1)*(y2 - y1)/(x2 - x1);
}
if (xMax < x2) {
xs2 = xMax;
ys2 += (xs2 - x2)*(y1 - y2)/(x1 - x2);
}
if (xs2 > xs1) {
sum += log(xs2/xs1)*(ys1*xs2 - ys2*xs1)/(xs2 - xs1)
+ ys2 - ys1;
if (x2 > x1) {
if (xMin > x1) {
xs1 = xMin;
ys1 += (xs1 - x1)*(y2 - y1)/(x2 - x1);
}
if (xMax < x2) {
xs2 = xMax;
ys2 += (xs2 - x2)*(y1 - y2)/(x1 - x2);
}
if (xs2 > xs1) {
sum += log(xs2/xs1)*(ys1*xs2 - ys2*xs1)/(xs2 - xs1)
+ ys2 - ys1;
}
}
}
x1 = x2;
@@ -538,7 +554,6 @@ G4double G4eIonisationSpectrum::AverageValue(G4double xMin,
+ (1. + p[iMax])*log((1. - x2)/(1. - x1))
+ 0.5*p[0]*(xs1 - xs2);
// if(sum < 0.0) sum = 0.0;
return sum;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4eLowEnergyLoss.cc,v 1.28 2002/06/03 00:07:18 pia Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4eLowEnergyLoss.cc,v 1.29 2002/10/28 09:43:51 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// -----------------------------------------------------------
// GEANT 4 class implementation file
@@ -56,6 +56,7 @@
// 23/11/01 VI Move static member-functions from header to source
// 28/05/02 VI Remove flag fStopAndKill
// 03/06/02 MGP - Restore fStopAndKill
// 28/10/02 VI Optimal binning for dE/dx
//
// --------------------------------------------------------------
@@ -103,9 +104,9 @@ G4PhysicsTable* G4eLowEnergyLoss::thepRangeCoeffATable = 0;
G4PhysicsTable* G4eLowEnergyLoss::thepRangeCoeffBTable = 0;
G4PhysicsTable* G4eLowEnergyLoss::thepRangeCoeffCTable = 0;
G4double G4eLowEnergyLoss::LowerBoundEloss = 250.*eV ;
G4double G4eLowEnergyLoss::LowerBoundEloss = 10.*eV ;
G4double G4eLowEnergyLoss::UpperBoundEloss = 100.*GeV ;
G4int G4eLowEnergyLoss::NbinEloss = 1000 ;
G4int G4eLowEnergyLoss::NbinEloss = 360 ;
G4double G4eLowEnergyLoss::RTable ;
G4double G4eLowEnergyLoss::LOGRTable ;
@@ -120,9 +121,9 @@ G4eLowEnergyLoss::G4eLowEnergyLoss(const G4String& processName)
: G4VeLowEnergyLoss (processName),
theLossTable(0),
MinKineticEnergy(1.*eV),
Charge(-1.),lastCharge(0.),
Charge(-1.),
lastCharge(0.),
theDEDXTable(0),
//linLossLimit(0.02)
CounterOfProcess(0),
RecorderOfProcess(0),
fdEdx(0),
@@ -363,6 +364,11 @@ void G4eLowEnergyLoss::BuildDEDXTable(
LowerBoundEloss,UpperBoundEloss,NbinEloss);
}
if(verboseLevel > 1) {
G4cout << (*theDEDXElectronTable) << G4endl;
}
// make the energy loss and the range table available
G4EnergyLossTables::Register(&aParticleType,
(&aParticleType==G4Electron::Electron())?
@@ -56,6 +56,8 @@
G4hBetheBlochModel::G4hBetheBlochModel(const G4String& name)
: G4VLowEnergyModel(name),
lowEnergyLimit(1.*MeV),
highEnergyLimit(100.*GeV),
twoln10(2.*log(10.)),
bg2lim(0.0169),
taulim(8.4146e-3)
@@ -35,6 +35,8 @@
// Modifications:
// 20/07/2000 V.Ivanchenko First implementation
// 18/06/2001 V.Ivanchenko Continuation for eff.charge (small change of y)
// 08/10/2002 V.Ivanchenko The charge of the nucleus is used not charge of
// DynamicParticle
//
// Class Description:
//
@@ -73,7 +75,7 @@ G4double G4hIonEffChargeSquare::TheValue(const G4DynamicParticle* particle,
{
G4double energy = particle->GetKineticEnergy() ;
G4double particleMass = particle->GetMass() ;
G4double charge = (particle->GetCharge())/eplus ;
G4double charge = (particle->GetDefinition()->GetPDGCharge())/eplus ;
G4double q = IonEffChargeSquare(material,energy,particleMass,charge) ;
@@ -80,6 +80,10 @@
// 10 Jun 2002 V.Ivanchenko Restore fStopButAlive
// 12 Jun 2002 V.Ivanchenko Fix in fluctuations - if tmax<2*Ipot Gaussian
// fluctuations enables
// 20 Sept 2002 V.Ivanchenko Clean up energy ranges for models
// 07 Oct 2002 V.Ivanchenko Clean up initialisation of fluorescence
// 28 Oct 2002 V.Ivanchenko Optimal binning for dE/dx
// 10 Dec 2002 V.Ivanchenko antiProtonLowEnergy -> 25 keV, QEG model below
// -----------------------------------------------------------------------
@@ -138,12 +142,12 @@ G4hLowEnergyIonisation::G4hLowEnergyIonisation(const G4String& processName)
void G4hLowEnergyIonisation::InitializeMe()
{
LowestKineticEnergy = 10.0*eV ;
HighestKineticEnergy = 100.0*TeV ;
HighestKineticEnergy = 100.0*GeV ;
MinKineticEnergy = 10.0*eV ;
TotBin = 200 ;
TotBin = 360 ;
protonLowEnergy = 1.*keV ;
protonHighEnergy = 2.*MeV ;
antiProtonLowEnergy = 1.*keV ;
antiProtonLowEnergy = 25.*keV ;
antiProtonHighEnergy = 2.*MeV ;
minGammaEnergy = 25.*keV;
minElectronEnergy = 25.*keV;
@@ -197,9 +201,6 @@ void G4hLowEnergyIonisation::SetElectronicStoppingPowerModel(
void G4hLowEnergyIonisation::InitializeParametrisation()
{
G4Proton* theProton = G4Proton::Proton();
G4AntiProton* theAntiProton = G4AntiProton::AntiProton();
// Define models for parametrisation of electronic energy losses
theBetheBlochModel = new G4hBetheBlochModel("Bethe-Bloch") ;
theProtonModel = new G4hParametrisedLossModel(theProtonTable) ;
@@ -208,22 +209,6 @@ void G4hLowEnergyIonisation::InitializeParametrisation()
theIonEffChargeModel = new G4hIonEffChargeSquare("Ziegler1988") ;
theIonChuFluctuationModel = new G4IonChuFluctuationModel("Chu") ;
theIonYangFluctuationModel = new G4IonYangFluctuationModel("Yang") ;
// Energy limits for parametrisation of electronic energy losses
protonLowEnergy = G4std::max(protonLowEnergy,
theProtonModel->LowEnergyLimit(theProton)) ;
G4double x1 = theBetheBlochModel->LowEnergyLimit(theProton) ;
G4double x2 = theProtonModel->HighEnergyLimit(theProton) ;
if(protonHighEnergy < x1) protonHighEnergy = x1 ;
if(protonHighEnergy > x2) protonHighEnergy = x2 ;
antiProtonLowEnergy = G4std::max(antiProtonLowEnergy,
theAntiProtonModel->LowEnergyLimit(theAntiProton)) ;
x2 = theAntiProtonModel->HighEnergyLimit(theAntiProton) ;
if(antiProtonHighEnergy < x1) antiProtonHighEnergy = x1 ;
if(antiProtonHighEnergy > x2) antiProtonHighEnergy = x2 ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -349,6 +334,9 @@ void G4hLowEnergyIonisation::BuildPhysicsTable(
BuildLambdaTable(aParticleType) ;
BuildDataForFluorescence(aParticleType);
if(verboseLevel > 1) {
G4cout << (*theMeanFreePathTable) << G4endl;
}
if(verboseLevel > 0) {
G4cout << "G4hLowEnergyIonisation::BuildPhysicsTable: "
@@ -356,6 +344,9 @@ void G4hLowEnergyIonisation::BuildPhysicsTable(
}
BuildDEDXTable(aParticleType) ;
if(verboseLevel > 1) {
G4cout << (*theDEDXpTable) << G4endl;
}
if((&aParticleType == theProton) ) PrintInfoDefinition() ;
@@ -410,25 +401,15 @@ void G4hLowEnergyIonisation::BuildLossTable(
// get material parameters needed for the energy loss calculation
const G4Material* material= (*theMaterialTable)[j];
// low energy of Bethe-Bloch formula for this material
G4double highE = G4std::max(highEnergy,theBetheBlochModel->
LowEnergyLimit(&aParticleType,material)) ;
if ( charge > 0.0 ) {
ionloss = ProtonParametrisedDEDX(material,highE) ;
ionloss = ProtonParametrisedDEDX(material,highEnergy) ;
} else {
ionloss = AntiProtonParametrisedDEDX(material,highE) ;
ionloss = AntiProtonParametrisedDEDX(material,highEnergy) ;
}
ionlossBB = theBetheBlochModel->TheValue(&aParticleType,material,highE) ;
ionlossBB -= DeltaRaysEnergy(material,highE,proton_mass_c2) ;
ionlossBB = theBetheBlochModel->TheValue(&aParticleType,material,highEnergy) ;
ionlossBB -= DeltaRaysEnergy(material,highEnergy,proton_mass_c2) ;
/*
if(theBarkas) {
ionlossBB += BarkasTerm(material,highE)*charge ;
ionlossBB += BlochTerm(material,highE,1.0) ;
}
*/
paramB = ionloss/ionlossBB - 1.0 ;
@@ -437,7 +418,7 @@ void G4hLowEnergyIonisation::BuildLossTable(
lowEdgeEnergy = aVector->GetLowEdgeEnergy(i) ;
// low energy part for this material, parametrised energy loss formulae
if ( lowEdgeEnergy < highE ) {
if ( lowEdgeEnergy < highEnergy ) {
if ( charge > 0.0 ) {
ionloss = ProtonParametrisedDEDX(material,lowEdgeEnergy) ;
@@ -453,12 +434,6 @@ void G4hLowEnergyIonisation::BuildLossTable(
ionloss -= DeltaRaysEnergy(material,lowEdgeEnergy,proton_mass_c2) ;
/*
if(theBarkas) {
ionloss += BarkasTerm(material,lowEdgeEnergy)*charge ;
ionloss += BlochTerm(material,lowEdgeEnergy,1.0) ;
}
*/
ionloss *= (1.0 + paramB*highEnergy/lowEdgeEnergy) ;
}
@@ -488,6 +463,9 @@ void G4hLowEnergyIonisation::BuildDataForFluorescence(
// fill data for fluorescence
deexcitationManager.SetCutForSecondaryPhotons(minGammaEnergy);
deexcitationManager.SetCutForAugerElectrons(minElectronEnergy);
G4double mass = aParticleType.GetPDGMass();
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
@@ -1061,8 +1039,8 @@ G4double G4hLowEnergyIonisation::AntiProtonParametrisedDEDX(
// Antiproton model is used
if(theAntiProtonModel->IsInCharge(theAntiProton,material)) {
if(kineticEnergy < antiProtonLowEnergy) {
eloss = theAntiProtonModel->TheValue(theAntiProton,material,
antiProtonLowEnergy);
eloss = theAntiProtonModel->TheValue(theAntiProton,material,antiProtonLowEnergy)
* sqrt(kineticEnergy/antiProtonLowEnergy) ;
// Parametrisation
} else {
@@ -1072,9 +1050,8 @@ G4double G4hLowEnergyIonisation::AntiProtonParametrisedDEDX(
// The proton model is used + Barkas correction
} else {
if(kineticEnergy < antiProtonLowEnergy) {
eloss = theProtonModel->TheValue(G4Proton::Proton(),material,
antiProtonLowEnergy);
if(kineticEnergy < protonLowEnergy) {
eloss = theProtonModel->TheValue(G4Proton::Proton(),material,protonLowEnergy);
// Parametrisation
} else {
@@ -1942,8 +1919,6 @@ G4double G4hLowEnergyIonisation::ElectronicLossFluctuation(
void G4hLowEnergyIonisation::SetCutForSecondaryPhotons(G4double cut)
{
minGammaEnergy = cut;
deexcitationManager.SetCutForSecondaryPhotons(cut);
theFluo = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -1951,8 +1926,6 @@ void G4hLowEnergyIonisation::SetCutForSecondaryPhotons(G4double cut)
void G4hLowEnergyIonisation::SetCutForAugerElectrons(G4double cut)
{
minElectronEnergy = cut;
deexcitationManager.SetCutForAugerElectrons(cut);
theFluo = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4hLowEnergyLoss.cc,v 1.15 2002/02/27 14:38:53 vnivanch Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4hLowEnergyLoss.cc,v 1.17 2002/10/28 09:43:52 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// -----------------------------------------------------------
// GEANT 4 class implementation file
@@ -45,6 +45,7 @@
// 05/11/00 new method to calculate particle ranges
// 10/05/01 V.Ivanchenko Clean up againist Linux compilation with -Wall
// 23/11/01 V.Ivanchenko Move static member-functions from header to source
// 28/10/02 V.Ivanchenko Optimal binning for dE/dx
// --------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -131,8 +132,9 @@ G4double G4hLowEnergyLoss::Charge ;
G4bool G4hLowEnergyLoss::rndmStepFlag = false ;
G4bool G4hLowEnergyLoss::EnlossFlucFlag = true ;
G4double G4hLowEnergyLoss::LowestKineticEnergy,G4hLowEnergyLoss::HighestKineticEnergy;
G4int G4hLowEnergyLoss::TotBin ;
G4double G4hLowEnergyLoss::LowestKineticEnergy = 10.*eV;
G4double G4hLowEnergyLoss::HighestKineticEnergy= 100.*GeV;
G4int G4hLowEnergyLoss::TotBin = 360;
G4double G4hLowEnergyLoss::RTable,G4hLowEnergyLoss::LOGRTable;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -228,14 +230,14 @@ void G4hLowEnergyLoss::BuildDEDXTable(
const G4ParticleDefinition& aParticleType)
{
// calculate data members TotBin,LOGRTable,RTable first
/*
G4double binning = dRoverRange;
G4double lrate = log(HighestKineticEnergy/LowestKineticEnergy);
G4int nbin = G4int(lrate/log(1.+binning) + 0.5 );
nbin = (nbin+25)/50;
LOGRTable=lrate/TotBin;
RTable =exp(LOGRTable);
*/
// create table if there is no table or there is a new cut value
G4bool MakeTable = false ;
@@ -974,8 +976,7 @@ void G4hLowEnergyLoss::BuildInverseRangeTable(
const G4ParticleDefinition& aParticleType)
// Build inverse table of the range table
{
G4double SmallestRange,BiggestRange ;
G4bool isOut ;
G4bool b;
G4int numOfMaterials = G4Material::GetNumberOfMaterials();
if(&aParticleType == G4Proton::Proton())
@@ -1007,19 +1008,49 @@ void G4hLowEnergyLoss::BuildInverseRangeTable(
}
// loop for materials
for (G4int J=0; J<numOfMaterials; J++)
for (G4int i=0; i<numOfMaterials; i++)
{
SmallestRange = (*theRangeTable)(J)->
GetValue(LowestKineticEnergy,isOut) ;
BiggestRange = (*theRangeTable)(J)->
GetValue(HighestKineticEnergy,isOut) ;
G4PhysicsLogVector* aVector;
aVector = new G4PhysicsLogVector(SmallestRange,
BiggestRange,TotBin);
InvertRangeVector(J, aVector);
G4PhysicsVector* pv = (*theRangeTable)[i];
size_t nbins = pv->GetVectorLength();
G4double elow = pv->GetLowEdgeEnergy(0);
G4double ehigh = pv->GetLowEdgeEnergy(nbins-1);
G4double rlow = pv->GetValue(elow, b);
G4double rhigh = pv->GetValue(ehigh, b);
rhigh *= exp(log(rhigh/rlow)/((G4double)(nbins-1)));
G4PhysicsLogVector* v = new G4PhysicsLogVector(rlow, rhigh, nbins);
v->PutValue(0,elow);
G4double energy1 = elow;
G4double range1 = rlow;
G4double energy2 = elow;
G4double range2 = rlow;
size_t ilow = 0;
size_t ihigh;
for (size_t j=1; j<nbins; j++) {
G4double range = v->GetLowEdgeEnergy(j);
for (ihigh=ilow+1; ihigh<nbins; ihigh++) {
energy2 = pv->GetLowEdgeEnergy(ihigh);
range2 = pv->GetValue(energy2, b);
if(range2 >= range || ihigh == nbins-1) {
ilow = ihigh - 1;
energy1 = pv->GetLowEdgeEnergy(ilow);
range1 = pv->GetValue(energy1, b);
break;
}
}
G4double e = log(energy1) + log(energy2/energy1)*log(range/range1)/log(range2/range1);
v->PutValue(j,exp(e));
}
theInverseRangeTable->insert(v);
theInverseRangeTable->insert(aVector);
}
}
@@ -114,7 +114,7 @@ void G4hParametrisedLossModel::InitializeMe()
<< modelName << ">" << "for electronic stopping, <ICRU_R49p> is applied"
<< G4endl;
eStopingPowerTable = new G4hICRU49p();
highEnergyLimit = 2.0*MeV;
highEnergyLimit = 1.0*MeV;
lowEnergyLimit = 1.0*keV;
}
//G4cout << "G4hParametrisedLossModel: the model <" << modelName
@@ -34,6 +34,7 @@
// 23 Oct 2001 A. Mantero 1st implementation
// 24 Oct 2001 MGP Cleaned up
// 30 Oct 2001 V.Ivanchenko Include formula (53)
// 07 Oct 2002 V.Ivanchenko Fix in formula (53)
//
// -------------------------------------------------------------------
@@ -73,19 +74,19 @@ G4std::vector<G4double> G4hShellCrossSection::Probabilities(
G4std::vector<G4double> crossSections;
// Partial and total cross-section used for normalization of crossSections:
G4double aCrossSection = 0.;
G4double totalCrossSection = 0.;
// In this loop we calculate cross-section for every shell in the atom
for (size_t k=0; k<nShells; k++)
{
G4double bindingEnergy = transitionManager->Shell(Z,k)->BindingEnergy();
G4double xDelta = deltaEnergy/bindingEnergy;
G4double y = incidentEnergy*electron_mass_c2/(bindingEnergy*hMass);
G4double x = 1.0 + xDelta;
G4double xEnergy = 0.5*bindingEnergy;
G4double y = incidentEnergy*electron_mass_c2/(xEnergy*hMass);
G4double dele = deltaEnergy + xEnergy;
G4double x = electron_mass_c2/dele;
aCrossSection = (x/(xDelta*(1. + 1./y))
+ 4.*log(2.7 + sqrt(y))/3.)/ (x*x*x);
G4double aCrossSection = (dele/(xEnergy*(1. + 1./y))
+ 4.*log(2.7 + sqrt(y))/3.) * x*x*x;
// Calculation of total cross-section
totalCrossSection += aCrossSection;
+13 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.30 2002/05/29 16:30:32 maire Exp $
$Id: History,v 1.34 2002/12/09 10:26:20 vnivanch Exp $
-------------------------------------------------------------------
=========================================================
@@ -16,6 +16,18 @@ committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
09 dec 02: V.Ivant (muons-V04-01-03)
-fix warning in G4MuIonisationSTD
04 dec 02: V.Ivant (muons-V04-01-02)
-fix problems in delta-electrons spectrum
28 oct 02: V.Ivant (muons-V04-01-01)
-fix compilation warnings for STD classes
16 oct 02: V.Ivant (muons-V04-01-00)
-redesign for a Model approach: files processNameSTD and processNameModel
29 may 02: mma (muons-V04-00-02)
- V.Ivanchenko G4VMuEnergyLoss - bug fixed in N of subcutoff delta
@@ -0,0 +1,159 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4MuBetheBlochModel
//
// Author: Vladimir Ivanchenko on base of Laszlo Urban code
//
// Creation date: 09.08.2002
//
// Modifications:
//
// Class Description:
//
// Implementation of Bethe-Bloch model of energy loss and
// delta-electron production by heavy charged particles
// -------------------------------------------------------------------
//
#ifndef G4MuBetheBlochModel_h
#define G4MuBetheBlochModel_h 1
#include "G4VEmModel.hh"
class G4MuBetheBlochModel : public G4VEmModel
{
public:
G4MuBetheBlochModel(const G4ParticleDefinition* p = 0);
~G4MuBetheBlochModel();
G4double HighEnergyLimit(const G4ParticleDefinition* p,
const G4Material*);
G4double LowEnergyLimit(const G4ParticleDefinition* p,
const G4Material*);
void SetHighEnergyLimit(const G4Material*, G4double e) {highKinEnergy = e;};
void SetLowEnergyLimit(const G4Material*, G4double e) {lowKinEnergy = e;};
G4double MinEnergyCut(const G4ParticleDefinition*,
const G4Material*);
G4bool IsInCharge(const G4ParticleDefinition*,
const G4Material*);
virtual G4double ComputeDEDX(const G4Material*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy);
virtual G4double CrossSection(const G4Material*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy,
G4double maxEnergy);
virtual G4std::vector<G4DynamicParticle*>* SampleSecondary(
const G4Material*,
const G4DynamicParticle*,
G4double tmin,
G4double maxEnergy);
G4double MaxSecondaryEnergy(const G4DynamicParticle*);
protected:
G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
G4double kinEnergy);
private:
void SetParticle(const G4ParticleDefinition* p);
G4double CrossSectionPerAtom(G4double Z,
G4double kineticEnergy,
G4double tmin,
G4double tmax,
G4double tmaxSecondary);
G4double DifCrossSectionPerAtom(G4double kineticEnergy,
G4double knockonEnergy,
G4double tmaxSecondary);
// hide assignment operator
G4MuBetheBlochModel & operator=(const G4MuBetheBlochModel &right);
G4MuBetheBlochModel(const G4MuBetheBlochModel&);
const G4ParticleDefinition* particle;
G4double mass;
G4double chargeSquare;
G4double ratio;
G4double highKinEnergy;
G4double lowKinEnergy;
G4double twoln10;
G4double bg2lim;
G4double taulim;
G4double qc;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuBetheBlochModel::MaxSecondaryEnergy(
const G4ParticleDefinition* p,
G4double kinEnergy)
{
G4double gamma= kinEnergy/mass + 1.0;
G4double tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /
(1. + 2.0*gamma*ratio + ratio*ratio);
return tmax;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuBetheBlochModel::MaxSecondaryEnergy(const G4DynamicParticle* dp)
{
G4double kineticEnergy = dp->GetKineticEnergy();
G4double gamma= kineticEnergy/mass + 1.0;
G4double tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /
(1. + 2.0*gamma*ratio + ratio*ratio);
return tmax;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4MuBremsstrahlung.hh,v 1.12 2001/10/29 13:53:18 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//--------------- G4MuBremsstrahlung physics process ------------------
// by Laszlo Urban, September 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4MuBremsstrahlung.icc,v 1.8 2001/10/24 16:36:40 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//--------------- G4MuBremsstrahlung physics process ------------------
// by Laszlo Urban, September 1997
@@ -0,0 +1,163 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4MuBremsstrahlungModel
//
// Author: Vladimir Ivanchenko on base of Laszlo Urban code
//
// Creation date: 18.05.2002
//
// Modifications:
//
// Class Description:
//
// Implementation of energy loss for gamma emission by muons
// -------------------------------------------------------------------
//
#ifndef G4MuBremsstrahlungModel_h
#define G4MuBremsstrahlungModel_h 1
#include "G4VEmModel.hh"
class G4MuBremsstrahlungModel : public G4VEmModel
{
public:
G4MuBremsstrahlungModel(const G4ParticleDefinition* p = 0);
~G4MuBremsstrahlungModel();
G4double HighEnergyLimit(const G4ParticleDefinition* p,
const G4Material*);
G4double LowEnergyLimit(const G4ParticleDefinition* p,
const G4Material*);
void SetHighEnergyLimit(const G4Material*, G4double e) {highKinEnergy = e;};
void SetLowEnergyLimit(const G4Material*, G4double e) {lowKinEnergy = e;};
G4double MinEnergyCut(const G4ParticleDefinition*,
const G4Material*);
G4bool IsInCharge(const G4ParticleDefinition*,
const G4Material*);
G4double ComputeDEDX(const G4Material*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy);
G4double CrossSection(const G4Material*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy,
G4double maxEnergy);
G4std::vector<G4DynamicParticle*>* SampleSecondary(
const G4Material*,
const G4DynamicParticle*,
G4double tmin,
G4double maxEnergy);
virtual G4double MaxSecondaryEnergy(
const G4DynamicParticle* dynParticle);
protected:
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
G4double kineticEnergy);
private:
G4double ComputMuBremLoss(G4double Z, G4double A, G4double tkin, G4double cut);
G4double ComputeMicroscopicCrossSection(G4double tkin,
G4double Z,
G4double A,
G4double cut);
G4double ComputeDMicroscopicCrossSection(G4double tkin,
G4double Z,
G4double A,
G4double gammaEnergy);
void ComputePartialSumSigma(const G4Material* material, G4double tkin,
G4double cut);
const G4Element* SelectRandomAtom(const G4Material* material) const;
void MakeSamplingTables();
// hide assignment operator
G4MuBremsstrahlungModel & operator=(const G4MuBremsstrahlungModel &right);
G4MuBremsstrahlungModel(const G4MuBremsstrahlungModel&);
G4double highKinEnergy;
G4double lowKinEnergy;
G4double minThreshold;
// tables for sampling
G4int nzdat,ntdat,NBIN;
static G4double zdat[5],adat[5],tdat[8];
G4double ya[1001], proba[5][8][1001];
G4double cutFixed;
const G4Material* oldMaterial;
G4std::vector<G4DataVector*> partialSumSigma;
G4bool samplingTablesAreFilled;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
G4double G4MuBremsstrahlungModel::MaxSecondaryEnergy(
const G4DynamicParticle* dynParticle)
{
return dynParticle->GetKineticEnergy();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
G4double G4MuBremsstrahlungModel::MaxSecondaryEnergy(
const G4ParticleDefinition*,
G4double kineticEnergy)
{
return kineticEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -0,0 +1,117 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4MuBremsstrahlungSTD
//
// Author: Laszlo Urban
//
// Creation date: 30.09.1997
//
// Modifications:
//
// 10/02/00 modifications , new e.m. structure, L.Urban
// 10-08-01: new methods Store/Retrieve PhysicsTable (mma)
// 29-10-01 all static functions no more inlined (mma)
// 10-05-02 V.Ivanchenko update to new design
//
// Class Description:
//
// This class manages the Bremsstrahlung process for muons.
// it inherites from G4VContinuousDiscreteProcess via G4VEnergyLossSTD.
//
// -------------------------------------------------------------------
//
#ifndef G4MuBremsstrahlungSTD_h
#define G4MuBremsstrahlungSTD_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "globals.hh"
#include "G4VEnergyLossSTD.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MuBremsstrahlungSTD : public G4VEnergyLossSTD
{
public:
G4MuBremsstrahlungSTD(const G4String& processName = "MuBrems");
~G4MuBremsstrahlungSTD();
G4bool IsApplicable(const G4ParticleDefinition& p)
{return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);};
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*, G4double cut);
void PrintInfoDefinition() const;
// Print out of the class parameters
protected:
const G4ParticleDefinition* DefineBaseParticle(const G4ParticleDefinition* p);
virtual G4double MaxSecondaryEnergy(const G4DynamicParticle* dynParticle);
private:
void InitialiseProcess();
G4MuBremsstrahlungSTD & operator=(const G4MuBremsstrahlungSTD &right);
G4MuBremsstrahlungSTD(const G4MuBremsstrahlungSTD&);
const G4ParticleDefinition* theParticle;
const G4ParticleDefinition* theBaseParticle;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuBremsstrahlungSTD::MinPrimaryEnergy(const G4ParticleDefinition*,
const G4Material*,
G4double cut)
{
return cut;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuBremsstrahlungSTD::MaxSecondaryEnergy(const G4DynamicParticle* dynParticle)
{
return dynParticle->GetKineticEnergy();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4MuIonisation.hh,v 1.13 2001/10/29 13:53:18 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
// --------------- G4MuIonisation physics process ------------------------------
// by Laszlo Urban, September 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4MuIonisation.icc,v 1.4 2001/08/29 16:38:05 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// GEANT 4 class inlined methods file
@@ -0,0 +1,130 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4MuIonisationSTD
//
// Author: Laszlo Urban
//
// Creation date: 30.05.1997
//
// Modifications:
//
// corrected by L.Urban on 24/09/97
// corrected by L.Urban on 13/01/98
// bugs fixed by L.Urban on 02/02/99
// 10/02/00 modifications , new e.m. structure, L.Urban
// 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 14-08-01 new function ComputeRestrictedMeandEdx() + 'cleanup' (mma)
// 19-09-01 come back to previous process name "hIoni"
// 29-10-01 all static functions no more inlined
// 10-05-02 V.Ivanchenko update to new design
// 09-12-02 V.Ivanchenko remove warning
//
// Class Description:
//
// This class manages the ionisation process for muons.
// it inherites from G4VContinuousDiscreteProcess via G4VEnergyLossSTD.
//
// -------------------------------------------------------------------
//
#ifndef G4MuIonisationSTD_h
#define G4MuIonisationSTD_h 1
#include "G4VEnergyLossSTD.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "globals.hh"
class G4Material;
class G4MuIonisationSTD : public G4VEnergyLossSTD
{
public:
G4MuIonisationSTD(const G4String& name = "muIoni");
~G4MuIonisationSTD();
G4bool IsApplicable(const G4ParticleDefinition& p)
{return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);};
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*, G4double cut);
void PrintInfoDefinition() const;
// Print out of the class parameters
protected:
const G4ParticleDefinition* DefineBaseParticle(const G4ParticleDefinition* p);
virtual G4double MaxSecondaryEnergy(const G4DynamicParticle* dynParticle);
private:
void InitialiseProcess();
// hide assignment operator
G4MuIonisationSTD & operator=(const G4MuIonisationSTD &right);
G4MuIonisationSTD(const G4MuIonisationSTD&);
const G4ParticleDefinition* theParticle;
const G4ParticleDefinition* theBaseParticle;
G4double mass;
G4double ratio;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuIonisationSTD::MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*,
G4double cut)
{
G4double x = 0.5*cut/electron_mass_c2;
G4double y = electron_mass_c2/mass;
G4double g = x*y + sqrt((1. + x)*(1. + x*y*y));
return mass*(g - 1.0);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuIonisationSTD::MaxSecondaryEnergy(const G4DynamicParticle* dynParticle)
{
G4double gamma= dynParticle->GetKineticEnergy()/mass + 1.0;
G4double tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /
(1. + 2.0*gamma*ratio + ratio*ratio);
return tmax;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4MuPairProduction.hh,v 1.12 2001/10/29 13:53:18 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//--------------- G4MuPairProduction physics process ------------------
// by Laszlo Urban, May 1998
@@ -22,7 +22,7 @@
//
//
// $Id: G4MuPairProduction.icc,v 1.8 2001/10/24 16:36:40 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//--------------- G4MuPairProduction physics process ------------------
// by Laszlo Urban, May 1998
@@ -0,0 +1,164 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4MuPairProductionModel
//
// Author: Vladimir Ivanchenko on base of Laszlo Urban code
//
// Creation date: 18.05.2002
//
// Modifications:
//
// Class Description:
//
// Implementation of e+e- pair production by muons
//
// -------------------------------------------------------------------
//
#ifndef G4MuPairProductionModel_h
#define G4MuPairProductionModel_h 1
#include "G4VEmModel.hh"
class G4MuPairProductionModel : public G4VEmModel
{
public:
G4MuPairProductionModel(const G4ParticleDefinition* p = 0);
~G4MuPairProductionModel();
G4double HighEnergyLimit(const G4ParticleDefinition* p,
const G4Material*);
G4double LowEnergyLimit(const G4ParticleDefinition* p,
const G4Material*);
void SetHighEnergyLimit(const G4Material*, G4double e) {highKinEnergy = e;};
void SetLowEnergyLimit(const G4Material*, G4double e) {lowKinEnergy = e;};
G4double MinEnergyCut(const G4ParticleDefinition*,
const G4Material*);
G4bool IsInCharge(const G4ParticleDefinition*,
const G4Material*);
G4double ComputeDEDX(const G4Material*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy);
G4double CrossSection(const G4Material*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy,
G4double maxEnergy);
G4std::vector<G4DynamicParticle*>* SampleSecondary(
const G4Material*,
const G4DynamicParticle*,
G4double tmin,
G4double maxEnergy);
virtual G4double MaxSecondaryEnergy(
const G4DynamicParticle* dynParticle);
protected:
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
G4double kineticEnergy);
private:
G4double ComputMuPairLoss(G4double Z, G4double tkin, G4double cut);
G4double ComputeMicroscopicCrossSection(G4double tkin,
G4double Z,
G4double A,
G4double cut);
G4double ComputeDMicroscopicCrossSection(G4double tkin,
G4double Z,
G4double pairEnergy);
G4double ComputeDDMicroscopicCrossSection(G4double tkin,
G4double Z,
G4double pairEnergy,
G4double asymmetry);
void ComputePartialSumSigma(const G4Material* material, G4double tkin, G4double cut);
const G4Element* SelectRandomAtom(const G4Material* material) const;
void MakeSamplingTables();
// hide assignment operator
G4MuPairProductionModel & operator=(const G4MuPairProductionModel &right);
G4MuPairProductionModel(const G4MuPairProductionModel&);
G4double minPairEnergy;
G4double highKinEnergy;
G4double lowKinEnergy;
G4double minThreshold;
// tables for sampling
G4int nzdat,ntdat,NBIN;
static G4double zdat[5],adat[5],tdat[8];
G4double ya[1001],proba[5][8][1001];
const G4Material* oldMaterial;
G4std::vector<G4DataVector*> partialSumSigma;
G4bool samplingTablesAreFilled;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
G4double G4MuPairProductionModel::MaxSecondaryEnergy(
const G4DynamicParticle* dynParticle)
{
return dynParticle->GetKineticEnergy();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
G4double G4MuPairProductionModel::MaxSecondaryEnergy(
const G4ParticleDefinition*,
G4double kineticEnergy)
{
return kineticEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -0,0 +1,117 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4MuPairProductionSTD
//
// Author: Laszlo Urban
//
// Creation date: 30.05.1998
//
// Modifications:
// 10-02-00 modifications , new e.m. structure, L.Urban
// 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 29-10-01 all static functions no more inlined (mma)
// 10-05-02 V.Ivanchenko update to new design
//
// Class Description:
//
// This class manages the PairProduction process for muons.
// it inherites from G4VContinuousDiscreteProcess via G4VEnergyLossSTD.
//
// -------------------------------------------------------------------
//
#ifndef G4MuPairProductionSTD_h
#define G4MuPairProductionSTD_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "globals.hh"
#include "G4VEnergyLossSTD.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MuPairProductionSTD : public G4VEnergyLossSTD
{
public:
G4MuPairProductionSTD(const G4String& processName = "MuPairProd");
~G4MuPairProductionSTD();
G4bool IsApplicable(const G4ParticleDefinition& p)
{return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);};
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*, G4double cut);
void PrintInfoDefinition() const;
// Print out of the class parameters
protected:
const G4ParticleDefinition* DefineBaseParticle(const G4ParticleDefinition* p);
virtual G4double MaxSecondaryEnergy(const G4DynamicParticle* dp);
private:
void InitialiseProcess();
G4MuPairProductionSTD & operator=(const G4MuPairProductionSTD &right);
G4MuPairProductionSTD(const G4MuPairProductionSTD&);
const G4ParticleDefinition* theParticle;
const G4ParticleDefinition* theBaseParticle;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuPairProductionSTD::MinPrimaryEnergy(const G4ParticleDefinition*,
const G4Material*,
G4double cut)
{
return G4std::max(cut, 2.0*electron_mass_c2);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuPairProductionSTD::MaxSecondaryEnergy(const G4DynamicParticle* dp)
{
return dp->GetKineticEnergy();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4VMuEnergyLoss.hh,v 1.7 2001/10/29 13:53:18 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
// -------------------------------------------------------------------
// GEANT 4 class header file
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4VMuEnergyLoss.icc,v 1.3 2001/09/28 15:44:20 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
@@ -0,0 +1,362 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4MuBetheBlochModel
//
// Author: Vladimir Ivanchenko on base of Laszlo Urban code
//
// Creation date: 09.08.2002
//
// Modifications: 04.12.2002 VI Fix problem of G4DynamicParticle constructor
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4MuBetheBlochModel.hh"
#include "Randomize.hh"
#include "G4Electron.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4MuBetheBlochModel::G4MuBetheBlochModel(const G4ParticleDefinition* p)
: G4VEmModel(),
particle(0),
highKinEnergy(100.*TeV),
lowKinEnergy(2.0*MeV),
twoln10(2.0*log(10.0)),
bg2lim(0.0169),
taulim(8.4146e-3)
{
if(p) SetParticle(p);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4MuBetheBlochModel::~G4MuBetheBlochModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4MuBetheBlochModel::SetParticle(const G4ParticleDefinition* p)
{
particle = p;
mass = particle->GetPDGMass();
G4double q = particle->GetPDGCharge()/eplus;
chargeSquare = q*q;
lowKinEnergy *= mass/proton_mass_c2;
ratio = electron_mass_c2/mass;
qc = mass/ratio;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MuBetheBlochModel::HighEnergyLimit(const G4ParticleDefinition* p,
const G4Material*)
{
if(!particle) SetParticle(p);
return highKinEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MuBetheBlochModel::LowEnergyLimit(const G4ParticleDefinition* p,
const G4Material*)
{
if(!particle) SetParticle(p);
return lowKinEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MuBetheBlochModel::MinEnergyCut(const G4ParticleDefinition* p,
const G4Material* material)
{
return material->GetIonisation()->GetMeanExcitationEnergy();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4bool G4MuBetheBlochModel::IsInCharge(const G4ParticleDefinition* p,
const G4Material*)
{
return (p->GetPDGCharge() != 0.0 && p->GetPDGMass() > 10.*MeV
&& p->GetPDGSpin() == 0.5);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MuBetheBlochModel::ComputeDEDX(const G4Material* material,
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cutEnergy)
{
if(!particle) SetParticle(p);
G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
G4double tau = kineticEnergy/mass;
G4double x = 1.0;
if(cutEnergy < tmax) x = cutEnergy/tmax;
G4double gam = tau + 1.0;
G4double beta2 = 1. - 1./(gam*gam);
G4double bg2 = tau * (tau+2.0);
G4double eexc = material->GetIonisation()->GetMeanExcitationEnergy();
G4double eexc2 = eexc*eexc;
G4double taul = material->GetIonisation()->GetTaul();
G4double cden = material->GetIonisation()->GetCdensity();
G4double mden = material->GetIonisation()->GetMdensity();
G4double aden = material->GetIonisation()->GetAdensity();
G4double x0den = material->GetIonisation()->GetX0density();
G4double x1den = material->GetIonisation()->GetX1density();
G4double* shellCorrectionVector =
material->GetIonisation()->GetShellCorrectionVector();
G4double eDensity = material->GetElectronDensity();
G4double dedx = log(2.0*electron_mass_c2*bg2*tmax*x/eexc2)-(1.0 + x)*beta2;
G4double totEnergy = kineticEnergy + mass;
G4double del = 0.5*x*tmax/totEnergy;
dedx += del*del;
// density correction
x = log(bg2)/twoln10;
if ( x >= x0den ) {
dedx -= twoln10*x - cden ;
if ( x < x1den ) dedx -= aden*pow((x1den-x),mden) ;
}
// shell correction
G4double sh = 0.0;
x = 1.0;
if ( bg2 > bg2lim ) {
for (G4int k=0; k<3; k++) {
x *= bg2 ;
sh += shellCorrectionVector[k]/x;
}
} else {
for (G4int k=0; k<3; k++) {
x *= bg2lim ;
sh += shellCorrectionVector[k]/x;
}
sh *= log(tau/taul)/log(taulim/taul);
}
dedx -= sh;
// now compute the total ionization loss
if (dedx < 0.0) dedx = 0.0 ;
// correction of R. Kokoulin // has been taken out ***************
// G4double apar = log(2.*(tmax/electron_mass_c2 + 1.0));
// dedx += fine_structure_const*(log(2.*totEnergy/mass)-apar/3.)*apar*apar/twopi;
dedx *= twopi_mc2_rcl2*chargeSquare*eDensity/beta2;
return dedx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MuBetheBlochModel::CrossSection(const G4Material* material,
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cutEnergy,
G4double maxEnergy)
{
if(!particle) SetParticle(p);
G4double cross = 0.0;
G4double tmaxSecondary = MaxSecondaryEnergy(p, kineticEnergy);
G4double tmax = G4std::min(tmaxSecondary, maxEnergy);
if(cutEnergy < tmax) {
const G4ElementVector* theElementVector = material->GetElementVector();
const G4double* NbOfAtomsPerVolume = material->GetVecNbOfAtomsPerVolume();
G4int NumberOfElements = material->GetNumberOfElements();
for (G4int iel=0; iel<NumberOfElements; iel++ ) {
cross += NbOfAtomsPerVolume[iel]* CrossSectionPerAtom(
(*theElementVector)[iel]->GetZ(),
kineticEnergy, cutEnergy, tmax, tmaxSecondary);
}
}
// G4cout << "tmin= " << cutEnergy << " tmax= " << tmax
// << " cross= " << cross << G4endl;
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuBetheBlochModel::CrossSectionPerAtom(
G4double Z,
G4double kineticEnergy,
G4double tmin,
G4double tmax,
G4double tmaxSecondary)
{
G4double cross = 0.;
const G4double xgi[] = {0.06943,0.33001,0.66999,0.93057};
const G4double wgi[] = {0.17393,0.32607,0.32607,0.17393};
const G4double ak1 = 4.6;
const G4int k2 = 2;
G4double aaa = log(tmin);
G4double bbb = log(tmax);
G4int kkk = int((bbb-aaa)/ak1)+k2;
G4double hhh = (bbb-aaa)/(float)kkk;
G4double step = exp(hhh);
G4double ymax = 1./tmax;
for (G4int k=0; k<kkk; k++) {
G4double ymin = ymax;
ymax = ymin*step;
G4double hhy = ymax-ymin;
for (G4int i=0; i<4; i++) {
G4double y = ymin+hhy*xgi[i];
G4double ep = 1./y ;
cross += ep*ep*wgi[i]*hhy*DifCrossSectionPerAtom(kineticEnergy, ep, tmaxSecondary);
}
}
cross *= twopi_mc2_rcl2*Z*chargeSquare;
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuBetheBlochModel::DifCrossSectionPerAtom(G4double kineticEnergy,
G4double knockonEnergy,
G4double tmaxSecondary)
// Calculates the differential cross section per atom
// using the cross section formula of R.P. Kokoulin (10/98)
{
const G4double alphaprime = fine_structure_const/twopi;
G4double totalEnergy = kineticEnergy + mass;
G4double gam = totalEnergy/mass;
G4double beta2 = 1. - 1./(gam*gam);
G4double v = knockonEnergy/totalEnergy;
G4double cross = (1.-beta2*knockonEnergy/tmaxSecondary + 0.5*v*v)/
(beta2*knockonEnergy*knockonEnergy);
G4double a1 = log(1.+2.*knockonEnergy/electron_mass_c2);
G4double a3 = log(4.*totalEnergy*(totalEnergy-knockonEnergy)/(mass*mass));
cross *= (1.+alphaprime*a1*(a3-a1));
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4std::vector<G4DynamicParticle*>* G4MuBetheBlochModel::SampleSecondary(
const G4Material* material,
const G4DynamicParticle* dp,
G4double tmin,
G4double maxEnergy)
{
G4double tmax = MaxSecondaryEnergy(dp);
G4double xmin = tmin/tmax;
G4double xmax = G4std::min(tmax, maxEnergy)/tmax;
if(xmin >= xmax) return 0;
G4ThreeVector momentum = dp->GetMomentumDirection();
G4double kineticEnergy = dp->GetKineticEnergy();
G4double totEnergy = kineticEnergy + mass;
G4double beta2 = 1. - mass*mass/(totEnergy*totEnergy);
G4double x = 0.5*tmax*tmax/(totEnergy*totEnergy);
const G4double alphaprime = fine_structure_const/twopi;
G4double a0=log(2.*totEnergy/mass);
G4double grej = (1.0 - beta2*xmin + xmax*xmax*x)*(1. + alphaprime*a0*a0);
G4double z, f, a1, twoep;
// sampling follows ...
do {
G4double q = G4UniformRand();
z = xmin*xmax/(xmin*(1.0 - q) + xmax*q);
twoep = 2.0*z*tmax;
a1= log(1.0 + twoep/electron_mass_c2);
f = (1.0 - beta2 * z + z*z*x)
* (1. + alphaprime*a1*(a0 + log((2.0*totEnergy-twoep)/mass) - a1));
if(f > grej) {
G4cout << "G4MuBetheBlochModel::SampleSecondary Warning! "
<< "Majorant " << grej << " < "
<< f << " for x= " << z
<< G4endl;
}
} while( grej*G4UniformRand() >= f );
G4double deltaKinEnergy = z * tmax;
G4double deltaMomentum =
sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
G4double totMomentum = sqrt(totEnergy*totEnergy - mass*mass);
G4double cost = deltaKinEnergy * (totEnergy + electron_mass_c2) /
(deltaMomentum * totMomentum);
G4double sint = sqrt(1.0 - cost*cost);
G4double phi = twopi * G4UniformRand() ;
G4ThreeVector deltaDirection(sint*cos(phi),sint*sin(phi), cost) ;
deltaDirection.rotateUz(momentum);
// create G4DynamicParticle object for delta ray
G4DynamicParticle* delta = new G4DynamicParticle();
delta->SetDefinition(G4Electron::Electron());
delta->SetKineticEnergy(deltaKinEnergy);
delta->SetMomentumDirection(deltaDirection);
G4std::vector<G4DynamicParticle*>* vdp = new G4std::vector<G4DynamicParticle*>;
vdp->push_back(delta);
return vdp;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -22,7 +22,7 @@
//
//
// $Id: G4MuBremsstrahlung.cc,v 1.22 2001/11/09 13:52:31 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// GEANT4 tag $Name: geant4-05-00 $
//
//
//--------------- G4MuBremsstrahlung physics process ---------------------------

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