Import Geant4 9.2.0 source tree
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4EnergyLossForExtrapolator.hh,v 1.9 2007/07/28 13:44:25 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4EnergyLossForExtrapolator.hh,v 1.12 2008/11/13 14:14:07 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -80,22 +80,30 @@ public:
|
||||
const G4Material*, const G4ParticleDefinition*);
|
||||
|
||||
G4double EnergyBeforeStep(G4double kinEnergy, G4double step,
|
||||
const G4Material*, const G4ParticleDefinition*);
|
||||
const G4Material*, const G4ParticleDefinition*);
|
||||
|
||||
G4double TrueStepLength(G4double kinEnergy, G4double step,
|
||||
const G4Material*, const G4ParticleDefinition* part);
|
||||
|
||||
inline G4double EnergyAfterStep(G4double kinEnergy, G4double step,
|
||||
const G4Material*, const G4String& particleName);
|
||||
const G4Material*, const G4String& particleName);
|
||||
|
||||
inline G4double EnergyBeforeStep(G4double kinEnergy, G4double step,
|
||||
const G4Material*, const G4String& particleName);
|
||||
const G4Material*, const G4String& particleName);
|
||||
|
||||
inline G4double AverageScatteringAngle(G4double kinEnergy, G4double step,
|
||||
const G4Material*, const G4ParticleDefinition* part);
|
||||
const G4Material*,
|
||||
const G4ParticleDefinition* part);
|
||||
|
||||
inline G4double AverageScatteringAngle(G4double kinEnergy, G4double step,
|
||||
const G4Material*, const G4String& particleName);
|
||||
const G4Material*,
|
||||
const G4String& particleName);
|
||||
|
||||
inline G4double ComputeTrueStep(const G4Material*, const G4ParticleDefinition* part,
|
||||
G4double kinEnergy, G4double stepLength);
|
||||
|
||||
inline G4double EnergyDispersion(G4double kinEnergy, G4double step,
|
||||
const G4Material*, const G4ParticleDefinition*);
|
||||
const G4Material*, const G4ParticleDefinition*);
|
||||
|
||||
inline G4double EnergyDispersion(G4double kinEnergy, G4double step,
|
||||
const G4Material*, const G4String& particleName);
|
||||
@@ -112,6 +120,9 @@ private:
|
||||
|
||||
void Initialisation();
|
||||
|
||||
G4bool SetupKinematics(const G4ParticleDefinition*, const G4Material*,
|
||||
G4double kinEnergy);
|
||||
|
||||
G4PhysicsTable* PrepareTable();
|
||||
|
||||
const G4ParticleDefinition* FindParticle(const G4String& name);
|
||||
@@ -122,13 +133,10 @@ private:
|
||||
|
||||
void ComputeProtonDEDX(const G4ParticleDefinition* part, G4PhysicsTable* table);
|
||||
|
||||
G4double ComputeTrueStep(const G4Material*, const G4ParticleDefinition* part,
|
||||
G4double kinEnergy, G4double stepLength);
|
||||
void ComputeTrasportXS(const G4ParticleDefinition* part, G4PhysicsTable* table);
|
||||
|
||||
inline G4double ComputeValue(G4double x, const G4PhysicsTable* table);
|
||||
|
||||
inline G4double ComputeScatteringAngle(G4double x);
|
||||
|
||||
// hide assignment operator
|
||||
G4EnergyLossForExtrapolator & operator=(const G4EnergyLossForExtrapolator &right);
|
||||
G4EnergyLossForExtrapolator(const G4EnergyLossForExtrapolator&);
|
||||
@@ -157,6 +165,7 @@ private:
|
||||
G4PhysicsTable* invRangePositron;
|
||||
G4PhysicsTable* invRangeMuon;
|
||||
G4PhysicsTable* invRangeProton;
|
||||
G4PhysicsTable* mscElectron;
|
||||
|
||||
const G4Material* currentMaterial;
|
||||
G4int index;
|
||||
@@ -213,51 +222,56 @@ inline G4double G4EnergyLossForExtrapolator::AverageScatteringAngle(G4double kin
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double G4EnergyLossForExtrapolator::EnergyDispersion(G4double kinEnergy,
|
||||
G4double step,
|
||||
const G4Material* mat,
|
||||
const G4String& name)
|
||||
inline G4double
|
||||
G4EnergyLossForExtrapolator::EnergyDispersion(G4double kinEnergy,
|
||||
G4double step,
|
||||
const G4Material* mat,
|
||||
const G4String& name)
|
||||
{
|
||||
return EnergyDispersion(kinEnergy,step,mat,FindParticle(name));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double G4EnergyLossForExtrapolator::AverageScatteringAngle(G4double kinEnergy,
|
||||
G4double stepLength,
|
||||
const G4Material* mat,
|
||||
const G4ParticleDefinition* part)
|
||||
inline G4double
|
||||
G4EnergyLossForExtrapolator::AverageScatteringAngle(G4double kinEnergy,
|
||||
G4double stepLength,
|
||||
const G4Material* mat,
|
||||
const G4ParticleDefinition* part)
|
||||
{
|
||||
if(!isInitialised) Initialisation();
|
||||
G4double theta = 0.0;
|
||||
if(mat && part && kinEnergy > 0.0) {
|
||||
G4double step = ComputeTrueStep(mat,part,kinEnergy,stepLength);
|
||||
if(step > 0.001*radLength) theta = ComputeScatteringAngle(stepLength);
|
||||
if(SetupKinematics(part, mat, kinEnergy)) {
|
||||
G4double t = stepLength/radLength;
|
||||
G4double y = std::max(0.001, t);
|
||||
theta = 19.23*MeV*std::sqrt(charge2*t)*(1.0 + 0.038*std::log(y))/(beta2*gam*mass);
|
||||
}
|
||||
return theta;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double G4EnergyLossForExtrapolator::ComputeScatteringAngle(G4double x)
|
||||
inline G4double
|
||||
G4EnergyLossForExtrapolator::ComputeTrueStep(const G4Material* mat,
|
||||
const G4ParticleDefinition* part,
|
||||
G4double kinEnergy,
|
||||
G4double stepLength)
|
||||
{
|
||||
G4double t = x/radLength;
|
||||
return 19.23*MeV*std::sqrt(charge2*t)*(1.0 + 0.038*std::log(t))/(beta2*gam*mass);
|
||||
}
|
||||
G4double theta = AverageScatteringAngle(kinEnergy,stepLength,mat,part);
|
||||
return stepLength*std::sqrt(1.0 + 0.625*theta*theta);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double G4EnergyLossForExtrapolator::EnergyDispersion(
|
||||
G4double kinEnergy,
|
||||
inline
|
||||
G4double G4EnergyLossForExtrapolator::EnergyDispersion(G4double kinEnergy,
|
||||
G4double stepLength,
|
||||
const G4Material* mat,
|
||||
const G4ParticleDefinition* part)
|
||||
{
|
||||
if(!isInitialised) Initialisation();
|
||||
G4double sig2 = 0.0;
|
||||
if(mat && part ) {
|
||||
if(SetupKinematics(part, mat, kinEnergy)) {
|
||||
G4double step = ComputeTrueStep(mat,part,kinEnergy,stepLength);
|
||||
sig2 = (1.0/beta2 - 0.5)* twopi_mc2_rcl2 * tmax*step * electronDensity * charge2;
|
||||
sig2 = (1.0/beta2 - 0.5)*twopi_mc2_rcl2*tmax*step*electronDensity*charge2;
|
||||
}
|
||||
return sig2;
|
||||
}
|
||||
@@ -268,8 +282,8 @@ inline G4double G4EnergyLossForExtrapolator::ComputeValue(G4double x,
|
||||
const G4PhysicsTable* table)
|
||||
{
|
||||
G4double res = 0.0;
|
||||
bool b;
|
||||
res = ((*table)[index])->GetValue(x, b);
|
||||
G4bool b;
|
||||
if(table) res = ((*table)[index])->GetValue(x, b);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuBetheBlochModel.hh,v 1.17 2007/05/22 17:35:58 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuBremsstrahlung.hh,v 1.29 2007/05/23 08:49:32 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4MuBremsstrahlung.hh,v 1.30 2008/02/29 17:50:05 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -115,20 +115,22 @@ private:
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4bool G4MuBremsstrahlung::IsApplicable(const G4ParticleDefinition& p)
|
||||
inline
|
||||
G4bool G4MuBremsstrahlung::IsApplicable(const G4ParticleDefinition& p)
|
||||
{
|
||||
return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double G4MuBremsstrahlung::MinPrimaryEnergy(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double)
|
||||
inline
|
||||
G4double G4MuBremsstrahlung::MinPrimaryEnergy(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double)
|
||||
{
|
||||
return lowestKinEnergy;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuBremsstrahlungModel.hh,v 1.17 2007/10/11 09:25:31 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4MuBremsstrahlungModel.hh,v 1.21 2008/07/22 16:11:34 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -44,14 +44,16 @@
|
||||
// 13-02-03 Add name (V.Ivanchenko)
|
||||
// 10-02-04 Add lowestKinEnergy (V.Ivanchenko)
|
||||
// 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
|
||||
// 13-02-06 add ComputeCrossSectionPerAtom (mma)
|
||||
// 13-02-06 Add ComputeCrossSectionPerAtom (mma)
|
||||
// 11-10-07 Add ignoreCut flag (V.Ivanchenko)
|
||||
// 28-02-08 Reorganized protected methods and members (V.Ivanchenko)
|
||||
// 06-03-08 Remove obsolete methods and members (V.Ivanchenko)
|
||||
//
|
||||
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// Implementation of energy loss for gamma emission by muons
|
||||
// Implementation of bremssrahlung by muons
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -60,6 +62,7 @@
|
||||
#define G4MuBremsstrahlungModel_h 1
|
||||
|
||||
#include "G4VEmModel.hh"
|
||||
#include "G4NistManager.hh"
|
||||
|
||||
class G4Element;
|
||||
class G4ParticleChangeForLoss;
|
||||
@@ -78,8 +81,6 @@ public:
|
||||
|
||||
void Initialise(const G4ParticleDefinition*, const G4DataVector&);
|
||||
|
||||
void SetLowestKineticEnergy(G4double e) {lowestKinEnergy = e;};
|
||||
|
||||
G4double MinEnergyCut(const G4ParticleDefinition*,
|
||||
const G4MaterialCutsCouple*);
|
||||
|
||||
@@ -89,13 +90,7 @@ public:
|
||||
G4double Z, G4double A,
|
||||
G4double cutEnergy,
|
||||
G4double maxEnergy);
|
||||
|
||||
virtual G4double CrossSectionPerVolume(const G4Material*,
|
||||
const G4ParticleDefinition*,
|
||||
G4double kineticEnergy,
|
||||
G4double cutEnergy,
|
||||
G4double maxEnergy);
|
||||
|
||||
|
||||
virtual G4double ComputeDEDXPerVolume(const G4Material*,
|
||||
const G4ParticleDefinition*,
|
||||
G4double kineticEnergy,
|
||||
@@ -107,87 +102,98 @@ public:
|
||||
G4double tmin,
|
||||
G4double maxEnergy);
|
||||
|
||||
inline void SetLowestKineticEnergy(G4double e);
|
||||
|
||||
protected:
|
||||
|
||||
G4double ComputMuBremLoss(G4double Z, G4double tkin, G4double cut);
|
||||
|
||||
G4double ComputeMicroscopicCrossSection(G4double tkin,
|
||||
G4double Z,
|
||||
G4double cut);
|
||||
|
||||
virtual G4double ComputeDMicroscopicCrossSection(G4double tkin,
|
||||
G4double Z,
|
||||
G4double gammaEnergy);
|
||||
|
||||
G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
|
||||
G4double kineticEnergy);
|
||||
|
||||
public:
|
||||
|
||||
G4double ComputMuBremLoss(G4double Z, G4double A, G4double tkin, G4double cut);
|
||||
|
||||
G4double ComputeMicroscopicCrossSection(G4double tkin,
|
||||
G4double Z,
|
||||
G4double A,
|
||||
G4double cut);
|
||||
|
||||
G4double ComputeDMicroscopicCrossSection(G4double tkin,
|
||||
G4double Z,
|
||||
G4double A,
|
||||
G4double gammaEnergy);
|
||||
|
||||
inline void SetIgnoreCutFlag(G4bool);
|
||||
|
||||
inline G4bool IgnoreCutFlag() const;
|
||||
|
||||
private:
|
||||
|
||||
G4DataVector* ComputePartialSumSigma(const G4Material* material,
|
||||
G4double tkin, G4double cut);
|
||||
|
||||
const G4Element* SelectRandomAtom(const G4MaterialCutsCouple* couple) const;
|
||||
|
||||
void MakeSamplingTables();
|
||||
G4DataVector* ComputePartialSumSigma(const G4Material* material,
|
||||
G4double tkin, G4double cut);
|
||||
|
||||
const G4Element* SelectRandomAtom(const G4MaterialCutsCouple* couple) const;
|
||||
|
||||
// hide assignment operator
|
||||
G4MuBremsstrahlungModel & operator=(const G4MuBremsstrahlungModel &right);
|
||||
G4MuBremsstrahlungModel(const G4MuBremsstrahlungModel&);
|
||||
|
||||
G4ParticleDefinition* theGamma;
|
||||
protected:
|
||||
|
||||
const G4ParticleDefinition* particle;
|
||||
G4NistManager* nist;
|
||||
G4double mass;
|
||||
G4double rmass;
|
||||
G4double cc;
|
||||
G4double coeff;
|
||||
G4double sqrte;
|
||||
G4double bh;
|
||||
G4double bh1;
|
||||
G4double btf;
|
||||
G4double btf1;
|
||||
|
||||
private:
|
||||
|
||||
G4ParticleDefinition* theGamma;
|
||||
G4ParticleChangeForLoss* fParticleChange;
|
||||
|
||||
G4double highKinEnergy;
|
||||
G4double lowKinEnergy;
|
||||
G4double lowestKinEnergy;
|
||||
G4double minThreshold;
|
||||
G4double mass;
|
||||
|
||||
// tables for sampling
|
||||
G4int nzdat,ntdat,NBIN;
|
||||
static G4double zdat[5],adat[5],tdat[8];
|
||||
G4double ya[1001], proba[5][8][1001];
|
||||
G4double cutFixed;
|
||||
|
||||
G4bool ignoreCut;
|
||||
|
||||
std::vector<G4DataVector*> partialSumSigma;
|
||||
G4bool samplingTablesAreFilled;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline G4double G4MuBremsstrahlungModel::MaxSecondaryEnergy(
|
||||
const G4ParticleDefinition*,
|
||||
G4double kineticEnergy)
|
||||
inline
|
||||
G4double G4MuBremsstrahlungModel::MaxSecondaryEnergy(const G4ParticleDefinition*,
|
||||
G4double kineticEnergy)
|
||||
{
|
||||
return kineticEnergy;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void G4MuBremsstrahlungModel::SetIgnoreCutFlag(G4bool val)
|
||||
inline void G4MuBremsstrahlungModel::SetLowestKineticEnergy(G4double e)
|
||||
{
|
||||
ignoreCut = val;
|
||||
lowestKinEnergy = e;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline G4bool G4MuBremsstrahlungModel::IgnoreCutFlag() const
|
||||
inline
|
||||
G4double G4MuBremsstrahlungModel::MinEnergyCut(const G4ParticleDefinition*,
|
||||
const G4MaterialCutsCouple*)
|
||||
{
|
||||
return ignoreCut;
|
||||
return minThreshold;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
void G4MuBremsstrahlungModel::SetParticle(const G4ParticleDefinition* p)
|
||||
{
|
||||
if(!particle) {
|
||||
particle = p;
|
||||
mass = particle->GetPDGMass();
|
||||
rmass=mass/electron_mass_c2 ;
|
||||
cc=classic_electr_radius/rmass ;
|
||||
coeff= 16.*fine_structure_const*cc*cc/3. ;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuIonisation.hh,v 1.30 2007/05/23 08:49:32 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -1,256 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * 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. 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 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: G4MuMscModel.hh,v 1.4 2007/11/09 19:48:09 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// GEANT4 Class header file
|
||||
//
|
||||
//
|
||||
// File name: G4MuMscModel
|
||||
//
|
||||
// Author: V.Ivanchenko on base of L.Urban model
|
||||
//
|
||||
// Creation date: 25.10.2007
|
||||
//
|
||||
// Modifications:
|
||||
//
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// Implementation of the model of multiple scattering based on
|
||||
// H.W.Lewis Phys Rev 78 (1950) 526 and L.Urban model
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef G4MuMscModel_h
|
||||
#define G4MuMscModel_h 1
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4eCoulombScatteringModel.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4MscStepLimitType.hh"
|
||||
#include "G4MaterialCutsCouple.hh"
|
||||
|
||||
class G4LossTableManager;
|
||||
class G4ParticleChangeForMSC;
|
||||
class G4SafetyHelper;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class G4MuMscModel : public G4eCoulombScatteringModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4MuMscModel(G4double frange = 0.2,
|
||||
G4double thetaMax = 0.04,
|
||||
G4double tMax = TeV*TeV,
|
||||
const G4String& nam = "MuMscUni");
|
||||
|
||||
virtual ~G4MuMscModel();
|
||||
|
||||
void Initialise(const G4ParticleDefinition*, const G4DataVector&);
|
||||
|
||||
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
|
||||
G4double KineticEnergy,
|
||||
G4double AtomicNumber,
|
||||
G4double AtomicWeight=0.,
|
||||
G4double cut = DBL_MAX,
|
||||
G4double emax= DBL_MAX);
|
||||
|
||||
void SampleScattering(const G4DynamicParticle*, G4double safety);
|
||||
|
||||
void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double,
|
||||
G4double);
|
||||
|
||||
G4double ComputeTruePathLengthLimit(const G4Track& track,
|
||||
G4PhysicsTable* theLambdaTable,
|
||||
G4double currentMinimalStep);
|
||||
|
||||
G4double ComputeGeomPathLength(G4double truePathLength);
|
||||
|
||||
G4double ComputeTrueStepLength(G4double geomStepLength);
|
||||
|
||||
inline void SetStepLimitType(G4MscStepLimitType);
|
||||
|
||||
inline void SetLateralDisplasmentFlag(G4bool val);
|
||||
|
||||
inline G4double GetLambda(G4double kinEnergy);
|
||||
|
||||
inline G4double GetLambda2(G4double kinEnergy);
|
||||
|
||||
// inline void SetThetaLimit(G4double);
|
||||
|
||||
inline void SetRangeFactor(G4double);
|
||||
|
||||
private:
|
||||
|
||||
void BuildTables();
|
||||
|
||||
G4double ComputeLambda2(G4double kinEnergy, G4double cut);
|
||||
|
||||
inline void DefineMaterial(const G4MaterialCutsCouple*);
|
||||
|
||||
// hide assignment operator
|
||||
G4MuMscModel & operator=(const G4MuMscModel &right);
|
||||
G4MuMscModel(const G4MuMscModel&);
|
||||
|
||||
G4ParticleChangeForMSC* fParticleChange;
|
||||
|
||||
G4SafetyHelper* safetyHelper;
|
||||
G4PhysicsTable* theLambdaTable;
|
||||
G4PhysicsTable* theLambda2Table;
|
||||
G4LossTableManager* theManager;
|
||||
const G4DataVector* currentCuts;
|
||||
|
||||
G4double dtrl;
|
||||
G4double facrange;
|
||||
G4double thetaLimit;
|
||||
G4double numlimit;
|
||||
G4double tlimitminfix;
|
||||
G4double invsqrt12;
|
||||
G4double lowBinEnergy;
|
||||
G4double highBinEnergy;
|
||||
|
||||
// cash
|
||||
G4double preKinEnergy;
|
||||
G4double xSection;
|
||||
G4double ecut;
|
||||
G4double lambda0;
|
||||
G4double tPathLength;
|
||||
G4double zPathLength;
|
||||
G4double lambdaeff;
|
||||
G4double currentRange;
|
||||
G4double par1;
|
||||
G4double par2;
|
||||
G4double par3;
|
||||
|
||||
G4int currentMaterialIndex;
|
||||
|
||||
G4int nbins;
|
||||
G4int nwarnings;
|
||||
G4int nwarnlimit;
|
||||
|
||||
const G4MaterialCutsCouple* currentCouple;
|
||||
|
||||
G4MscStepLimitType steppingAlgorithm;
|
||||
|
||||
G4bool samplez;
|
||||
G4bool latDisplasment;
|
||||
G4bool isInitialized;
|
||||
G4bool buildTables;
|
||||
G4bool newrun;
|
||||
G4bool inside;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
void G4MuMscModel::SetLateralDisplasmentFlag(G4bool val)
|
||||
{
|
||||
latDisplasment = val;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
/*
|
||||
inline
|
||||
void G4MuMscModel::SetThetaLimit(G4double val)
|
||||
{
|
||||
thetaLimit = val;
|
||||
}
|
||||
*/
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
void G4MuMscModel::SetRangeFactor(G4double val)
|
||||
{
|
||||
facrange = val;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
void G4MuMscModel::SetStepLimitType(G4MscStepLimitType val)
|
||||
{
|
||||
steppingAlgorithm = val;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
void G4MuMscModel::DefineMaterial(const G4MaterialCutsCouple* cup)
|
||||
{
|
||||
if(cup != currentCouple) {
|
||||
currentCouple = cup;
|
||||
currentMaterialIndex = currentCouple->GetIndex();
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
G4double G4MuMscModel::GetLambda(G4double e)
|
||||
{
|
||||
G4double x;
|
||||
if(theLambdaTable) {
|
||||
G4bool b;
|
||||
x = ((*theLambdaTable)[currentMaterialIndex])->GetValue(e, b);
|
||||
} else {
|
||||
x = CrossSection(currentCouple,particle,e);
|
||||
}
|
||||
if(x > DBL_MIN) x = 1./x;
|
||||
else x = DBL_MAX;
|
||||
return x;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
G4double G4MuMscModel::GetLambda2(G4double e)
|
||||
{
|
||||
G4double x;
|
||||
if(theLambda2Table) {
|
||||
G4bool b;
|
||||
x = ((*theLambda2Table)[currentMaterialIndex])->GetValue(e, b);
|
||||
} else {
|
||||
x = ComputeLambda2(e, (*currentCuts)[currentMaterialIndex]);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuMultipleScattering.hh,v 1.1 2007/10/26 09:52:37 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4MuMultipleScattering.hh,v 1.2 2008/04/13 17:19:13 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// -----------------------------------------------------------------------------
|
||||
//
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class G4MuMscModel;
|
||||
class G4VMscModel;
|
||||
|
||||
class G4MuMultipleScattering : public G4VMultipleScattering
|
||||
|
||||
@@ -93,7 +93,7 @@ protected:
|
||||
|
||||
private: // data members
|
||||
|
||||
G4MuMscModel* mscModel;
|
||||
G4VMscModel* mscModel;
|
||||
|
||||
G4double thetaLimit;
|
||||
G4double dtrl;
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuPairProduction.hh,v 1.29 2007/05/23 08:49:32 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4MuPairProduction.hh,v 1.30 2008/02/29 17:50:05 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -114,20 +114,22 @@ private:
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4bool G4MuPairProduction::IsApplicable(const G4ParticleDefinition& p)
|
||||
inline
|
||||
G4bool G4MuPairProduction::IsApplicable(const G4ParticleDefinition& p)
|
||||
{
|
||||
return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double G4MuPairProduction::MinPrimaryEnergy(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double)
|
||||
inline
|
||||
G4double G4MuPairProduction::MinPrimaryEnergy(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double)
|
||||
{
|
||||
return lowestKinEnergy;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuPairProductionModel.hh,v 1.24 2007/10/11 13:52:03 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4MuPairProductionModel.hh,v 1.27 2008/07/22 16:11:34 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -47,6 +47,7 @@
|
||||
// 13-02-06 Add ComputeCrossSectionPerAtom (mma)
|
||||
// 12-05-06 Add parameter to SelectRandomAtom (A.Bogdanov)
|
||||
// 11-10-07 Add ignoreCut flag (V.Ivanchenko)
|
||||
// 28-02-08 Reorganized protected methods and members (V.Ivanchenko)
|
||||
|
||||
//
|
||||
// Class Description:
|
||||
@@ -61,6 +62,7 @@
|
||||
#define G4MuPairProductionModel_h 1
|
||||
|
||||
#include "G4VEmModel.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4Element;
|
||||
@@ -69,7 +71,6 @@ class G4ParticleChangeForGamma;
|
||||
|
||||
class G4MuPairProductionModel : public G4VEmModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4MuPairProductionModel(const G4ParticleDefinition* p = 0,
|
||||
@@ -77,14 +78,8 @@ public:
|
||||
|
||||
virtual ~G4MuPairProductionModel();
|
||||
|
||||
void SetParticle(const G4ParticleDefinition*);
|
||||
|
||||
void Initialise(const G4ParticleDefinition*, const G4DataVector&);
|
||||
|
||||
void SetLowestKineticEnergy(G4double e) {lowestKinEnergy = e;};
|
||||
|
||||
G4double MinEnergyCut(const G4ParticleDefinition*,
|
||||
const G4MaterialCutsCouple*);
|
||||
|
||||
virtual G4double ComputeCrossSectionPerAtom(
|
||||
const G4ParticleDefinition*,
|
||||
@@ -93,31 +88,26 @@ public:
|
||||
G4double cutEnergy,
|
||||
G4double maxEnergy);
|
||||
|
||||
virtual G4double CrossSectionPerVolume(const G4Material*,
|
||||
const G4ParticleDefinition*,
|
||||
G4double kineticEnergy,
|
||||
G4double cutEnergy,
|
||||
G4double maxEnergy);
|
||||
|
||||
virtual G4double ComputeDEDXPerVolume(const G4Material*,
|
||||
const G4ParticleDefinition*,
|
||||
G4double kineticEnergy,
|
||||
G4double cutEnergy);
|
||||
|
||||
void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy);
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy);
|
||||
|
||||
inline void SetLowestKineticEnergy(G4double e);
|
||||
|
||||
inline G4double MinEnergyCut(const G4ParticleDefinition*,
|
||||
const G4MaterialCutsCouple*);
|
||||
|
||||
inline void SetParticle(const G4ParticleDefinition*);
|
||||
|
||||
protected:
|
||||
|
||||
inline G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
|
||||
G4double kineticEnergy);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
G4double ComputMuPairLoss(G4double Z, G4double tkin, G4double cut,
|
||||
G4double tmax);
|
||||
|
||||
@@ -125,13 +115,14 @@ public:
|
||||
G4double Z,
|
||||
G4double cut);
|
||||
|
||||
G4double ComputeDMicroscopicCrossSection(G4double tkin,
|
||||
G4double Z,
|
||||
G4double pairEnergy);
|
||||
virtual G4double ComputeDMicroscopicCrossSection(G4double tkin,
|
||||
G4double Z,
|
||||
G4double pairEnergy);
|
||||
|
||||
inline void SetIgnoreCutFlag(G4bool);
|
||||
inline G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
|
||||
G4double kineticEnergy);
|
||||
|
||||
inline G4bool IgnoreCutFlag() const;
|
||||
inline void SetCurrentElement(G4double Z);
|
||||
|
||||
private:
|
||||
|
||||
@@ -143,8 +134,6 @@ private:
|
||||
|
||||
void MakeSamplingTables();
|
||||
|
||||
void SetCurrentElement(G4double Z);
|
||||
|
||||
inline G4double InterpolatedIntegralCrossSection(
|
||||
G4double dt, G4double dz, G4int iz,
|
||||
G4int it, G4int iy, G4double z);
|
||||
@@ -153,13 +142,10 @@ private:
|
||||
G4MuPairProductionModel & operator=(const G4MuPairProductionModel &right);
|
||||
G4MuPairProductionModel(const G4MuPairProductionModel&);
|
||||
|
||||
G4ParticleDefinition* theElectron;
|
||||
G4ParticleDefinition* thePositron;
|
||||
G4ParticleChangeForLoss* fParticleChange;
|
||||
G4ParticleChangeForGamma* gParticleChange;
|
||||
protected:
|
||||
|
||||
G4double minPairEnergy;
|
||||
G4double lowestKinEnergy;
|
||||
const G4ParticleDefinition* particle;
|
||||
G4NistManager* nist;
|
||||
|
||||
G4double factorForCross;
|
||||
G4double sqrte;
|
||||
@@ -169,28 +155,62 @@ private:
|
||||
G4double z23;
|
||||
G4double lnZ;
|
||||
|
||||
const G4ParticleDefinition* particle;
|
||||
static G4double xgi[8],wgi[8];
|
||||
|
||||
private:
|
||||
|
||||
G4ParticleDefinition* theElectron;
|
||||
G4ParticleDefinition* thePositron;
|
||||
G4ParticleChangeForLoss* fParticleChange;
|
||||
|
||||
G4double minPairEnergy;
|
||||
G4double lowestKinEnergy;
|
||||
|
||||
// tables for sampling
|
||||
G4int nzdat;
|
||||
G4int ntdat;
|
||||
G4int nbiny;
|
||||
size_t nmaxElements;
|
||||
static G4double zdat[5],adat[5],tdat[8],xgi[8],wgi[8];
|
||||
static G4double zdat[5],adat[5],tdat[8];
|
||||
G4double ya[1001],proba[5][8][1001];
|
||||
|
||||
G4double ymin;
|
||||
G4double ymax;
|
||||
G4double dy;
|
||||
|
||||
G4bool ignoreCut;
|
||||
|
||||
G4bool samplingTablesAreFilled;
|
||||
std::vector<G4double> partialSum;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void G4MuPairProductionModel::SetLowestKineticEnergy(G4double e)
|
||||
{
|
||||
lowestKinEnergy = e;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
G4double G4MuPairProductionModel::MinEnergyCut(const G4ParticleDefinition*,
|
||||
const G4MaterialCutsCouple* )
|
||||
{
|
||||
return minPairEnergy;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline
|
||||
void G4MuPairProductionModel::SetParticle(const G4ParticleDefinition* p)
|
||||
{
|
||||
if(!particle) {
|
||||
particle = p;
|
||||
particleMass = particle->GetPDGMass();
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline G4double G4MuPairProductionModel::MaxSecondaryEnergy(
|
||||
const G4ParticleDefinition*,
|
||||
G4double kineticEnergy)
|
||||
@@ -205,9 +225,10 @@ inline void G4MuPairProductionModel::SetCurrentElement(G4double Z)
|
||||
{
|
||||
if(Z != currentZ) {
|
||||
currentZ = Z;
|
||||
z13 = std::pow(Z,0.333333333);
|
||||
G4int iz = G4int(Z);
|
||||
z13 = nist->GetZ13(iz);
|
||||
z23 = z13*z13;
|
||||
lnZ = std::log(Z);
|
||||
lnZ = nist->GetLOGZ(iz);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,18 +249,4 @@ inline G4double G4MuPairProductionModel::InterpolatedIntegralCrossSection(
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void G4MuPairProductionModel::SetIgnoreCutFlag(G4bool val)
|
||||
{
|
||||
ignoreCut = val;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline G4bool G4MuPairProductionModel::IgnoreCutFlag() const
|
||||
{
|
||||
return ignoreCut;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user