00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 #ifndef G4EIONISATIONSPECTRUM_HH
00056 #define G4EIONISATIONSPECTRUM_HH 1
00057
00058 #include "G4VEnergySpectrum.hh"
00059 #include "G4eIonisationParameters.hh"
00060
00061
00062 class G4DataVector;
00063
00064 class G4eIonisationSpectrum : public G4VEnergySpectrum
00065 {
00066
00067 public:
00068
00069 G4eIonisationSpectrum();
00070
00071 ~G4eIonisationSpectrum();
00072
00073 G4double Probability(G4int Z, G4double tMin, G4double tMax,
00074 G4double kineticEnergy, G4int shell,
00075 const G4ParticleDefinition* pd=0) const;
00076
00077 G4double AverageEnergy(G4int Z, G4double tMin, G4double tMax,
00078 G4double kineticEnergy, G4int shell,
00079 const G4ParticleDefinition* pd=0) const;
00080
00081 G4double SampleEnergy(G4int Z, G4double tMin, G4double tMax,
00082 G4double kineticEnergy, G4int shell,
00083 const G4ParticleDefinition* pd=0) const;
00084
00085 G4double MaxEnergyOfSecondaries(G4double kineticEnergy,
00086 G4int Z = 0,
00087 const G4ParticleDefinition* pd=0) const;
00088
00089 G4double Excitation(G4int Z, G4double e) const;
00090
00091 void PrintData() const;
00092
00093 protected:
00094
00095 private:
00096
00097 G4double IntSpectrum(G4double xMin, G4double xMax,
00098 const G4DataVector& p) const;
00099
00100 G4double AverageValue(G4double xMin, G4double xMax,
00101 const G4DataVector& p) const;
00102
00103 G4double Function(G4double x, const G4DataVector& p) const;
00104
00105
00106 G4eIonisationSpectrum(const G4eIonisationSpectrum&);
00107 G4eIonisationSpectrum & operator = (const G4eIonisationSpectrum &right);
00108
00109 private:
00110
00111 G4eIonisationParameters* theParam;
00112 G4double lowestE;
00113 G4double factor;
00114 G4int iMax;
00115 G4int verbose;
00116 };
00117
00118
00119 inline G4double G4eIonisationSpectrum::Function(G4double x,
00120 const G4DataVector& p) const
00121 {
00122 G4double f = 1.0 - p[0] - p[iMax]*x
00123 + x*x*(1.0 - p[iMax] + (1.0/(1.0 - x) - p[iMax])/(1.0 - x))
00124 + 0.5*p[0]/x;
00125
00126 return f;
00127 }
00128
00129 inline G4double G4eIonisationSpectrum::Excitation(G4int Z, G4double e) const
00130 {
00131 return theParam->Excitation(Z, e);
00132 }
00133
00134
00135 #endif