141 lines
3.8 KiB
Plaintext
141 lines
3.8 KiB
Plaintext
//
|
|
// ********************************************************************
|
|
// * License and Disclaimer *
|
|
// * *
|
|
// * The Geant4 software is copyright of the Copyright Holders of *
|
|
// * the Geant4 Collaboration. It is provided under the terms and *
|
|
// * conditions of the Geant4 Software License, included in the file *
|
|
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
|
// * include a list of copyright holders. *
|
|
// * *
|
|
// * Neither the authors of this software system, nor their employing *
|
|
// * institutes,nor the agencies providing financial support for this *
|
|
// * work make any representation or warranty, express or implied, *
|
|
// * regarding this software system or assume any liability for its *
|
|
// * use. Please see the license in the file LICENSE and URL above *
|
|
// * for the full disclaimer and the limitation of liability. *
|
|
// * *
|
|
// * This code implementation is the result of the scientific and *
|
|
// * technical work of the GEANT4 collaboration. *
|
|
// * By using, copying, modifying or distributing the software (or *
|
|
// * any work based on the software) you agree to acknowledge its *
|
|
// * use in resulting scientific publications, and indicate your *
|
|
// * acceptance of all terms of the Geant4 Software license. *
|
|
// ********************************************************************
|
|
//
|
|
//
|
|
// $Id:$
|
|
// GEANT4 tag $Name: not supported by cvs2svn $
|
|
//
|
|
//
|
|
//---------------------------------------------------------------
|
|
// GEANT 4 class inline source file
|
|
//
|
|
// G4Physics2DVector.icc
|
|
|
|
//---------------------------------------------------------------
|
|
|
|
inline G4double G4Physics2DVector::Value(G4double x, G4double y)
|
|
{
|
|
if(x != cache->lastX || y != cache->lastY) { ComputeValue(x, y); }
|
|
return cache->lastValue;
|
|
}
|
|
|
|
inline void G4Physics2DVector::PutX(size_t idx, G4double val)
|
|
{
|
|
xVector[idx] = val;
|
|
}
|
|
|
|
inline void G4Physics2DVector::PutY(size_t idy, G4double val)
|
|
{
|
|
yVector[idy] = val;
|
|
}
|
|
|
|
inline void
|
|
G4Physics2DVector::PutValue(size_t idx, size_t idy, G4double val)
|
|
{
|
|
(*(value[idy]))[idx] = val;
|
|
}
|
|
|
|
inline G4double G4Physics2DVector::GetX(size_t index) const
|
|
{
|
|
return xVector[index];
|
|
}
|
|
|
|
inline G4double G4Physics2DVector::GetY(size_t index) const
|
|
{
|
|
return yVector[index];
|
|
}
|
|
|
|
inline
|
|
G4double G4Physics2DVector::GetValue(size_t idx, size_t idy) const
|
|
{
|
|
return (*(value[idy]))[idx];
|
|
}
|
|
|
|
inline size_t G4Physics2DVector::GetLengthX() const
|
|
{
|
|
return numberOfXNodes;
|
|
}
|
|
|
|
inline size_t G4Physics2DVector::GetLengthY() const
|
|
{
|
|
return numberOfYNodes;
|
|
}
|
|
|
|
inline G4PhysicsVectorType G4Physics2DVector::GetType() const
|
|
{
|
|
return type;
|
|
}
|
|
|
|
inline G4double G4Physics2DVector::GetLastX() const
|
|
{
|
|
return cache->lastX;
|
|
}
|
|
|
|
inline G4double G4Physics2DVector::GetLastY() const
|
|
{
|
|
return cache->lastY;
|
|
}
|
|
|
|
inline G4double G4Physics2DVector::GetLastValue() const
|
|
{
|
|
return cache->lastValue;
|
|
}
|
|
|
|
inline size_t G4Physics2DVector::GetLastBinX() const
|
|
{
|
|
return cache->lastBinX;
|
|
}
|
|
|
|
inline size_t G4Physics2DVector::GetLastBinY() const
|
|
{
|
|
return cache->lastBinY;
|
|
}
|
|
|
|
inline void
|
|
G4Physics2DVector::FindBin(G4double z, const G4PV2DDataVector& v, size_t& idz)
|
|
{
|
|
if(z < v[idz] || z >= v[idz]) { idz = FindBinLocation(z, v); }
|
|
}
|
|
|
|
inline void G4Physics2DVector::FindBinLocationX(G4double x)
|
|
{
|
|
FindBin(x, xVector, cache->lastBinX);
|
|
}
|
|
|
|
inline void G4Physics2DVector::FindBinLocationY(G4double y)
|
|
{
|
|
FindBin(y, yVector, cache->lastBinY);
|
|
}
|
|
|
|
inline void G4Physics2DVector::SetVerboseLevel(G4int value)
|
|
{
|
|
verboseLevel = value;
|
|
}
|
|
|
|
inline G4int G4Physics2DVector::GetVerboseLevel(G4int)
|
|
{
|
|
return verboseLevel;
|
|
}
|