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
00056
00057
00058
00059
00060 #ifndef G4BraggModel_h
00061 #define G4BraggModel_h 1
00062
00063 #include <CLHEP/Units/PhysicalConstants.h>
00064
00065 #include "G4VEmModel.hh"
00066 #include "G4PSTARStopping.hh"
00067
00068 class G4ParticleChangeForLoss;
00069 class G4EmCorrections;
00070
00071 class G4BraggModel : public G4VEmModel
00072 {
00073
00074 public:
00075
00076 G4BraggModel(const G4ParticleDefinition* p = 0,
00077 const G4String& nam = "Bragg");
00078
00079 virtual ~G4BraggModel();
00080
00081 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
00082
00083 virtual G4double ComputeCrossSectionPerElectron(
00084 const G4ParticleDefinition*,
00085 G4double kineticEnergy,
00086 G4double cutEnergy,
00087 G4double maxEnergy);
00088
00089 virtual G4double ComputeCrossSectionPerAtom(
00090 const G4ParticleDefinition*,
00091 G4double kineticEnergy,
00092 G4double Z, G4double A,
00093 G4double cutEnergy,
00094 G4double maxEnergy);
00095
00096 virtual G4double CrossSectionPerVolume(const G4Material*,
00097 const G4ParticleDefinition*,
00098 G4double kineticEnergy,
00099 G4double cutEnergy,
00100 G4double maxEnergy);
00101
00102 virtual G4double ComputeDEDXPerVolume(const G4Material*,
00103 const G4ParticleDefinition*,
00104 G4double kineticEnergy,
00105 G4double cutEnergy);
00106
00107 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
00108 const G4MaterialCutsCouple*,
00109 const G4DynamicParticle*,
00110 G4double tmin,
00111 G4double maxEnergy);
00112
00113
00114 virtual G4double GetChargeSquareRatio(const G4ParticleDefinition*,
00115 const G4Material*,
00116 G4double kineticEnergy);
00117
00118 virtual G4double GetParticleCharge(const G4ParticleDefinition* p,
00119 const G4Material* mat,
00120 G4double kineticEnergy);
00121
00122 protected:
00123
00124 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
00125 G4double kinEnergy);
00126
00127 inline G4double GetChargeSquareRatio() const;
00128
00129 inline void SetChargeSquareRatio(G4double val);
00130
00131 private:
00132
00133 inline void SetParticle(const G4ParticleDefinition* p);
00134
00135 G4bool HasMaterial(const G4Material* material);
00136
00137 G4double StoppingPower(const G4Material* material,
00138 G4double kineticEnergy);
00139
00140 G4double ElectronicStoppingPower(G4double z,
00141 G4double kineticEnergy) const;
00142
00143 G4double DEDX(const G4Material* material, G4double kineticEnergy);
00144
00145 G4bool MolecIsInZiegler1988(const G4Material* material);
00146
00147 G4double ChemicalFactor(G4double kineticEnergy, G4double eloss125) const;
00148
00149 void SetExpStopPower125(G4double value) {expStopPower125 = value;};
00150
00151
00152 G4BraggModel & operator=(const G4BraggModel &right);
00153 G4BraggModel(const G4BraggModel&);
00154
00155
00156 G4EmCorrections* corr;
00157
00158 const G4ParticleDefinition* particle;
00159 G4ParticleDefinition* theElectron;
00160 G4ParticleChangeForLoss* fParticleChange;
00161 G4PSTARStopping pstar;
00162
00163 const G4Material* currentMaterial;
00164
00165 G4double mass;
00166 G4double spin;
00167 G4double chargeSquare;
00168 G4double massRate;
00169 G4double ratio;
00170 G4double lowestKinEnergy;
00171 G4double protonMassAMU;
00172 G4double theZieglerFactor;
00173 G4double expStopPower125;
00174
00175 G4int iMolecula;
00176 G4int iPSTAR;
00177 G4bool isIon;
00178 G4bool isInitialised;
00179 };
00180
00181
00182
00183 inline void G4BraggModel::SetParticle(const G4ParticleDefinition* p)
00184 {
00185 particle = p;
00186 mass = particle->GetPDGMass();
00187 spin = particle->GetPDGSpin();
00188 G4double q = particle->GetPDGCharge()/CLHEP::eplus;
00189 chargeSquare = q*q;
00190 massRate = mass/CLHEP::proton_mass_c2;
00191 ratio = CLHEP::electron_mass_c2/mass;
00192 }
00193
00194 inline G4double G4BraggModel::GetChargeSquareRatio() const
00195 {
00196 return chargeSquare;
00197 }
00198
00199 inline void G4BraggModel::SetChargeSquareRatio(G4double val)
00200 {
00201 chargeSquare = val;
00202 }
00203
00204
00205
00206 #endif