Import Geant4 8.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:44:26 +02:00
parent 8a51e0bc40
commit 216a75eeb1
8717 changed files with 360418 additions and 141343 deletions
@@ -1,27 +1,30 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * 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. *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EnergyLossForExtrapolator.cc,v 1.5 2005/06/27 15:29:29 gunter Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: G4EnergyLossForExtrapolator.cc,v 1.9 2006/06/29 19:49:34 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//---------------------------------------------------------------------------
//
@@ -33,15 +36,18 @@
// Author: 09.12.04 V.Ivanchenko
//
// Modification:
// 08-04-05 Rename Propogator -> Extrapolator
// 08-04-05 Rename Propogator -> Extrapolator (V.Ivanchenko)
// 16-03-06 Add muon tables and fix bug in units (V.Ivanchenko)
// 21-03-06 Add verbosity defined in the constructor and Initialisation
// start only when first public method is called (V.Ivanchenko)
// 03-05-06 Remove unused pointer G4Material* from number of methods (VI)
//
//----------------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4EnergyLossForExtrapolator.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsLogVector.hh"
#include "G4ParticleDefinition.hh"
#include "G4Material.hh"
@@ -49,19 +55,22 @@
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4Proton.hh"
#include "G4MuonPlus.hh"
#include "G4MuonMinus.hh"
#include "G4ParticleTable.hh"
#include "G4LossTableBuilder.hh"
#include "G4MollerBhabhaModel.hh"
#include "G4BetheBlochModel.hh"
#include "G4eBremsstrahlungModel.hh"
#include "G4MuPairProductionModel.hh"
#include "G4MuBremsstrahlungModel.hh"
#include "G4ProductionCuts.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4EnergyLossForExtrapolator::G4EnergyLossForExtrapolator()
{
Initialisation();
}
G4EnergyLossForExtrapolator::G4EnergyLossForExtrapolator(G4int verb)
:verbose(verb),isInitialised(false)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -83,20 +92,22 @@ G4EnergyLossForExtrapolator:: ~G4EnergyLossForExtrapolator()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4EnergyLossForExtrapolator::EnergyAfterStep(G4double kinEnergy,
G4double step,
G4double stepLength,
const G4Material* mat,
const G4ParticleDefinition* part)
{
if(!isInitialised) Initialisation();
G4double kinEnergyFinal = kinEnergy;
if(mat && part) {
G4double r = ComputeRange(kinEnergy,mat,part);
G4double step = ComputeTrueStep(mat,part,kinEnergy,stepLength);
G4double r = ComputeRange(kinEnergy,part);
if(r <= step) {
kinEnergyFinal = 0.0;
} else if(step < linLossLimit*r) {
kinEnergyFinal -= step*ComputeDEDX(kinEnergy,mat,part);
kinEnergyFinal -= step*ComputeDEDX(kinEnergy,part);
} else {
G4double r1 = r - step;
kinEnergyFinal = ComputeEnergy(r1,mat,part);
kinEnergyFinal = ComputeEnergy(r1,part);
}
}
return kinEnergyFinal;
@@ -105,18 +116,22 @@ G4double G4EnergyLossForExtrapolator::EnergyAfterStep(G4double kinEnergy,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4EnergyLossForExtrapolator::EnergyBeforeStep(G4double kinEnergy,
G4double step,
G4double stepLength,
const G4Material* mat,
const G4ParticleDefinition* part)
{
if(!isInitialised) Initialisation();
G4double kinEnergyFinal = kinEnergy;
if(mat && part) {
G4double r = ComputeRange(kinEnergy,mat,part);
G4double step = ComputeTrueStep(mat,part,kinEnergy,stepLength);
G4double r = ComputeRange(kinEnergy,part);
if(step < linLossLimit*r) {
kinEnergyFinal += step*ComputeDEDX(kinEnergy,mat,part);
kinEnergyFinal += step*ComputeDEDX(kinEnergy,part);
} else {
G4double r1 = r + step;
kinEnergyFinal = ComputeEnergy(r1,mat,part);
kinEnergyFinal = ComputeEnergy(r1,part);
}
}
return kinEnergyFinal;
@@ -124,57 +139,65 @@ G4double G4EnergyLossForExtrapolator::EnergyBeforeStep(G4double kinEnergy,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4EnergyLossForExtrapolator::AverageScatteringAngle(G4double kinEnergy,
G4double step,
const G4Material* mat,
const G4ParticleDefinition* part)
G4double G4EnergyLossForExtrapolator::ComputeTrueStep(const G4Material* mat,
const G4ParticleDefinition* part,
G4double kinEnergy, G4double stepLength)
{
G4double theta = 0.0;
if(mat && part && kinEnergy > 0.0) {
G4double t = step/mat->GetRadlen();
G4double M = part->GetPDGMass();
G4double z = std::abs(part->GetPDGCharge()/eplus);
G4double bpc = kinEnergy*(kinEnergy + 2.0*M)/(kinEnergy+M);
theta = 13.6*MeV*z*std::sqrt(t)/bpc;
if(!isInitialised) Initialisation();
G4bool flag = false;
if(part != currentParticle) {
flag = true;
currentParticle = part;
mass = part->GetPDGMass();
G4double q = part->GetPDGCharge()/eplus;
charge2 = q*q;
}
return theta;
}
if(mat != currentMaterial) {
G4int i = mat->GetIndex();
if(i >= nmat) {
G4cout << "### G4EnergyLossForExtrapolator WARNING:index i= "
<< i << " is out of table - NO extrapolation" << G4endl;
} else {
flag = true;
currentMaterial = mat;
electronDensity = mat->GetElectronDensity();
radLength = mat->GetRadlen();
index = i;
}
}
if(flag || kinEnergy != kineticEnergy) {
kineticEnergy = kinEnergy;
G4double tau = kinEnergy/mass;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4EnergyLossForExtrapolator::EnergyDispersion(G4double kinEnergy,
G4double step,
const G4Material* mat,
const G4ParticleDefinition* part)
{
G4double sig2 = 0.0;
if(part) {
G4double tmax = kinEnergy;
G4double mass = part->GetPDGMass();
G4double tau = kinEnergy/mass;
G4double gam = tau + 1.0;
G4double bg2 = tau * (tau+2.0);
G4double beta2 = bg2/(gam*gam);
gam = tau + 1.0;
bg2 = tau * (tau + 2.0);
beta2 = bg2/(gam*gam);
tmax = kinEnergy;
if(part == electron) tmax *= 0.5;
else if(part != positron) {
G4double r = electron_mass_c2/mass;
tmax = 2.0*bg2*electron_mass_c2/(1.0 + 2.0*gam*r + r*r);
}
G4double electronDensity = mat->GetElectronDensity();
G4double q = part->GetPDGCharge()/eplus;
sig2 = (1.0/beta2 - 0.5)* twopi_mc2_rcl2 * tmax*step * electronDensity * q *q;
}
return sig2;
}
G4double theta = ComputeScatteringAngle(stepLength);
return stepLength*std::sqrt(1.0 + 0.625*theta*theta);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4EnergyLossForExtrapolator::Initialisation()
{
isInitialised = true;
if(verbose>1)
G4cout << "### G4EnergyLossForExtrapolator::Initialisation" << G4endl;
currentParticle = 0;
currentMaterial = 0;
kineticEnergy = 0.0;
electron = G4Electron::Electron();
positron = G4Positron::Positron();
proton = G4Proton::Proton();
muonPlus = G4MuonPlus::MuonPlus();
muonMinus= G4MuonMinus::MuonMinus();
currentParticleName = "";
@@ -182,7 +205,6 @@ void G4EnergyLossForExtrapolator::Initialisation()
emin = 1.*MeV;
emax = 100.*GeV;
nbins = 50;
verbose = 1;
nmat = G4Material::GetNumberOfMaterials();
const G4MaterialTable* mtable = G4Material::GetMaterialTable();
@@ -196,24 +218,43 @@ void G4EnergyLossForExtrapolator::Initialisation()
dedxElectron = PrepareTable();
dedxPositron = PrepareTable();
dedxMuon = PrepareTable();
dedxProton = PrepareTable();
rangeElectron = PrepareTable();
rangePositron = PrepareTable();
rangeMuon = PrepareTable();
rangeProton = PrepareTable();
invRangeElectron = PrepareTable();
invRangePositron = PrepareTable();
invRangeMuon = PrepareTable();
invRangeProton = PrepareTable();
G4LossTableBuilder builder;
if(verbose>1)
G4cout << "### G4EnergyLossForExtrapolator Builds electron tables" << G4endl;
ComputeElectronDEDX(electron, dedxElectron);
builder.BuildRangeTable(dedxElectron,rangeElectron);
builder.BuildInverseRangeTable(rangeElectron, invRangeElectron);
if(verbose>1)
G4cout << "### G4EnergyLossForExtrapolator Builds positron tables" << G4endl;
ComputeElectronDEDX(positron, dedxPositron);
builder.BuildRangeTable(dedxPositron, rangePositron);
builder.BuildInverseRangeTable(rangePositron, invRangePositron);
if(verbose>1)
G4cout << "### G4EnergyLossForExtrapolator Builds muon tables" << G4endl;
ComputeMuonDEDX(muonPlus, dedxMuon);
builder.BuildRangeTable(dedxMuon, rangeMuon);
builder.BuildInverseRangeTable(rangeMuon, invRangeMuon);
if(verbose>1)
G4cout << "### G4EnergyLossForExtrapolator Builds proton tables" << G4endl;
ComputeProtonDEDX(proton, dedxProton);
builder.BuildRangeTable(dedxProton, rangeProton);
builder.BuildInverseRangeTable(rangeProton, invRangeProton);
@@ -238,29 +279,32 @@ G4PhysicsTable* G4EnergyLossForExtrapolator::PrepareTable()
const G4ParticleDefinition* G4EnergyLossForExtrapolator::FindParticle(const G4String& name)
{
const G4ParticleDefinition* p = 0;
if(name != currentParticleName) {
currentParticle = G4ParticleTable::GetParticleTable()->FindParticle(name);
if(!currentParticle) {
G4cout << "### WARNING: G4EmCalculator::FindParticle fails to find " << name << G4endl;
p = G4ParticleTable::GetParticleTable()->FindParticle(name);
if(!p) {
G4cout << "### G4EnergyLossForExtrapolator WARNING:FindParticle fails to find "
<< name << G4endl;
}
currentParticleName = name;
} else {
p = currentParticle;
}
return currentParticle;
return p;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4EnergyLossForExtrapolator::ComputeDEDX(G4double kinEnergy,
const G4Material* mat,
const G4ParticleDefinition* part)
{
G4double x = 0.0;
if(part == electron) x = ComputeValue(kinEnergy, mat, dedxElectron);
else if(part == positron) x = ComputeValue(kinEnergy, mat, dedxPositron);
else {
G4double e = kinEnergy*proton_mass_c2/part->GetPDGMass();
G4double z = part->GetPDGCharge()/eplus;
x = ComputeValue(e, mat, dedxProton)*z*z;
if(part == electron) x = ComputeValue(kinEnergy, dedxElectron);
else if(part == positron) x = ComputeValue(kinEnergy, dedxPositron);
else if(part == muonPlus || part == muonMinus) {
x = ComputeValue(kinEnergy, dedxMuon);
} else {
G4double e = kinEnergy*proton_mass_c2/mass;
x = ComputeValue(e, dedxProton)*charge2;
}
return x;
}
@@ -268,17 +312,17 @@ G4double G4EnergyLossForExtrapolator::ComputeDEDX(G4double kinEnergy,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4EnergyLossForExtrapolator::ComputeRange(G4double kinEnergy,
const G4Material* mat,
const G4ParticleDefinition* part)
{
G4double x = 0.0;
if(part == electron) x = ComputeValue(kinEnergy, mat, rangeElectron);
else if(part == positron) x = ComputeValue(kinEnergy, mat, rangePositron);
if(part == electron) x = ComputeValue(kinEnergy, rangeElectron);
else if(part == positron) x = ComputeValue(kinEnergy, rangePositron);
else if(part == muonPlus || part == muonMinus)
x = ComputeValue(kinEnergy, rangeMuon);
else {
G4double massratio = proton_mass_c2/part->GetPDGMass();
G4double massratio = proton_mass_c2/mass;
G4double e = kinEnergy*massratio;
G4double z = part->GetPDGCharge()/eplus;
x = ComputeValue(e, mat, rangeProton)/(z*z*massratio);
x = ComputeValue(e, rangeProton)/(charge2*massratio);
}
return x;
}
@@ -286,37 +330,23 @@ G4double G4EnergyLossForExtrapolator::ComputeRange(G4double kinEnergy,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4EnergyLossForExtrapolator::ComputeEnergy(G4double range,
const G4Material* mat,
const G4ParticleDefinition* part)
{
G4double x = 0.0;
if(part == electron) x = ComputeValue(range, mat, invRangeElectron);
else if(part == positron) x = ComputeValue(range, mat, invRangePositron);
if(part == electron) x = ComputeValue(range, invRangeElectron);
else if(part == positron) x = ComputeValue(range, invRangePositron);
else if(part == muonPlus || part == muonMinus)
x = ComputeValue(range, invRangeMuon);
else {
G4double massratio = proton_mass_c2/part->GetPDGMass();
G4double z = part->GetPDGCharge()/eplus;
G4double r = range*massratio*z*z;
x = ComputeValue(r, mat, invRangeProton)/massratio;
G4double massratio = proton_mass_c2/mass;
G4double r = range*massratio*charge2;
x = ComputeValue(r, invRangeProton)/massratio;
}
return x;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4EnergyLossForExtrapolator::ComputeValue(G4double x,
const G4Material* mat,
const G4PhysicsTable* table)
{
G4double res = 0.0;
bool b;
G4int i = mat->GetIndex();
if(i<nmat) res = ((*table)[i])->GetValue(x, b);
return res;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4EnergyLossForExtrapolator::ComputeElectronDEDX(const G4ParticleDefinition* part,
G4PhysicsTable* table)
{
@@ -326,6 +356,10 @@ void G4EnergyLossForExtrapolator::ComputeElectronDEDX(const G4ParticleDefinition
ioni->Initialise(part, v);
brem->Initialise(part, v);
mass = electron_mass_c2;
charge2 = 1.0;
currentParticle = part;
const G4MaterialTable* mtable = G4Material::GetMaterialTable();
if(0<verbose) {
G4cout << "G4EnergyLossForExtrapolator::ComputeElectronDEDX for "
@@ -344,12 +378,11 @@ void G4EnergyLossForExtrapolator::ComputeElectronDEDX(const G4ParticleDefinition
G4double e = aVector->GetLowEdgeEnergy(j);
G4double dedx = ioni->ComputeDEDX(couple,part,e,e) + brem->ComputeDEDX(couple,part,e,e);
dedx /= (MeV/cm);
if(1<verbose) {
G4cout << "j= " << j
<< " e(MeV)= " << e/MeV
<< " dedx(Mev/cm)= " << dedx
<< " dedx(Mev.cm2/g)= " << dedx/((mat->GetDensity())/(g/cm3)) << G4endl;
<< " dedx(Mev/cm)= " << dedx*cm/MeV
<< " dedx(Mev.cm2/g)= " << dedx/((MeV*mat->GetDensity())/(g/cm2)) << G4endl;
}
aVector->PutValue(j,dedx);
}
@@ -360,6 +393,55 @@ void G4EnergyLossForExtrapolator::ComputeElectronDEDX(const G4ParticleDefinition
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4EnergyLossForExtrapolator::ComputeMuonDEDX(const G4ParticleDefinition* part,
G4PhysicsTable* table)
{
G4DataVector v;
G4BetheBlochModel* ioni = new G4BetheBlochModel();
G4MuPairProductionModel* pair = new G4MuPairProductionModel();
G4MuBremsstrahlungModel* brem = new G4MuBremsstrahlungModel();
ioni->Initialise(part, v);
pair->Initialise(part, v);
brem->Initialise(part, v);
mass = part->GetPDGMass();
charge2 = 1.0;
currentParticle = part;
const G4MaterialTable* mtable = G4Material::GetMaterialTable();
if(0<verbose) {
G4cout << "G4EnergyLossForExtrapolator::ComputeMuonDEDX for " << part->GetParticleName()
<< G4endl;
}
for(G4int i=0; i<nmat; i++) {
const G4Material* mat = (*mtable)[i];
if(1<verbose)
G4cout << "i= " << i << " mat= " << mat->GetName() << G4endl;
const G4MaterialCutsCouple* couple = couples[i];
G4PhysicsVector* aVector = (*table)[i];
for(G4int j=0; j<nbins; j++) {
G4double e = aVector->GetLowEdgeEnergy(j);
G4double dedx = ioni->ComputeDEDX(couple,part,e,e) +
pair->ComputeDEDX(couple,part,e,e) +
brem->ComputeDEDX(couple,part,e,e);
aVector->PutValue(j,dedx);
if(1<verbose) {
G4cout << "j= " << j
<< " e(MeV)= " << e/MeV
<< " dedx(Mev/cm)= " << dedx*cm/MeV
<< " dedx(Mev/(g/cm2)= " << dedx/((MeV*mat->GetDensity())/(g/cm2)) << G4endl;
}
}
}
delete ioni;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4EnergyLossForExtrapolator::ComputeProtonDEDX(const G4ParticleDefinition* part,
G4PhysicsTable* table)
{
@@ -367,6 +449,10 @@ void G4EnergyLossForExtrapolator::ComputeProtonDEDX(const G4ParticleDefinition*
G4BetheBlochModel* ioni = new G4BetheBlochModel();
ioni->Initialise(part, v);
mass = part->GetPDGMass();
charge2 = 1.0;
currentParticle = part;
const G4MaterialTable* mtable = G4Material::GetMaterialTable();
if(0<verbose) {
@@ -385,13 +471,12 @@ void G4EnergyLossForExtrapolator::ComputeProtonDEDX(const G4ParticleDefinition*
G4double e = aVector->GetLowEdgeEnergy(j);
G4double dedx = ioni->ComputeDEDX(couple,part,e,e);
dedx /= (MeV/cm);
aVector->PutValue(j,dedx);
if(1<verbose) {
G4cout << "j= " << j
<< " e(MeV)= " << e/MeV
<< " dedx(Mev/cm)= " << dedx
<< " dedx(Mev.cm2/g)= " << dedx/((mat->GetDensity())/(g/cm3)) << G4endl;
<< " dedx(Mev/cm)= " << dedx*cm/MeV
<< " dedx(Mev.cm2/g)= " << dedx/((mat->GetDensity())/(g/cm2)) << G4endl;
}
}
}
@@ -1,27 +1,30 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * 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. *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuBetheBlochModel.cc,v 1.20 2005/08/18 14:38:55 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: G4MuBetheBlochModel.cc,v 1.22 2006/06/29 19:49:36 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// -------------------------------------------------------------------
//
@@ -40,9 +43,10 @@
// 23-12-02 Change interface in order to move to cut per region (V.Ivanchenko)
// 27-01-03 Make models region aware (V.Ivanchenko)
// 13-02-03 Add name (V.Ivanchenko)
// 10-02-04 Calculation of radiative corrections using R.Kokoulin model (V.Ivanchenko)
// 10-02-04 Calculation of radiative corrections using R.Kokoulin model (V.I)
// 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
// 12-04-05 Add usage of G4EmCorrections (V.Ivanchenko)
// 13-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
//
//
@@ -50,8 +54,8 @@
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MuBetheBlochModel.hh"
#include "Randomize.hh"
@@ -60,10 +64,13 @@
#include "G4EmCorrections.hh"
#include "G4ParticleChangeForLoss.hh"
G4double G4MuBetheBlochModel::xgi[]={ 0.0199,0.1017,0.2372,0.4083,0.5917,0.7628,0.8983,0.9801 };
G4double G4MuBetheBlochModel::wgi[]={ 0.0506,0.1112,0.1569,0.1813,0.1813,0.1569,0.1112,0.0506 };
G4double G4MuBetheBlochModel::xgi[]={ 0.0199, 0.1017, 0.2372, 0.4083, 0.5917,
0.7628, 0.8983, 0.9801 };
G4double G4MuBetheBlochModel::wgi[]={ 0.0506, 0.1112, 0.1569, 0.1813, 0.1813,
0.1569, 0.1112, 0.0506 };
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
using namespace std;
@@ -84,12 +91,12 @@ G4MuBetheBlochModel::G4MuBetheBlochModel(const G4ParticleDefinition* p,
if(p) SetParticle(p);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4MuBetheBlochModel::~G4MuBetheBlochModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MuBetheBlochModel::SetParticle(const G4ParticleDefinition* p)
{
@@ -101,7 +108,7 @@ void G4MuBetheBlochModel::SetParticle(const G4ParticleDefinition* p)
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuBetheBlochModel::MinEnergyCut(const G4ParticleDefinition*,
const G4MaterialCutsCouple* couple)
@@ -109,7 +116,7 @@ G4double G4MuBetheBlochModel::MinEnergyCut(const G4ParticleDefinition*,
return couple->GetMaterial()->GetIonisation()->GetMeanExcitationEnergy();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MuBetheBlochModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector&)
@@ -117,17 +124,96 @@ void G4MuBetheBlochModel::Initialise(const G4ParticleDefinition* p,
if(p) SetParticle(p);
if(pParticleChange)
fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange);
fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>
(pParticleChange);
else
fParticleChange = new G4ParticleChangeForLoss();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuBetheBlochModel::ComputeCrossSectionPerElectron(
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cutEnergy,
G4double maxKinEnergy)
{
G4double cross = 0.0;
G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
G4double maxEnergy = min(tmax,maxKinEnergy);
if(cutEnergy < maxEnergy) {
G4double totEnergy = kineticEnergy + mass;
G4double energy2 = totEnergy*totEnergy;
G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
cross = 1.0/cutEnergy - 1.0/maxEnergy - beta2*log(maxEnergy/cutEnergy)/tmax
+ 0.5*(maxEnergy - cutEnergy)/energy2;
// radiative corrections of R. Kokoulin
if (maxEnergy > limitKinEnergy) {
G4double logtmax = log(maxEnergy);
G4double logtmin = log(max(cutEnergy,limitKinEnergy));
G4double logstep = logtmax - logtmin;
G4double dcross = 0.0;
for (G4int ll=0; ll<8; ll++)
{
G4double ep = exp(logtmin + xgi[ll]*logstep);
G4double a1 = log(1.0 + 2.0*ep/electron_mass_c2);
G4double a3 = log(4.0*totEnergy*(totEnergy - ep)/massSquare);
dcross += wgi[ll]*(1.0/ep - beta2/tmax + 0.5*ep/energy2)*a1*(a3 - a1);
}
cross += dcross*logstep*alphaprime;
}
cross *= twopi_mc2_rcl2/beta2;
}
// G4cout << "tmin= " << cutEnergy << " tmax= " << tmax
// << " cross= " << cross << G4endl;
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuBetheBlochModel::ComputeCrossSectionPerAtom(
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double Z, G4double,
G4double cutEnergy,
G4double maxEnergy)
{
G4double cross = Z*ComputeCrossSectionPerElectron
(p,kineticEnergy,cutEnergy,maxEnergy);
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuBetheBlochModel::CrossSectionPerVolume(
const G4Material* material,
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cutEnergy,
G4double maxEnergy)
{
G4double eDensity = material->GetElectronDensity();
G4double cross = eDensity*ComputeCrossSectionPerElectron
(p,kineticEnergy,cutEnergy,maxEnergy);
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuBetheBlochModel::ComputeDEDXPerVolume(const G4Material* material,
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cut)
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cut)
{
G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
G4double tau = kineticEnergy/mass;
@@ -146,7 +232,8 @@ G4double G4MuBetheBlochModel::ComputeDEDXPerVolume(const G4Material* material,
G4double eDensity = material->GetElectronDensity();
G4double dedx = log(2.0*electron_mass_c2*bg2*cutEnergy/eexc2)-(1.0 + cutEnergy/tmax)*beta2;
G4double dedx = log(2.0*electron_mass_c2*bg2*cutEnergy/eexc2)
-(1.0 + cutEnergy/tmax)*beta2;
G4double totEnergy = kineticEnergy + mass;
G4double del = 0.5*cutEnergy/totEnergy;
@@ -192,55 +279,7 @@ G4double G4MuBetheBlochModel::ComputeDEDXPerVolume(const G4Material* material,
return dedx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4MuBetheBlochModel::CrossSectionPerVolume(const G4Material* material,
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double cutEnergy,
G4double maxKinEnergy)
{
G4double cross = 0.0;
G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
G4double maxEnergy = min(tmax,maxKinEnergy);
if(cutEnergy < maxEnergy) {
G4double totEnergy = kineticEnergy + mass;
G4double energy2 = totEnergy*totEnergy;
G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
cross = 1.0/cutEnergy - 1.0/maxEnergy - beta2*log(maxEnergy/cutEnergy)/tmax
+ 0.5*(maxEnergy - cutEnergy)/energy2;
// radiative corrections of R. Kokoulin
if (maxEnergy > limitKinEnergy) {
G4double logtmax = log(maxEnergy);
G4double logtmin = log(max(cutEnergy,limitKinEnergy));
G4double logstep = logtmax - logtmin;
G4double dcross = 0.0;
for (G4int ll=0; ll<8; ll++)
{
G4double ep = exp(logtmin + xgi[ll]*logstep);
G4double a1 = log(1.0 + 2.0*ep/electron_mass_c2);
G4double a3 = log(4.0*totEnergy*(totEnergy - ep)/massSquare);
dcross += wgi[ll]*(1.0/ep - beta2/tmax + 0.5*ep/energy2)*a1*(a3 - a1);
}
cross += dcross*logstep*alphaprime;
}
cross *= twopi_mc2_rcl2*(material->GetElectronDensity())/beta2;
}
// G4cout << "tmin= " << cutEnergy << " tmax= " << tmax
// << " cross= " << cross << G4endl;
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
vector<G4DynamicParticle*>* G4MuBetheBlochModel::SampleSecondaries(
const G4MaterialCutsCouple*,
@@ -268,10 +307,12 @@ vector<G4DynamicParticle*>* G4MuBetheBlochModel::SampleSecondaries(
// sampling follows ...
do {
G4double q = G4UniformRand();
deltaKinEnergy = minKinEnergy*maxKinEnergy/(minKinEnergy*(1.0 - q) + maxKinEnergy*q);
deltaKinEnergy = minKinEnergy*maxKinEnergy
/(minKinEnergy*(1.0 - q) + maxKinEnergy*q);
f = 1.0 - beta2*deltaKinEnergy/tmax + 0.5*deltaKinEnergy*deltaKinEnergy/etot2;
f = 1.0 - beta2*deltaKinEnergy/tmax
+ 0.5*deltaKinEnergy*deltaKinEnergy/etot2;
if(deltaKinEnergy > limitKinEnergy) {
G4double a1 = log(1.0 + 2.0*deltaKinEnergy/electron_mass_c2);
@@ -313,11 +354,11 @@ vector<G4DynamicParticle*>* G4MuBetheBlochModel::SampleSecondaries(
// create G4DynamicParticle object for delta ray
G4DynamicParticle* delta = new G4DynamicParticle(theElectron,
deltaDirection,deltaKinEnergy);
deltaDirection,deltaKinEnergy);
vector<G4DynamicParticle*>* vdp = new vector<G4DynamicParticle*>;
vdp->push_back(delta);
return vdp;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,27 +1,30 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * 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. *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuBremsstrahlung.cc,v 1.36 2005/04/08 15:18:12 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: G4MuBremsstrahlung.cc,v 1.37 2006/06/29 19:49:38 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// -------------------------------------------------------------------
//
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * 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. *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4MuBremsstrahlung52.cc,v 1.4 2004/12/02 08:20:38 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: G4MuBremsstrahlung52.cc,v 1.5 2006/06/29 19:49:40 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//
//--------------- G4MuBremsstrahlung52 physics process ---------------------------
@@ -1,27 +1,30 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * 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. *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuBremsstrahlungModel.cc,v 1.18 2005/08/18 14:38:55 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: G4MuBremsstrahlungModel.cc,v 1.21 2006/06/29 19:49:42 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// -------------------------------------------------------------------
//
@@ -44,6 +47,8 @@
// 10-02-04 Add lowestKinEnergy (V.Ivanchenko)
// 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
// 03-08-05 Angular correlations according to PRM (V.Ivantchenko)
// 13-02-06 add ComputeCrossSectionPerAtom (mma)
// 21-03-06 Fix problem of initialisation in case when cuts are not defined (VI)
//
//
@@ -52,8 +57,8 @@
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MuBremsstrahlungModel.hh"
#include "G4Gamma.hh"
@@ -70,11 +75,12 @@
// static members
//
G4double G4MuBremsstrahlungModel::zdat[]={1.,4.,13.,29.,92.};
G4double G4MuBremsstrahlungModel::adat[]={1.01,9.01,26.98,63.55,238.03};
G4double G4MuBremsstrahlungModel::tdat[]={1.e3,1.e4,1.e5,1.e6,1.e7,1.e8,1.e9,1.e10};
G4double G4MuBremsstrahlungModel::zdat[]={1., 4., 13., 29., 92.};
G4double G4MuBremsstrahlungModel::adat[]={1.01, 9.01, 26.98, 63.55, 238.03};
G4double G4MuBremsstrahlungModel::tdat[]={1.e3, 1.e4, 1.e5, 1.e6, 1.e7, 1.e8,
1.e9, 1.e10};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
using namespace std;
@@ -95,7 +101,7 @@ G4MuBremsstrahlungModel::G4MuBremsstrahlungModel(const G4ParticleDefinition* p,
if(p) SetParticle(p);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4MuBremsstrahlungModel::~G4MuBremsstrahlungModel()
{
@@ -107,7 +113,7 @@ G4MuBremsstrahlungModel::~G4MuBremsstrahlungModel()
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuBremsstrahlungModel::MinEnergyCut(const G4ParticleDefinition*,
const G4MaterialCutsCouple*)
@@ -115,7 +121,7 @@ G4double G4MuBremsstrahlungModel::MinEnergyCut(const G4ParticleDefinition*,
return minThreshold;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MuBremsstrahlungModel::SetParticle(const G4ParticleDefinition* p)
{
@@ -125,7 +131,7 @@ void G4MuBremsstrahlungModel::SetParticle(const G4ParticleDefinition* p)
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MuBremsstrahlungModel::Initialise(const G4ParticleDefinition* p,
const G4DataVector& cuts)
@@ -141,29 +147,37 @@ void G4MuBremsstrahlungModel::Initialise(const G4ParticleDefinition* p,
G4ProductionCutsTable::GetProductionCutsTable();
if(theCoupleTable) {
G4int numOfCouples = theCoupleTable->GetTableSize();
for (size_t ii=0; ii<partialSumSigma.size(); ii++){
G4DataVector* a=partialSumSigma[ii];
if ( a ) delete a;
}
partialSumSigma.clear();
if(numOfCouples>0) {
G4int nn = partialSumSigma.size();
G4int nc = cuts.size();
if(nn > 0) {
for (G4int ii=0; ii<nn; ii++){
G4DataVector* a=partialSumSigma[ii];
if ( a ) delete a;
}
partialSumSigma.clear();
}
if (numOfCouples>0) {
for (G4int i=0; i<numOfCouples; i++) {
const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i);
G4double cute = DBL_MAX;
if(i < nc) cute = cuts[i];
const G4MaterialCutsCouple* couple =
theCoupleTable->GetMaterialCutsCouple(i);
const G4Material* material = couple->GetMaterial();
G4DataVector* dv = ComputePartialSumSigma(material, fixedEnergy,cuts[i]);
G4DataVector* dv = ComputePartialSumSigma(material,fixedEnergy,cute);
partialSumSigma.push_back(dv);
}
}
}
if(!samplingTablesAreFilled) MakeSamplingTables();
if(pParticleChange)
fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange);
fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>
(pParticleChange);
else
fParticleChange = new G4ParticleChangeForLoss();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuBremsstrahlungModel::ComputeDEDXPerVolume(
const G4Material* material,
@@ -178,7 +192,8 @@ G4double G4MuBremsstrahlungModel::ComputeDEDXPerVolume(
G4double cut = min(cutEnergy,tmax);
const G4ElementVector* theElementVector = material->GetElementVector();
const G4double* theAtomicNumDensityVector = material->GetAtomicNumDensityVector();
const G4double* theAtomicNumDensityVector =
material->GetAtomicNumDensityVector();
// loop for elements in the material
for (size_t i=0; i<material->GetNumberOfElements(); i++) {
@@ -194,7 +209,7 @@ G4double G4MuBremsstrahlungModel::ComputeDEDXPerVolume(
return dedx;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuBremsstrahlungModel::ComputMuBremLoss(G4double Z, G4double A,
G4double tkin, G4double cut)
@@ -231,7 +246,7 @@ G4double G4MuBremsstrahlungModel::ComputMuBremLoss(G4double Z, G4double A,
return loss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuBremsstrahlungModel::ComputeMicroscopicCrossSection(
G4double tkin,
@@ -336,7 +351,21 @@ G4double G4MuBremsstrahlungModel::ComputeDMicroscopicCrossSection(
return dxsection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuBremsstrahlungModel::ComputeCrossSectionPerAtom(
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double Z, G4double A,
G4double cutEnergy,
G4double)
{
G4double cross = ComputeMicroscopicCrossSection (kineticEnergy,
Z, A/(g/mole), cutEnergy);
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuBremsstrahlungModel::CrossSectionPerVolume(
const G4Material* material,
@@ -351,13 +380,14 @@ G4double G4MuBremsstrahlungModel::CrossSectionPerVolume(
G4double tmax = min(maxEnergy, kineticEnergy);
G4double cut = min(cutEnergy, tmax);
const G4ElementVector* theElementVector = material->GetElementVector() ;
const G4double* theAtomNumDensityVector = material->GetAtomicNumDensityVector();
const G4ElementVector* theElementVector = material->GetElementVector();
const G4double* theAtomNumDensityVector =
material->GetAtomicNumDensityVector();
for (size_t i=0; i<material->GetNumberOfElements(); i++) {
G4double Z = (*theElementVector)[i]->GetZ();
G4double A = (*theElementVector)[i]->GetA()/(g/mole) ;
G4double A = (*theElementVector)[i]->GetA()/(g/mole);
G4double cr = ComputeMicroscopicCrossSection(kineticEnergy, Z, A, cut);
@@ -370,19 +400,20 @@ G4double G4MuBremsstrahlungModel::CrossSectionPerVolume(
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4DataVector* G4MuBremsstrahlungModel::ComputePartialSumSigma(
const G4Material* material,
G4double kineticEnergy,
G4double cut)
// Build the table of cross section per element. The table is built for MATERIALS.
// Build the table of cross section per element. The table is built for MATERIAL
// This table is used by DoIt to select randomly an element in the material.
{
G4int nElements = material->GetNumberOfElements();
const G4ElementVector* theElementVector = material->GetElementVector();
const G4double* theAtomNumDensityVector = material->GetAtomicNumDensityVector();
const G4double* theAtomNumDensityVector =
material->GetAtomicNumDensityVector();
G4DataVector* dv = new G4DataVector();
@@ -392,14 +423,14 @@ G4DataVector* G4MuBremsstrahlungModel::ComputePartialSumSigma(
G4double Z = (*theElementVector)[i]->GetZ();
G4double A = (*theElementVector)[i]->GetA()/(g/mole) ;
cross += theAtomNumDensityVector[i] * ComputeMicroscopicCrossSection(kineticEnergy,
Z, A, cut);
cross += theAtomNumDensityVector[i]
* ComputeMicroscopicCrossSection(kineticEnergy, Z, A, cut);
dv->push_back(cross);
}
return dv;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MuBremsstrahlungModel::MakeSamplingTables()
{
@@ -464,7 +495,7 @@ void G4MuBremsstrahlungModel::MakeSamplingTables()
samplingTablesAreFilled = true;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
vector<G4DynamicParticle*>* G4MuBremsstrahlungModel::SampleSecondaries(
const G4MaterialCutsCouple* couple,
@@ -583,14 +614,14 @@ vector<G4DynamicParticle*>* G4MuBremsstrahlungModel::SampleSecondaries(
fParticleChange->SetProposedMomentumDirection(partDirection);
// save secondary
G4DynamicParticle* aGamma = new G4DynamicParticle(theGamma,gDirection,gEnergy);
G4DynamicParticle* aGamma = new G4DynamicParticle(theGamma,gDirection,gEnergy);
vector<G4DynamicParticle*>* vdp = new vector<G4DynamicParticle*>;
vdp->push_back(aGamma);
return vdp;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
const G4Element* G4MuBremsstrahlungModel::SelectRandomAtom(
const G4MaterialCutsCouple* couple) const
@@ -1,27 +1,30 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * 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. *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuIonisation.cc,v 1.51 2005/10/02 16:39:50 maire Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: G4MuIonisation.cc,v 1.53 2006/06/29 19:49:44 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// -------------------------------------------------------------------
//
@@ -67,6 +70,7 @@
// 12-08-05 SetStepLimits(0.2, 0.1*mm) (mma)
// 02-09-05 SetStepLimits(0.2, 1*mm) (V.Ivantchenko)
// 12-08-05 SetStepLimits(0.2, 0.1*mm) + integral off (V.Ivantchenko)
// 10-01-06 SetStepLimits -> SetStepFunction (V.Ivantchenko)
//
// -------------------------------------------------------------------
//
@@ -98,6 +102,9 @@ G4MuIonisation::G4MuIonisation(const G4String& name)
SetLambdaBinning(120);
SetMinKinEnergy(0.1*keV);
SetMaxKinEnergy(100.0*TeV);
SetStepFunction(0.2, 1*mm);
SetIntegral(true);
SetVerboseLevel(1);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -133,9 +140,6 @@ void G4MuIonisation::InitialiseEnergyLossProcess(const G4ParticleDefinition* par
em2->SetHighEnergyLimit(100.0*TeV);
AddEmModel(3, em2, flucModel);
SetStepLimits(0.2, 1*mm);
SetIntegral(true);
ratio = electron_mass_c2/mass;
isInitialised = true;
}
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * 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. *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4MuIonisation52.cc,v 1.4 2004/12/02 08:20:38 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: G4MuIonisation52.cc,v 1.5 2006/06/29 19:49:46 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// --------------- G4MuIonisation52 physics process ------------------------------
// by Laszlo Urban, September 1997
@@ -1,27 +1,30 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * 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. *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuPairProduction.cc,v 1.46 2005/04/08 15:18:12 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: G4MuPairProduction.cc,v 1.47 2006/06/29 19:49:48 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// -------------------------------------------------------------------
//
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * 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. *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4MuPairProduction52.cc,v 1.4 2004/12/02 08:20:38 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: G4MuPairProduction52.cc,v 1.5 2006/06/29 19:49:50 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//--------------- G4MuPairProduction52 physics process ---------------------------
// by Laszlo Urban, May 1998
@@ -1,27 +1,30 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * 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. *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuPairProductionModel.cc,v 1.28 2005/10/23 16:47:23 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: G4MuPairProductionModel.cc,v 1.30 2006/06/29 19:49:52 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
// -------------------------------------------------------------------
//
@@ -48,10 +51,12 @@
// 10-02-04 Update parameterisation using R.Kokoulin model (V.Ivanchenko)
// 28-04-04 For complex materials repeat calculation of max energy for each
// material (V.Ivanchenko)
// 01-11-04 Fix bug in expression inside ComputeDMicroscopicCrossSection (R.Kokoulin)
// 01-11-04 Fix bug inside ComputeDMicroscopicCrossSection (R.Kokoulin)
// 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
// 03-08-05 Add SetParticle method (V.Ivantchenko)
// 23-10-05 Add protection in sampling of e+e- pair energy needed for low cuts (V.Ivantchenko)
// 23-10-05 Add protection in sampling of e+e- pair energy needed for
// low cuts (V.Ivantchenko)
// 13-02-06 add ComputeCrossSectionPerAtom (mma)
//
// Class Description:
@@ -78,11 +83,14 @@
// static members
//
G4double G4MuPairProductionModel::zdat[]={1.,4.,13.,29.,92.};
G4double G4MuPairProductionModel::adat[]={1.01,9.01,26.98,63.55,238.03};
G4double G4MuPairProductionModel::tdat[]={1.e3,1.e4,1.e5,1.e6,1.e7,1.e8,1.e9,1.e10};
G4double G4MuPairProductionModel::xgi[]={ 0.0199,0.1017,0.2372,0.4083,0.5917,0.7628,0.8983,0.9801 };
G4double G4MuPairProductionModel::wgi[]={ 0.0506,0.1112,0.1569,0.1813,0.1813,0.1569,0.1112,0.0506 };
G4double G4MuPairProductionModel::zdat[]={1., 4., 13., 29., 92.};
G4double G4MuPairProductionModel::adat[]={1.01, 9.01, 26.98, 63.55, 238.03};
G4double G4MuPairProductionModel::tdat[]={1.e3, 1.e4, 1.e5, 1.e6, 1.e7, 1.e8,
1.e9, 1.e10};
G4double G4MuPairProductionModel::xgi[]={ 0.0199, 0.1017, 0.2372, 0.4083,
0.5917, 0.7628, 0.8983, 0.9801 };
G4double G4MuPairProductionModel::wgi[]={ 0.0506, 0.1112, 0.1569, 0.1813,
0.1813, 0.1569, 0.1112, 0.0506 };
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -128,7 +136,7 @@ G4double G4MuPairProductionModel::MinEnergyCut(const G4ParticleDefinition*,
return minPairEnergy;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4MuPairProductionModel::SetParticle(const G4ParticleDefinition* p)
{
@@ -147,7 +155,8 @@ void G4MuPairProductionModel::Initialise(const G4ParticleDefinition* p,
if (!samplingTablesAreFilled) MakeSamplingTables();
if(pParticleChange)
fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange);
fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>
(pParticleChange);
else
fParticleChange = new G4ParticleChangeForLoss();
}
@@ -161,7 +170,8 @@ G4double G4MuPairProductionModel::ComputeDEDXPerVolume(
G4double cutEnergy)
{
G4double dedx = 0.0;
if (cutEnergy <= minPairEnergy || kineticEnergy <= lowestKinEnergy) return dedx;
if (cutEnergy <= minPairEnergy || kineticEnergy <= lowestKinEnergy)
return dedx;
const G4ElementVector* theElementVector = material->GetElementVector();
const G4double* theAtomicNumDensityVector =
@@ -181,9 +191,8 @@ G4double G4MuPairProductionModel::ComputeDEDXPerVolume(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuPairProductionModel::ComputMuPairLoss(G4double Z,
G4double tkin, G4double cutEnergy,
G4double tmax)
G4double G4MuPairProductionModel::ComputMuPairLoss(G4double Z, G4double tkin,
G4double cutEnergy, G4double tmax)
{
SetCurrentElement(Z);
G4double loss = 0.0;
@@ -294,10 +303,10 @@ G4double G4MuPairProductionModel::ComputeDMicroscopicCrossSection(
else { bbb = bbbtf; g1 = g1tf; g2 = g2tf; }
G4double zeta = 0;
G4double zeta1 = 0.073 * log(totalEnergy/(particleMass+g1*z23*totalEnergy))-0.26 ;
G4double zeta1 = 0.073*log(totalEnergy/(particleMass+g1*z23*totalEnergy))-0.26;
if ( zeta1 > 0.)
{
G4double zeta2 = 0.058*log(totalEnergy/(particleMass+g2*z13*totalEnergy))-0.14 ;
G4double zeta2 = 0.058*log(totalEnergy/(particleMass+g2*z13*totalEnergy))-0.14;
zeta = zeta1/zeta2 ;
}
@@ -367,6 +376,19 @@ G4double G4MuPairProductionModel::ComputeDMicroscopicCrossSection(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuPairProductionModel::ComputeCrossSectionPerAtom(
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double Z, G4double,
G4double cutEnergy,
G4double)
{
G4double cross = ComputeMicroscopicCrossSection (kineticEnergy, Z, cutEnergy);
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4MuPairProductionModel::CrossSectionPerVolume(
const G4Material* material,
const G4ParticleDefinition*,
@@ -380,7 +402,8 @@ G4double G4MuPairProductionModel::CrossSectionPerVolume(
maxEnergy += particleMass;
const G4ElementVector* theElementVector = material->GetElementVector();
const G4double* theAtomNumDensityVector = material->GetAtomicNumDensityVector();
const G4double* theAtomNumDensityVector = material->
GetAtomicNumDensityVector();
for (size_t i=0; i<material->GetNumberOfElements(); i++) {
G4double Z = (*theElementVector)[i]->GetZ();
@@ -454,7 +477,8 @@ vector<G4DynamicParticle*>* G4MuPairProductionModel::SampleSecondaries(
{
G4double kineticEnergy = aDynamicParticle->GetKineticEnergy();
G4double totalEnergy = kineticEnergy + particleMass ;
G4ParticleMomentum ParticleDirection = aDynamicParticle->GetMomentumDirection();
G4ParticleMomentum ParticleDirection = aDynamicParticle->
GetMomentumDirection();
G4int it;
for(it=1; it<ntdat; it++) {if(kineticEnergy <= tdat[it]) break;}
@@ -494,8 +518,8 @@ vector<G4DynamicParticle*>* G4MuPairProductionModel::SampleSecondaries(
G4double dz = log(currentZ/zdat[iz-1])/log(zdat[iz]/zdat[iz-1]);
G4double pmin = InterpolatedIntegralCrossSection(dt, dz, iz, it, iymin, currentZ);
G4double pmax = InterpolatedIntegralCrossSection(dt, dz, iz, it, iymax, currentZ);
G4double pmin = InterpolatedIntegralCrossSection(dt,dz,iz,it,iymin,currentZ);
G4double pmax = InterpolatedIntegralCrossSection(dt,dz,iz,it,iymax,currentZ);
G4double p = pmin+G4UniformRand()*(pmax - pmin);
@@ -507,10 +531,13 @@ vector<G4DynamicParticle*>* G4MuPairProductionModel::SampleSecondaries(
p2 = InterpolatedIntegralCrossSection(dt, dz, iz, it, iy, currentZ);
if(p <= p2) break;
}
// G4cout << "iy= " << iy << " iymin= " << iymin << " iymax= " << iymax << " Z= " << currentZ << G4endl;
// G4cout << "iy= " << iy << " iymin= " << iymin << " iymax= "
// << iymax << " Z= " << currentZ << G4endl;
G4double y = ya[iy-1] + dy*(p - p1)/(p2 - p1);
G4double PairEnergy = minPairEnergy*exp(exp(y)*log(maxPairEnergy/minPairEnergy));
G4double PairEnergy = minPairEnergy*exp(exp(y)
*log(maxPairEnergy/minPairEnergy));
if(PairEnergy < minEnergy) PairEnergy = minEnergy;
if(PairEnergy > maxEnergy) PairEnergy = maxEnergy;
@@ -552,7 +579,7 @@ vector<G4DynamicParticle*>* G4MuPairProductionModel::SampleSecondaries(
// create G4DynamicParticle object for the particle1
G4DynamicParticle* aParticle1= new G4DynamicParticle(theElectron,
ElectDirection,
ElectronEnergy - electron_mass_c2);
ElectronEnergy - electron_mass_c2);
G4ThreeVector PositDirection (dxPo, dyPo, dzPo);
PositDirection.rotateUz(ParticleDirection);
@@ -560,7 +587,7 @@ vector<G4DynamicParticle*>* G4MuPairProductionModel::SampleSecondaries(
// create G4DynamicParticle object for the particle2
G4DynamicParticle* aParticle2= new G4DynamicParticle(thePositron,
PositDirection,
PositronEnergy - electron_mass_c2);
PositronEnergy - electron_mass_c2);
// primary change
kineticEnergy -= (ElectronEnergy + PositronEnergy);
@@ -610,8 +637,8 @@ const G4Element* G4MuPairProductionModel::SelectRandomAtom(
G4int iy = (G4int)((log(xc) - ymin)/dy);
if(iy >= nbiny) iy = nbiny-1;
G4double sigtot = InterpolatedIntegralCrossSection(dt, dz, iz, it, nbiny, Z);
G4double sigcut = InterpolatedIntegralCrossSection(dt, dz, iz, it, iy, Z);
G4double sigtot = InterpolatedIntegralCrossSection(dt,dz,iz,it,nbiny,Z);
G4double sigcut = InterpolatedIntegralCrossSection(dt,dz,iz,it,iy, Z);
sum += (sigtot - sigcut)*theAtomNumDensityVector[i];
partialSum[i] = sum;
}
@@ -1,28 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * License and 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 *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * 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. *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4VMuEnergyLoss.cc,v 1.31 2004/12/02 08:20:38 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-00 $
// $Id: G4VMuEnergyLoss.cc,v 1.32 2006/06/29 19:49:54 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// --------------------------------------------------------------
// GEANT 4 class implementation file
//