Ignore:
Timestamp:
Apr 6, 2009, 12:21:12 PM (15 years ago)
Author:
garnier
Message:

update processes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionChargeDecreasePartial.cc

    r819 r961  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4CrossSectionChargeDecreasePartial.cc,v 1.1 2007/11/08 18:25:25 pia Exp $
    28 // GEANT4 tag $Name:  $
    29 //
    30 // Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
    31 //
    32 // Reference: TNS Geant4-DNA paper
    33 // Reference for implementation model: NIM. 155, pp. 145-156, 1978
    34 
    35 // History:
    36 // -----------
    37 // Date         Name              Modification
    38 // 28 Apr 2007  M.G. Pia          Created in compliance with design described in TNS paper
    39 // 08 Nov 2007  MGP               Got code from S.I.; added variable initialisation to avoid compilation warnings
    40 //
    41 // -------------------------------------------------------------------
    42 
    43 // Class description:
    44 // Geant4-DNA Cross total cross section for electron elastic scattering in water
    45 // Reference: TNS Geant4-DNA paper
    46 // S. Chauvie et al., Geant4 physics processes for microdosimetry simulation:
    47 // design foundation and implementation of the first set of models,
    48 // IEEE Trans. Nucl. Sci., vol. 54, no. 6, Dec. 2007.
    49 // Further documentation available from http://www.ge.infn.it/geant4/dna
    50 
    51 // -------------------------------------------------------------------
    52 
     26// $Id: G4CrossSectionChargeDecreasePartial.cc,v 1.2 2008/07/14 20:47:34 sincerti Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    5328
    5429#include "G4CrossSectionChargeDecreasePartial.hh"
    55 #include "G4ParticleDefinition.hh"
    56 #include "G4Proton.hh"
    57 #include "G4DNAGenericIonsManager.hh"
    58 
    59 #include "Randomize.hh"
    60 
     30
     31//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    6132
    6233G4CrossSectionChargeDecreasePartial::G4CrossSectionChargeDecreasePartial()
     
    11687}
    11788
     89//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     90
    11891G4CrossSectionChargeDecreasePartial::~G4CrossSectionChargeDecreasePartial()
    119 { }
    120  
     92{}
     93 
     94//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     95
    12196G4double G4CrossSectionChargeDecreasePartial::CrossSection(G4double k, G4int index,
    12297                                                           const G4ParticleDefinition* particleDefinition)
     
    149124 
    150125  if (x1[index][particleTypeIndex]<x0[index][particleTypeIndex])
    151     {
     126  {
    152127      //
    153128      // if x1 < x0 means that x1 and b1 will be calculated with the following formula (this piece of code is run on all alphas and not on protons)
     
    163138        + b0[index][particleTypeIndex] - c0[index][particleTypeIndex] * std::pow(x1[index][particleTypeIndex]
    164139                                                                                 - x0[index][particleTypeIndex], d0[index][particleTypeIndex]);
    165     }
     140  }
    166141
    167142  G4double x(std::log10(k/eV));
     
    197172 
    198173  while (i>0)
    199     {
     174  {
    200175      i--;
    201176      values[i]=CrossSection(k, i, particleDefinition);
    202177      value+=values[i];
    203     }
     178  }
    204179 
    205180  value*=G4UniformRand();
     
    207182  i=n;
    208183  while (i>0)
    209     {
     184  {
    210185      i--;
    211186   
     
    214189 
    215190      value-=values[i];
    216     }
     191  }
    217192 
    218193  delete[] values;
     
    220195  return i;
    221196}
     197
     198//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    222199
    223200G4double G4CrossSectionChargeDecreasePartial::Sum(G4double k, const G4ParticleDefinition* particleDefinition)
     
    234211
    235212  for (G4int i=0; i<numberOfPartialCrossSections[particleTypeIndex]; i++)
    236     {
    237       totalCrossSection += CrossSection(k,i,particleDefinition);
    238     }
     213  {
     214    totalCrossSection += CrossSection(k,i,particleDefinition);
     215  }
    239216  return totalCrossSection;
    240217}
    241 
    242 
Note: See TracChangeset for help on using the changeset viewer.