Ignore:
Timestamp:
Nov 19, 2009, 2:53:25 PM (15 years ago)
Author:
garnier
Message:

update par rapport a CVS

File:
1 edited

Legend:

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

    r1007 r1192  
    2525//
    2626//
    27 // $Id: G4CrossSectionHandler.cc,v 1.18 2006/06/29 19:38:48 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     27// $Id: G4CrossSectionHandler.cc,v 1.21 2009/09/27 10:47:42 sincerti Exp $
     28// GEANT4 tag $Name: emlowen-V09-02-64 $
    2929//
    3030// Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
     
    3535// 19 Jul 2002   VI         Create composite data set for material
    3636// 24 Apr 2003   VI         Cut per region mfpt
     37//
     38// 15 Jul 2009   Nicolas A. Karakatsanis
     39//
     40//                           - BuildCrossSectionForMaterials method was revised in order to calculate the
     41//                             logarithmic values of the loaded data.
     42//                             It retrieves the data values from the G4EMLOW data files but, then, calculates the
     43//                             respective log values and loads them to seperate data structures.
     44//                             The EM data sets, initialized this way, contain both non-log and log values.
     45//                             These initialized data sets can enhance the computing performance of data interpolation
     46//                             operations
    3747//
    3848// -------------------------------------------------------------------
     
    6676  G4DataVector* data;
    6777
     78  G4DataVector* log_energies;
     79  G4DataVector* log_data;
     80
    6881  std::vector<G4VEMDataSet*>* matCrossSections = new std::vector<G4VEMDataSet*>;
    6982
     
    95108        data = new G4DataVector;
    96109
     110        log_energies = new G4DataVector;
     111        log_data = new G4DataVector;
     112
    97113
    98114        for (size_t bin=0; bin<nOfBins; bin++)
     
    100116            G4double e = energyVector[bin];
    101117            energies->push_back(e);
     118            if (e==0.) e=1e-300;
     119            log_energies->push_back(std::log10(e));
    102120            G4double cross = density*FindValue(Z,e);
    103121            data->push_back(cross);
     122            if (cross==0.) cross=1e-300;
     123            log_data->push_back(std::log10(cross));
    104124          }
    105125
    106126        G4VDataSetAlgorithm* algo1 = interpolationAlgo->Clone();
    107         G4VEMDataSet* elSet = new G4EMDataSet(i,energies,data,algo1,1.,1.);
     127
     128//      G4VEMDataSet* elSet = new G4EMDataSet(i,energies,data,algo1,1.,1.);
     129
     130        G4VEMDataSet* elSet = new G4EMDataSet(i,energies,data,log_energies,log_data,algo1,1.,1.);
     131
    108132        setForMat->AddComponent(elSet);
    109133      }
Note: See TracChangeset for help on using the changeset viewer.