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