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
00061
00062
00063
00064 #include "G4ionIonisation.hh"
00065 #include "G4PhysicalConstants.hh"
00066 #include "G4SystemOfUnits.hh"
00067 #include "G4Electron.hh"
00068 #include "G4Proton.hh"
00069 #include "G4GenericIon.hh"
00070 #include "G4BraggModel.hh"
00071 #include "G4BraggIonModel.hh"
00072 #include "G4BetheBlochModel.hh"
00073 #include "G4UnitsTable.hh"
00074 #include "G4LossTableManager.hh"
00075 #include "G4WaterStopping.hh"
00076 #include "G4EmCorrections.hh"
00077 #include "G4IonFluctuations.hh"
00078
00079
00080
00081 using namespace std;
00082
00083 G4ionIonisation::G4ionIonisation(const G4String& name)
00084 : G4VEnergyLossProcess(name),
00085 theParticle(0),
00086 isInitialised(false),
00087 stopDataActive(true)
00088 {
00089 SetLinearLossLimit(0.02);
00090 SetStepFunction(0.1, 0.01*mm);
00091 SetProcessSubType(fIonisation);
00092 SetSecondaryParticle(G4Electron::Electron());
00093 corr = G4LossTableManager::Instance()->EmCorrections();
00094 eth = 2*MeV;
00095 }
00096
00097
00098
00099 G4ionIonisation::~G4ionIonisation()
00100 {}
00101
00102
00103
00104 G4bool G4ionIonisation::IsApplicable(const G4ParticleDefinition& p)
00105 {
00106 return (p.GetPDGCharge() != 0.0 && !p.IsShortLived() &&
00107 p.GetParticleType() == "nucleus");
00108 }
00109
00110
00111
00112 G4double G4ionIonisation::MinPrimaryEnergy(const G4ParticleDefinition* p,
00113 const G4Material*,
00114 G4double cut)
00115 {
00116 return
00117 p->GetPDGMass()*(std::sqrt(1. + 0.5*cut/CLHEP::electron_mass_c2) - 1.0);
00118 }
00119
00120
00121
00122 void G4ionIonisation::InitialiseEnergyLossProcess(
00123 const G4ParticleDefinition* part,
00124 const G4ParticleDefinition* bpart)
00125 {
00126 const G4ParticleDefinition* ion = G4GenericIon::GenericIon();
00127
00128 if(!isInitialised) {
00129
00130 theParticle = part;
00131
00132
00133 const G4ParticleDefinition* theBaseParticle = 0;
00134
00135 if(part == ion) { theBaseParticle = 0; }
00136 else if(bpart == 0) { theBaseParticle = ion; }
00137 else { theBaseParticle = bpart; }
00138
00139 SetBaseParticle(theBaseParticle);
00140
00141 if (!EmModel(1)) { SetEmModel(new G4BraggIonModel(), 1); }
00142 EmModel(1)->SetLowEnergyLimit(MinKinEnergy());
00143
00144
00145 eth = (EmModel(1)->HighEnergyLimit())*part->GetPDGMass()/proton_mass_c2;
00146 EmModel(1)->SetHighEnergyLimit(eth);
00147
00148 if (!FluctModel()) { SetFluctModel(new G4IonFluctuations()); }
00149 AddEmModel(1, EmModel(1), FluctModel());
00150
00151 if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); }
00152 EmModel(2)->SetLowEnergyLimit(eth);
00153 EmModel(2)->SetHighEnergyLimit(MaxKinEnergy());
00154 AddEmModel(2, EmModel(2), FluctModel());
00155
00156
00157 if(part == ion) {
00158 G4WaterStopping ws(corr);
00159 corr->SetIonisationModels(EmModel(1),EmModel(2));
00160 }
00161 isInitialised = true;
00162 }
00163
00164 if(part == ion) { corr->InitialiseForNewRun(); }
00165 }
00166
00167
00168
00169 void G4ionIonisation::PrintInfo()
00170 {
00171 if (stopDataActive && G4GenericIon::GenericIon() == theParticle) {
00172 G4cout << " Stopping Power data for "
00173 << corr->GetNumberOfStoppingVectors()
00174 << " ion/material pairs "
00175 << G4endl;
00176 }
00177 }
00178
00179
00180
00181 void G4ionIonisation::AddStoppingData(G4int Z, G4int A,
00182 const G4String& mname,
00183 G4PhysicsVector* dVector)
00184 {
00185 corr->AddStoppingData(Z, A, mname, dVector);
00186 }
00187
00188