Import Geant4 6.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:41:53 +02:00
parent 4aea781e80
commit 96686e0c8f
6560 changed files with 153347 additions and 238155 deletions
@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4MuBetheBlochModel.hh,v 1.7 2003/06/16 17:01:36 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: G4MuBetheBlochModel.hh,v 1.8 2003/07/21 12:52:35 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
// -------------------------------------------------------------------
//
@@ -76,15 +76,15 @@ public:
G4double MinEnergyCut(const G4ParticleDefinition*,
const G4MaterialCutsCouple*);
G4bool IsInCharge(const G4ParticleDefinition*);
virtual G4double ComputeDEDX(const G4Material*,
virtual G4double ComputeDEDX(const G4MaterialCutsCouple*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy);
virtual G4double CrossSection(const G4Material*,
virtual G4double CrossSection(const G4MaterialCutsCouple*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy,
@@ -20,155 +20,137 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4MuBremsstrahlung.hh,v 1.17 2003/11/12 16:18:23 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
// $Id: G4MuBremsstrahlung.hh,v 1.15 2003/06/16 17:01:37 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// -------------------------------------------------------------------
//
//--------------- G4MuBremsstrahlung physics process ------------------
// by Laszlo Urban, September 1997
//------------------------------------------------------------------------------
// 10/02/00 modifications , new e.m. structure, L.Urban
// 10-08-01: new methods Store/Retrieve PhysicsTable (mma)
// GEANT4 Class header file
//
//
// File name: G4MuBremsstrahlung
//
// Author: Laszlo Urban
//
// Creation date: 30.09.1997
//
// Modifications:
//
// 10/02/00 modifications , new e.m. structure, L.Urban
// 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 29-10-01 all static functions no more inlined (mma)
// 16-01-03 Migrade to cut per region (V.Ivanchenko)
//------------------------------------------------------------------------------
// 10-05-02 V.Ivanchenko update to new design
// 26-12-02 secondary production moved to derived classes (VI)
// 24-01-03 Make models region aware (V.Ivanchenko)
// 05-02-03 Fix compilation warnings (V.Ivanchenko)
// 08-08-03 STD substitute standard (V.Ivanchenko)
// 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko)
//
// Class Description:
//
// This class manages the Bremsstrahlung process for muons.
// it inherites from G4VContinuousDiscreteProcess via G4VEnergyLossProcess.
//
// -------------------------------------------------------------------
//
#ifndef G4MuBremsstrahlung_h
#define G4MuBremsstrahlung_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4VMuEnergyLoss.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4OrderedTable.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsLogVector.hh"
#include "G4MaterialCutsCouple.hh"
#include "G4VEnergyLossProcess.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MuBremsstrahlung : public G4VMuEnergyLoss
class G4MuBremsstrahlung : public G4VEnergyLossProcess
{
public:
public:
G4MuBremsstrahlung(const G4String& processName = "MuBrems");
G4MuBremsstrahlung(const G4String& processName = "MuBrems");
~G4MuBremsstrahlung();
~G4MuBremsstrahlung();
G4bool IsApplicable(const G4ParticleDefinition&);
G4bool IsApplicable(const G4ParticleDefinition& p)
{return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);};
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*, G4double cut);
void BuildLossTable(const G4ParticleDefinition& ParticleType);
virtual std::vector<G4Track*>* SecondariesAlongStep(
const G4Step&,
G4double&,
G4double&,
G4double&) {return 0;};
void BuildLambdaTable(const G4ParticleDefinition& ParticleType);
virtual void SecondariesPostStep(
G4VEmModel*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double&,
G4double&);
void PrintInfoDefinition();
void PrintInfoDefinition();
// Print out of the class parameters
G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition );
protected:
G4VParticleChange *PostStepDoIt(const G4Track& track,
const G4Step& Step );
const G4ParticleDefinition* DefineBaseParticle(const G4ParticleDefinition* p);
G4double GetDMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double AtomicMass,
G4double GammaEnergy);
virtual G4double MaxSecondaryEnergy(const G4DynamicParticle* dynParticle);
G4bool StorePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// store eLoss and MeanFreePath tables into an external file
// specified by 'directory' (must exist before invokation)
private:
G4bool RetrievePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// retrieve eLoss and MeanFreePath tables from an external file
// specified by 'directory'
protected:
G4double ComputeMeanFreePath( const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4MaterialCutsCouple* couple);
void ComputePartialSumSigma( const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4MaterialCutsCouple* couple);
virtual G4double ComputeMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double AtomicMass,
G4double GammaEnergyCut);
virtual G4double ComputeDMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double AtomicMass,
G4double GammaEnergy);
private:
G4MuBremsstrahlung & operator=(const G4MuBremsstrahlung &right);
G4MuBremsstrahlung(const G4MuBremsstrahlung&);
G4double ComputeBremLoss(const G4ParticleDefinition* ParticleType,
G4double Z,G4double A,
G4double T, G4double Cut);
const G4Element* SelectRandomAtom(const G4MaterialCutsCouple* couple) const;
void MakeSamplingTables( const G4ParticleDefinition* ParticleType );
protected:
virtual G4double SecondaryEnergyThreshold(size_t index);
private:
G4PhysicsTable* theMeanFreePathTable;
G4OrderedTable PartialSumSigma;
static G4double LowerBoundLambda; // bining for lambda table
static G4double UpperBoundLambda;
static G4int NbinLambda;
G4double LowestKineticEnergy,HighestKineticEnergy;
G4int TotBin;
void InitialiseProcess();
const std::vector<G4double>* secondaryEnergyCuts;
G4MuBremsstrahlung & operator=(const G4MuBremsstrahlung &right);
G4MuBremsstrahlung(const G4MuBremsstrahlung&);
// tables for sampling
static G4int nzdat,ntdat,NBIN;
static G4double zdat[5],adat[5],tdat[8];
static G4double ya[1001],proba[5][8][1001];
static G4double CutFixed;
public:
static void SetLowerBoundLambda(G4double val);
static void SetUpperBoundLambda(G4double val);
static void SetNbinLambda(G4int n);
static G4double GetLowerBoundLambda();
static G4double GetUpperBoundLambda();
static G4int GetNbinLambda();
const G4ParticleDefinition* theParticle;
const G4ParticleDefinition* theBaseParticle;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuBremsstrahlung::MinPrimaryEnergy(const G4ParticleDefinition*,
const G4Material*,
G4double cut)
{
return cut;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuBremsstrahlung::MaxSecondaryEnergy(const G4DynamicParticle* dynParticle)
{
return dynParticle->GetKineticEnergy();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4VEmModel.hh"
inline void G4MuBremsstrahlung::SecondariesPostStep(
G4VEmModel* model,
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double& tcut,
G4double& kinEnergy)
{
G4DynamicParticle* gamma = model->SampleSecondary(couple, dp, tcut, kinEnergy);
if(gamma) {
aParticleChange.SetNumberOfSecondaries(1);
aParticleChange.AddSecondary(gamma);
kinEnergy -= gamma->GetKineticEnergy();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MuBremsstrahlung.icc"
#endif
@@ -0,0 +1,175 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4MuBremsstrahlung52.hh,v 1.1 2003/08/08 11:28:39 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//--------------- G4MuBremsstrahlung52 physics process ------------------
// by Laszlo Urban, September 1997
//------------------------------------------------------------------------------
// 10/02/00 modifications , new e.m. structure, L.Urban
// 10-08-01: new methods Store/Retrieve PhysicsTable (mma)
// 29-10-01 all static functions no more inlined (mma)
// 16-01-03 Migrade to cut per region (V.Ivanchenko)
// 08-08-03 This class is frozen at the release 5.2 (V.Ivanchenko)
//------------------------------------------------------------------------------
#ifndef G4MuBremsstrahlung52_h
#define G4MuBremsstrahlung52_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4VMuEnergyLoss.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4OrderedTable.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsLogVector.hh"
#include "G4MaterialCutsCouple.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MuBremsstrahlung52 : public G4VMuEnergyLoss
{
public:
G4MuBremsstrahlung52(const G4String& processName = "MuBrems");
~G4MuBremsstrahlung52();
G4bool IsApplicable(const G4ParticleDefinition&);
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
void BuildLossTable(const G4ParticleDefinition& ParticleType);
void BuildLambdaTable(const G4ParticleDefinition& ParticleType);
void PrintInfoDefinition();
G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition );
G4VParticleChange *PostStepDoIt(const G4Track& track,
const G4Step& Step );
G4double GetDMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double AtomicMass,
G4double GammaEnergy);
G4bool StorePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// store eLoss and MeanFreePath tables into an external file
// specified by 'directory' (must exist before invokation)
G4bool RetrievePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// retrieve eLoss and MeanFreePath tables from an external file
// specified by 'directory'
protected:
G4double ComputeMeanFreePath( const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4MaterialCutsCouple* couple);
void ComputePartialSumSigma( const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4MaterialCutsCouple* couple);
virtual G4double ComputeMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double AtomicMass,
G4double GammaEnergyCut);
virtual G4double ComputeDMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double AtomicMass,
G4double GammaEnergy);
private:
G4MuBremsstrahlung52 & operator=(const G4MuBremsstrahlung52 &right);
G4MuBremsstrahlung52(const G4MuBremsstrahlung52&);
G4double ComputeBremLoss(const G4ParticleDefinition* ParticleType,
G4double Z,G4double A,
G4double T, G4double Cut);
const G4Element* SelectRandomAtom(const G4MaterialCutsCouple* couple) const;
void MakeSamplingTables( const G4ParticleDefinition* ParticleType );
protected:
virtual G4double SecondaryEnergyThreshold(size_t index);
private:
G4PhysicsTable* theMeanFreePathTable;
G4OrderedTable PartialSumSigma;
static G4double LowerBoundLambda; // bining for lambda table
static G4double UpperBoundLambda;
static G4int NbinLambda;
G4double LowestKineticEnergy,HighestKineticEnergy;
G4int TotBin;
const std::vector<G4double>* secondaryEnergyCuts;
// tables for sampling
static G4int nzdat,ntdat,NBIN;
static G4double zdat[5],adat[5],tdat[8];
static G4double ya[1001],proba[5][8][1001];
static G4double CutFixed;
public:
static void SetLowerBoundLambda(G4double val);
static void SetUpperBoundLambda(G4double val);
static void SetNbinLambda(G4int n);
static G4double GetLowerBoundLambda();
static G4double GetUpperBoundLambda();
static G4int GetNbinLambda();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MuBremsstrahlung52.icc"
#endif
@@ -21,10 +21,10 @@
// ********************************************************************
//
//
// $Id: G4MuBremsstrahlung.icc,v 1.10 2003/05/26 16:21:54 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: G4MuBremsstrahlung52.icc,v 1.1 2003/08/08 11:28:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//--------------- G4MuBremsstrahlung physics process ------------------
//--------------- G4MuBremsstrahlung52 physics process ------------------
// by Laszlo Urban, September 1997
//------------------------------------------------------------------------------
//
@@ -34,12 +34,13 @@
// 29.05.01 V.Ivanchenko minor changes to provide ANSI -wall compilation
// 28-09-01 suppression of theMuonPlus ..etc..data members (mma)
// 16-01-03 Migrade to cut per region (V.Ivanchenko)
// 08-08-03 This class is frozen at the release 5.2 (V.Ivanchenko)
//
//------------------------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4MuBremsstrahlung::GetMeanFreePath(const G4Track& trackData,
inline G4double G4MuBremsstrahlung52::GetMeanFreePath(const G4Track& trackData,
G4double,
G4ForceCondition* condition)
{
@@ -66,7 +67,7 @@ inline G4double G4MuBremsstrahlung::GetMeanFreePath(const G4Track& trackData,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4MuBremsstrahlung::ComputeMeanFreePath(
inline G4double G4MuBremsstrahlung52::ComputeMeanFreePath(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4MaterialCutsCouple* couple)
@@ -92,7 +93,7 @@ inline G4double G4MuBremsstrahlung::ComputeMeanFreePath(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4bool G4MuBremsstrahlung::IsApplicable(
inline G4bool G4MuBremsstrahlung52::IsApplicable(
const G4ParticleDefinition& particle)
{
return ((&particle == G4MuonPlus::MuonPlus() ) ||
@@ -101,7 +102,7 @@ inline G4bool G4MuBremsstrahlung::IsApplicable(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4MuBremsstrahlung::SecondaryEnergyThreshold(size_t index)
inline G4double G4MuBremsstrahlung52::SecondaryEnergyThreshold(size_t index)
{
return (*secondaryEnergyCuts)[index];
}
@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4MuBremsstrahlungModel.hh,v 1.7 2003/06/16 17:01:38 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: G4MuBremsstrahlungModel.hh,v 1.8 2003/07/21 12:52:35 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
// -------------------------------------------------------------------
//
@@ -54,6 +54,8 @@
#include "G4VEmModel.hh"
class G4Element;
class G4MuBremsstrahlungModel : public G4VEmModel
{
@@ -78,12 +80,12 @@ public:
G4bool IsInCharge(const G4ParticleDefinition*);
G4double ComputeDEDX(const G4Material*,
G4double ComputeDEDX(const G4MaterialCutsCouple*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy);
G4double CrossSection(const G4Material*,
G4double CrossSection(const G4MaterialCutsCouple*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy,
@@ -1,154 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4MuBremsstrahlungSTD.hh,v 1.8 2003/06/16 17:01:39 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4MuBremsstrahlungSTD
//
// Author: Laszlo Urban
//
// Creation date: 30.09.1997
//
// Modifications:
//
// 10/02/00 modifications , new e.m. structure, L.Urban
// 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 29-10-01 all static functions no more inlined (mma)
// 10-05-02 V.Ivanchenko update to new design
// 26-12-02 secondary production moved to derived classes (VI)
// 24-01-03 Make models region aware (V.Ivanchenko)
// 05-02-03 Fix compilation warnings (V.Ivanchenko)
//
// Class Description:
//
// This class manages the Bremsstrahlung process for muons.
// it inherites from G4VContinuousDiscreteProcess via G4VEnergyLossSTD.
//
// -------------------------------------------------------------------
//
#ifndef G4MuBremsstrahlungSTD_h
#define G4MuBremsstrahlungSTD_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "globals.hh"
#include "G4VEnergyLossSTD.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MuBremsstrahlungSTD : public G4VEnergyLossSTD
{
public:
G4MuBremsstrahlungSTD(const G4String& processName = "MuBrems");
~G4MuBremsstrahlungSTD();
G4bool IsApplicable(const G4ParticleDefinition& p)
{return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);};
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*, G4double cut);
virtual std::vector<G4Track*>* SecondariesAlongStep(
const G4Step&,
G4double&,
G4double&,
G4double&) {return 0;};
virtual void SecondariesPostStep(
G4VEmModel*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double&,
G4double&);
void PrintInfoDefinition();
// Print out of the class parameters
protected:
const G4ParticleDefinition* DefineBaseParticle(const G4ParticleDefinition* p);
virtual G4double MaxSecondaryEnergy(const G4DynamicParticle* dynParticle);
private:
void InitialiseProcess();
G4MuBremsstrahlungSTD & operator=(const G4MuBremsstrahlungSTD &right);
G4MuBremsstrahlungSTD(const G4MuBremsstrahlungSTD&);
const G4ParticleDefinition* theParticle;
const G4ParticleDefinition* theBaseParticle;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuBremsstrahlungSTD::MinPrimaryEnergy(const G4ParticleDefinition*,
const G4Material*,
G4double cut)
{
return cut;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuBremsstrahlungSTD::MaxSecondaryEnergy(const G4DynamicParticle* dynParticle)
{
return dynParticle->GetKineticEnergy();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4VEmModel.hh"
inline void G4MuBremsstrahlungSTD::SecondariesPostStep(
G4VEmModel* model,
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double& tcut,
G4double& kinEnergy)
{
G4DynamicParticle* gamma = model->SampleSecondary(couple, dp, tcut, kinEnergy);
if(gamma) {
aParticleChange.SetNumberOfSecondaries(1);
aParticleChange.AddSecondary(gamma);
kinEnergy -= gamma->GetKineticEnergy();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -20,168 +20,186 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4MuIonisation.hh,v 1.17 2003/11/12 16:18:23 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
// $Id: G4MuIonisation.hh,v 1.15 2003/06/16 17:01:40 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// -------------------------------------------------------------------
//
// --------------- G4MuIonisation physics process ------------------------------
// by Laszlo Urban, September 1997
// -----------------------------------------------------------------------------
// GEANT4 Class header file
//
// 10-02-00 modifications , new e.m. structure, L.Urban
//
// File name: G4MuIonisation
//
// Author: Laszlo Urban
//
// Creation date: 30.05.1997
//
// Modifications:
//
// corrected by L.Urban on 24/09/97
// corrected by L.Urban on 13/01/98
// bugs fixed by L.Urban on 02/02/99
// 10/02/00 modifications , new e.m. structure, L.Urban
// 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 29-08-01 new function ComputeRestrictedMeandEdx() + 'cleanup' (mma)
// 19-09-01 come back to the old process name 'MuIoni'
// 29-10-01 all static functions no more inlined (mma)
// 16-01-03 Migrade to cut per region (V.Ivanchenko)
// 14-08-01 new function ComputeRestrictedMeandEdx() + 'cleanup' (mma)
// 19-09-01 come back to previous process name "hIoni"
// 29-10-01 all static functions no more inlined
// 10-05-02 V.Ivanchenko update to new design
// 09-12-02 V.Ivanchenko remove warning
// 26-12-02 Secondary production moved to derived classes (VI)
// 24-01-03 Make models region aware (V.Ivanchenko)
// 05-02-03 Fix compilation warnings (V.Ivanchenko)
// 13-02-03 SubCutoff regime is assigned to a region (V.Ivanchenko)
// 23-05-03 Add fluctuation model as a member function (V.Ivanchenko)
// 03-06-03 Add SetIntegral method to choose fluctuation model (V.Ivanchenko)
// 03-06-03 Fix initialisation problem for STD ionisation (V.Ivanchenko)
// 08-08-03 STD substitute standard (V.Ivanchenko)
// 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko)
//
// -----------------------------------------------------------------------------
// Class description
// Class Description:
//
// This class manages the ionisation process for muons.
// it inherites from G4VContinuousDiscreteProcess via G4VMuEnergyLoss.
// it inherites from G4VContinuousDiscreteProcess via G4VEnergyLossProcess.
//
// Class description - end
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// -------------------------------------------------------------------
//
#ifndef G4MuIonisation_h
#define G4MuIonisation_h 1
#include "G4VMuEnergyLoss.hh"
#include "G4MaterialCutsCouple.hh"
#include "G4VEnergyLossProcess.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MuIonisation : public G4VMuEnergyLoss
class G4Material;
class G4VEmFluctuationModel;
class G4MuIonisation : public G4VEnergyLossProcess
{
public: // with description
G4MuIonisation(const G4String& processName = "MuIoni");
public:
~G4MuIonisation();
G4MuIonisation(const G4String& name = "MuIoni");
G4bool IsApplicable(const G4ParticleDefinition&);
// return true for charged particles, false otherwise
~G4MuIonisation();
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
// this function overloads a virtual function of the base class.
// It is invoked by the G4ParticleWithCuts::SetCut() method.
// It invokes BuildLambdaTable(), BuildLossTable(), BuildDEDXTable()
G4bool IsApplicable(const G4ParticleDefinition& p)
{return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);};
void BuildLossTable(const G4ParticleDefinition& aParticleType);
// build the dE/dx tables due to the ionisation, for every materials.
// (restricted stopping power, Bethe-Bloch formula)
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*, G4double cut);
void BuildLambdaTable(const G4ParticleDefinition& aParticleType);
// build mean free path tables for the delta rays production.
// the tables are built for every materials.
virtual std::vector<G4Track*>* SecondariesAlongStep(
const G4Step&,
G4double&,
G4double&,
G4double&);
G4bool StorePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// store eLoss and MeanFreePath tables into an external file
// specified by 'directory' (must exist before invokation)
virtual void SecondariesPostStep(
G4VEmModel*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double&,
G4double&);
G4bool RetrievePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// retrieve eLoss and MeanFreePath tables from an external file
// specified by 'directory'
void SetSubCutoff(G4bool val);
virtual void PrintInfoDefinition();
// Print few lines of informations about the process: validity range,
// origine ..etc..
// Invoked by BuildPhysicsTable().
void PrintInfoDefinition();
// Print out of the class parameters
G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition );
// It returns the MeanFreePath of the process for the current track :
// (energy, material)
// The previousStepSize and G4ForceCondition* are not used.
// This function overloads a virtual function of the base class.
// It is invoked by the ProcessManager of the Particle.
protected:
G4VParticleChange* PostStepDoIt(const G4Track& track,
const G4Step& Step );
// It computes the final state of the process (at end of step),
// returned as a ParticleChange object.
// This function overloads a virtual function of the base class.
// It is invoked by the ProcessManager of the Particle.
const G4ParticleDefinition* DefineBaseParticle(const G4ParticleDefinition* p);
virtual G4double MaxSecondaryEnergy(const G4DynamicParticle* dynParticle);
protected: // with description
private:
virtual G4double ComputeRestrictedMeandEdx(
const G4ParticleDefinition& aParticleType,
G4double KineticEnergy,
const G4Material* material,
G4double DeltaThreshold);
// computes restricted mean dE/dx in Geant4 internal units.
void InitialiseProcess();
virtual G4double ComputeCrossSectionPerAtom(
const G4ParticleDefinition& aParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double DeltaThreshold);
// computes total cross section per atom in Geant4 internal units.
// hide assignment operator
G4MuIonisation & operator=(const G4MuIonisation &right);
G4MuIonisation(const G4MuIonisation&);
virtual G4double ComputeDifCrossSectionPerAtom(
const G4ParticleDefinition& aParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double KnockonEnergy);
// computes differential cross section per atom.
G4double mass;
G4double ratio;
protected:
const G4ParticleDefinition* theParticle;
const G4ParticleDefinition* theBaseParticle;
G4VEmFluctuationModel* flucModel;
virtual G4double SecondaryEnergyThreshold(size_t index);
G4PhysicsTable* theMeanFreePathTable;
private:
// hide assignment operator
G4MuIonisation & operator=(const G4MuIonisation &right);
G4MuIonisation(const G4MuIonisation&);
private:
static G4double LowerBoundLambda; // bining for lambda table
static G4double UpperBoundLambda;
static G4int NbinLambda;
G4double LowestKineticEnergy; // binning for dE/dx table
G4double HighestKineticEnergy;
G4int TotBin;
const std::vector<G4double>* secondaryEnergyCuts;
public: // with description
static void SetLowerBoundLambda(G4double val);
static void SetUpperBoundLambda(G4double val);
static void SetNbinLambda(G4int n);
// set the parameters of the mean free path table.
static G4double GetLowerBoundLambda();
static G4double GetUpperBoundLambda();
static G4int GetNbinLambda();
// get the parameters of the mean free path table.
G4bool subCutoff;
G4bool isInitialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4MuIonisation.icc"
inline G4double G4MuIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,
const G4Material*,
G4double cut)
{
G4double x = 0.5*cut/electron_mass_c2;
G4double y = electron_mass_c2/mass;
G4double g = x*y + sqrt((1. + x)*(1. + x*y*y));
return mass*(g - 1.0);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuIonisation::MaxSecondaryEnergy(const G4DynamicParticle* dynParticle)
{
G4double gamma= dynParticle->GetKineticEnergy()/mass + 1.0;
G4double tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /
(1. + 2.0*gamma*ratio + ratio*ratio);
return tmax;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4VSubCutoffProcessor.hh"
inline std::vector<G4Track*>* G4MuIonisation::SecondariesAlongStep(
const G4Step& step,
G4double& tmax,
G4double& eloss,
G4double& kinEnergy)
{
std::vector<G4Track*>* newp = 0;
if(subCutoff) {
G4VSubCutoffProcessor* sp = SubCutoffProcessor(CurrentMaterialCutsCoupleIndex());
if (sp) {
G4VEmModel* model = SelectModel(kinEnergy);
newp = sp->SampleSecondaries(step,tmax,eloss,model);
}
}
return newp;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4VEmModel.hh"
inline void G4MuIonisation::SecondariesPostStep(
G4VEmModel* model,
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double& tcut,
G4double& kinEnergy)
{
G4DynamicParticle* delta = model->SampleSecondary(couple, dp, tcut, kinEnergy);
aParticleChange.SetNumberOfSecondaries(1);
aParticleChange.AddSecondary(delta);
G4ThreeVector finalP = dp->GetMomentum();
kinEnergy -= delta->GetKineticEnergy();
finalP -= delta->GetMomentum();
finalP = finalP.unit();
aParticleChange.SetMomentumDirectionChange(finalP);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -0,0 +1,188 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4MuIonisation52.hh,v 1.1 2003/08/08 11:28:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
// --------------- G4MuIonisation52 physics process ------------------------------
// by Laszlo Urban, September 1997
// -----------------------------------------------------------------------------
//
// 10-02-00 modifications , new e.m. structure, L.Urban
// 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 29-08-01 new function ComputeRestrictedMeandEdx() + 'cleanup' (mma)
// 19-09-01 come back to the old process name 'MuIoni'
// 29-10-01 all static functions no more inlined (mma)
// 16-01-03 Migrade to cut per region (V.Ivanchenko)
// 08-08-03 This class is frozen at the release 5.2 (V.Ivanchenko)
//
// -----------------------------------------------------------------------------
// Class description
//
// This class manages the ionisation process for muons.
// it inherites from G4VContinuousDiscreteProcess via G4VMuEnergyLoss.
//
// Class description - end
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4MuIonisation52_h
#define G4MuIonisation52_h 1
#include "G4VMuEnergyLoss.hh"
#include "G4MaterialCutsCouple.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MuIonisation52 : public G4VMuEnergyLoss
{
public: // with description
G4MuIonisation52(const G4String& processName = "MuIoni");
~G4MuIonisation52();
G4bool IsApplicable(const G4ParticleDefinition&);
// return true for charged particles, false otherwise
void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
// this function overloads a virtual function of the base class.
// It is invoked by the G4ParticleWithCuts::SetCut() method.
// It invokes BuildLambdaTable(), BuildLossTable(), BuildDEDXTable()
void BuildLossTable(const G4ParticleDefinition& aParticleType);
// build the dE/dx tables due to the ionisation, for every materials.
// (restricted stopping power, Bethe-Bloch formula)
void BuildLambdaTable(const G4ParticleDefinition& aParticleType);
// build mean free path tables for the delta rays production.
// the tables are built for every materials.
G4bool StorePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// store eLoss and MeanFreePath tables into an external file
// specified by 'directory' (must exist before invokation)
G4bool RetrievePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// retrieve eLoss and MeanFreePath tables from an external file
// specified by 'directory'
virtual void PrintInfoDefinition();
// Print few lines of informations about the process: validity range,
// origine ..etc..
// Invoked by BuildPhysicsTable().
G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition );
// It returns the MeanFreePath of the process for the current track :
// (energy, material)
// The previousStepSize and G4ForceCondition* are not used.
// This function overloads a virtual function of the base class.
// It is invoked by the ProcessManager of the Particle.
G4VParticleChange* PostStepDoIt(const G4Track& track,
const G4Step& Step );
// It computes the final state of the process (at end of step),
// returned as a ParticleChange object.
// This function overloads a virtual function of the base class.
// It is invoked by the ProcessManager of the Particle.
protected: // with description
virtual G4double ComputeRestrictedMeandEdx(
const G4ParticleDefinition& aParticleType,
G4double KineticEnergy,
const G4Material* material,
G4double DeltaThreshold);
// computes restricted mean dE/dx in Geant4 internal units.
virtual G4double ComputeCrossSectionPerAtom(
const G4ParticleDefinition& aParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double DeltaThreshold);
// computes total cross section per atom in Geant4 internal units.
virtual G4double ComputeDifCrossSectionPerAtom(
const G4ParticleDefinition& aParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double KnockonEnergy);
// computes differential cross section per atom.
protected:
virtual G4double SecondaryEnergyThreshold(size_t index);
G4PhysicsTable* theMeanFreePathTable;
private:
// hide assignment operator
G4MuIonisation52 & operator=(const G4MuIonisation52 &right);
G4MuIonisation52(const G4MuIonisation52&);
private:
static G4double LowerBoundLambda; // bining for lambda table
static G4double UpperBoundLambda;
static G4int NbinLambda;
G4double LowestKineticEnergy; // binning for dE/dx table
G4double HighestKineticEnergy;
G4int TotBin;
const std::vector<G4double>* secondaryEnergyCuts;
public: // with description
static void SetLowerBoundLambda(G4double val);
static void SetUpperBoundLambda(G4double val);
static void SetNbinLambda(G4int n);
// set the parameters of the mean free path table.
static G4double GetLowerBoundLambda();
static G4double GetUpperBoundLambda();
static G4int GetNbinLambda();
// get the parameters of the mean free path table.
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MuIonisation52.icc"
#endif
@@ -21,26 +21,27 @@
// ********************************************************************
//
//
// $Id: G4MuIonisation.icc,v 1.5 2003/01/17 18:54:39 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: G4MuIonisation52.icc,v 1.1 2003/08/08 11:28:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// GEANT 4 class inlined methods file
//
// ------------ G4MuIonisation physics process ------------
// ------------ G4MuIonisation52 physics process ------------
// by Laszlo Urban, September 1997
// ---------------------------------------------------------------
//
// 20/11/97 correction on MeanFreePath for KineticEnergy > HighestLimit
// 14-08-01 'cleanup' of GetMeanFreePath (mma)
// 16-01-03 Migrade to cut per region (V.Ivanchenko)
// 08-08-03 This class is frozen at the release 5.2 (V.Ivanchenko)
//
// ---------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4bool G4MuIonisation::IsApplicable(
inline G4bool G4MuIonisation52::IsApplicable(
const G4ParticleDefinition& particle)
{
return ((&particle == G4MuonPlus::MuonPlus() ) ||
@@ -49,7 +50,7 @@ inline G4bool G4MuIonisation::IsApplicable(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuIonisation::GetMeanFreePath(const G4Track& track, G4double,
inline G4double G4MuIonisation52::GetMeanFreePath(const G4Track& track, G4double,
G4ForceCondition*)
{
G4double KineticEnergy = track.GetDynamicParticle()->GetKineticEnergy();
@@ -69,7 +70,7 @@ inline G4double G4MuIonisation::GetMeanFreePath(const G4Track& track, G4double,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4MuIonisation::SecondaryEnergyThreshold(size_t index)
inline G4double G4MuIonisation52::SecondaryEnergyThreshold(size_t index)
{
return (*secondaryEnergyCuts)[index];
}
@@ -1,203 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4MuIonisationSTD.hh,v 1.14 2003/06/16 17:01:41 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4MuIonisationSTD
//
// Author: Laszlo Urban
//
// Creation date: 30.05.1997
//
// Modifications:
//
// corrected by L.Urban on 24/09/97
// corrected by L.Urban on 13/01/98
// bugs fixed by L.Urban on 02/02/99
// 10/02/00 modifications , new e.m. structure, L.Urban
// 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 14-08-01 new function ComputeRestrictedMeandEdx() + 'cleanup' (mma)
// 19-09-01 come back to previous process name "hIoni"
// 29-10-01 all static functions no more inlined
// 10-05-02 V.Ivanchenko update to new design
// 09-12-02 V.Ivanchenko remove warning
// 26-12-02 Secondary production moved to derived classes (VI)
// 24-01-03 Make models region aware (V.Ivanchenko)
// 05-02-03 Fix compilation warnings (V.Ivanchenko)
// 13-02-03 SubCutoff regime is assigned to a region (V.Ivanchenko)
// 23-05-03 Add fluctuation model as a member function (V.Ivanchenko)
// 03-06-03 Add SetIntegral method to choose fluctuation model (V.Ivanchenko)
// 03-06-03 Fix initialisation problem for STD ionisation (V.Ivanchenko)
//
// Class Description:
//
// This class manages the ionisation process for muons.
// it inherites from G4VContinuousDiscreteProcess via G4VEnergyLossSTD.
//
// -------------------------------------------------------------------
//
#ifndef G4MuIonisationSTD_h
#define G4MuIonisationSTD_h 1
#include "G4VEnergyLossSTD.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "globals.hh"
class G4Material;
class G4VEmFluctuationModel;
class G4MuIonisationSTD : public G4VEnergyLossSTD
{
public:
G4MuIonisationSTD(const G4String& name = "MuIoni");
~G4MuIonisationSTD();
G4bool IsApplicable(const G4ParticleDefinition& p)
{return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);};
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*, G4double cut);
virtual std::vector<G4Track*>* SecondariesAlongStep(
const G4Step&,
G4double&,
G4double&,
G4double&);
virtual void SecondariesPostStep(
G4VEmModel*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double&,
G4double&);
void SetSubCutoff(G4bool val);
void PrintInfoDefinition();
// Print out of the class parameters
protected:
const G4ParticleDefinition* DefineBaseParticle(const G4ParticleDefinition* p);
virtual G4double MaxSecondaryEnergy(const G4DynamicParticle* dynParticle);
private:
void InitialiseProcess();
// hide assignment operator
G4MuIonisationSTD & operator=(const G4MuIonisationSTD &right);
G4MuIonisationSTD(const G4MuIonisationSTD&);
G4double mass;
G4double ratio;
const G4ParticleDefinition* theParticle;
const G4ParticleDefinition* theBaseParticle;
G4VEmFluctuationModel* flucModel;
G4bool subCutoff;
G4bool isInitialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuIonisationSTD::MinPrimaryEnergy(const G4ParticleDefinition*,
const G4Material*,
G4double cut)
{
G4double x = 0.5*cut/electron_mass_c2;
G4double y = electron_mass_c2/mass;
G4double g = x*y + sqrt((1. + x)*(1. + x*y*y));
return mass*(g - 1.0);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuIonisationSTD::MaxSecondaryEnergy(const G4DynamicParticle* dynParticle)
{
G4double gamma= dynParticle->GetKineticEnergy()/mass + 1.0;
G4double tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /
(1. + 2.0*gamma*ratio + ratio*ratio);
return tmax;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4VSubCutoffProcessor.hh"
inline std::vector<G4Track*>* G4MuIonisationSTD::SecondariesAlongStep(
const G4Step& step,
G4double& tmax,
G4double& eloss,
G4double& kinEnergy)
{
std::vector<G4Track*>* newp = 0;
if(subCutoff) {
G4VSubCutoffProcessor* sp = SubCutoffProcessor(CurrentMaterialCutsCoupleIndex());
if (sp) {
G4VEmModel* model = SelectModel(kinEnergy);
newp = sp->SampleSecondaries(step,tmax,eloss,model);
}
}
return newp;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4VEmModel.hh"
inline void G4MuIonisationSTD::SecondariesPostStep(
G4VEmModel* model,
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double& tcut,
G4double& kinEnergy)
{
G4DynamicParticle* delta = model->SampleSecondary(couple, dp, tcut, kinEnergy);
aParticleChange.SetNumberOfSecondaries(1);
aParticleChange.AddSecondary(delta);
G4ThreeVector finalP = dp->GetMomentum();
kinEnergy -= delta->GetKineticEnergy();
finalP -= delta->GetMomentum();
finalP = finalP.unit();
aParticleChange.SetMomentumDirectionChange(finalP);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -20,160 +20,169 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4MuPairProduction.hh,v 1.16 2003/11/12 16:18:23 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
// $Id: G4MuPairProduction.hh,v 1.14 2003/06/16 17:01:42 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// -------------------------------------------------------------------
//
//--------------- G4MuPairProduction physics process ------------------
// by Laszlo Urban, May 1998
//------------------------------------------------------------------------------
// GEANT4 Class header file
//
//
// File name: G4MuPairProduction
//
// Author: Laszlo Urban
//
// Creation date: 30.05.1998
//
// Modifications:
// 10-02-00 modifications , new e.m. structure, L.Urban
// 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 29-10-01 all static functions no more inlined (mma)
// 16-01-03 Migrade to cut per region (V.Ivanchenko)
//------------------------------------------------------------------------------
// 29-10-01 all static functions no more inlined (mma)
// 10-05-02 V.Ivanchenko update to new design
// 26-12-02 secondary production moved to derived classes (VI)
// 27-01-03 Make models region aware (V.Ivanchenko)
// 05-02-03 Fix compilation warnings (V.Ivanchenko)
// 13-02-03 SubCutoff regime is assigned to a region (V.Ivanchenko)
// 08-08-03 STD substitute standard (V.Ivanchenko)
// 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko)
//
// Class Description:
//
// This class manages the PairProduction process for muons.
// it inherites from G4VContinuousDiscreteProcess via G4VEnergyLossProcess.
//
#ifndef G4MuPairproduction_h
#define G4MuPairproduction_h 1
// -------------------------------------------------------------------
//
#ifndef G4MuPairProduction_h
#define G4MuPairProduction_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4VMuEnergyLoss.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4OrderedTable.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsLogVector.hh"
#include "G4MaterialCutsCouple.hh"
#include "G4VEnergyLossProcess.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MuPairProduction : public G4VMuEnergyLoss
class G4MuPairProduction : public G4VEnergyLossProcess
{
public:
public:
G4MuPairProduction(const G4String& processName = "MuPairProd");
G4MuPairProduction(const G4String& processName = "MuPairProd");
~G4MuPairProduction();
~G4MuPairProduction();
G4bool IsApplicable(const G4ParticleDefinition&);
G4bool IsApplicable(const G4ParticleDefinition& p)
{return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);};
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*, G4double cut);
void BuildLossTable(const G4ParticleDefinition& ParticleType);
virtual std::vector<G4Track*>* SecondariesAlongStep(
const G4Step&,
G4double&,
G4double&,
G4double&);
void BuildLambdaTable(const G4ParticleDefinition& ParticleType);
void PrintInfoDefinition();
G4double GetMeanFreePath( const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition );
G4VParticleChange *PostStepDoIt(const G4Track& track,
const G4Step& Step );
G4double GetDMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double PairEnergy);
G4bool StorePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// store eLoss and MeanFreePath tables into an external file
// specified by 'directory' (must exist before invokation)
G4bool RetrievePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// retrieve eLoss and MeanFreePath tables from an external file
// specified by 'directory'
protected:
G4double ComputeMeanFreePath(const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4MaterialCutsCouple* couple);
void ComputePartialSumSigma(const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4MaterialCutsCouple* couple);
virtual G4double ComputeMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double ElectronEnergyCut,
G4double PositronEnergyCut);
G4double ComputeDDMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double PairEnergy,
G4double asymmetry);
G4double ComputeDMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double PairEnergy);
private:
G4MuPairProduction & operator=(const G4MuPairProduction &right);
G4MuPairProduction(const G4MuPairProduction&);
G4double ComputePairLoss( const G4ParticleDefinition* ParticleType,
G4double Z,G4double T,G4double ElectronCut,
G4double PositronCut);
G4Element* SelectRandomAtom(const G4MaterialCutsCouple* couple) const;
void MakeSamplingTables( const G4ParticleDefinition* ParticleType );
protected:
virtual G4double SecondaryEnergyThreshold(size_t index);
virtual void SecondariesPostStep(
G4VEmModel*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double&,
G4double&);
private:
void SetSubCutoff(G4bool val);
G4PhysicsTable* theMeanFreePathTable;
void PrintInfoDefinition();
// Print out of the class parameters
G4OrderedTable PartialSumSigma;
protected:
static G4double LowerBoundLambda; // bining for lambda table
static G4double UpperBoundLambda;
static G4int NbinLambda;
G4double LowestKineticEnergy,HighestKineticEnergy;
G4int TotBin;
const G4ParticleDefinition* DefineBaseParticle(const G4ParticleDefinition* p);
const std::vector<G4double>* electronEnergyCuts;
const std::vector<G4double>* positronEnergyCuts;
virtual G4double MaxSecondaryEnergy(const G4DynamicParticle* dp);
// tables for sampling
static G4int nzdat,ntdat,NBIN;
static G4double zdat[5],tdat[8];
static G4double ya[1001],proba[5][8][1001];
static G4double MinPairEnergy;
private:
public:
void InitialiseProcess();
static void SetLowerBoundLambda(G4double val);
static void SetUpperBoundLambda(G4double val);
static void SetNbinLambda(G4int n);
static G4double GetLowerBoundLambda();
static G4double GetUpperBoundLambda();
static G4int GetNbinLambda();
G4MuPairProduction & operator=(const G4MuPairProduction &right);
G4MuPairProduction(const G4MuPairProduction&);
const G4ParticleDefinition* theParticle;
const G4ParticleDefinition* theBaseParticle;
G4bool subCutoff;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuPairProduction::MinPrimaryEnergy(const G4ParticleDefinition*,
const G4Material*,
G4double cut)
{
return std::max(cut, 2.0*electron_mass_c2);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuPairProduction::MaxSecondaryEnergy(const G4DynamicParticle* dp)
{
return dp->GetKineticEnergy();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4VSubCutoffProcessor.hh"
inline std::vector<G4Track*>* G4MuPairProduction::SecondariesAlongStep(
const G4Step& step,
G4double& tmax,
G4double& eloss,
G4double& kinEnergy)
{
std::vector<G4Track*>* newp = 0;
if(subCutoff) {
G4VSubCutoffProcessor* sp = SubCutoffProcessor(CurrentMaterialCutsCoupleIndex());
if (sp) {
G4VEmModel* model = SelectModel(kinEnergy);
newp = sp->SampleSecondaries(step,tmax,eloss,model);
}
}
return newp;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4VEmModel.hh"
inline void G4MuPairProduction::SecondariesPostStep(
G4VEmModel* model,
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double& tcut,
G4double& kinEnergy)
{
std::vector<G4DynamicParticle*>* newp =
model->SampleSecondaries(couple, dp, tcut, kinEnergy);
if(newp) {
aParticleChange.SetNumberOfSecondaries(2);
G4DynamicParticle* elpos = (*newp)[0];
aParticleChange.AddSecondary(elpos);
kinEnergy -= elpos->GetKineticEnergy();
elpos = (*newp)[1];
aParticleChange.AddSecondary(elpos);
kinEnergy -= elpos->GetKineticEnergy();
delete newp;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MuPairProduction.icc"
#endif
@@ -0,0 +1,180 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4MuPairProduction52.hh,v 1.1 2003/08/08 11:28:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//--------------- G4MuPairProduction52 physics process ------------------
// by Laszlo Urban, May 1998
//------------------------------------------------------------------------------
// 10-02-00 modifications , new e.m. structure, L.Urban
// 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 29-10-01 all static functions no more inlined (mma)
// 16-01-03 Migrade to cut per region (V.Ivanchenko)
// 08-08-03 This class is frozen at the release 5.2 (V.Ivanchenko)
//------------------------------------------------------------------------------
#ifndef G4MuPairProduction52_h
#define G4MuPairProduction52_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4VMuEnergyLoss.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4OrderedTable.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsLogVector.hh"
#include "G4MaterialCutsCouple.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MuPairProduction52 : public G4VMuEnergyLoss
{
public:
G4MuPairProduction52(const G4String& processName = "MuPairProd");
~G4MuPairProduction52();
G4bool IsApplicable(const G4ParticleDefinition&);
void BuildPhysicsTable(const G4ParticleDefinition& ParticleType);
void BuildLossTable(const G4ParticleDefinition& ParticleType);
void BuildLambdaTable(const G4ParticleDefinition& ParticleType);
void PrintInfoDefinition();
G4double GetMeanFreePath( const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition );
G4VParticleChange *PostStepDoIt(const G4Track& track,
const G4Step& Step );
G4double GetDMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double PairEnergy);
G4bool StorePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// store eLoss and MeanFreePath tables into an external file
// specified by 'directory' (must exist before invokation)
G4bool RetrievePhysicsTable(G4ParticleDefinition* ,
const G4String& directory, G4bool);
// retrieve eLoss and MeanFreePath tables from an external file
// specified by 'directory'
protected:
G4double ComputeMeanFreePath(const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4MaterialCutsCouple* couple);
void ComputePartialSumSigma(const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4MaterialCutsCouple* couple);
virtual G4double ComputeMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double ElectronEnergyCut,
G4double PositronEnergyCut);
G4double ComputeDDMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double PairEnergy,
G4double asymmetry);
G4double ComputeDMicroscopicCrossSection(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
G4double AtomicNumber,
G4double PairEnergy);
private:
G4MuPairProduction52 & operator=(const G4MuPairProduction52 &right);
G4MuPairProduction52(const G4MuPairProduction52&);
G4double ComputePairLoss( const G4ParticleDefinition* ParticleType,
G4double Z,G4double T,G4double ElectronCut,
G4double PositronCut);
G4Element* SelectRandomAtom(const G4MaterialCutsCouple* couple) const;
void MakeSamplingTables( const G4ParticleDefinition* ParticleType );
protected:
virtual G4double SecondaryEnergyThreshold(size_t index);
private:
G4PhysicsTable* theMeanFreePathTable;
G4OrderedTable PartialSumSigma;
static G4double LowerBoundLambda; // bining for lambda table
static G4double UpperBoundLambda;
static G4int NbinLambda;
G4double LowestKineticEnergy,HighestKineticEnergy;
G4int TotBin;
const std::vector<G4double>* electronEnergyCuts;
const std::vector<G4double>* positronEnergyCuts;
// tables for sampling
static G4int nzdat,ntdat,NBIN;
static G4double zdat[5],tdat[8];
static G4double ya[1001],proba[5][8][1001];
static G4double MinPairEnergy;
public:
static void SetLowerBoundLambda(G4double val);
static void SetUpperBoundLambda(G4double val);
static void SetNbinLambda(G4int n);
static G4double GetLowerBoundLambda();
static G4double GetUpperBoundLambda();
static G4int GetNbinLambda();
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4MuPairProduction52.icc"
#endif
@@ -21,10 +21,10 @@
// ********************************************************************
//
//
// $Id: G4MuPairProduction.icc,v 1.10 2003/05/26 16:21:54 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: G4MuPairProduction52.icc,v 1.1 2003/08/08 11:28:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//--------------- G4MuPairProduction physics process ------------------
//--------------- G4MuPairProduction52 physics process ------------------
// by Laszlo Urban, May 1998
//------------------------------------------------------------------------------
//
@@ -34,12 +34,13 @@
// 29.05.01 V.Ivanchenko minor changes to provide ANSI -wall compilation
// 28-09-01 suppression of theMuonPlus ..etc..data members (mma)
// 16-01-03 Migrade to cut per region (V.Ivanchenko)
// 08-08-03 This class is frozen at the release 5.2 (V.Ivanchenko)
//
//------------------------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4MuPairProduction::GetMeanFreePath(const G4Track& trackData,
inline G4double G4MuPairProduction52::GetMeanFreePath(const G4Track& trackData,
G4double,
G4ForceCondition* condition)
{
@@ -66,7 +67,7 @@ inline G4double G4MuPairProduction::GetMeanFreePath(const G4Track& trackData,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4MuPairProduction::ComputeMeanFreePath(
inline G4double G4MuPairProduction52::ComputeMeanFreePath(
const G4ParticleDefinition* ParticleType,
G4double KineticEnergy,
const G4MaterialCutsCouple* couple)
@@ -93,7 +94,7 @@ inline G4double G4MuPairProduction::ComputeMeanFreePath(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4bool G4MuPairProduction::IsApplicable(
inline G4bool G4MuPairProduction52::IsApplicable(
const G4ParticleDefinition& particle)
{
return ((&particle == G4MuonPlus::MuonPlus() ) ||
@@ -102,7 +103,7 @@ inline G4bool G4MuPairProduction::IsApplicable(
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4MuPairProduction::SecondaryEnergyThreshold(size_t index)
inline G4double G4MuPairProduction52::SecondaryEnergyThreshold(size_t index)
{
return (*electronEnergyCuts)[index] + (*positronEnergyCuts)[index]
+ 2.*electron_mass_c2;
@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4MuPairProductionModel.hh,v 1.9 2003/06/16 17:01:43 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: G4MuPairProductionModel.hh,v 1.10 2003/07/21 12:52:35 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
// -------------------------------------------------------------------
//
@@ -55,6 +55,8 @@
#include "G4VEmModel.hh"
class G4Element;
class G4MuPairProductionModel : public G4VEmModel
{
@@ -79,12 +81,12 @@ public:
G4bool IsInCharge(const G4ParticleDefinition*);
G4double ComputeDEDX(const G4Material*,
G4double ComputeDEDX(const G4MaterialCutsCouple*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy);
G4double CrossSection(const G4Material*,
G4double CrossSection(const G4MaterialCutsCouple*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy,
@@ -1,186 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4MuPairProductionSTD.hh,v 1.9 2003/06/16 17:01:44 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4MuPairProductionSTD
//
// Author: Laszlo Urban
//
// Creation date: 30.05.1998
//
// Modifications:
// 10-02-00 modifications , new e.m. structure, L.Urban
// 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
// 29-10-01 all static functions no more inlined (mma)
// 10-05-02 V.Ivanchenko update to new design
// 26-12-02 secondary production moved to derived classes (VI)
// 27-01-03 Make models region aware (V.Ivanchenko)
// 05-02-03 Fix compilation warnings (V.Ivanchenko)
// 13-02-03 SubCutoff regime is assigned to a region (V.Ivanchenko)
//
// Class Description:
//
// This class manages the PairProduction process for muons.
// it inherites from G4VContinuousDiscreteProcess via G4VEnergyLossSTD.
//
// -------------------------------------------------------------------
//
#ifndef G4MuPairProductionSTD_h
#define G4MuPairProductionSTD_h 1
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "globals.hh"
#include "G4VEnergyLossSTD.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4MuPairProductionSTD : public G4VEnergyLossSTD
{
public:
G4MuPairProductionSTD(const G4String& processName = "MuPairProd");
~G4MuPairProductionSTD();
G4bool IsApplicable(const G4ParticleDefinition& p)
{return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV);};
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
const G4Material*, G4double cut);
virtual std::vector<G4Track*>* SecondariesAlongStep(
const G4Step&,
G4double&,
G4double&,
G4double&);
virtual void SecondariesPostStep(
G4VEmModel*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double&,
G4double&);
void SetSubCutoff(G4bool val);
void PrintInfoDefinition();
// Print out of the class parameters
protected:
const G4ParticleDefinition* DefineBaseParticle(const G4ParticleDefinition* p);
virtual G4double MaxSecondaryEnergy(const G4DynamicParticle* dp);
private:
void InitialiseProcess();
G4MuPairProductionSTD & operator=(const G4MuPairProductionSTD &right);
G4MuPairProductionSTD(const G4MuPairProductionSTD&);
const G4ParticleDefinition* theParticle;
const G4ParticleDefinition* theBaseParticle;
G4bool subCutoff;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuPairProductionSTD::MinPrimaryEnergy(const G4ParticleDefinition*,
const G4Material*,
G4double cut)
{
return std::max(cut, 2.0*electron_mass_c2);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double G4MuPairProductionSTD::MaxSecondaryEnergy(const G4DynamicParticle* dp)
{
return dp->GetKineticEnergy();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4VSubCutoffProcessor.hh"
inline std::vector<G4Track*>* G4MuPairProductionSTD::SecondariesAlongStep(
const G4Step& step,
G4double& tmax,
G4double& eloss,
G4double& kinEnergy)
{
std::vector<G4Track*>* newp = 0;
if(subCutoff) {
G4VSubCutoffProcessor* sp = SubCutoffProcessor(CurrentMaterialCutsCoupleIndex());
if (sp) {
G4VEmModel* model = SelectModel(kinEnergy);
newp = sp->SampleSecondaries(step,tmax,eloss,model);
}
}
return newp;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4VEmModel.hh"
inline void G4MuPairProductionSTD::SecondariesPostStep(
G4VEmModel* model,
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double& tcut,
G4double& kinEnergy)
{
std::vector<G4DynamicParticle*>* newp =
model->SampleSecondaries(couple, dp, tcut, kinEnergy);
if(newp) {
aParticleChange.SetNumberOfSecondaries(2);
G4DynamicParticle* elpos = (*newp)[0];
aParticleChange.AddSecondary(elpos);
kinEnergy -= elpos->GetKineticEnergy();
elpos = (*newp)[1];
aParticleChange.AddSecondary(elpos);
kinEnergy -= elpos->GetKineticEnergy();
delete newp;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4VMuEnergyLoss.hh,v 1.9 2003/06/16 17:01:45 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
// -------------------------------------------------------------------
// GEANT 4 class header file
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4VMuEnergyLoss.icc,v 1.4 2003/01/17 18:54:40 vnivanch Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//