Import Geant4 0.1.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 2.0 1998/07/02 16:18:43 gunter Exp $
|
||||
# $Id: GNUmakefile,v 1.3 1999/06/05 13:20:23 stesting Exp $
|
||||
# --------------------------------------------------------------------
|
||||
# GNUmakefile for electromagnetic sub-library. John Allison, 25/6/98.
|
||||
# --------------------------------------------------------------------
|
||||
@@ -20,6 +20,7 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/track/include \
|
||||
-I$(G4BASE)/processes/management/include \
|
||||
-I$(G4BASE)/processes/electromagnetic/utils/include \
|
||||
-I$(G4BASE)/processes/electromagnetic/standard/include \
|
||||
-I$(G4BASE)/particles/management/include \
|
||||
-I$(G4BASE)/particles/bosons/include \
|
||||
-I$(G4BASE)/particles/leptons/include \
|
||||
@@ -29,3 +30,14 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/materials/include
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
CXXFLAGS_WITHOUT_O := $(filter-out -O% , $(CXXFLAGS))
|
||||
CXXFLAGS_WITHOUT_O := $(filter-out +O% , $(CXXFLAGS_WITHOUT_O))
|
||||
|
||||
ifeq ($(G4SYSTEM),HP-aCC)
|
||||
COMPILER := $(shell aCC -V 2>&1)
|
||||
ifeq ($(COMPILER), aCC: HP ANSI C++ B3910B A.01.15)
|
||||
$(G4TMP)/$(G4SYSTEM)/$(name)/G4MuEnergyLoss.o: src/G4MuEnergyLoss.cc
|
||||
$(CXX) $(CXXFLAGS_WITHOUT_O) $(CPPFLAGS) -c $(OUT_OBJ)$@ src/G4MuEnergyLoss.cc
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuBremsstrahlung.hh,v 2.1 1998/08/23 11:50:49 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IMuBremsstrahlung.hh,v 1.1 1999/01/07 16:11:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuBremsstrahlung.icc,v 2.1 1998/08/23 11:50:50 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IMuBremsstrahlung.icc,v 1.1 1999/01/07 16:11:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuEnergyLoss.hh,v 2.1 1998/08/23 11:50:51 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IMuEnergyLoss.hh,v 1.2 1999/04/30 08:04:05 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// -------------------------------------------------------------------
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "G4IVContinuousDiscreteProcess.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4EnergyLossTables.hh"
|
||||
#include "G4VParticleChange.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4Track.hh"
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuEnergyLoss.icc,v 2.1 1998/08/23 11:50:51 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IMuEnergyLoss.icc,v 1.1 1999/01/07 16:11:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuIonisation.hh,v 2.1 1998/08/23 11:50:52 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IMuIonisation.hh,v 1.1 1999/01/07 16:11:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuIonisation.icc,v 2.1 1998/08/23 11:50:52 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IMuIonisation.icc,v 1.1 1999/01/07 16:11:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuPairProduction.hh,v 2.1 1998/08/23 11:50:52 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IMuPairProduction.hh,v 1.1 1999/01/07 16:11:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuPairProduction.icc,v 2.1 1998/08/23 11:50:53 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IMuPairProduction.icc,v 1.1 1999/01/07 16:11:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuBremsstrahlung.hh,v 2.4 1998/10/27 12:24:39 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4MuBremsstrahlung.hh,v 1.2 1999/03/15 13:35:32 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
@@ -28,9 +28,6 @@
|
||||
#include "G4MuEnergyLoss.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4OrderedTable.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
@@ -110,22 +107,9 @@ class G4MuBremsstrahlung : public G4MuEnergyLoss
|
||||
G4double HighestKineticEnergy;
|
||||
G4int TotBin;
|
||||
|
||||
G4double CutInRange;
|
||||
|
||||
const G4Gamma* theGamma;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
|
||||
const G4double* GammaCutInKineticEnergy;
|
||||
const G4double* MuonMinusCutInKineticEnergy;
|
||||
const G4double* MuonPlusCutInKineticEnergy;
|
||||
const G4double* ParticleCutInKineticEnergy;
|
||||
|
||||
|
||||
G4double GammaCutInKineticEnergyNow;
|
||||
G4double MuonMinusCutInKineticEnergyNow;
|
||||
G4double MuonPlusCutInKineticEnergyNow;
|
||||
G4double ParticleCutInKineticEnergyNow;
|
||||
|
||||
// tables for sampling ..............
|
||||
static G4int nzdat,ntdat,NBIN ;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuBremsstrahlung.icc,v 2.2 1998/10/27 12:24:40 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4MuBremsstrahlung.icc,v 1.2 1999/03/15 13:35:33 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
@@ -32,7 +32,6 @@ inline G4double G4MuBremsstrahlung::GetMeanFreePath(const G4Track& trackData,
|
||||
|
||||
aDynamicParticle = trackData.GetDynamicParticle();
|
||||
aMaterial = trackData.GetMaterial();
|
||||
|
||||
G4double KineticEnergy = aDynamicParticle->GetKineticEnergy();
|
||||
|
||||
if (KineticEnergy < LowestKineticEnergy)
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuEnergyLoss.hh,v 2.7 1998/10/27 12:24:38 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4MuEnergyLoss.hh,v 1.2 1999/03/15 12:53:06 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// -------------------------------------------------------------------
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "globals.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
@@ -140,10 +141,13 @@ class G4MuEnergyLoss : public G4VContinuousDiscreteProcess
|
||||
|
||||
G4PhysicsTable* theLossTable ;
|
||||
|
||||
// cut in range
|
||||
G4double CutInRange ;
|
||||
// last cut in range
|
||||
G4double lastCutInRange ;
|
||||
G4double lastgammaCutInRange ;
|
||||
G4double lastelectronCutInRange ;
|
||||
|
||||
const G4Electron* theElectron;
|
||||
const G4Positron* thePositron;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
|
||||
// particle mass
|
||||
G4double ParticleMass;
|
||||
@@ -194,15 +198,6 @@ class G4MuEnergyLoss : public G4VContinuousDiscreteProcess
|
||||
// variables for the integration routines
|
||||
G4double taulow,tauhigh,ltaulow,ltauhigh;
|
||||
|
||||
// cuts in kinetic energy ........
|
||||
G4double* ParticleCutInKineticEnergy ;
|
||||
G4double ParticleCutInKineticEnergyNow ;
|
||||
|
||||
const G4Electron* theElectron;
|
||||
const G4Positron* thePositron;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
|
||||
// data members to speed up the fluctuation calculation
|
||||
G4int imat ;
|
||||
G4Material *lastMaterial ;
|
||||
@@ -241,8 +236,6 @@ class G4MuEnergyLoss : public G4VContinuousDiscreteProcess
|
||||
static G4PhysicsTable* theProperTimemuplusTable ;
|
||||
static G4PhysicsTable* theProperTimemuminusTable ;
|
||||
|
||||
static G4double CutInmupluslossTable;
|
||||
static G4double CutInmuminuslossTable;
|
||||
|
||||
// processes inherited from G4muEnergyLoss
|
||||
// register themselves in the static array Recorder
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuEnergyLoss.icc,v 2.2 1998/10/27 12:24:39 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4MuEnergyLoss.icc,v 1.1 1999/01/07 16:11:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuIonisation.hh,v 2.4 1998/10/27 12:24:39 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4MuIonisation.hh,v 1.2 1999/03/15 13:35:34 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
|
||||
// ------------------------------------------------------------
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "globals.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
|
||||
@@ -98,19 +97,8 @@ class G4MuIonisation : public G4MuEnergyLoss
|
||||
G4double HighestKineticEnergy;
|
||||
G4int TotBin;
|
||||
|
||||
// cut in range
|
||||
G4double CutInRange ;
|
||||
G4double lastCutInRange ;
|
||||
|
||||
// particles , cuts in kinetic energy ........
|
||||
const G4Electron* theElectron;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
|
||||
const G4double* ParticleCutInKineticEnergy;
|
||||
const G4double* DeltaCutInKineticEnergy ;
|
||||
|
||||
G4double ParticleCutInKineticEnergyNow ;
|
||||
G4double DeltaCutInKineticEnergyNow ;
|
||||
};
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuIonisation.icc,v 2.2 1998/10/27 12:24:39 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4MuIonisation.icc,v 1.1 1999/01/07 16:11:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuNuclearInteraction.hh,v 2.4 1998/10/27 12:24:40 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD group
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// -------- G4MuNuclearInteraction physics process ---------
|
||||
// by Laszlo Urban, May 1998
|
||||
// ************************************************************
|
||||
|
||||
#ifndef G4MuNuclearInteraction_h
|
||||
#define G4MuNuclearInteraction_h 1
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4VDiscreteProcess.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4PionZero.hh"
|
||||
#include "G4OrderedTable.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
|
||||
class G4MuNuclearInteraction : public G4VDiscreteProcess
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4MuNuclearInteraction(const G4String& processName = "MuNucl");
|
||||
|
||||
~G4MuNuclearInteraction();
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
|
||||
void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
|
||||
|
||||
void PrintInfoDefinition() ;
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition ) ;
|
||||
|
||||
G4VParticleChange *PostStepDoIt(const G4Track& track,
|
||||
const G4Step& Step ) ;
|
||||
|
||||
protected:
|
||||
|
||||
G4double ComputeMeanFreePath( const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
const G4Material* aMaterial);
|
||||
|
||||
void ComputePartialSumSigma( const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
const G4Material* aMaterial);
|
||||
|
||||
virtual G4double ComputeMicroscopicCrossSection(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber,
|
||||
G4double AtomicMass);
|
||||
|
||||
virtual G4double ComputeDMicroscopicCrossSection(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber,
|
||||
G4double AtomicMass,
|
||||
G4double epsilon);
|
||||
|
||||
private:
|
||||
|
||||
G4MuNuclearInteraction & operator=(const G4MuNuclearInteraction &right);
|
||||
G4MuNuclearInteraction(const G4MuNuclearInteraction&);
|
||||
|
||||
G4Element* SelectRandomAtom(G4Material* aMaterial) const;
|
||||
|
||||
void MakeSamplingTables( const G4ParticleDefinition* ParticleType );
|
||||
|
||||
private:
|
||||
|
||||
G4PhysicsTable* theMeanFreePathTable;
|
||||
G4PhysicsTable* theCrossSectionTable ;
|
||||
|
||||
G4OrderedTable PartialSumSigma;
|
||||
|
||||
G4double LowestKineticEnergy;
|
||||
G4double HighestKineticEnergy;
|
||||
G4int TotBin;
|
||||
|
||||
//cut from R.P. Kokoulin
|
||||
const G4double CutFixed ;
|
||||
// for the atomic weight conversion
|
||||
G4double GramPerMole ;
|
||||
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
const G4PionZero* thePionZero;
|
||||
|
||||
// tables for sampling ..............
|
||||
static G4int nzdat,ntdat,NBIN ;
|
||||
static G4double zdat[5],adat[5],tdat[8] ;
|
||||
static G4double ya[1000],proba[5][8][1000] ;
|
||||
|
||||
};
|
||||
|
||||
#include "G4MuNuclearInteraction.icc"
|
||||
|
||||
#endif
|
||||
@@ -1,80 +0,0 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuNuclearInteraction.icc,v 2.2 1998/10/27 12:24:41 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
// GEANT 4 class inlined methods file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD group
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
// -------- G4MuNuclearInteraction physics process ---------
|
||||
// by Laszlo Urban, May 1998
|
||||
// ***************************************************************
|
||||
|
||||
inline G4double G4MuNuclearInteraction::GetMeanFreePath(
|
||||
const G4Track& trackData,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition)
|
||||
{
|
||||
const G4DynamicParticle* aDynamicParticle;
|
||||
G4Material* aMaterial;
|
||||
G4double MeanFreePath;
|
||||
G4bool isOutRange ;
|
||||
|
||||
*condition = NotForced ;
|
||||
|
||||
aDynamicParticle = trackData.GetDynamicParticle();
|
||||
aMaterial = trackData.GetMaterial();
|
||||
|
||||
G4double KineticEnergy = aDynamicParticle->GetKineticEnergy();
|
||||
|
||||
if (KineticEnergy < LowestKineticEnergy)
|
||||
MeanFreePath = DBL_MAX ;
|
||||
else {
|
||||
if (KineticEnergy > HighestKineticEnergy)
|
||||
KineticEnergy = 0.99*HighestKineticEnergy ;
|
||||
MeanFreePath = (*theMeanFreePathTable)(aMaterial->GetIndex())->
|
||||
GetValue( KineticEnergy, isOutRange );
|
||||
}
|
||||
return MeanFreePath;
|
||||
}
|
||||
|
||||
inline G4double G4MuNuclearInteraction::ComputeMeanFreePath(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double KineticEnergy,
|
||||
const G4Material* aMaterial)
|
||||
{
|
||||
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
|
||||
const G4double* theAtomNumDensityVector =
|
||||
aMaterial->GetAtomicNumDensityVector();
|
||||
|
||||
G4double SIGMA = 0 ;
|
||||
|
||||
for ( G4int i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
|
||||
{
|
||||
SIGMA += theAtomNumDensityVector[i] *
|
||||
ComputeMicroscopicCrossSection( ParticleType, KineticEnergy,
|
||||
(*theElementVector)(i)->GetZ(),
|
||||
(*theElementVector)(i)->GetA()) ;
|
||||
}
|
||||
|
||||
return SIGMA<=0.0 ? DBL_MAX : 1./SIGMA ;
|
||||
}
|
||||
|
||||
|
||||
inline G4bool G4MuNuclearInteraction::IsApplicable(
|
||||
const G4ParticleDefinition& particle)
|
||||
{
|
||||
return( (&particle == (const G4ParticleDefinition *)theMuonMinus)
|
||||
||(&particle == (const G4ParticleDefinition *)theMuonPlus)
|
||||
) ;
|
||||
}
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuPairProduction.hh,v 2.6 1998/10/27 12:24:40 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4MuPairProduction.hh,v 1.2 1999/03/15 13:35:35 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// ------------------------------------------------------------
|
||||
@@ -29,10 +29,6 @@
|
||||
#include "G4MuEnergyLoss.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4OrderedTable.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
@@ -118,25 +114,11 @@ class G4MuPairProduction : public G4MuEnergyLoss
|
||||
G4double HighestKineticEnergy;
|
||||
G4int TotBin;
|
||||
|
||||
G4double CutInRange;
|
||||
|
||||
const G4Electron* theElectron;
|
||||
const G4Positron* thePositron;
|
||||
const G4MuonMinus* theMuonMinus;
|
||||
const G4MuonPlus* theMuonPlus;
|
||||
|
||||
const G4double* ElectronCutInKineticEnergy;
|
||||
const G4double* PositronCutInKineticEnergy;
|
||||
const G4double* MuonMinusCutInKineticEnergy;
|
||||
const G4double* MuonPlusCutInKineticEnergy;
|
||||
const G4double* ParticleCutInKineticEnergy;
|
||||
|
||||
|
||||
G4double ElectronCutInKineticEnergyNow;
|
||||
G4double PositronCutInKineticEnergyNow;
|
||||
G4double MuonMinusCutInKineticEnergyNow;
|
||||
G4double MuonPlusCutInKineticEnergyNow;
|
||||
G4double ParticleCutInKineticEnergyNow;
|
||||
|
||||
// tables for sampling ..............
|
||||
static G4int nzdat,ntdat,NBIN ;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuPairProduction.icc,v 2.2 1998/10/27 12:24:40 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4MuPairProduction.icc,v 1.1 1999/01/07 16:11:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuBremsstrahlung.cc,v 2.2 1998/12/09 09:20:44 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IMuBremsstrahlung.cc,v 1.2 1999/05/04 14:24:21 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -821,6 +821,8 @@ void G4IMuBremsstrahlung::BuildLambdaTable(const G4ParticleDefinition& ParticleT
|
||||
delete theMeanFreePathTable;
|
||||
}
|
||||
theMeanFreePathTable = new G4PhysicsTable( G4Material::GetNumberOfMaterials() ) ;
|
||||
PartialSumSigma.resize(G4Material::GetNumberOfMaterials());
|
||||
|
||||
G4PhysicsLogVector* ptrVector;
|
||||
for ( G4int J=0 ; J < G4Material::GetNumberOfMaterials(); J++ )
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuEnergyLoss.cc,v 2.2 1998/12/09 09:20:44 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IMuEnergyLoss.cc,v 1.1 1999/01/07 16:11:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuIonisation.cc,v 2.2 1998/12/09 09:20:45 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IMuIonisation.cc,v 1.2 1999/04/13 09:09:42 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -1031,16 +1031,17 @@ G4VParticleChange* G4IMuIonisation::PostStepDoIt(
|
||||
finalKineticEnergy = KineticEnergy - DeltaKineticEnergy ;
|
||||
if (finalKineticEnergy > 0. )
|
||||
{
|
||||
// changed energy and momentum of the actual particle
|
||||
finalMomentum=sqrt(finalKineticEnergy*
|
||||
(finalKineticEnergy+2.*ParticleMass)) ;
|
||||
|
||||
finalPx = (TotalMomentum*ParticleDirection.x()
|
||||
-DeltaTotalMomentum*DeltaDirection.x())/finalMomentum ;
|
||||
finalPy = (TotalMomentum*ParticleDirection.y()
|
||||
-DeltaTotalMomentum*DeltaDirection.y())/finalMomentum ;
|
||||
finalPz = (TotalMomentum*ParticleDirection.z()
|
||||
-DeltaTotalMomentum*DeltaDirection.z())/finalMomentum ;
|
||||
finalPx = TotalMomentum*ParticleDirection.x()
|
||||
- DeltaTotalMomentum*DeltaDirection.x();
|
||||
finalPy = TotalMomentum*ParticleDirection.y()
|
||||
- DeltaTotalMomentum*DeltaDirection.y();
|
||||
finalPz = TotalMomentum*ParticleDirection.z()
|
||||
- DeltaTotalMomentum*DeltaDirection.z();
|
||||
finalMomentum =
|
||||
sqrt(finalPx*finalPx+finalPy*finalPy+finalPz*finalPz) ;
|
||||
finalPx /= finalMomentum ;
|
||||
finalPy /= finalMomentum ;
|
||||
finalPz /= finalMomentum ;
|
||||
|
||||
aParticleChange.SetMomentumChange( finalPx,finalPy,finalPz );
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMuPairProduction.cc,v 2.3 1998/12/09 09:20:47 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4IMuPairProduction.cc,v 1.2 1999/05/04 14:24:23 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
@@ -809,6 +809,8 @@ void G4IMuPairProduction::BuildLambdaTable(const G4ParticleDefinition& ParticleT
|
||||
delete theMeanFreePathTable;
|
||||
}
|
||||
theMeanFreePathTable = new G4PhysicsTable( G4Material::GetNumberOfMaterials() ) ;
|
||||
PartialSumSigma.resize(G4Material::GetNumberOfMaterials());
|
||||
|
||||
if(&ParticleType == theMuonPlus )
|
||||
themuplusLambdaTable = theMeanFreePathTable ;
|
||||
if(&ParticleType == theMuonMinus )
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuBremsstrahlung.cc,v 2.6 1998/11/13 13:38:35 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4MuBremsstrahlung.cc,v 1.5 1999/06/14 13:26:30 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -43,10 +43,7 @@ G4MuBremsstrahlung::G4MuBremsstrahlung(const G4String& processName)
|
||||
theMeanFreePathTable(NULL),
|
||||
LowestKineticEnergy (1.*GeV),
|
||||
HighestKineticEnergy (1000000.*TeV),
|
||||
TotBin(100),
|
||||
theGamma (G4Gamma::Gamma() ),
|
||||
theMuonMinus ( G4MuonMinus::MuonMinus() ),
|
||||
theMuonPlus ( G4MuonPlus::MuonPlus() )
|
||||
TotBin(100)
|
||||
{ }
|
||||
|
||||
G4MuBremsstrahlung::~G4MuBremsstrahlung()
|
||||
@@ -85,7 +82,9 @@ void G4MuBremsstrahlung::BuildPhysicsTable(
|
||||
if(theMeanFreePathTable == NULL)
|
||||
MakeSamplingTables(&aParticleType) ;
|
||||
|
||||
BuildLambdaTable(aParticleType) ;
|
||||
G4double gammaCutInRange = G4Gamma::Gamma()->GetCuts();
|
||||
if(gammaCutInRange != lastgammaCutInRange)
|
||||
BuildLambdaTable(aParticleType) ;
|
||||
|
||||
G4MuEnergyLoss::BuildDEDXTable(aParticleType) ;
|
||||
|
||||
@@ -103,7 +102,7 @@ void G4MuBremsstrahlung::BuildLossTable(
|
||||
const G4MaterialTable* theMaterialTable =
|
||||
G4Material::GetMaterialTable();
|
||||
ParticleMass = aParticleType.GetPDGMass();
|
||||
GammaCutInKineticEnergy = (*theGamma).GetEnergyCuts() ;
|
||||
GammaCutInKineticEnergy = G4Gamma::Gamma()->GetEnergyCuts() ;
|
||||
|
||||
G4int numOfMaterials = theMaterialTable->length() ;
|
||||
|
||||
@@ -205,6 +204,7 @@ void G4MuBremsstrahlung::BuildLambdaTable(
|
||||
delete theMeanFreePathTable;
|
||||
}
|
||||
theMeanFreePathTable = new G4PhysicsTable(G4Material::GetNumberOfMaterials());
|
||||
PartialSumSigma.resize(G4Material::GetNumberOfMaterials());
|
||||
|
||||
G4PhysicsLogVector* ptrVector;
|
||||
for ( G4int J=0 ; J < G4Material::GetNumberOfMaterials(); J++ )
|
||||
@@ -240,7 +240,7 @@ void G4MuBremsstrahlung::ComputePartialSumSigma(
|
||||
const G4ElementVector* theElementVector = aMaterial->GetElementVector();
|
||||
const G4double* theAtomNumDensityVector =
|
||||
aMaterial->GetAtomicNumDensityVector();
|
||||
G4double GammaEnergyCut = (G4Gamma::GetCutsInEnergy())[Imate];
|
||||
G4double GammaEnergyCut = (G4Gamma::Gamma()->GetCutsInEnergy())[Imate];
|
||||
|
||||
PartialSumSigma(Imate) = new G4ValVector(NbOfElements);
|
||||
|
||||
@@ -425,6 +425,8 @@ void G4MuBremsstrahlung::MakeSamplingTables(
|
||||
}
|
||||
}
|
||||
|
||||
ya[NBIN] = 0. ; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
if(CrossSection > 0.)
|
||||
{
|
||||
for(G4int ib=0; ib<=nbin; ib++)
|
||||
@@ -454,17 +456,11 @@ G4VParticleChange* G4MuBremsstrahlung::PostStepDoIt(const G4Track& trackData,
|
||||
|
||||
// Gamma cut in this material
|
||||
G4double GammaEnergyCut =
|
||||
(G4Gamma::GetCutsInEnergy())[aMaterial->GetIndex()];
|
||||
(G4Gamma::Gamma()->GetCutsInEnergy())[aMaterial->GetIndex()];
|
||||
|
||||
// check against insufficient energy
|
||||
if (KineticEnergy < GammaEnergyCut)
|
||||
{
|
||||
aParticleChange.SetMomentumChange( ParticleDirection );
|
||||
aParticleChange.SetEnergyChange( KineticEnergy );
|
||||
aParticleChange.SetLocalEnergyDeposit (0.);
|
||||
aParticleChange.SetNumberOfSecondaries(0);
|
||||
if(KineticEnergy < GammaEnergyCut)
|
||||
return G4VContinuousDiscreteProcess::PostStepDoIt(trackData,stepData);
|
||||
}
|
||||
|
||||
// select randomly one element constituing the material
|
||||
G4Element* anElement = SelectRandomAtom(aMaterial);
|
||||
@@ -497,22 +493,20 @@ G4VParticleChange* G4MuBremsstrahlung::PostStepDoIt(const G4Track& trackData,
|
||||
del = abs(log(KineticEnergy)-log(tdat[it])) ;
|
||||
if(del<delmin)
|
||||
{
|
||||
del=delmin;
|
||||
delmin=del;
|
||||
itt=it ;
|
||||
}
|
||||
}
|
||||
|
||||
//sample energy transfer according to the sampling table
|
||||
|
||||
G4double r = G4UniformRand() ;
|
||||
|
||||
iy = -1 ;
|
||||
do {
|
||||
iy += 1 ;
|
||||
} while (((proba[izz][itt][iy]) < r)&&(iy < NBINminus1)) ;
|
||||
} while ((proba[izz][itt][iy] < r)&&(iy < NBINminus1)) ;
|
||||
|
||||
//sampling is Done uniformly in y in the bin
|
||||
if( iy < NBINminus1 )
|
||||
if( iy < NBIN )
|
||||
y = ya[iy] + G4UniformRand() * ( ya[iy+1] - ya[iy] ) ;
|
||||
else
|
||||
y = ya[iy] ;
|
||||
@@ -573,14 +567,14 @@ G4Element* G4MuBremsstrahlung::SelectRandomAtom(G4Material* aMaterial) const
|
||||
G4double rval = G4UniformRand()*((*PartialSumSigma(Index))(NumberOfElements-1));
|
||||
for ( G4int i=0; i < NumberOfElements; i++ )
|
||||
if (rval <= (*PartialSumSigma(Index))(i)) return ((*theElementVector)(i));
|
||||
G4cout << " WARNING !!! - The Material '"<< aMaterial->GetName()
|
||||
<< "' has no elements, NULL pointer returned." << endl;
|
||||
G4cout << " WARNING !!! - The Material " << aMaterial->GetName()
|
||||
<< " has no elements, NULL pointer returned." << endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void G4MuBremsstrahlung::PrintInfoDefinition()
|
||||
{
|
||||
G4String comments = "cross sections from R. Kokoulin \n ";
|
||||
G4String comments = "theoretical cross section \n ";
|
||||
comments += " Good description up to 1000 TeV.";
|
||||
|
||||
G4cout << endl << GetProcessName() << ": " << comments
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuEnergyLoss.cc,v 2.8 1998/12/09 09:20:42 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4MuEnergyLoss.cc,v 1.6 1999/06/18 11:30:47 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
@@ -42,7 +42,7 @@
|
||||
// The NbOfProcesses data member can be changed using the (public static)
|
||||
// functions Get/Set/Plus/MinusNbOfProcesses (see G4MuEnergyLoss.hh)
|
||||
|
||||
G4int G4MuEnergyLoss::NbOfProcesses = 3 ;
|
||||
G4int G4MuEnergyLoss::NbOfProcesses = 3 ; // !!!!!!!!!!!!!!!
|
||||
|
||||
G4PhysicsTable** G4MuEnergyLoss::RecorderOfmuplusProcess =
|
||||
new G4PhysicsTable*[10] ;
|
||||
@@ -74,9 +74,8 @@ G4PhysicsTable* G4MuEnergyLoss::themuplusRangeCoeffCTable = NULL ;
|
||||
G4PhysicsTable* G4MuEnergyLoss::themuminusRangeCoeffATable = NULL ;
|
||||
G4PhysicsTable* G4MuEnergyLoss::themuminusRangeCoeffBTable = NULL ;
|
||||
G4PhysicsTable* G4MuEnergyLoss::themuminusRangeCoeffCTable = NULL ;
|
||||
|
||||
G4double G4MuEnergyLoss::CutInmupluslossTable = 0. ;
|
||||
G4double G4MuEnergyLoss::CutInmuminuslossTable = 0. ;
|
||||
|
||||
G4EnergyLossMessenger* G4MuEnergyLoss::eLossMessenger = NULL ;
|
||||
|
||||
// constructor and destructor
|
||||
|
||||
@@ -94,7 +93,8 @@ G4MuEnergyLoss::G4MuEnergyLoss(const G4String& processName)
|
||||
theRangeCoeffBTable(NULL),
|
||||
theRangeCoeffCTable(NULL),
|
||||
lastMaterial(NULL),
|
||||
lastCutInRange(0.),
|
||||
lastgammaCutInRange(0.),
|
||||
lastelectronCutInRange(0.),
|
||||
theElectron ( G4Electron::Electron() ),
|
||||
thePositron ( G4Positron::Positron() ),
|
||||
theMuonPlus ( G4MuonPlus::MuonPlus() ),
|
||||
@@ -114,56 +114,39 @@ G4MuEnergyLoss::~G4MuEnergyLoss()
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
// calculate data members TotBin,LOGRTable,RTable first
|
||||
G4double lrate ;
|
||||
G4int nbin ;
|
||||
G4double binning = 2.*dRoverRange ;
|
||||
lrate = log(HighestKineticEnergy/LowestKineticEnergy) ;
|
||||
nbin = G4int((lrate/log(1.+binning) + lrate/log(1.+2.*binning))/2.);
|
||||
nbin = (nbin+25)/50 ;
|
||||
TotBin = 50*nbin ;
|
||||
if(TotBin<50)
|
||||
TotBin = 50 ;
|
||||
if(TotBin>500)
|
||||
TotBin = 500 ;
|
||||
G4double binning = dRoverRange;
|
||||
G4double lrate = log(HighestKineticEnergy/LowestKineticEnergy);
|
||||
G4int nbin = G4int(lrate/log(1.+binning) + 0.5 );
|
||||
nbin = (nbin+25)/50;
|
||||
TotBin =50*nbin ;
|
||||
if (TotBin<50) TotBin = 50;
|
||||
if (TotBin>500) TotBin = 500;
|
||||
LOGRTable=lrate/TotBin;
|
||||
RTable =exp(LOGRTable);
|
||||
|
||||
G4bool MakeTable ;
|
||||
ParticleMass = aParticleType.GetPDGMass() ;
|
||||
G4double Charge = aParticleType.GetPDGCharge() ;
|
||||
CutInRange = aParticleType.GetLengthCuts();
|
||||
G4double gammaCutInRange = G4Gamma::Gamma()->GetCuts();
|
||||
G4double electronCutInRange = G4Electron::Electron()->GetCuts();
|
||||
|
||||
// Create tables only if there is a new cut value !*************************
|
||||
if( Charge > 0.)
|
||||
MakeTable = false ;
|
||||
// Create tables only if there are new cut values
|
||||
if((gammaCutInRange == lastgammaCutInRange) &&
|
||||
(electronCutInRange == lastelectronCutInRange))
|
||||
{
|
||||
if(CounterOfmuplusProcess==NbOfProcesses)
|
||||
{
|
||||
if(CutInRange != CutInmupluslossTable)
|
||||
MakeTable = true ;
|
||||
CutInmupluslossTable = CutInRange ;
|
||||
}
|
||||
else
|
||||
{
|
||||
MakeTable = false ;
|
||||
}
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(CounterOfmuminusProcess==NbOfProcesses)
|
||||
{
|
||||
if(CutInRange != CutInmuminuslossTable)
|
||||
MakeTable = true ;
|
||||
CutInmuminuslossTable = CutInRange ;
|
||||
}
|
||||
else
|
||||
{
|
||||
MakeTable = false ;
|
||||
}
|
||||
if((Charge > 0.)&&(CounterOfmuplusProcess==NbOfProcesses))
|
||||
MakeTable = true ;
|
||||
if((Charge < 0.)&&(CounterOfmuminusProcess==NbOfProcesses))
|
||||
MakeTable = true ;
|
||||
}
|
||||
|
||||
|
||||
if( MakeTable )
|
||||
{
|
||||
|
||||
// Build energy loss table as a sum of the energy loss due to the
|
||||
// different processes.
|
||||
const G4MaterialTable* theMaterialTable=
|
||||
@@ -203,66 +186,53 @@ G4MuEnergyLoss::~G4MuEnergyLoss()
|
||||
|
||||
if(CounterOfProcess == NbOfProcesses)
|
||||
{
|
||||
|
||||
// loop for materials
|
||||
G4double LowEdgeEnergy , Value ;
|
||||
G4bool isOutRange ;
|
||||
G4int J;
|
||||
|
||||
G4PhysicsTable* pointer ;
|
||||
|
||||
for (J=0; J<numOfMaterials; J++)
|
||||
{
|
||||
// create physics vector and fill it
|
||||
|
||||
G4PhysicsLogVector* aVector = new G4PhysicsLogVector(
|
||||
LowestKineticEnergy, HighestKineticEnergy, TotBin);
|
||||
|
||||
// loop for the kinetic energy
|
||||
for (G4int i=0; i<TotBin; i++)
|
||||
{
|
||||
LowEdgeEnergy = aVector->GetLowEdgeEnergy(i) ;
|
||||
|
||||
Value = 0. ;
|
||||
|
||||
for (G4int process=0; process < NbOfProcesses; process++)
|
||||
{
|
||||
pointer= RecorderOfProcess[process];
|
||||
Value += (*pointer)[J]->
|
||||
GetValue(LowEdgeEnergy,isOutRange) ;
|
||||
|
||||
}
|
||||
|
||||
aVector->PutValue(i,Value) ;
|
||||
|
||||
}
|
||||
|
||||
theDEDXTable->insert(aVector) ;
|
||||
}
|
||||
}
|
||||
|
||||
// reset counter to zero ..................
|
||||
if( Charge >0.)
|
||||
CounterOfmuplusProcess=0 ;
|
||||
else
|
||||
CounterOfmuminusProcess=0 ;
|
||||
// reset counter to zero ..................
|
||||
if( Charge >0.)
|
||||
CounterOfmuplusProcess=0 ;
|
||||
else
|
||||
CounterOfmuminusProcess=0 ;
|
||||
|
||||
// Build range table
|
||||
BuildRangeTable( aParticleType);
|
||||
// Build range table
|
||||
BuildRangeTable( aParticleType);
|
||||
|
||||
// Build lab/proper time tables
|
||||
BuildTimeTables( aParticleType) ;
|
||||
// Build lab/proper time tables
|
||||
BuildTimeTables( aParticleType) ;
|
||||
|
||||
// Build coeff tables for the energy loss calculation
|
||||
BuildRangeCoeffATable( aParticleType);
|
||||
BuildRangeCoeffBTable( aParticleType);
|
||||
BuildRangeCoeffCTable( aParticleType);
|
||||
|
||||
// invert the range table
|
||||
BuildInverseRangeTable(aParticleType);
|
||||
// Build coeff tables for the energy loss calculation
|
||||
BuildRangeCoeffATable( aParticleType);
|
||||
BuildRangeCoeffBTable( aParticleType);
|
||||
BuildRangeCoeffCTable( aParticleType);
|
||||
|
||||
// invert the range table
|
||||
BuildInverseRangeTable(aParticleType);
|
||||
}
|
||||
|
||||
}
|
||||
// make the energy loss and the range table available
|
||||
const G4double lowestKineticEnergy(1.00*keV);
|
||||
const G4double highestKineticEnergy(1000000.*TeV);
|
||||
@@ -273,6 +243,10 @@ G4MuEnergyLoss::~G4MuEnergyLoss()
|
||||
(Charge > 0)? theLabTimemuplusTable: theLabTimemuminusTable,
|
||||
(Charge > 0)? theProperTimemuplusTable: theProperTimemuminusTable,
|
||||
lowestKineticEnergy, highestKineticEnergy, 1.,TotBin);
|
||||
|
||||
lastgammaCutInRange = gammaCutInRange ;
|
||||
lastelectronCutInRange = electronCutInRange ;
|
||||
}
|
||||
}
|
||||
|
||||
void G4MuEnergyLoss::BuildRangeTable(
|
||||
@@ -1171,51 +1145,44 @@ G4VParticleChange* G4MuEnergyLoss::AlongStepDoIt(
|
||||
|
||||
// do not track further if kin.energy < 1. eV
|
||||
const G4double MinKineticEnergy = 1.*eV;
|
||||
const G4double linLossLimit = 0.02 ;
|
||||
|
||||
G4double MeanLoss, finalT;
|
||||
|
||||
if (E < MinKineticEnergy) { finalT = 0.; MeanLoss = E;}
|
||||
|
||||
else if (EnergyBinNumber <= 0)
|
||||
{
|
||||
if (Step >= fRangeNow) { finalT = 0.; MeanLoss = E;}
|
||||
else
|
||||
{
|
||||
finalT = E*(1.-Step/fRangeNow)*(1.-Step/fRangeNow);
|
||||
if (finalT < MinKineticEnergy) finalT = 0.;
|
||||
MeanLoss = E - finalT;
|
||||
}
|
||||
}
|
||||
if (E < MinKineticEnergy) finalT = 0.;
|
||||
else if ( E<= LowestKineticEnergy)
|
||||
{
|
||||
if (Step >= fRangeNow) finalT = 0.;
|
||||
else finalT = E - Step*fdEdx ;
|
||||
}
|
||||
|
||||
else if (E>=HighestKineticEnergy) finalT = E - Step*fdEdx;
|
||||
|
||||
else if (EnergyBinNumber >= (TotBin-1))
|
||||
{
|
||||
// simple solution for the moment: loss = Step*dE/dx (dE/dx const)
|
||||
MeanLoss = Step*fdEdx;
|
||||
if (MeanLoss > E) MeanLoss = E;
|
||||
finalT = E - MeanLoss;
|
||||
if (finalT < MinKineticEnergy) { finalT = 0.; MeanLoss = E;}
|
||||
}
|
||||
|
||||
else if (Step >= fRangeNow) { finalT = 0.; MeanLoss = E;}
|
||||
else if (Step >= fRangeNow) finalT = 0.;
|
||||
|
||||
else
|
||||
{
|
||||
{
|
||||
if(Step/fRangeNow < linLossLimit) finalT = E-Step*fdEdx ;
|
||||
else
|
||||
{
|
||||
if (charge<0.) finalT = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
theMuonMinus,fRangeNow-Step,aMaterial);
|
||||
else finalT = G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
theMuonPlus,fRangeNow-Step,aMaterial);
|
||||
if (finalT < MinKineticEnergy) finalT = 0.;
|
||||
MeanLoss = E-finalT;
|
||||
|
||||
if (MeanLoss < 0.) { MeanLoss = 0.; finalT = E;}
|
||||
|
||||
//now the loss with fluctuation
|
||||
if ((EnlossFlucFlag) && (MeanLoss > 0.) && (MeanLoss < E))
|
||||
{
|
||||
finalT = E-GetLossWithFluct(aParticle,aMaterial,MeanLoss);
|
||||
if (finalT < 0.) finalT = E-MeanLoss;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(finalT < MinKineticEnergy) finalT = 0. ;
|
||||
|
||||
MeanLoss = E-finalT ;
|
||||
|
||||
//now the loss with fluctuation
|
||||
if ((EnlossFlucFlag) && (finalT > 0.) && (finalT < E)&&(E > LowestKineticEnergy))
|
||||
|
||||
{
|
||||
finalT = E-GetLossWithFluct(aParticle,aMaterial,MeanLoss);
|
||||
if (finalT < 0.) finalT = E-MeanLoss;
|
||||
}
|
||||
|
||||
// kill the particle if the kinetic energy <= 0
|
||||
if (finalT <= 0. )
|
||||
@@ -1237,6 +1204,8 @@ G4double G4MuEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
// calculate actual loss from the mean loss
|
||||
// The model used to get the fluctuation is the same as in Glandz in Geant3.
|
||||
{
|
||||
static const G4double Tlow=10.*keV ;
|
||||
|
||||
// check if the material has changed ( cache mechanism)
|
||||
|
||||
if (aMaterial != lastMaterial)
|
||||
@@ -1265,8 +1234,7 @@ G4double G4MuEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
// get particle data
|
||||
G4double Tkin = aParticle->GetKineticEnergy();
|
||||
G4double charge = aParticle->GetDefinition()->GetPDGCharge();
|
||||
if (charge<0.) threshold =((*G4Electron::Electron()).GetCutsInEnergy())[imat];
|
||||
else threshold =((*G4Positron::Positron()).GetCutsInEnergy())[imat];
|
||||
threshold =((*G4Electron::Electron()).GetCutsInEnergy())[imat];
|
||||
|
||||
G4double rmass = electron_mass_c2/ParticleMass;
|
||||
G4double tau = Tkin/ParticleMass, tau1 = tau+1., tau2 = tau*(tau+2.);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuIonisation.cc,v 2.6 1998/11/13 13:38:35 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4MuIonisation.cc,v 1.3 1999/04/13 09:09:41 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -30,6 +30,8 @@
|
||||
#include "G4MuIonisation.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
#include "G4ios.hh"
|
||||
|
||||
// constructor and destructor
|
||||
|
||||
G4MuIonisation::G4MuIonisation(const G4String& processName)
|
||||
@@ -37,11 +39,7 @@ G4MuIonisation::G4MuIonisation(const G4String& processName)
|
||||
LowestKineticEnergy(1.00*keV),
|
||||
HighestKineticEnergy(1000000.*TeV),
|
||||
theMeanFreePathTable(NULL),
|
||||
lastCutInRange(0.),
|
||||
TotBin(100),
|
||||
theElectron ( G4Electron::Electron() ),
|
||||
theMuonPlus ( G4MuonPlus::MuonPlus() ),
|
||||
theMuonMinus ( G4MuonMinus::MuonMinus() )
|
||||
TotBin(100)
|
||||
{ }
|
||||
|
||||
G4MuIonisation::~G4MuIonisation()
|
||||
@@ -63,12 +61,9 @@ void G4MuIonisation::SetPhysicsTableBining(G4double lowE, G4double highE,
|
||||
void G4MuIonisation::BuildPhysicsTable(const G4ParticleDefinition& aParticleType)
|
||||
// just call BuildLossTable+BuildLambdaTable
|
||||
{
|
||||
BuildLossTable(aParticleType) ;
|
||||
G4double Charge = aParticleType.GetPDGCharge();
|
||||
|
||||
CutInRange = aParticleType.GetLengthCuts();
|
||||
|
||||
BuildLossTable(aParticleType) ;
|
||||
|
||||
if(Charge>0.)
|
||||
{
|
||||
RecorderOfmuplusProcess[CounterOfmuplusProcess] = (*this).theLossTable ;
|
||||
@@ -80,11 +75,9 @@ void G4MuIonisation::BuildPhysicsTable(const G4ParticleDefinition& aParticleType
|
||||
CounterOfmuminusProcess++;
|
||||
}
|
||||
|
||||
if(CutInRange != lastCutInRange)
|
||||
{
|
||||
lastCutInRange = CutInRange ;
|
||||
G4double electronCutInRange = G4Electron::Electron()->GetCuts();
|
||||
if(electronCutInRange != lastelectronCutInRange)
|
||||
BuildLambdaTable(aParticleType) ;
|
||||
}
|
||||
|
||||
G4MuEnergyLoss::BuildDEDXTable(aParticleType) ;
|
||||
|
||||
@@ -94,14 +87,7 @@ void G4MuIonisation::BuildPhysicsTable(const G4ParticleDefinition& aParticleType
|
||||
|
||||
void G4MuIonisation::BuildLossTable(const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
G4double Charge = aParticleType.GetPDGCharge() ;
|
||||
|
||||
if(Charge>0.)
|
||||
ParticleCutInKineticEnergy = theMuonPlus->GetCutsInEnergy() ;
|
||||
else
|
||||
ParticleCutInKineticEnergy = theMuonMinus->GetCutsInEnergy() ;
|
||||
|
||||
DeltaCutInKineticEnergy = theElectron->GetCutsInEnergy() ;
|
||||
DeltaCutInKineticEnergy = theElectron->GetCutsInEnergy() ;
|
||||
|
||||
G4double LowEdgeEnergy , ionloss ;
|
||||
G4double RateMass ;
|
||||
@@ -151,11 +137,9 @@ void G4MuIonisation::BuildLossTable(const G4ParticleDefinition& aParticleType)
|
||||
material->GetAtomicNumDensityVector() ;
|
||||
const G4int NumberOfElements=
|
||||
material->GetNumberOfElements() ;
|
||||
|
||||
DeltaCutInKineticEnergyNow = DeltaCutInKineticEnergy[J] ;
|
||||
|
||||
G4double tau,tau0,Tmax,gamma,bg2,beta2,rcut,delta,x,sh ;
|
||||
|
||||
for (G4int i = 0 ; i < TotBin ; i++)
|
||||
{
|
||||
LowEdgeEnergy = aVector->GetLowEdgeEnergy(i) ;
|
||||
@@ -248,7 +232,7 @@ void G4MuIonisation::BuildLossTable(const G4ParticleDefinition& aParticleType)
|
||||
void G4MuIonisation::BuildLambdaTable(const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
// Build mean free path tables for the delta ray production process
|
||||
G4double LowEdgeEnergy , Value ,sigma ;
|
||||
G4double LowEdgeEnergy,Tmax , Value ,sigma ;
|
||||
G4bool isOutRange ;
|
||||
const G4MaterialTable* theMaterialTable=G4Material::GetMaterialTable();
|
||||
|
||||
@@ -263,7 +247,6 @@ void G4MuIonisation::BuildLambdaTable(const G4ParticleDefinition& aParticleType)
|
||||
|
||||
// get electron and particle cuts in kinetic energy
|
||||
DeltaCutInKineticEnergy = theElectron->GetCutsInEnergy() ;
|
||||
ParticleCutInKineticEnergy = aParticleType.GetEnergyCuts() ;
|
||||
|
||||
for (G4int J=0 ; J < numOfMaterials; J++)
|
||||
{
|
||||
@@ -282,13 +265,23 @@ void G4MuIonisation::BuildLambdaTable(const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
LowEdgeEnergy = aVector->GetLowEdgeEnergy(i) ;
|
||||
sigma = 0. ;
|
||||
|
||||
for (G4int iel=0; iel<NumberOfElements; iel++ )
|
||||
|
||||
// check threshold here !
|
||||
G4double Tmax = 2.*electron_mass_c2*LowEdgeEnergy*
|
||||
(LowEdgeEnergy+2.*ParticleMass)/
|
||||
(ParticleMass*ParticleMass+2.*electron_mass_c2*
|
||||
(LowEdgeEnergy+ParticleMass)+
|
||||
electron_mass_c2*electron_mass_c2) ;
|
||||
|
||||
if(Tmax > DeltaCutInKineticEnergyNow)
|
||||
{
|
||||
sigma += theAtomicNumDensityVector[iel]*
|
||||
for (G4int iel=0; iel<NumberOfElements; iel++ )
|
||||
{
|
||||
sigma += theAtomicNumDensityVector[iel]*
|
||||
ComputeMicroscopicCrossSection(aParticleType,
|
||||
LowEdgeEnergy,
|
||||
(*theElementVector)(iel)->GetZ() ) ;
|
||||
}
|
||||
}
|
||||
|
||||
Value = sigma<=0 ? DBL_MAX : 1./sigma ;
|
||||
@@ -341,7 +334,6 @@ G4double G4MuIonisation::ComputeMicroscopicCrossSection(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TotalCrossSection ;
|
||||
}
|
||||
|
||||
@@ -430,10 +422,12 @@ G4VParticleChange* G4MuIonisation::PostStepDoIt(
|
||||
(a0+log((2.*TotalEnergy-twoep)/ParticleMass)-
|
||||
log(1.+twoep/electron_mass_c2)))
|
||||
/grejc ;
|
||||
|
||||
} while( G4UniformRand()>grej );
|
||||
}
|
||||
|
||||
DeltaKineticEnergy = x * MaxKineticEnergyTransfer ;
|
||||
|
||||
if(DeltaKineticEnergy <= 0.)
|
||||
return G4VContinuousDiscreteProcess::PostStepDoIt(trackData,stepData);
|
||||
|
||||
@@ -467,15 +461,18 @@ G4VParticleChange* G4MuIonisation::PostStepDoIt(
|
||||
finalKineticEnergy = KineticEnergy - DeltaKineticEnergy ;
|
||||
if (finalKineticEnergy > 0. )
|
||||
{
|
||||
// changed energy and momentum of the actual particle
|
||||
finalMomentum=sqrt(finalKineticEnergy*
|
||||
(finalKineticEnergy+2.*ParticleMass)) ;
|
||||
finalPx = (TotalMomentum*ParticleDirection.x()
|
||||
-DeltaTotalMomentum*DeltaDirection.x())/finalMomentum ;
|
||||
finalPy = (TotalMomentum*ParticleDirection.y()
|
||||
-DeltaTotalMomentum*DeltaDirection.y())/finalMomentum ;
|
||||
finalPz = (TotalMomentum*ParticleDirection.z()
|
||||
-DeltaTotalMomentum*DeltaDirection.z())/finalMomentum ;
|
||||
finalPx = TotalMomentum*ParticleDirection.x()
|
||||
- DeltaTotalMomentum*DeltaDirection.x();
|
||||
finalPy = TotalMomentum*ParticleDirection.y()
|
||||
- DeltaTotalMomentum*DeltaDirection.y();
|
||||
finalPz = TotalMomentum*ParticleDirection.z()
|
||||
- DeltaTotalMomentum*DeltaDirection.z();
|
||||
finalMomentum =
|
||||
sqrt(finalPx*finalPx+finalPy*finalPy+finalPz*finalPz) ;
|
||||
finalPx /= finalMomentum ;
|
||||
finalPy /= finalMomentum ;
|
||||
finalPz /= finalMomentum ;
|
||||
|
||||
aParticleChange.SetMomentumChange( finalPx,finalPy,finalPz );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MuPairProduction.cc,v 2.10 1998/12/02 16:33:18 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4MuPairProduction.cc,v 1.6 1999/06/14 13:26:35 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
@@ -21,6 +20,7 @@
|
||||
// **************************************************************
|
||||
// 04-06-98, in DoIt,secondary production condition:range>min(threshold,safety)
|
||||
// 26/10/98, new stuff from R. Kokoulin + cleanup , L.Urban
|
||||
// 06/05/99 , bug fixed , L.Urban
|
||||
// --------------------------------------------------------------
|
||||
|
||||
#include "G4MuPairProduction.hh"
|
||||
@@ -42,11 +42,7 @@ G4MuPairProduction::G4MuPairProduction(const G4String& processName)
|
||||
theMeanFreePathTable(NULL),
|
||||
LowestKineticEnergy (1.*GeV),
|
||||
HighestKineticEnergy (1000000.*TeV),
|
||||
TotBin(50),
|
||||
theElectron (G4Electron::Electron() ),
|
||||
thePositron (G4Positron::Positron() ),
|
||||
theMuonMinus ( G4MuonMinus::MuonMinus() ),
|
||||
theMuonPlus ( G4MuonPlus::MuonPlus() )
|
||||
TotBin(50)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -89,16 +85,16 @@ void G4MuPairProduction::BuildPhysicsTable(
|
||||
if(theMeanFreePathTable == NULL)
|
||||
MakeSamplingTables(&aParticleType) ;
|
||||
|
||||
BuildLambdaTable(aParticleType) ;
|
||||
G4double electronCutInRange = G4Electron::Electron()->GetCuts();
|
||||
if(electronCutInRange != lastelectronCutInRange)
|
||||
BuildLambdaTable(aParticleType) ;
|
||||
|
||||
G4MuEnergyLoss::BuildDEDXTable(aParticleType) ;
|
||||
|
||||
if(&aParticleType==theMuonPlus)
|
||||
PrintInfoDefinition() ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void G4MuPairProduction::BuildLossTable(
|
||||
const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
@@ -153,7 +149,6 @@ void G4MuPairProduction::BuildLossTable(
|
||||
natom = theAtomicNumDensityVector[iel] ;
|
||||
loss = ComputePairLoss(&aParticleType,
|
||||
Z,KineticEnergy,eCut,pCut) ;
|
||||
|
||||
pairloss += natom*loss ;
|
||||
}
|
||||
if(pairloss<0.)
|
||||
@@ -166,7 +161,6 @@ void G4MuPairProduction::BuildLossTable(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
G4double G4MuPairProduction::ComputePairLoss(
|
||||
const G4ParticleDefinition* ParticleType,
|
||||
G4double AtomicNumber,
|
||||
@@ -180,7 +174,7 @@ G4double G4MuPairProduction::ComputePairLoss(
|
||||
wgi[] ={ 0.0506,0.1112,0.1569,0.1813,0.1813,0.1569,0.1112,0.0506 };
|
||||
static const G4double ak1=6.9 ;
|
||||
static const G4double ak2=1.0 ;
|
||||
G4double sqrte = sqrt(exp(1.)) ;
|
||||
static const G4double sqrte = sqrt(exp(1.)) ;
|
||||
G4double z13 = exp(log(AtomicNumber)/3.) ;
|
||||
|
||||
G4double loss = 0.0 ;
|
||||
@@ -236,6 +230,7 @@ void G4MuPairProduction::BuildLambdaTable(
|
||||
}
|
||||
theMeanFreePathTable = new
|
||||
G4PhysicsTable( G4Material::GetNumberOfMaterials() ) ;
|
||||
PartialSumSigma.resize(G4Material::GetNumberOfMaterials());
|
||||
|
||||
G4PhysicsLogVector* ptrVector;
|
||||
for ( G4int J=0 ; J < G4Material::GetNumberOfMaterials(); J++ )
|
||||
@@ -304,7 +299,7 @@ G4double G4MuPairProduction::ComputeMicroscopicCrossSection(
|
||||
static const G4double ak1=6.9 ;
|
||||
static const G4double ak2=1.0 ;
|
||||
|
||||
G4double sqrte = sqrt(exp(1.)) ;
|
||||
static const G4double sqrte = sqrt(exp(1.)) ;
|
||||
G4double z13 = exp(log(AtomicNumber)/3.) ;
|
||||
|
||||
G4double CrossSection = 0.0 ;
|
||||
@@ -357,7 +352,7 @@ void G4MuPairProduction::MakeSamplingTables(
|
||||
|
||||
MinPairEnergy = 4.*electron_mass_c2 ;
|
||||
|
||||
G4double sqrte = sqrt(exp(1.)) ;
|
||||
static const G4double sqrte = sqrt(exp(1.)) ;
|
||||
|
||||
for (G4int iz=0; iz<nzdat; iz++)
|
||||
{
|
||||
@@ -399,6 +394,7 @@ void G4MuPairProduction::MakeSamplingTables(
|
||||
proba[iz][it][nbin] = CrossSection ;
|
||||
}
|
||||
}
|
||||
ya[NBIN]=0. ;
|
||||
|
||||
if(CrossSection > 0.)
|
||||
{
|
||||
@@ -420,7 +416,7 @@ G4double G4MuPairProduction::ComputeDDMicroscopicCrossSection(
|
||||
// Calculates the double differential (DD) microscopic cross section
|
||||
// using the cross section formula of R.P. Kokoulin (18/01/98)
|
||||
{
|
||||
G4double sqrte = sqrt(exp(1.)) ;
|
||||
static const G4double sqrte = sqrt(exp(1.)) ;
|
||||
|
||||
G4double bbbtf= 183. ;
|
||||
G4double bbbh = 202.4 ;
|
||||
@@ -595,23 +591,18 @@ G4VParticleChange* G4MuPairProduction::PostStepDoIt(const G4Track& trackData,
|
||||
aDynamicParticle->GetMomentumDirection();
|
||||
|
||||
// e-e+ cut in this material
|
||||
G4double ElectronEnergyCut =
|
||||
(G4Electron::GetCutsInEnergy())[aMaterial->GetIndex()];
|
||||
G4double PositronEnergyCut =
|
||||
(G4Electron::GetCutsInEnergy())[aMaterial->GetIndex()];
|
||||
G4double ElectronEnergyCut = electron_mass_c2+
|
||||
((*G4Electron::Electron()).GetCutsInEnergy())[aMaterial->GetIndex()];
|
||||
G4double PositronEnergyCut = electron_mass_c2+
|
||||
((*G4Positron::Positron()).GetCutsInEnergy())[aMaterial->GetIndex()];
|
||||
G4double CutInPairEnergy = ElectronEnergyCut + PositronEnergyCut ;
|
||||
|
||||
G4double MinPairEnergy = 4.*electron_mass_c2 ;
|
||||
if (CutInPairEnergy < MinPairEnergy) CutInPairEnergy = MinPairEnergy ;
|
||||
|
||||
// check against insufficient energy
|
||||
if (KineticEnergy < CutInPairEnergy )
|
||||
{
|
||||
aParticleChange.SetMomentumChange( ParticleDirection );
|
||||
aParticleChange.SetEnergyChange( KineticEnergy );
|
||||
aParticleChange.SetLocalEnergyDeposit (0.);
|
||||
aParticleChange.SetNumberOfSecondaries(0);
|
||||
return G4VContinuousDiscreteProcess::PostStepDoIt(trackData,stepData);
|
||||
}
|
||||
if(KineticEnergy < CutInPairEnergy )
|
||||
return G4VContinuousDiscreteProcess::PostStepDoIt(trackData,stepData);
|
||||
|
||||
// select randomly one element constituing the material
|
||||
G4Element* anElement = SelectRandomAtom(aMaterial);
|
||||
@@ -650,7 +641,7 @@ G4VParticleChange* G4MuPairProduction::PostStepDoIt(const G4Track& trackData,
|
||||
del = abs(log(KineticEnergy)-log(tdat[it])) ;
|
||||
if(del<delmin)
|
||||
{
|
||||
del=delmin;
|
||||
delmin=del;
|
||||
itt=it ;
|
||||
}
|
||||
}
|
||||
@@ -662,17 +653,17 @@ G4VParticleChange* G4MuPairProduction::PostStepDoIt(const G4Track& trackData,
|
||||
do {
|
||||
iy += 1 ;
|
||||
} while ((ya[iy] < yc )&&(iy < NBINminus1)) ;
|
||||
G4double norm = 1./(1.-proba[izz][itt][iy]) ;
|
||||
G4double norm = proba[izz][itt][iy] ;
|
||||
|
||||
G4double r = G4UniformRand() ;
|
||||
G4double r = norm+G4UniformRand()*(1.-norm) ;
|
||||
|
||||
iy = -1 ;
|
||||
iy -= 1 ;
|
||||
do {
|
||||
iy += 1 ;
|
||||
} while (((norm*proba[izz][itt][iy]) < r)&&(iy < NBINminus1)) ;
|
||||
} while ((proba[izz][itt][iy] < r)&&(iy < NBINminus1)) ;
|
||||
|
||||
//sampling is uniformly in y in the bin
|
||||
if( iy < NBINminus1 )
|
||||
if( iy < NBIN )
|
||||
y = ya[iy] + G4UniformRand() * ( ya[iy+1] - ya[iy]) ;
|
||||
else
|
||||
y = ya[iy] ;
|
||||
@@ -801,7 +792,7 @@ G4Element* G4MuPairProduction::SelectRandomAtom(G4Material* aMaterial) const
|
||||
}
|
||||
void G4MuPairProduction::PrintInfoDefinition()
|
||||
{
|
||||
G4String comments = "cross sections from R. Kokoulin \n ";
|
||||
G4String comments = "theoretical cross sections \n ";
|
||||
comments += " Good description up to 1000 TeV.";
|
||||
|
||||
G4cout << endl << GetProcessName() << ": " << comments
|
||||
|
||||
Reference in New Issue
Block a user