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

update processes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/standard/src/G4BetheHeitlerModel.cc

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4BetheHeitlerModel.cc,v 1.11 2007/05/22 17:34:36 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4BetheHeitlerModel.cc,v 1.12 2008/10/15 15:54:57 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    6161#include "G4PhysicsLogVector.hh"
    6262#include "G4ParticleChangeForGamma.hh"
     63#include "G4LossTableManager.hh"
    6364
    6465//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     
    7071  : G4VEmModel(nam),
    7172    theCrossSectionTable(0),
    72     nbins(200)
    73 {
     73    nbins(10)
     74{
     75  fParticleChange = 0;
    7476  theGamma    = G4Gamma::Gamma();
    7577  thePositron = G4Positron::Positron();
     
    9294                                     const G4DataVector&)
    9395{
    94   if(pParticleChange)
    95     fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange);
    96   else
    97     fParticleChange = new G4ParticleChangeForGamma();
     96  if(!fParticleChange) {
     97    if(pParticleChange) {
     98      fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange);
     99    } else {
     100      fParticleChange = new G4ParticleChangeForGamma();
     101    }
     102  }
    98103
    99104  if(theCrossSectionTable) {
     
    108113  G4double emin = LowEnergyLimit();
    109114  G4double emax = HighEnergyLimit();
     115  G4int n = nbins*G4int(log10(emax/emin));
     116  G4bool spline = G4LossTableManager::Instance()->SplineFlag();
    110117  G4double e, value;
    111118
    112119  for(size_t j=0; j<nvect ; j++) {
    113120
    114     ptrVector  = new G4PhysicsLogVector(emin, emax, nbins);
     121    ptrVector  = new G4PhysicsLogVector(emin, emax, n);
     122    ptrVector->SetSpline(spline);
    115123    G4double Z = (*theElementTable)[j]->GetZ();
    116124    G4int   iz = G4int(Z);
Note: See TracChangeset for help on using the changeset viewer.