Ignore:
Timestamp:
May 28, 2009, 4:26:57 PM (15 years ago)
Author:
garnier
Message:

maj sur la beta de geant 4.9.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundTransitions.cc

    r1007 r1055  
    2424// ********************************************************************
    2525//
    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:
    3041//                      - "never go back"  hipothesis (useNGB=true)
    3142//                      -  CEM transition probabilities (useCEMtr=true)
     43
    3244#include "G4PreCompoundTransitions.hh"
    3345#include "G4HadronicException.hh"
     
    184196    //  G4cout<<"N="<<N<<"  P="<<P<<"  H="<<H<<G4endl;
    185197    //  G4cout<<"l+ ="<<TransitionProb1<<"  l- ="<< TransitionProb2<<"  l0 ="<< TransitionProb3<<G4endl;
    186     return TransitionProb1 + TransitionProb2 + TransitionProb3;}
     198    return TransitionProb1 + TransitionProb2 + TransitionProb3;
     199  }
    187200 
    188201  else  {
     
    215228    return TransitionProb1 + TransitionProb2 + TransitionProb3;
    216229  }
    217 
    218 
    219230}
    220231
     
    237248    }
    238249
    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)) {
    241255    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
    245260  result.SetNumberOfParticles(result.GetNumberOfParticles()+deltaN/2);
    246261  result.SetNumberOfHoles(result.GetNumberOfHoles()+deltaN/2);
    247262
    248  // With weight Z/A, number of charged particles is increased with +1
     263  // With weight Z/A, number of charged particles is increased with +1
    249264  if ( ( deltaN > 0 ) &&
    250265      (G4UniformRand() <= static_cast<G4double>(result.GetZ()-result.GetNumberOfCharged())/
    251                   std::max(static_cast<G4double>(result.GetA()-Nexcitons),1.)))
     266       std::max(static_cast<G4double>(result.GetA()-Nexcitons),1.)))
    252267    {
    253268      result.SetNumberOfCharged(result.GetNumberOfCharged()+deltaN/2);
Note: See TracChangeset for help on using the changeset viewer.