Files
geant4/source/geometry/magneticfield/include/G4ChordFinder.icc
T
2016-06-09 10:49:58 +02:00

122 lines
4.0 KiB
Plaintext

//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ChordFinder.icc,v 1.11 2003/11/13 18:04:48 japost Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
// G4ChordFinder inline implementations
//
// --------------------------------------------------------------------
inline
void G4ChordFinder::SetIntegrationDriver(G4MagInt_Driver* IntegrationDriver)
{
fIntgrDriver=IntegrationDriver;
}
inline
G4MagInt_Driver* G4ChordFinder::GetIntegrationDriver()
{
return fIntgrDriver;
}
inline
G4bool G4ChordFinder::AcceptableMissDist(G4double dChordStep) const
{
return (dChordStep <= fDeltaChord) ;
}
inline
void G4ChordFinder::SetChargeMomentumMass(G4double pCharge, // in e+ units
G4double pMomentum,
G4double pMass)
{
fIntgrDriver-> SetChargeMomentumMass(pCharge, pMomentum, pMass);
}
inline
G4double G4ChordFinder::GetDeltaChord() const
{
return fDeltaChord;
}
inline
void G4ChordFinder::SetDeltaChord(G4double newval)
{
fDeltaChord=newval;
}
// ......................................................................
inline
G4double G4ChordFinder::GetLastStepEstimateUnc()
{
return fLastStepEstimate_Unconstrained;
}
inline
void G4ChordFinder::SetLastStepEstimateUnc( G4double stepEst )
{
fLastStepEstimate_Unconstrained = stepEst;
}
inline
void G4ChordFinder::ResetStepEstimate()
{
fLastStepEstimate_Unconstrained = DBL_MAX;
}
// ......................................................................
inline G4int G4ChordFinder::GetNoCalls() { return fNoCalls_FNC; }
inline G4int G4ChordFinder::GetNoTrials() { return fTotalNoTrials_FNC; }
inline G4int G4ChordFinder::GetNoMaxTrials() { return fmaxTrials_FNC; }
inline G4double G4ChordFinder::GetFirstFraction() { return fFirstFraction; }
inline G4double G4ChordFinder::GetFractionLast() { return fFractionLast; }
inline G4double G4ChordFinder::GetFractionNextEstimate()
{ return fFractionNextEstimate; }
inline G4double G4ChordFinder::GetMultipleRadius()
{ return fMultipleRadius; }
inline void G4ChordFinder::SetFirstFraction(G4double val){ fFirstFraction=val; }
inline G4int G4ChordFinder::SetVerbose( G4int newvalue )
{
G4int oldval= fStatsVerbose;
fStatsVerbose = newvalue;
return oldval;
}
inline
void G4ChordFinder::AccumulateStatistics( G4int noTrials )
{
// Statistics
fTotalNoTrials_FNC += noTrials;
fNoCalls_FNC++;
// if( noTrials >= fmaxTrials_FNC ){
if (noTrials > fmaxTrials_FNC ) {
fmaxTrials_FNC=noTrials;
// fnoTimesMaxTrFNC=0;
} else {
// fnoTimesMaxTrFNC++;
}
// }
}