Import Geant4 9.2.0 source tree
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PhysicsLnVector.cc,v 1.15 2006/06/29 19:04:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4PhysicsLnVector.cc,v 1.17 2008/09/22 14:49:57 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -33,23 +33,20 @@
|
||||
//
|
||||
// G4PhysicsLnVector.cc
|
||||
//
|
||||
// History:
|
||||
// 27 Apr. 1999, M.G. Pia: Created, copying from G4PhysicsLogVector
|
||||
// 11 Nov. 2000, H.Kurashige : use STL vector for dataVector and binVector
|
||||
// 9 Mar. 2001, H.Kurashige : add PhysicsVector type and Retrieve
|
||||
// 27 Apr 1999 - M.G.Pia: Created from G4PhysicsLogVector
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
#include "G4PhysicsLnVector.hh"
|
||||
|
||||
G4PhysicsLnVector::G4PhysicsLnVector()
|
||||
: dBin(0.), baseBin(0.)
|
||||
: G4PhysicsVector(), dBin(0.), baseBin(0.)
|
||||
{
|
||||
type = T_G4PhysicsLnVector;
|
||||
}
|
||||
|
||||
G4PhysicsLnVector::G4PhysicsLnVector(size_t theNbin)
|
||||
: dBin(0.), baseBin(0.)
|
||||
: G4PhysicsVector(), dBin(0.), baseBin(0.)
|
||||
{
|
||||
type = T_G4PhysicsLnVector;
|
||||
|
||||
@@ -60,13 +57,6 @@ G4PhysicsLnVector::G4PhysicsLnVector(size_t theNbin)
|
||||
|
||||
numberOfBin = theNbin;
|
||||
|
||||
edgeMin = 0.;
|
||||
edgeMax = 0.;
|
||||
|
||||
lastBin = INT_MAX;
|
||||
lastEnergy = -DBL_MAX;
|
||||
lastValue = DBL_MAX;
|
||||
|
||||
for (size_t i=0; i<=numberOfBin; i++)
|
||||
{
|
||||
binVector.push_back(0.0);
|
||||
@@ -76,7 +66,8 @@ G4PhysicsLnVector::G4PhysicsLnVector(size_t theNbin)
|
||||
|
||||
G4PhysicsLnVector::G4PhysicsLnVector(G4double theEmin,
|
||||
G4double theEmax, size_t theNbin)
|
||||
: dBin(std::log(theEmax/theEmin)/theNbin),
|
||||
: G4PhysicsVector(),
|
||||
dBin(std::log(theEmax/theEmin)/theNbin),
|
||||
baseBin(std::log(theEmin)/dBin)
|
||||
{
|
||||
type = T_G4PhysicsLnVector;
|
||||
@@ -96,10 +87,6 @@ G4PhysicsLnVector::G4PhysicsLnVector(G4double theEmin,
|
||||
|
||||
edgeMin = binVector[0];
|
||||
edgeMax = binVector[numberOfBin-1];
|
||||
|
||||
lastBin = INT_MAX;
|
||||
lastEnergy = -DBL_MAX;
|
||||
lastValue = DBL_MAX;
|
||||
}
|
||||
|
||||
G4PhysicsLnVector::~G4PhysicsLnVector(){}
|
||||
@@ -115,3 +102,25 @@ G4bool G4PhysicsLnVector::Retrieve(std::ifstream& fIn, G4bool ascii)
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
G4PhysicsLnVector::G4PhysicsLnVector(const G4PhysicsLnVector& right)
|
||||
: G4PhysicsVector(right)
|
||||
{
|
||||
dBin = right.dBin;
|
||||
baseBin = right.baseBin;
|
||||
}
|
||||
|
||||
G4PhysicsLnVector&
|
||||
G4PhysicsLnVector::operator=(const G4PhysicsLnVector& right)
|
||||
{
|
||||
// Check assignment to self
|
||||
//
|
||||
if(this == &right) { return *this; }
|
||||
|
||||
DeleteData();
|
||||
CopyData(right);
|
||||
|
||||
dBin = right.dBin;
|
||||
baseBin = right.baseBin;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user