Import Geant4 7.1.0 source tree
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuPairProductionModel.cc,v 1.21 2004/12/02 08:20:38 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
// $Id: G4MuPairProductionModel.cc,v 1.25 2005/04/12 18:12:33 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -49,6 +49,7 @@
|
||||
// 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)
|
||||
// 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
|
||||
|
||||
//
|
||||
// Class Description:
|
||||
@@ -69,6 +70,7 @@
|
||||
#include "G4Element.hh"
|
||||
#include "G4ElementVector.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4ParticleChangeForLoss.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -88,8 +90,6 @@ G4MuPairProductionModel::G4MuPairProductionModel(const G4ParticleDefinition*,
|
||||
const G4String& nam)
|
||||
: G4VEmModel(nam),
|
||||
minPairEnergy(4.*electron_mass_c2),
|
||||
highKinEnergy(1000000.*TeV),
|
||||
lowKinEnergy(minPairEnergy),
|
||||
lowestKinEnergy(1.*GeV),
|
||||
factorForCross(4.*fine_structure_const*fine_structure_const
|
||||
*classic_electr_radius*classic_electr_radius/(3.*pi)),
|
||||
@@ -105,7 +105,9 @@ G4MuPairProductionModel::G4MuPairProductionModel(const G4ParticleDefinition*,
|
||||
ymax(0.),
|
||||
dy((ymax-ymin)/nbiny),
|
||||
samplingTablesAreFilled(false)
|
||||
{}
|
||||
{
|
||||
SetLowEnergyLimit(minPairEnergy);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -114,20 +116,6 @@ G4MuPairProductionModel::~G4MuPairProductionModel()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4double G4MuPairProductionModel::HighEnergyLimit(const G4ParticleDefinition*)
|
||||
{
|
||||
return highKinEnergy;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4double G4MuPairProductionModel::LowEnergyLimit(const G4ParticleDefinition*)
|
||||
{
|
||||
return lowKinEnergy;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4double G4MuPairProductionModel::MinEnergyCut(const G4ParticleDefinition*,
|
||||
const G4MaterialCutsCouple* )
|
||||
{
|
||||
@@ -136,22 +124,24 @@ G4double G4MuPairProductionModel::MinEnergyCut(const G4ParticleDefinition*,
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4bool G4MuPairProductionModel::IsInCharge(const G4ParticleDefinition* p)
|
||||
{
|
||||
return (p == G4MuonMinus::MuonMinus() || p == G4MuonPlus::MuonPlus());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4MuPairProductionModel::Initialise(const G4ParticleDefinition*,
|
||||
const G4DataVector&)
|
||||
{
|
||||
if (!samplingTablesAreFilled) MakeSamplingTables();
|
||||
|
||||
theElectron = G4Electron::Electron();
|
||||
thePositron = G4Positron::Positron();
|
||||
|
||||
if(pParticleChange)
|
||||
fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange);
|
||||
else
|
||||
fParticleChange = new G4ParticleChangeForLoss();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4double G4MuPairProductionModel::ComputeDEDX(const G4MaterialCutsCouple* couple,
|
||||
G4double G4MuPairProductionModel::ComputeDEDXPerVolume(
|
||||
const G4Material* material,
|
||||
const G4ParticleDefinition*,
|
||||
G4double kineticEnergy,
|
||||
G4double cutEnergy)
|
||||
@@ -159,7 +149,6 @@ G4double G4MuPairProductionModel::ComputeDEDX(const G4MaterialCutsCouple* couple
|
||||
G4double dedx = 0.0;
|
||||
if (cutEnergy <= minPairEnergy || kineticEnergy <= lowestKinEnergy) return dedx;
|
||||
|
||||
const G4Material* material = couple->GetMaterial();
|
||||
const G4ElementVector* theElementVector = material->GetElementVector();
|
||||
const G4double* theAtomicNumDensityVector =
|
||||
material->GetAtomicNumDensityVector();
|
||||
@@ -169,8 +158,7 @@ G4double G4MuPairProductionModel::ComputeDEDX(const G4MaterialCutsCouple* couple
|
||||
G4double Z = (*theElementVector)[i]->GetZ();
|
||||
SetCurrentElement(Z);
|
||||
G4double tmax = MaxSecondaryEnergy(particle, kineticEnergy);
|
||||
G4double cut = min(cutEnergy,tmax);
|
||||
G4double loss = ComputMuPairLoss(Z, kineticEnergy, cut, tmax);
|
||||
G4double loss = ComputMuPairLoss(Z, kineticEnergy, cutEnergy, tmax);
|
||||
dedx += loss*theAtomicNumDensityVector[i];
|
||||
}
|
||||
if (dedx < 0.) dedx = 0.;
|
||||
@@ -186,8 +174,8 @@ G4double G4MuPairProductionModel::ComputMuPairLoss(G4double Z,
|
||||
SetCurrentElement(Z);
|
||||
G4double loss = 0.0;
|
||||
|
||||
G4double cut = cutEnergy;
|
||||
if(tmax <= cutEnergy || cut <= minPairEnergy) return loss;
|
||||
G4double cut = min(cutEnergy,tmax);
|
||||
if(cut <= minPairEnergy) return loss;
|
||||
|
||||
// calculate the rectricted loss
|
||||
// numerical integration in log(PairEnergy)
|
||||
@@ -365,7 +353,8 @@ G4double G4MuPairProductionModel::ComputeDMicroscopicCrossSection(
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4double G4MuPairProductionModel::CrossSection(const G4MaterialCutsCouple* couple,
|
||||
G4double G4MuPairProductionModel::CrossSectionPerVolume(
|
||||
const G4Material* material,
|
||||
const G4ParticleDefinition*,
|
||||
G4double kineticEnergy,
|
||||
G4double cutEnergy,
|
||||
@@ -376,9 +365,8 @@ G4double G4MuPairProductionModel::CrossSection(const G4MaterialCutsCouple* coupl
|
||||
|
||||
maxEnergy += particleMass;
|
||||
|
||||
const G4Material* material = couple->GetMaterial();
|
||||
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();
|
||||
@@ -444,17 +432,6 @@ void G4MuPairProductionModel::MakeSamplingTables()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4DynamicParticle* G4MuPairProductionModel::SampleSecondary(
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double,
|
||||
G4double)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
vector<G4DynamicParticle*>* G4MuPairProductionModel::SampleSecondaries(
|
||||
const G4MaterialCutsCouple* couple,
|
||||
const G4DynamicParticle* aDynamicParticle,
|
||||
@@ -543,7 +520,7 @@ vector<G4DynamicParticle*>* G4MuPairProductionModel::SampleSecondaries(
|
||||
ElectDirection.rotateUz(ParticleDirection);
|
||||
|
||||
// create G4DynamicParticle object for the particle1
|
||||
G4DynamicParticle* aParticle1= new G4DynamicParticle(G4Electron::Electron(),
|
||||
G4DynamicParticle* aParticle1= new G4DynamicParticle(theElectron,
|
||||
ElectDirection,
|
||||
ElectKineEnergy);
|
||||
|
||||
@@ -553,10 +530,13 @@ vector<G4DynamicParticle*>* G4MuPairProductionModel::SampleSecondaries(
|
||||
PositDirection.rotateUz(ParticleDirection);
|
||||
|
||||
// create G4DynamicParticle object for the particle2
|
||||
G4DynamicParticle* aParticle2= new G4DynamicParticle(G4Positron::Positron(),
|
||||
G4DynamicParticle* aParticle2= new G4DynamicParticle(thePositron,
|
||||
PositDirection,
|
||||
PositKineEnergy);
|
||||
|
||||
// primary change
|
||||
kineticEnergy -= (ElectKineEnergy + PositKineEnergy + 2.0*electron_mass_c2);
|
||||
fParticleChange->SetProposedKineticEnergy(kineticEnergy);
|
||||
|
||||
vector<G4DynamicParticle*>* vdp = new vector<G4DynamicParticle*>;
|
||||
vdp->push_back(aParticle1);
|
||||
|
||||
Reference in New Issue
Block a user