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/G4CrossSectionExcitationBornPartial.cc

    r819 r961  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4CrossSectionExcitationBornPartial.cc,v 1.1 2007/10/15 08:57:54 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 //
    40 // -------------------------------------------------------------------
    41 
    42 // Class description:
    43 // Geant4-DNA Cross total cross section for electron elastic scattering in water
    44 // Reference: TNS Geant4-DNA paper
    45 // S. Chauvie et al., Geant4 physics processes for microdosimetry simulation:
    46 // design foundation and implementation of the first set of models,
    47 // IEEE Trans. Nucl. Sci., vol. 54, no. 6, Dec. 2007.
    48 // Further documentation available from http://www.ge.infn.it/geant4/dna
    49 
    50 // -------------------------------------------------------------------
    51 
     26// $Id: G4CrossSectionExcitationBornPartial.cc,v 1.3 2008/07/14 20:47:34 sincerti Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    5228
    5329#include "G4CrossSectionExcitationBornPartial.hh"
    54 #include "G4Track.hh"
    55 #include "G4DynamicParticle.hh"
    56 #include "G4ParticleDefinition.hh"
    57 #include "G4Electron.hh"
    58 #include "G4LogLogInterpolation.hh"
    5930
    60 #include "Randomize.hh"
    61 
    62 #include <deque>
     31//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    6332
    6433G4CrossSectionExcitationBornPartial::G4CrossSectionExcitationBornPartial()
    6534{
    6635  table = 0;
    67   // nLevels = waterExcitation.NumberOfLevels();
    6836}
    6937
     38//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    7039
    7140G4CrossSectionExcitationBornPartial::~G4CrossSectionExcitationBornPartial()
     
    7443}
    7544
     45//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    7646
    7747G4int G4CrossSectionExcitationBornPartial::RandomSelect(G4double k)
    7848{   
    79   // Lazy initialisation: load cross section tables in memory the first time access to them is required
    80  
    8149  G4int level = 0;
    8250
    8351  if (table == 0)
    84     {
    85       // Load tables
    86       // ---- MGP ----
    87       table = new G4DNACrossSectionDataSet(new G4LogLogInterpolation, eV,(1e-22/3.343)*m*m );
    88       table->LoadData("dna/sigma_excitation_p_born");
    89      
    90       // ---- MGP ---- Temporary
    91       table->PrintData();
    92     }
     52  {
     53    table = new G4DNACrossSectionDataSet(new G4LogLogInterpolation, eV,(1e-22/3.343)*m*m );
     54    table->LoadData("dna/sigma_excitation_p_born");
     55  }
    9356
    9457  G4double* valuesBuffer = new G4double[table->NumberOfComponents()];
     
    9962 
    10063  while (i>0)
    101     {
    102       i--;
    103       valuesBuffer[i] = table->GetComponent(i)->FindValue(k);
    104       value += valuesBuffer[i];
    105     }
     64  {
     65    i--;
     66    valuesBuffer[i] = table->GetComponent(i)->FindValue(k);
     67    value += valuesBuffer[i];
     68  }
    10669 
    10770  value *= G4UniformRand();
     
    11073 
    11174  while (i > 0)
     75  {
     76    i--;
     77     
     78    if (valuesBuffer[i] > value)
    11279    {
    113       i--;
    114      
    115       if (valuesBuffer[i] > value)
    116         {
    117           delete[] valuesBuffer;
    118           return i;
    119         }
     80      delete[] valuesBuffer;
     81      return i;
     82    }
    12083      value -= valuesBuffer[i];
    121     }
     84  }
    12285
    123   // It should never end up here
    124 
    125   // ---- MGP ---- Is the following line really necessary? 
    12686  if (valuesBuffer) delete[] valuesBuffer;
    12787
Note: See TracChangeset for help on using the changeset viewer.