Changeset 1055 for trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundTransitions.cc
- Timestamp:
- May 28, 2009, 4:26:57 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundTransitions.cc
r1007 r1055 24 24 // ******************************************************************** 25 25 // 26 // 27 //J. M. Quesada (Feb. 08). Base on previous work by V. Lara. 28 // New transition probabilities. Several bugs fixed. 29 // JMQ (06 September 2008) Also external choices have been added for: 26 // $Id: G4PreCompoundTransitions.cc,v 1.20 2009/02/10 16:01:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ 28 // 29 // ------------------------------------------------------------------- 30 // 31 // GEANT4 Class file 32 // 33 // 34 // File name: G4PreCompoundIon 35 // 36 // Author: V.Lara 37 // 38 // Modified: 39 // 16.02.2008 J. M. Quesada fixed bugs 40 // 06.09.2008 J. M. Quesada added external choices for: 30 41 // - "never go back" hipothesis (useNGB=true) 31 42 // - CEM transition probabilities (useCEMtr=true) 43 32 44 #include "G4PreCompoundTransitions.hh" 33 45 #include "G4HadronicException.hh" … … 184 196 // G4cout<<"N="<<N<<" P="<<P<<" H="<<H<<G4endl; 185 197 // G4cout<<"l+ ="<<TransitionProb1<<" l- ="<< TransitionProb2<<" l0 ="<< TransitionProb3<<G4endl; 186 return TransitionProb1 + TransitionProb2 + TransitionProb3;} 198 return TransitionProb1 + TransitionProb2 + TransitionProb3; 199 } 187 200 188 201 else { … … 215 228 return TransitionProb1 + TransitionProb2 + TransitionProb3; 216 229 } 217 218 219 230 } 220 231 … … 237 248 } 238 249 239 // AH/JMQ: Randomly decrease the number of charges if deltaN is -2 and in proportion to the number charges w.r.t. number of particles, PROVIDED that there are charged particles 240 if(deltaN < 0 && G4UniformRand() <= static_cast<G4double>(result.GetNumberOfCharged())/static_cast<G4double>(result.GetNumberOfParticles()) && (result.GetNumberOfCharged() >= 1)) 250 // AH/JMQ: Randomly decrease the number of charges if deltaN is -2 and in proportion 251 // to the number charges w.r.t. number of particles, PROVIDED that there are charged particles 252 if(deltaN < 0 && G4UniformRand() <= 253 static_cast<G4double>(result.GetNumberOfCharged())/static_cast<G4double>(result.GetNumberOfParticles()) 254 && (result.GetNumberOfCharged() >= 1)) { 241 255 result.SetNumberOfCharged(result.GetNumberOfCharged()+deltaN/2); // deltaN is negative! 242 243 244 //JMQ the following lines have to be before SetNumberOfCharged, otherwise the check on number of charged vs. number of particles fails 256 } 257 258 // JMQ the following lines have to be before SetNumberOfCharged, otherwise the check on 259 // number of charged vs. number of particles fails 245 260 result.SetNumberOfParticles(result.GetNumberOfParticles()+deltaN/2); 246 261 result.SetNumberOfHoles(result.GetNumberOfHoles()+deltaN/2); 247 262 248 // With weight Z/A, number of charged particles is increased with +1263 // With weight Z/A, number of charged particles is increased with +1 249 264 if ( ( deltaN > 0 ) && 250 265 (G4UniformRand() <= static_cast<G4double>(result.GetZ()-result.GetNumberOfCharged())/ 251 266 std::max(static_cast<G4double>(result.GetA()-Nexcitons),1.))) 252 267 { 253 268 result.SetNumberOfCharged(result.GetNumberOfCharged()+deltaN/2);
Note: See TracChangeset
for help on using the changeset viewer.