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

fichier oublies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.