Files
geant4/source/geometry/magneticfield/include/G4ChordFinder.icc
T
2016-06-09 15:37:50 +02:00

125 lines
4.2 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: G4ChordFinder.icc,v 1.12 2006/06/29 18:21:32 gunter Exp $
// GEANT4 tag $Name: geant4-09-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++;
}
// }
}