Import Geant4 7.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 12:11:21 +02:00
parent 516dbf1a58
commit d93e1e39a9
5384 changed files with 125662 additions and 82444 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PhysicsFreeVector.hh,v 1.8 2001/07/11 10:00:50 gunter Exp $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
// $Id: G4PhysicsFreeVector.hh,v 1.9 2005/03/15 19:11:35 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
//
//
//--------------------------------------------------------------------
@@ -62,7 +62,7 @@ class G4PhysicsFreeVector : public G4PhysicsVector
public: // with description
G4PhysicsFreeVector();
G4PhysicsFreeVector(size_t theNbin);
explicit G4PhysicsFreeVector(size_t theNbin);
G4PhysicsFreeVector(const G4DataVector& binVector,
const G4DataVector& dataVector);
// Constructors:
@@ -106,12 +106,13 @@ size_t G4PhysicsFreeVector::FindBinLocation(G4double theEnergy) const
size_t lowerBound = 0;
size_t upperBound = numberOfBin-1;
while (lowerBound <= upperBound) {
while (lowerBound <= upperBound)
{
size_t midBin = (lowerBound + upperBound)/2;
if( theEnergy < binVector[midBin] )
upperBound = midBin-1;
{ upperBound = midBin-1; }
else
lowerBound = midBin+1;
{ lowerBound = midBin+1; }
}
return upperBound;