- Timestamp:
- Feb 16, 2009, 10:14:30 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/global/management/include/G4PhysicsVector.icc
r850 r921 25 25 // 26 26 // 27 // $Id: G4PhysicsVector.icc,v 1.1 4 2008/09/05 18:04:45 vnivanchExp $28 // GEANT4 tag $Name: HEAD$27 // $Id: G4PhysicsVector.icc,v 1.17 2008/09/22 08:26:33 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-cand-01 $ 29 29 // 30 30 // … … 41 41 // energy scale, for example like 'log', 'linear', 'free', etc. 42 42 // 43 // Modified:44 // 05 Sep. 2008, V.Ivanchenko : added protections for zero-length vector45 43 //--------------------------------------------------------------- 46 44 … … 127 125 if( theEnergy == lastEnergy ) { 128 126 129 } else if( theEnergy <= edgeMin ) {130 lastBin = 0;131 lastEnergy = theEnergy;132 lastValue = dataVector[0];133 134 127 } else if(theEnergy < lastEnergy && theEnergy >= binVector[lastBin]) { 135 128 lastEnergy = theEnergy; 136 129 Interpolation(); 130 131 } else if( theEnergy <= edgeMin ) { 132 lastBin = 0; 133 lastEnergy = edgeMin; 134 lastValue = dataVector[0]; 137 135 138 136 } else if(theEnergy < lastEnergy && theEnergy >= binVector[lastBin-1]) { … … 168 166 void G4PhysicsVector::PutValue(size_t binNumber, G4double theValue) 169 167 { 170 if(binNumber < numberOfBin) { 171 dataVector[binNumber] = theValue; 172 173 // Fill the bin which is hidden to user with theValue. This is to 174 // handle correctly when Energy=theEmax in getValue. 175 176 if(binNumber==numberOfBin-1) { dataVector[binNumber+1] = theValue; } 177 } 168 dataVector[binNumber] = theValue; 169 170 // Fill the bin which is hidden to user with theValue. This is to 171 // handle correctly when Energy=theEmax in getValue. 172 173 if(binNumber==numberOfBin-1) { dataVector[binNumber+1] = theValue; } 178 174 } 179 175
Note: See TracChangeset
for help on using the changeset viewer.