- Timestamp:
- Jun 18, 2010, 11:42:07 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/standard/src/G4hIonisation.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hIonisation.cc,v 1.8 2 2009/02/20 12:06:37vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4hIonisation.cc,v 1.85 2010/06/04 09:22:14 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 79 79 // 14-01-07 use SetEmModel() and SetFluctModel() from G4VEnergyLossProcess (mma) 80 80 // 12-09-08 Removed CorrectionsAlongStep (VI) 81 // 27-05-10 Added G4ICRU73QOModel for anti-protons (VI) 81 82 // 82 83 // ------------------------------------------------------------------- … … 99 100 #include "G4KaonPlus.hh" 100 101 #include "G4KaonMinus.hh" 102 #include "G4ICRU73QOModel.hh" 101 103 102 104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 106 108 G4hIonisation::G4hIonisation(const G4String& name) 107 109 : G4VEnergyLossProcess(name), 108 isInitialised(false), 109 nuclearStopping(true) 110 { 111 // SetStepFunction(0.2, 1.0*mm); 110 isInitialised(false) 111 { 112 //SetStepFunction(0.2, 1.0*mm); 112 113 //SetIntegral(true); 113 114 //SetVerboseLevel(1); … … 151 152 const G4ParticleDefinition* theBaseParticle = 0; 152 153 G4String pname = part->GetParticleName(); 154 G4double q = part->GetPDGCharge(); 153 155 154 156 // standard base particles … … 163 165 else if(bpart == 0) { 164 166 165 if(part->GetPDGSpin() == 0.0) 166 if(part->GetPDGCharge() > 0.0 ) { 167 theBaseParticle = G4KaonPlus::KaonPlus(); 168 } else { 169 theBaseParticle = G4KaonMinus::KaonMinus(); 170 } 171 else if(part->GetPDGCharge() > 0.0) { 172 theBaseParticle = G4Proton::Proton(); 167 if(part->GetPDGSpin() == 0.0) { 168 if(q > 0.0) { theBaseParticle = G4KaonPlus::KaonPlus(); } 169 else { theBaseParticle = G4KaonMinus::KaonMinus(); } 173 170 } else { 174 theBaseParticle = G4AntiProton::AntiProton(); 171 if(q > 0.0) { theBaseParticle = G4Proton::Proton(); } 172 else { theBaseParticle = G4AntiProton::AntiProton(); } 175 173 } 174 176 175 // base particle defined by interface 177 176 } else { … … 183 182 mass = part->GetPDGMass(); 184 183 ratio = electron_mass_c2/mass; 185 186 if(mass < 900.*MeV) nuclearStopping = false; 187 188 if (!EmModel(1)) SetEmModel(new G4BraggModel(),1); 184 eth = 2.0*MeV*mass/proton_mass_c2; 185 186 if (!EmModel(1)) { 187 if(q > 0.0) { SetEmModel(new G4BraggModel(),1); } 188 else { SetEmModel(new G4ICRU73QOModel(),1); } 189 } 189 190 EmModel(1)->SetLowEnergyLimit(MinKinEnergy()); 190 191 191 192 // model limit defined for protons 192 eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2;193 //eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2; 193 194 EmModel(1)->SetHighEnergyLimit(eth); 194 195 AddEmModel(1, EmModel(1), new G4IonFluctuations()); 195 196 196 if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation());197 198 if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2);197 if (!FluctModel()) { SetFluctModel(new G4UniversalFluctuation()); } 198 199 if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); } 199 200 EmModel(2)->SetLowEnergyLimit(eth); 200 201 EmModel(2)->SetHighEnergyLimit(MaxKinEnergy()); … … 203 204 isInitialised = true; 204 205 } 205 EmModel(1)->ActivateNuclearStopping(nuclearStopping);206 EmModel(2)->ActivateNuclearStopping(nuclearStopping);207 206 } 208 207 … … 210 209 211 210 void G4hIonisation::PrintInfo() 212 { 213 if(EmModel(1) && EmModel(2)) { 214 G4cout << " NuclearStopping= " << nuclearStopping 215 << G4endl; 216 } 217 }218 219 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 211 {} 212 213 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 214 215 void G4hIonisation::ActivateNuclearStopping(G4bool) 216 {} 217 218 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Note: See TracChangeset
for help on using the changeset viewer.