Ignore:
Timestamp:
Apr 20, 2009, 4:53:50 PM (15 years ago)
Author:
garnier
Message:

fichier oublies

Location:
trunk/source/processes/electromagnetic/lowenergy/src
Files:
18 edited

Legend:

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

    r991 r1005  
    2424// ********************************************************************
    2525//
    26 // $Id: G4CrossSectionExcitationMillerGreenPartial.cc,v 1.2 2008/07/14 20:47:34 sincerti Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4CrossSectionExcitationMillerGreenPartial.cc,v 1.3 2009/01/20 07:40:53 sincerti Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828
    2929#include "G4CrossSectionExcitationMillerGreenPartial.hh"
     
    115115  tCorrected = k * kineticEnergyCorrection[particleTypeIndex];
    116116
     117  // SI - added protection
     118  if (tCorrected < waterExcitation.ExcitationEnergy(excitationLevel)) return 0;
     119  //
     120 
    117121  G4int z = 10;
    118122
     
    158162  // ELECTRON CORRECTION
    159163 
    160   if ( particle == instance->GetIon("alpha++"))
     164  if ( particle == instance->GetIon("alpha++")||
     165       particle == G4Proton::ProtonDefinition())
     166       
    161167  {  while (i > 0)
    162168     {
  • trunk/source/processes/electromagnetic/lowenergy/src/G4CrossSectionIonisationBornPartial.cc

    r991 r1005  
    2424// ********************************************************************
    2525//
    26 // $Id: G4CrossSectionIonisationBornPartial.cc,v 1.4 2008/07/14 20:47:34 sincerti Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4CrossSectionIonisationBornPartial.cc,v 1.5 2009/01/20 07:40:53 sincerti Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828
    2929#include "G4CrossSectionIonisationBornPartial.hh"
     
    3333G4CrossSectionIonisationBornPartial::G4CrossSectionIonisationBornPartial()
    3434{
    35   lowEnergyLimitDefault = 25 * eV;
     35  lowEnergyLimitDefault = 12.61 * eV;
    3636  highEnergyLimitDefault = 30 * keV;
    3737
     
    5252    tableFile[electron] = fileElectron;
    5353
    54     lowEnergyLimit[electron] = 25. * eV;
     54    lowEnergyLimit[electron] = 12.61 * eV;
    5555    highEnergyLimit[electron] = 30. * keV;
    5656
  • trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateChargeDecrease.cc

    r991 r1005  
    2424// ********************************************************************
    2525//
    26 // $Id: G4FinalStateChargeDecrease.cc,v 1.3 2008/07/14 20:47:34 sincerti Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4FinalStateChargeDecrease.cc,v 1.4 2009/01/20 07:50:28 sincerti Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828
    2929#include "G4FinalStateChargeDecrease.hh"
     
    7070  }
    7171 
     72  //SI - Added protection against total energy deposit
     73  product.DoNotDepositEnergy();
     74  //
    7275  product.KillPrimaryParticle();
     76
    7377  product.AddEnergyDeposit(waterBindingEnergy);
    74  
     78
    7579  G4DynamicParticle* aSecondary = new G4DynamicParticle(OutgoingParticleDefinition(definition, finalStateIndex),
    7680                                                        track.GetDynamicParticle()->GetMomentumDirection(),
  • trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateChargeIncrease.cc

    r991 r1005  
    2424// ********************************************************************
    2525//
    26 // $Id: G4FinalStateChargeIncrease.cc,v 1.3 2008/07/14 20:47:34 sincerti Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4FinalStateChargeIncrease.cc,v 1.4 2009/01/20 07:50:28 sincerti Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828
    2929#include "G4FinalStateChargeIncrease.hh"
     
    4848  product.Clear();
    4949
     50  //SI - Added protection against total energy deposit
     51  product.DoNotDepositEnergy();
     52  //
    5053  product.KillPrimaryParticle();
    5154  product.AddEnergyDeposit(0.);
     55
    5256  G4ParticleDefinition* definition = track.GetDefinition();
    5357 
  • trunk/source/processes/electromagnetic/lowenergy/src/G4FinalStateProduct.cc

    r991 r1005  
    2525//
    2626//
    27 // $Id: G4FinalStateProduct.cc,v 1.5 2007/11/09 20:11:04 pia Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     27// $Id: G4FinalStateProduct.cc,v 1.6 2009/01/20 07:50:28 sincerti Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Contact Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
     
    5353#include "G4ThreeVector.hh"
    5454
    55 G4FinalStateProduct::G4FinalStateProduct() : killStatus(false), isModified(false), localEnergyDeposit(0.), modifiedEnergy(0)
     55G4FinalStateProduct::G4FinalStateProduct() : killStatus(false), doNotDepositStatus(false), isModified(false), localEnergyDeposit(0.), modifiedEnergy(0)
    5656{
    5757  // empty
     
    6868  // Reset object status
    6969  killStatus = false;
     70  doNotDepositStatus = false;
    7071  isModified = false;
    7172  localEnergyDeposit = 0.;
     
    9899}
    99100 
     101void G4FinalStateProduct::DoNotDepositEnergy()
     102{
     103  doNotDepositStatus = true;
     104}
     105
    100106void G4FinalStateProduct::KillPrimaryParticle()
    101107{
     108 
    102109  // ---- MGP ---- To be added: Handle local energy deposit here
    103110  killStatus = true;
  • trunk/source/processes/electromagnetic/lowenergy/src/G4IonParametrisedLossModel.cc

    r991 r1005  
    3737// First implementation: 10. 11. 2008
    3838//
    39 // Modifications:
     39// Modifications: 03. 02. 2009 - Bug fix iterators (AL)
    4040//
    4141//
     
    107107  dedxCacheMaterial = 0;
    108108  dedxCacheEnergyCut = 0;
    109   dedxCacheIter = lossTableList.begin();
     109  dedxCacheIter = lossTableList.end();
    110110  dedxCacheTransitionEnergy = 0.0; 
    111111  dedxCacheTransitionFactor = 0.0;
     
    166166  dedxCacheMaterial = 0;
    167167  dedxCacheEnergyCut = 0;
    168   dedxCacheIter = lossTableList.begin();
     168  dedxCacheIter = lossTableList.end();
    169169  dedxCacheTransitionEnergy = 0.0; 
    170170  dedxCacheTransitionFactor = 0.0;
     
    342342  LossTableList::iterator iter = dedxCacheIter;
    343343
    344   if(iter != lossTableList.begin()) {
     344  if(iter != lossTableList.end()) {
    345345
    346346     G4double transitionEnergy = dedxCacheTransitionEnergy;
     
    672672
    673673     // If any table is applicable, the transition factor is computed:
    674      if(iter != lossTableList.begin()) {
     674     if(iter != lossTableList.end()) {
    675675
    676676        // Retrieving the transition energy from the parameterisation table
     
    777777  // If parameterization for ions is available the electronic energy loss
    778778  // is overwritten
    779   if(iter != lossTableList.begin()) {
     779  if(iter != lossTableList.end()) {
    780780
    781781     // The energy loss is calculated using the ComputeDEDXPerVolume function
     
    854854  G4double transitionEnergy = dedxCacheTransitionEnergy;
    855855
    856   if(iter != lossTableList.begin() && transitionEnergy < kineticEnergy) {
     856  if(iter != lossTableList.end() && transitionEnergy < kineticEnergy) {
    857857     chargeSquareRatio *= corrections -> EffectiveChargeCorrection(particle,
    858858                                                                material,
     
    862862     eloss *= chargeSquareRatioCorr;
    863863  }
    864   else if (iter == lossTableList.begin()) {
     864  else if (iter == lossTableList.end()) {
    865865
    866866     chargeSquareRatio *= corrections -> EffectiveChargeCorrection(particle,
     
    875875  // overwrite the energy loss (i.e. when the effective charge approach is
    876876  // used)
    877   if(iter == lossTableList.begin()) {
     877  if(iter == lossTableList.end()) {
    878878
    879879     G4double scaledKineticEnergy = kineticEnergy * dedxCacheGenIonMassRatio;
  • trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreComptonModel.cc

    r991 r1005  
    2424// ********************************************************************
    2525//
    26 // $Id: G4LivermoreComptonModel.cc,v 1.1 2008/10/30 14:17:46 sincerti Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4LivermoreComptonModel.cc,v 1.2 2009/01/21 10:58:13 sincerti Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929
     
    3838G4LivermoreComptonModel::G4LivermoreComptonModel(const G4ParticleDefinition*,
    3939                                             const G4String& nam)
    40 :G4VEmModel(nam),isInitialised(false)
     40:G4VEmModel(nam),isInitialised(false),meanFreePathTable(0),scatterFunctionData(0),crossSectionHandler(0)
    4141{
    4242  lowEnergyLimit = 250 * eV; // SI - Could be 10 eV ?
     
    4545  SetHighEnergyLimit(highEnergyLimit);
    4646
    47   verboseLevel= 0;
     47  verboseLevel=0 ;
    4848  // Verbosity scale:
    4949  // 0 = nothing
     
    6565G4LivermoreComptonModel::~G4LivermoreComptonModel()
    6666
    67   delete meanFreePathTable;
    68   delete crossSectionHandler;
    69   delete scatterFunctionData;
     67
     68  if (meanFreePathTable)   delete meanFreePathTable;
     69  if (crossSectionHandler) delete crossSectionHandler;
     70  if (scatterFunctionData) delete scatterFunctionData;
     71
    7072}
    7173
     
    7577                                       const G4DataVector& cuts)
    7678{
     79
    7780  if (verboseLevel > 3)
    7881    G4cout << "Calling G4LivermoreComptonModel::Initialise()" << G4endl;
    7982
    80   InitialiseElementSelectors(particle,cuts);
    81 
     83  if (crossSectionHandler)
     84  {
     85    crossSectionHandler->Clear();
     86    delete crossSectionHandler;
     87  }
     88 
    8289  // Energy limits
    8390 
     
    118125  if (verboseLevel > 2)
    119126    G4cout << "Loaded cross section files for Livermore Compton model" << G4endl;
     127
     128  InitialiseElementSelectors(particle,cuts);
    120129
    121130  G4cout << "Livermore Compton model is initialized " << G4endl
     
    135144   
    136145  isInitialised = true;
     146
    137147}
    138148
     
    145155                                             G4double, G4double)
    146156{
     157
    147158  if (verboseLevel > 3)
    148159    G4cout << "Calling ComputeCrossSectionPerAtom() of G4LivermoreComptonModel" << G4endl;
    149160
    150161  G4double cs = crossSectionHandler->FindValue(G4int(Z), GammaEnergy);
     162 
    151163  return cs;
     164
    152165}
    153166
     
    160173                                              G4double)
    161174{
     175
    162176  // The scattered gamma energy is sampled according to Klein - Nishina formula.
    163177  // then accepted or rejected depending on the Scattering Function multiplied
     
    184198      fParticleChange->SetProposedKineticEnergy(0.);
    185199      fParticleChange->ProposeLocalEnergyDeposit(photonEnergy0);
    186       // SI - IS THE FOLLOWING RETURN NECESSARY ?
    187200      return ;
    188201  }
     
    335348  G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),eDirection,eKineticEnergy) ;
    336349  fvect->push_back(dp);
     350
    337351}
    338352
  • trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreGammaConversionModel.cc

    r991 r1005  
    2424// ********************************************************************
    2525//
    26 // $Id: G4LivermoreGammaConversionModel.cc,v 1.1 2008/10/30 14:16:35 sincerti Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4LivermoreGammaConversionModel.cc,v 1.2 2009/01/21 10:58:13 sincerti Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929
     
    3838G4LivermoreGammaConversionModel::G4LivermoreGammaConversionModel(const G4ParticleDefinition*,
    3939                                             const G4String& nam)
    40 :G4VEmModel(nam),smallEnergy(2.*MeV),isInitialised(false)
     40:G4VEmModel(nam),smallEnergy(2.*MeV),isInitialised(false),crossSectionHandler(0),meanFreePathTable(0)
    4141{
    4242  lowEnergyLimit = 1.022000 * MeV;
     
    6363G4LivermoreGammaConversionModel::~G4LivermoreGammaConversionModel()
    6464
    65   delete meanFreePathTable;
    66   delete crossSectionHandler;
     65  if (meanFreePathTable) delete meanFreePathTable;
     66  if (crossSectionHandler) delete crossSectionHandler;
    6767}
    6868
     
    7575    G4cout << "Calling G4LivermoreGammaConversionModel::Initialise()" << G4endl;
    7676
    77   InitialiseElementSelectors(particle,cuts);
     77  if (crossSectionHandler)
     78  {
     79    crossSectionHandler->Clear();
     80    delete crossSectionHandler;
     81  }
    7882
    7983  // Energy limits
     
    107111  if (verboseLevel > 2)
    108112    G4cout << "Loaded cross section files for PenelopeGammaConversion" << G4endl;
     113
     114  InitialiseElementSelectors(particle,cuts);
    109115
    110116  G4cout << "Livermore Gamma Conversion model is initialized " << G4endl
  • trunk/source/processes/electromagnetic/lowenergy/src/G4LivermorePhotoElectricModel.cc

    r991 r1005  
    2424// ********************************************************************
    2525//
    26 // $Id: G4LivermorePhotoElectricModel.cc,v 1.1 2008/10/30 14:16:35 sincerti Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4LivermorePhotoElectricModel.cc,v 1.2 2009/01/21 10:58:13 sincerti Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929
     
    3838G4LivermorePhotoElectricModel::G4LivermorePhotoElectricModel(const G4ParticleDefinition*,
    3939                                             const G4String& nam)
    40 :G4VEmModel(nam),isInitialised(false)
     40:G4VEmModel(nam),isInitialised(false),meanFreePathTable(0),crossSectionHandler(0),shellCrossSectionHandler(0),ElectronAngularGenerator(0)
    4141{
    4242  lowEnergyLimit = 250 * eV; // SI - Could be 10 eV ?
     
    6464G4LivermorePhotoElectricModel::~G4LivermorePhotoElectricModel()
    6565
    66   delete meanFreePathTable;
    67   delete crossSectionHandler;
    68   delete shellCrossSectionHandler;
    69   delete ElectronAngularGenerator;
     66  if (meanFreePathTable) delete meanFreePathTable;
     67  if (crossSectionHandler) delete crossSectionHandler;
     68  if (shellCrossSectionHandler) delete shellCrossSectionHandler;
     69  if (ElectronAngularGenerator) delete ElectronAngularGenerator;
    7070}
    7171
     
    7878    G4cout << "Calling G4LivermorePhotoElectricModel::Initialise()" << G4endl;
    7979
    80   InitialiseElementSelectors(particle,cuts);
    81 
     80  if (crossSectionHandler)
     81  {
     82    crossSectionHandler->Clear();
     83    delete crossSectionHandler;
     84  }
     85 
     86  if (shellCrossSectionHandler)
     87  {
     88    shellCrossSectionHandler->Clear();
     89    delete shellCrossSectionHandler;
     90  }
     91 
    8292  // Energy limits
    8393 
     
    122132    G4cout << "Loaded cross section files for Livermore PhotoElectric model" << G4endl;
    123133
     134  InitialiseElementSelectors(particle,cuts);
     135
    124136  G4cout << "Livermore PhotoElectric model is initialized " << G4endl
    125137         << "Energy range: "
     
    177189      fParticleChange->SetProposedKineticEnergy(0.);
    178190      fParticleChange->ProposeLocalEnergyDeposit(photonEnergy);
    179       // SI - IS THE FOLLOWING RETURN NECESSARY ?
    180191      return ;
    181192    }
  • trunk/source/processes/electromagnetic/lowenergy/src/G4LivermorePolarizedComptonModel.cc

    r991 r1005  
    2424// ********************************************************************
    2525//
    26 // $Id: G4LivermorePolarizedComptonModel.cc,v 1.1 2008/10/30 14:16:35 sincerti Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4LivermorePolarizedComptonModel.cc,v 1.2 2009/01/21 10:58:13 sincerti Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929
     
    3838G4LivermorePolarizedComptonModel::G4LivermorePolarizedComptonModel(const G4ParticleDefinition*,
    3939                                             const G4String& nam)
    40 :G4VEmModel(nam),isInitialised(false)
     40:G4VEmModel(nam),isInitialised(false),meanFreePathTable(0),scatterFunctionData(0),crossSectionHandler(0)
    4141{
    4242  lowEnergyLimit = 250 * eV; // SI - Could be 10 eV ?
     
    6565G4LivermorePolarizedComptonModel::~G4LivermorePolarizedComptonModel()
    6666
    67   delete meanFreePathTable;
    68   delete crossSectionHandler;
    69   delete scatterFunctionData;
     67  if (meanFreePathTable)   delete meanFreePathTable;
     68  if (crossSectionHandler) delete crossSectionHandler;
     69  if (scatterFunctionData) delete scatterFunctionData;
    7070}
    7171
     
    7878    G4cout << "Calling G4LivermorePolarizedComptonModel::Initialise()" << G4endl;
    7979
    80   InitialiseElementSelectors(particle,cuts);
     80  if (crossSectionHandler)
     81  {
     82    crossSectionHandler->Clear();
     83    delete crossSectionHandler;
     84  }
    8185
    8286  // Energy limits
     
    119123  if (verboseLevel > 2)
    120124    G4cout << "Loaded cross section files for Livermore Polarized Compton model" << G4endl;
     125
     126  InitialiseElementSelectors(particle,cuts);
    121127
    122128  G4cout << "Livermore Polarized Compton model is initialized " << G4endl
     
    203209      fParticleChange->SetProposedKineticEnergy(0.);
    204210      fParticleChange->ProposeLocalEnergyDeposit(gammaEnergy0);
    205       // SI - IS THE FOLLOWING RETURN NECESSARY ?
    206211      return;
    207212    }
  • trunk/source/processes/electromagnetic/lowenergy/src/G4LivermorePolarizedRayleighModel.cc

    r991 r1005  
    2424// ********************************************************************
    2525//
    26 // $Id: G4LivermorePolarizedRayleighModel.cc,v 1.1 2008/10/30 14:16:35 sincerti Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4LivermorePolarizedRayleighModel.cc,v 1.2 2009/01/21 10:58:13 sincerti Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929
     
    3838G4LivermorePolarizedRayleighModel::G4LivermorePolarizedRayleighModel(const G4ParticleDefinition*,
    3939                                             const G4String& nam)
    40 :G4VEmModel(nam),isInitialised(false)
     40:G4VEmModel(nam),isInitialised(false),crossSectionHandler(0),formFactorData(0)
    4141{
    4242  lowEnergyLimit = 250 * eV; // SI - Could be 10 eV ?
     
    6565G4LivermorePolarizedRayleighModel::~G4LivermorePolarizedRayleighModel()
    6666
    67   delete crossSectionHandler;
    68   delete formFactorData;
     67  if (crossSectionHandler) delete crossSectionHandler;
     68  if (formFactorData) delete formFactorData;
    6969}
    7070
     
    8484    G4cout << "Calling G4LivermorePolarizedRayleighModel::Initialise()" << G4endl;
    8585
    86   InitialiseElementSelectors(particle,cuts);
    87 
     86  if (crossSectionHandler)
     87  {
     88    crossSectionHandler->Clear();
     89    delete crossSectionHandler;
     90  }
     91 
    8892  // Energy limits
    8993 
     
    116120  if (verboseLevel > 2)
    117121    G4cout << "Loaded cross section files for Livermore Polarized Rayleigh model" << G4endl;
     122
     123  InitialiseElementSelectors(particle,cuts);
    118124
    119125  G4cout << "Livermore Polarized Rayleigh model is initialized " << G4endl
  • trunk/source/processes/electromagnetic/lowenergy/src/G4LivermoreRayleighModel.cc

    r991 r1005  
    2424// ********************************************************************
    2525//
    26 // $Id: G4LivermoreRayleighModel.cc,v 1.1 2008/10/30 14:16:35 sincerti Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4LivermoreRayleighModel.cc,v 1.2 2009/01/21 10:58:13 sincerti Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929
     
    3838G4LivermoreRayleighModel::G4LivermoreRayleighModel(const G4ParticleDefinition*,
    3939                                             const G4String& nam)
    40 :G4VEmModel(nam),isInitialised(false)
     40:G4VEmModel(nam),isInitialised(false),meanFreePathTable(0),formFactorData(0),crossSectionHandler(0)
    4141{
    4242  lowEnergyLimit = 250 * eV; // SI - Could be 10 eV ?
     
    6565G4LivermoreRayleighModel::~G4LivermoreRayleighModel()
    6666
    67   delete meanFreePathTable;
    68   delete crossSectionHandler;
    69   delete formFactorData;
     67  if (meanFreePathTable) delete meanFreePathTable;
     68  if (crossSectionHandler) delete crossSectionHandler;
     69  if (formFactorData) delete formFactorData;
    7070}
    7171
     
    7878    G4cout << "Calling G4LivermoreRayleighModel::Initialise()" << G4endl;
    7979
    80   InitialiseElementSelectors(particle,cuts);
    81 
     80  if (crossSectionHandler)
     81  {
     82    crossSectionHandler->Clear();
     83    delete crossSectionHandler;
     84  }
     85 
    8286  // Energy limits
    8387 
     
    115119  if (verboseLevel > 2)
    116120    G4cout << "Loaded cross section files for Livermore Rayleigh model" << G4endl;
     121
     122  InitialiseElementSelectors(particle,cuts);
    117123
    118124  G4cout << "Livermore Rayleigh model is initialized " << G4endl
     
    166172      fParticleChange->SetProposedKineticEnergy(0.);
    167173      fParticleChange->ProposeLocalEnergyDeposit(photonEnergy0);
    168       // SI - IS THE FOLLOWING RETURN NECESSARY ?
    169174      return ;
    170175  }
  • trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeBremsstrahlungContinuous.cc

    r991 r1005  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PenelopeBremsstrahlungContinuous.cc,v 1.10 2008/12/09 15:08:13 pandola Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4PenelopeBremsstrahlungContinuous.cc,v 1.11 2008/12/15 09:23:06 pandola Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// --------------------------------------------------------------
     
    9797 G4String dirFile = pathString + "/penelope/" + name;
    9898 std::ifstream file(dirFile);
    99  std::filebuf* lsdp = file.rdbuf();
    100  if (!(lsdp->is_open()))
     99 if (!file.is_open())
    101100     {
    102101      G4String excep = "G4PenelopeBremsstrahlungContinuous - data file " + name + " not found!";
     
    112111     for (size_t j=0;j<NumberofKPoints;j++){
    113112       file >> a1;
    114        ReducedCS[i][j]=a1*cm2; //coversion present in Penelope source
     113       ReducedCS[i][j]=a1*cm2;
    115114     }
    116115     //3) read the total cross section, in cm2
    117116     file >> a1;
    118      TotalCS[i]=a1*cm2; //conversion present in Penelope source
     117     TotalCS[i]=a1*cm2;
    119118     // Check closing item
    120119     file >> a1;
    121120     if (a1 != ((G4double) -1))
    122121       {
    123          G4String excep = "G4PenelopeBremsstrahlungContinuous - Check the bremms data file " + name;
     122         G4String excep = "G4PenelopeBremsstrahlungContinuous - Check the bremms data file "
     123           + name;
    124124         G4Exception(excep);
    125125       }
     
    229229 
    230230  //Global x-section factor
    231   G4double Fact=Zmat*Zmat*(energy+electron_mass_c2)*(energy+electron_mass_c2)/(energy*(energy+2.0*electron_mass_c2));
     231  G4double Fact=Zmat*Zmat*(energy+electron_mass_c2)*(energy+electron_mass_c2)/
     232    (energy*(energy+2.0*electron_mass_c2));
    232233  Fact *= PositronCorrection(energy);
    233234
  • trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopeIonisationModel.cc

    r991 r1005  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PenelopeIonisationModel.cc,v 1.2 2008/12/05 09:15:43 pandola Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4PenelopeIonisationModel.cc,v 1.3 2008/12/15 09:23:06 pandola Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// Author: Luciano Pandola
     
    517517    //Penelope subtracted the fluorescence, but one has to match the databases
    518518    eKineticEnergy = energySecondary+ioniEnergy-bindingEnergy;
    519    
    520   //VERIFICA QUI LA STORIA DEL LOCAL ENERGY DEPOSIT!
    521 
     519 
    522520  G4double localEnergyDeposit = ionEnergy;
    523521  G4double energyInFluorescence = 0.0*eV;
  • trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopePhotoElectric.cc

    r991 r1005  
    2525//
    2626//
    27 // $Id: G4PenelopePhotoElectric.cc,v 1.12 2006/06/29 19:40:51 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     27// $Id: G4PenelopePhotoElectric.cc,v 1.13 2009/01/08 09:42:54 pandola Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// Author: L. Pandola
     
    3737// 31 May 2005  L. Pandola  Added Sauter formula for the sampling of
    3838//                          the electron direction
     39// 08 Jan 2009  L. Pandola  Check shell index to avoid mismatch between
     40//                          the Penelope cross section database and the
     41//                          G4AtomicTransitionManager database. It suppresses
     42//                          a warning from G4AtomicTransitionManager only.
     43//                          Results are unchanged.
    3944// --------------------------------------------------------------
    4045
     
    146151  // Retrieve the corresponding identifier and binding energy of the selected shell
    147152  const G4AtomicTransitionManager* transitionManager = G4AtomicTransitionManager::Instance();
     153
     154  //The number of shell cross section possibly reported in the Penelope database
     155  //might be different from the number of shells in the G4AtomicTransitionManager
     156  //(namely, Penelope may contain more shell, especially for very light elements).
     157  //In order to avoid a warning message from the G4AtomicTransitionManager, I
     158  //add this protection. Results are anyway changed, because when G4AtomicTransitionManager
     159  //has a shellID>maxID, it sets the shellID to the last valid shell.
     160  size_t numberOfShells = (size_t) transitionManager->NumberOfShells(Z);
     161  if (shellIndex >= numberOfShells)
     162    shellIndex = numberOfShells-1;
     163
    148164  const G4AtomicShell* shell = transitionManager->Shell(Z,shellIndex);
    149165  G4double bindingEnergy = shell->BindingEnergy();
  • trunk/source/processes/electromagnetic/lowenergy/src/G4PenelopePhotoElectricModel.cc

    r991 r1005  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PenelopePhotoElectricModel.cc,v 1.2 2008/12/04 14:09:36 pandola Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4PenelopePhotoElectricModel.cc,v 1.3 2009/01/08 09:42:54 pandola Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// Author: Luciano Pandola
     
    3131// History:
    3232// --------
    33 // 08 Oct 2008   L Pandola    Migration from process to model
     33// 08 Oct 2008   L Pandola  Migration from process to model
     34// 08 Jan 2009  L. Pandola  Check shell index to avoid mismatch between
     35//                          the Penelope cross section database and the
     36//                          G4AtomicTransitionManager database. It suppresses
     37//                          a warning from G4AtomicTransitionManager only.
     38//                          Results are unchanged.
    3439//
    3540
     
    227232  // Retrieve the corresponding identifier and binding energy of the selected shell
    228233  const G4AtomicTransitionManager* transitionManager = G4AtomicTransitionManager::Instance();
     234
     235  //The number of shell cross section possibly reported in the Penelope database
     236  //might be different from the number of shells in the G4AtomicTransitionManager
     237  //(namely, Penelope may contain more shell, especially for very light elements).
     238  //In order to avoid a warning message from the G4AtomicTransitionManager, I
     239  //add this protection. Results are anyway changed, because when G4AtomicTransitionManager
     240  //has a shellID>maxID, it sets the shellID to the last valid shell.
     241  size_t numberOfShells = (size_t) transitionManager->NumberOfShells(Z);
     242  if (shellIndex >= numberOfShells)
     243    shellIndex = numberOfShells-1;
     244
    229245  const G4AtomicShell* shell = transitionManager->Shell(Z,shellIndex);
    230246  G4double bindingEnergy = shell->BindingEnergy();
  • trunk/source/processes/electromagnetic/lowenergy/src/G4eIonisationCrossSectionHandler.cc

    r991 r1005  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eIonisationCrossSectionHandler.cc,v 1.11 2006/06/29 19:42:00 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4eIonisationCrossSectionHandler.cc,v 1.12 2009/01/29 08:13:34 pandola Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    4242// 19 Jul 2002   VI          Create composite data set for material
    4343// 21 Jan 2003  V.Ivanchenko Cut per region
     44// 28 Jan 2009  L.Pandola    Added public method to make a easier migration of
     45//                           G4LowEnergyIonisation to G4LivermoreIonisationModel
    4446//
    4547// -------------------------------------------------------------------
     
    98100    G4int nElements = material->GetNumberOfElements();
    99101
    100     if(verbose > 0) {
    101       G4cout << "eIonisation CS for " << m << "th material "
    102              << material->GetName()
    103              << "  eEl= " << nElements << G4endl;
    104     }
     102    if(verbose > 0)
     103      {
     104        G4cout << "eIonisation CS for " << m << "th material "
     105               << material->GetName()
     106               << "  eEl= " << nElements << G4endl;
     107      }
    105108
    106109    G4double tcut  = (*energyCuts)[m];
     
    129132            value += cross * p * density;
    130133
    131             if(verbose>0 && m == 0 && e>=1. && e<=0.) {
     134            if(verbose>0 && m == 0 && e>=1. && e<=0.)
     135            {
    132136              G4cout << "G4eIonCrossSH: e(MeV)= " << e/MeV
    133137                     << " n= " << n
     
    139143                     << " Z= " << Z
    140144                     << G4endl;
    141             }
     145              }
    142146
    143147          }
     
    155159}
    156160
    157 
     161G4double G4eIonisationCrossSectionHandler::GetCrossSectionAboveThresholdForElement(G4double energy,
     162                                                                                   G4double cutEnergy,
     163                                                                                   G4int Z)
     164{
     165  G4int nShells = NumberOfComponents(Z);
     166  G4double value = 0.;
     167  if(energy > cutEnergy)
     168    {
     169      for (G4int n=0; n<nShells; n++) {
     170        G4double cross = FindValue(Z, energy, n);
     171        G4double p = theParam->Probability(Z, cutEnergy, energy, energy, n);
     172        value += cross * p;
     173      }
     174    }
     175  return value;
     176}
  • trunk/source/processes/electromagnetic/lowenergy/src/G4hLowEnergyLoss.cc

    r991 r1005  
    2525//
    2626//
    27 // $Id: G4hLowEnergyLoss.cc,v 1.27 2008/06/20 19:54:03 sincerti Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     27// $Id: G4hLowEnergyLoss.cc,v 1.28 2009/02/20 10:49:54 sincerti Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// -----------------------------------------------------------
     
    145145G4double G4hLowEnergyLoss::HighestKineticEnergy= 100.*GeV;
    146146G4int    G4hLowEnergyLoss::TotBin = 360;
    147 G4double G4hLowEnergyLoss::RTable,G4hLowEnergyLoss::LOGRTable;
     147G4double G4hLowEnergyLoss::RTable =1.1;
     148G4double G4hLowEnergyLoss::LOGRTable = 1.1;
    148149
    149150//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     
    772773    theRangeTable = theRangepbarTable ;
    773774  }
    774  
    775775  G4double R2 = RTable*RTable ;
    776776  G4double R1 = RTable+1.;
     
    10621062{
    10631063  G4double LowEdgeRange,A,B,C,discr,KineticEnergy ;
    1064   G4double Tbin = LowestKineticEnergy/RTable ;
     1064  G4double Tbin = 0;
     1065  if (RTable !=0.) Tbin = LowestKineticEnergy/RTable ;
    10651066  G4double rangebin = 0.0 ;
    10661067  G4int binnumber = -1 ;
Note: See TracChangeset for help on using the changeset viewer.