00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 inline
00034 void G4ChordFinder::SetIntegrationDriver(G4MagInt_Driver* IntegrationDriver)
00035 {
00036 fIntgrDriver=IntegrationDriver;
00037 }
00038
00039 inline
00040 G4MagInt_Driver* G4ChordFinder::GetIntegrationDriver()
00041 {
00042 return fIntgrDriver;
00043 }
00044
00045 inline
00046 G4bool G4ChordFinder::AcceptableMissDist(G4double dChordStep) const
00047 {
00048 return (dChordStep <= fDeltaChord) ;
00049 }
00050
00051 inline
00052 void G4ChordFinder::SetChargeMomentumMass(G4double pCharge,
00053 G4double pMomentum,
00054 G4double pMass)
00055 {
00056 fIntgrDriver-> SetChargeMomentumMass(pCharge, pMomentum, pMass);
00057 }
00058
00059 inline
00060 G4double G4ChordFinder::GetDeltaChord() const
00061 {
00062 return fDeltaChord;
00063 }
00064
00065 inline
00066 void G4ChordFinder::SetDeltaChord(G4double newval)
00067 {
00068 fDeltaChord=newval;
00069 }
00070
00071
00072 inline
00073 G4double G4ChordFinder::GetLastStepEstimateUnc()
00074 {
00075 return fLastStepEstimate_Unconstrained;
00076 }
00077 inline
00078 void G4ChordFinder::SetLastStepEstimateUnc( G4double stepEst )
00079 {
00080 fLastStepEstimate_Unconstrained = stepEst;
00081 }
00082 inline
00083 void G4ChordFinder::ResetStepEstimate()
00084 {
00085 fLastStepEstimate_Unconstrained = DBL_MAX;
00086 }
00087
00088
00089 inline G4int G4ChordFinder::GetNoCalls() { return fNoCalls_FNC; }
00090 inline G4int G4ChordFinder::GetNoTrials() { return fTotalNoTrials_FNC; }
00091 inline G4int G4ChordFinder::GetNoMaxTrials() { return fmaxTrials_FNC; }
00092
00093 inline G4double G4ChordFinder::GetFirstFraction() { return fFirstFraction; }
00094 inline G4double G4ChordFinder::GetFractionLast() { return fFractionLast; }
00095 inline G4double G4ChordFinder::GetFractionNextEstimate()
00096 { return fFractionNextEstimate; }
00097 inline G4double G4ChordFinder::GetMultipleRadius()
00098 { return fMultipleRadius; }
00099
00100 inline void G4ChordFinder::SetFirstFraction(G4double val){ fFirstFraction=val; }
00101
00102 inline G4int G4ChordFinder::SetVerbose( G4int newvalue )
00103 {
00104 G4int oldval= fStatsVerbose;
00105 fStatsVerbose = newvalue;
00106 return oldval;
00107 }
00108
00109 inline
00110 void G4ChordFinder::AccumulateStatistics( G4int noTrials )
00111 {
00112
00113 fTotalNoTrials_FNC += noTrials;
00114 fNoCalls_FNC++;
00115
00116 if (noTrials > fmaxTrials_FNC ) {
00117 fmaxTrials_FNC=noTrials;
00118
00119 } else {
00120
00121 }
00122
00123 }
00124
00125
00126
00127
00128 inline G4double G4ChordFinder::InvParabolic ( const G4double xa, const G4double ya,
00129 const G4double xb, const G4double yb,
00130 const G4double xc, const G4double yc )
00131 { const G4double R = yb/yc,
00132 S = yb/ya,
00133 T = ya/yc;
00134 const G4double Q = (T-1)*(R-1)*(S-1);
00135 if (std::fabs(Q) <DBL_MIN ) return DBL_MAX;
00136
00137 const G4double P = S*(T*(R-T)*(xc-xb) - (1-R)*(xb-xa));
00138 return xb + P/Q;
00139 }