Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/cross_sections/src/G4EMDissociationCrossSection.cc

    r819 r1340  
    3434// ********************************************************************
    3535//
    36 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     36// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    3737//
    3838// MODULE:              G4EMDissociationCrossSection.cc
     
    4545// Contract:            17191/03/NL/LvH
    4646//
    47 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     47// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    4848//
    4949// CHANGE HISTORY
     
    5656// Beta release
    5757//
    58 // 30. May 2005, J.P. Wellisch removed a compilation warning on gcc 3.4 for gant4 7.1.
    59 //
    60 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    61 ////////////////////////////////////////////////////////////////////////////////
     58// 30. May 2005, J.P. Wellisch removed a compilation warning on gcc 3.4 for
     59//               geant4 7.1.
     60//
     61// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     62//////////////////////////////////////////////////////////////////////////////
    6263//
    6364#include "G4EMDissociationCrossSection.hh"
     
    6566#include "G4ParticleTable.hh"
    6667#include "G4IonTable.hh"
     68#include "G4HadTmpUtil.hh"
    6769#include "globals.hh"
    68 ////////////////////////////////////////////////////////////////////////////////
    69 //
     70
     71
    7072G4EMDissociationCrossSection::G4EMDissociationCrossSection ()
    7173{
    72 //
    7374//
    7475// This function makes use of the class which can sample the virtual photon
     
    8687  xd      = 0.25;
    8788}
    88 ////////////////////////////////////////////////////////////////////////////////
     89//////////////////////////////////////////////////////////////////////////////
    8990//
    9091G4EMDissociationCrossSection::~G4EMDissociationCrossSection()
     
    9293  delete thePhotonSpectrum;
    9394}
    94 ///////////////////////////////////////////////////////////////////////////////
    95 //
    96 G4bool G4EMDissociationCrossSection::IsZAApplicable
    97 (const G4DynamicParticle* theDynamicParticle, G4double /*ZZ*/, G4double AA)
     95/////////////////////////////////////////////////////////////////////////////
     96//
     97G4bool
     98G4EMDissociationCrossSection::IsIsoApplicable(const G4DynamicParticle* theDynamicParticle,
     99                                              G4int /*ZZ*/, G4int AA)
    98100{
    99101//
     
    105107//
    106108  if (G4ParticleTable::GetParticleTable()->GetIonTable()->
    107     IsIon(theDynamicParticle->GetDefinition()) && AA > 1.0)
     109    IsIon(theDynamicParticle->GetDefinition()) && AA > 1)
    108110    return true;
    109111  else
     
    114116  (const G4DynamicParticle* theDynamicParticle, const G4Element* theElement)
    115117{
    116   return IsZAApplicable(theDynamicParticle, 0., theElement->GetN());
     118  return IsIsoApplicable(theDynamicParticle, 0, G4lrint(theElement->GetN()));
    117119}
    118120
     
    130132    G4IsotopeVector* isoVector = theElement->GetIsotopeVector();
    131133    G4double* abundVector = theElement->GetRelativeAbundanceVector();
    132     G4double ZZ;
    133     G4double AA;
     134    G4int ZZ;
     135    G4int AA;
    134136     
    135137    for (G4int i = 0; i < nIso; i++) {
    136       ZZ = G4double( (*isoVector)[i]->GetZ() );
    137       AA = G4double( (*isoVector)[i]->GetN() );
    138       sig = GetIsoZACrossSection(theDynamicParticle, ZZ, AA, temperature);
     138      ZZ = (*isoVector)[i]->GetZ();
     139      AA = (*isoVector)[i]->GetN();
     140      sig = GetZandACrossSection(theDynamicParticle, ZZ, AA, temperature);
    139141      crossSection += sig*abundVector[i];
    140142    }
    141143   
    142144  } else {
    143     crossSection =
    144       GetIsoZACrossSection(theDynamicParticle, theElement->GetZ(),
    145                            theElement->GetN(), temperature);
     145    G4int ZZ = G4lrint(theElement->GetZ());
     146    G4int AA = G4lrint(theElement->GetN());
     147    crossSection = GetZandACrossSection(theDynamicParticle, ZZ, AA, temperature);
    146148  }
    147149   
     
    150152
    151153
    152 G4double G4EMDissociationCrossSection::GetIsoZACrossSection
    153   (const G4DynamicParticle *theDynamicParticle, G4double ZZ, G4double AA,
    154    G4double /*temperature*/)
    155 {
    156 //
     154G4double
     155G4EMDissociationCrossSection::GetZandACrossSection(const G4DynamicParticle *theDynamicParticle,
     156                                                   G4int ZZ, G4int AA, G4double /*temperature*/)
     157{
    157158//
    158159// Get relevant information about the projectile and target (A, Z) and
     
    240241  return theCrossSectionVector;
    241242}
     243
    242244////////////////////////////////////////////////////////////////////////////////
    243245//
     
    247249{
    248250//
    249 //
    250251// This is a cheaky little member function to calculate the probability of
    251252// EMD for the target in the field of the projectile ... just by reversing the
     
    254255  return GetCrossSectionForProjectile (AT, ZT, AP, ZP, b, bmin);
    255256}
    256 ////////////////////////////////////////////////////////////////////////////////
    257 //
     257
     258
    258259G4double
    259   G4EMDissociationCrossSection::GetWilsonProbabilityForProtonDissociation
    260   (G4double A, G4double Z)
    261 {
    262 //
     260G4EMDissociationCrossSection::GetWilsonProbabilityForProtonDissociation(G4double A,
     261                                                                        G4double Z)
     262{
    263263//
    264264// This is a simple algorithm to choose whether a proton or neutron is ejected
     
    282282  return p;
    283283}
    284 ////////////////////////////////////////////////////////////////////////////////
    285 //
Note: See TracChangeset for help on using the changeset viewer.