Geant4  10.01.p02
G4ConvergenceTester Class Reference

#include <G4ConvergenceTester.hh>

+ Collaboration diagram for G4ConvergenceTester:

Public Member Functions

 G4ConvergenceTester (G4String theName="NONAME")
 
 ~G4ConvergenceTester ()
 
 G4ConvergenceTester (G4double)
 
void AddScore (G4double)
 
void ShowHistory (std::ostream &out=G4cout)
 
void ShowResult (std::ostream &out=G4cout)
 
G4double GetValueOfMinimizingFunction (std::vector< G4double > x)
 
void ComputeStatistics ()
 
G4double GetMean ()
 
G4double GetStandardDeviation ()
 
G4double GetVariance ()
 
G4double GetR ()
 
G4double GetEfficiency ()
 
G4double GetR2eff ()
 
G4double GetR2int ()
 
G4double GetShift ()
 
G4double GetVOV ()
 
G4double GetFOM ()
 

Private Member Functions

void calStat ()
 
void CheckIsUpdated ()
 
void calc_grid_point_of_history ()
 
void calc_stat_history ()
 
void check_stat_history (std::ostream &out=G4cout)
 
G4double calc_Pearson_r (G4int, std::vector< G4double >, std::vector< G4double >)
 
G4bool is_monotonically_decrease (std::vector< G4double >)
 
void calc_slope_fit (std::vector< G4double >)
 
G4double slope_fitting_function (std::vector< G4double >)
 

Private Attributes

G4String name
 
std::map< G4int, G4doublenonzero_histories
 
G4int n
 
G4double sum
 
G4Timertimer
 
std::vector< G4doublecpu_time
 
G4double mean
 
G4double var
 
G4double sd
 
G4double r
 
G4double efficiency
 
G4double r2eff
 
G4double r2int
 
G4double shift
 
G4double vov
 
G4double fom
 
G4double largest
 
G4int largest_score_happened
 
G4double mean_1
 
G4double var_1
 
G4double sd_1
 
G4double r_1
 
G4double shift_1
 
G4double vov_1
 
G4double fom_1
 
G4int noBinOfHistory
 
std::vector< G4inthistory_grid
 
std::vector< G4doublemean_history
 
std::vector< G4doublevar_history
 
std::vector< G4doublesd_history
 
std::vector< G4doubler_history
 
std::vector< G4doublevov_history
 
std::vector< G4doublefom_history
 
std::vector< G4doubleshift_history
 
std::vector< G4doublee_history
 
std::vector< G4doubler2eff_history
 
std::vector< G4doubler2int_history
 
G4double slope
 
std::vector< G4doublelargest_scores
 
std::vector< G4doublef_xi
 
std::vector< G4doublef_yi
 
G4int noBinOfPDF
 
G4SimplexDownhill
< G4ConvergenceTester > * 
minimizer
 
G4int noPass
 
G4int noTotal
 
G4bool statsAreUpdated
 
G4bool showHistory
 
G4bool calcSLOPE
 

Detailed Description

Definition at line 58 of file G4ConvergenceTester.hh.

Constructor & Destructor Documentation

G4ConvergenceTester::G4ConvergenceTester ( G4String  theName = "NONAME")

Definition at line 46 of file G4ConvergenceTester.cc.

References cpu_time, e_history, fom_history, history_grid, largest_scores, mean_history, noBinOfHistory, nonzero_histories, r2eff_history, r2int_history, r_history, sd_history, shift_history, G4Timer::Start(), timer, var_history, and vov_history.

+ Here is the call graph for this function:

G4ConvergenceTester::~G4ConvergenceTester ( )

Definition at line 78 of file G4ConvergenceTester.cc.

References timer.

G4ConvergenceTester::G4ConvergenceTester ( G4double  )

Member Function Documentation

void G4ConvergenceTester::AddScore ( G4double  x)

Definition at line 85 of file G4ConvergenceTester.cc.

References cpu_time, G4cout, G4endl, G4Timer::GetSystemElapsed(), G4Timer::GetUserElapsed(), largest_scores, n, nonzero_histories, statsAreUpdated, G4Timer::Stop(), sum, and timer.

Referenced by B1ConRunAction::EndOfRunAction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4ConvergenceTester::calc_grid_point_of_history ( )
private

Definition at line 263 of file G4ConvergenceTester.cc.

References history_grid, n, and noBinOfHistory.

Referenced by calStat().

+ Here is the caller graph for this function:

G4double G4ConvergenceTester::calc_Pearson_r ( G4int  N,
std::vector< G4double first_ally,
std::vector< G4double second_ally 
)
private

Definition at line 623 of file G4ConvergenceTester.cc.

References a, b1, and b2.

Referenced by check_stat_history().

+ Here is the caller graph for this function:

void G4ConvergenceTester::calc_slope_fit ( std::vector< G4double )
private

Definition at line 674 of file G4ConvergenceTester.cc.

References f_xi, f_yi, G4SimplexDownhill< T >::GetMinimumPoint(), largest_scores, G4INCL::Math::max(), G4INCL::Math::min(), minimizer, n, noBinOfPDF, and slope.

Referenced by calStat().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4ConvergenceTester::calc_stat_history ( )
private

Definition at line 282 of file G4ConvergenceTester.cc.

References cpu_time, e_history, fom_history, history_grid, mean_history, noBinOfHistory, nonzero_histories, r2eff_history, r2int_history, r_history, sd_history, shift_history, showHistory, var_history, and vov_history.

Referenced by calStat().

+ Here is the caller graph for this function:

void G4ConvergenceTester::calStat ( )
private

Definition at line 133 of file G4ConvergenceTester.cc.

References calc_grid_point_of_history(), calc_slope_fit(), calc_stat_history(), calcSLOPE, cpu_time, efficiency, fom, fom_1, largest, largest_score_happened, largest_scores, mean, mean_1, n, nonzero_histories, r, r2eff, r2int, r_1, sd, sd_1, shift, shift_1, statsAreUpdated, sum, var, var_1, vov, and vov_1.

Referenced by CheckIsUpdated(), ComputeStatistics(), and ShowResult().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4ConvergenceTester::check_stat_history ( std::ostream &  out = G4cout)
private

Definition at line 480 of file G4ConvergenceTester.cc.

References calc_Pearson_r(), fom_history, G4endl, history_grid, is_monotonically_decrease(), mean_history, noPass, r_history, var_history, and vov_history.

Referenced by ShowResult().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4ConvergenceTester::CheckIsUpdated ( )
inlineprivate

Definition at line 84 of file G4ConvergenceTester.hh.

References calStat(), and statsAreUpdated.

Referenced by GetEfficiency(), GetFOM(), GetMean(), GetR(), GetR2eff(), GetR2int(), GetShift(), GetStandardDeviation(), GetVariance(), and GetVOV().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4ConvergenceTester::ComputeStatistics ( )
inline

Definition at line 88 of file G4ConvergenceTester.hh.

References calStat().

+ Here is the call graph for this function:

G4double G4ConvergenceTester::GetEfficiency ( )
inline

Definition at line 95 of file G4ConvergenceTester.hh.

References CheckIsUpdated(), and efficiency.

+ Here is the call graph for this function:

G4double G4ConvergenceTester::GetFOM ( )
inline

Definition at line 100 of file G4ConvergenceTester.hh.

References CheckIsUpdated(), and fom.

+ Here is the call graph for this function:

G4double G4ConvergenceTester::GetMean ( )
inline

Definition at line 91 of file G4ConvergenceTester.hh.

References CheckIsUpdated(), and mean.

+ Here is the call graph for this function:

G4double G4ConvergenceTester::GetR ( )
inline

Definition at line 94 of file G4ConvergenceTester.hh.

References CheckIsUpdated(), and r.

+ Here is the call graph for this function:

G4double G4ConvergenceTester::GetR2eff ( )
inline

Definition at line 96 of file G4ConvergenceTester.hh.

References CheckIsUpdated(), and r2eff.

+ Here is the call graph for this function:

G4double G4ConvergenceTester::GetR2int ( )
inline

Definition at line 97 of file G4ConvergenceTester.hh.

References CheckIsUpdated(), and r2int.

+ Here is the call graph for this function:

G4double G4ConvergenceTester::GetShift ( )
inline

Definition at line 98 of file G4ConvergenceTester.hh.

References CheckIsUpdated(), and shift.

+ Here is the call graph for this function:

G4double G4ConvergenceTester::GetStandardDeviation ( )
inline

Definition at line 92 of file G4ConvergenceTester.hh.

References CheckIsUpdated(), and sd.

+ Here is the call graph for this function:

G4double G4ConvergenceTester::GetValueOfMinimizingFunction ( std::vector< G4double x)
inline

Definition at line 74 of file G4ConvergenceTester.hh.

References slope_fitting_function().

+ Here is the call graph for this function:

G4double G4ConvergenceTester::GetVariance ( )
inline

Definition at line 93 of file G4ConvergenceTester.hh.

References CheckIsUpdated(), and var.

+ Here is the call graph for this function:

G4double G4ConvergenceTester::GetVOV ( )
inline

Definition at line 99 of file G4ConvergenceTester.hh.

References CheckIsUpdated(), and vov.

+ Here is the call graph for this function:

G4bool G4ConvergenceTester::is_monotonically_decrease ( std::vector< G4double ally)
private

Definition at line 658 of file G4ConvergenceTester.cc.

References FALSE, noPass, and TRUE.

Referenced by check_stat_history().

+ Here is the caller graph for this function:

void G4ConvergenceTester::ShowHistory ( std::ostream &  out = G4cout)

Definition at line 439 of file G4ConvergenceTester.cc.

References e_history, fom_history, G4endl, history_grid, mean_history, name, noBinOfHistory, r2eff_history, r2int_history, r_history, sd_history, shift_history, showHistory, var_history, and vov_history.

Referenced by B1ConRunAction::EndOfRunAction().

+ Here is the caller graph for this function:

void G4ConvergenceTester::ShowResult ( std::ostream &  out = G4cout)

Definition at line 366 of file G4ConvergenceTester.cc.

References calcSLOPE, calStat(), check_stat_history(), efficiency, fom, fom_1, G4endl, largest, largest_score_happened, mean, mean_1, name, noPass, noTotal, r, r_1, sd, shift, shift_1, showHistory, slope, statsAreUpdated, var, var_1, and vov.

Referenced by B1ConRunAction::EndOfRunAction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4double G4ConvergenceTester::slope_fitting_function ( std::vector< G4double x)
private

Definition at line 764 of file G4ConvergenceTester.cc.

References a, f_xi, and f_yi.

Referenced by GetValueOfMinimizingFunction().

+ Here is the caller graph for this function:

Member Data Documentation

G4bool G4ConvergenceTester::calcSLOPE
private

Definition at line 172 of file G4ConvergenceTester.hh.

Referenced by calStat(), and ShowResult().

std::vector<G4double> G4ConvergenceTester::cpu_time
private

Definition at line 122 of file G4ConvergenceTester.hh.

Referenced by AddScore(), calc_stat_history(), calStat(), and G4ConvergenceTester().

std::vector< G4double > G4ConvergenceTester::e_history
private

Definition at line 155 of file G4ConvergenceTester.hh.

Referenced by calc_stat_history(), G4ConvergenceTester(), and ShowHistory().

G4double G4ConvergenceTester::efficiency
private

Definition at line 128 of file G4ConvergenceTester.hh.

Referenced by calStat(), GetEfficiency(), and ShowResult().

std::vector< G4double > G4ConvergenceTester::f_xi
private

Definition at line 161 of file G4ConvergenceTester.hh.

Referenced by calc_slope_fit(), and slope_fitting_function().

std::vector< G4double > G4ConvergenceTester::f_yi
private

Definition at line 162 of file G4ConvergenceTester.hh.

Referenced by calc_slope_fit(), and slope_fitting_function().

G4double G4ConvergenceTester::fom
private

Definition at line 133 of file G4ConvergenceTester.hh.

Referenced by calStat(), GetFOM(), and ShowResult().

G4double G4ConvergenceTester::fom_1
private

Definition at line 144 of file G4ConvergenceTester.hh.

Referenced by calStat(), and ShowResult().

std::vector< G4double > G4ConvergenceTester::fom_history
private
std::vector< G4int > G4ConvergenceTester::history_grid
private
G4double G4ConvergenceTester::largest
private

Definition at line 135 of file G4ConvergenceTester.hh.

Referenced by calStat(), and ShowResult().

G4int G4ConvergenceTester::largest_score_happened
private

Definition at line 136 of file G4ConvergenceTester.hh.

Referenced by calStat(), and ShowResult().

std::vector< G4double > G4ConvergenceTester::largest_scores
private

Definition at line 160 of file G4ConvergenceTester.hh.

Referenced by AddScore(), calc_slope_fit(), calStat(), and G4ConvergenceTester().

G4double G4ConvergenceTester::mean
private

Definition at line 124 of file G4ConvergenceTester.hh.

Referenced by calStat(), GetMean(), and ShowResult().

G4double G4ConvergenceTester::mean_1
private

Definition at line 138 of file G4ConvergenceTester.hh.

Referenced by calStat(), and ShowResult().

std::vector< G4double > G4ConvergenceTester::mean_history
private
G4SimplexDownhill<G4ConvergenceTester>* G4ConvergenceTester::minimizer
private

Definition at line 164 of file G4ConvergenceTester.hh.

Referenced by calc_slope_fit().

G4int G4ConvergenceTester::n
private
G4String G4ConvergenceTester::name
private

Definition at line 114 of file G4ConvergenceTester.hh.

Referenced by ShowHistory(), and ShowResult().

G4int G4ConvergenceTester::noBinOfHistory
private
G4int G4ConvergenceTester::noBinOfPDF
private

Definition at line 163 of file G4ConvergenceTester.hh.

Referenced by calc_slope_fit().

std::map< G4int , G4double > G4ConvergenceTester::nonzero_histories
private

Definition at line 115 of file G4ConvergenceTester.hh.

Referenced by AddScore(), calc_stat_history(), calStat(), and G4ConvergenceTester().

G4int G4ConvergenceTester::noPass
private
G4int G4ConvergenceTester::noTotal
private

Definition at line 167 of file G4ConvergenceTester.hh.

Referenced by ShowResult().

G4double G4ConvergenceTester::r
private

Definition at line 127 of file G4ConvergenceTester.hh.

Referenced by calStat(), GetR(), and ShowResult().

G4double G4ConvergenceTester::r2eff
private

Definition at line 129 of file G4ConvergenceTester.hh.

Referenced by calStat(), and GetR2eff().

std::vector< G4double > G4ConvergenceTester::r2eff_history
private

Definition at line 156 of file G4ConvergenceTester.hh.

Referenced by calc_stat_history(), G4ConvergenceTester(), and ShowHistory().

G4double G4ConvergenceTester::r2int
private

Definition at line 130 of file G4ConvergenceTester.hh.

Referenced by calStat(), and GetR2int().

std::vector< G4double > G4ConvergenceTester::r2int_history
private

Definition at line 157 of file G4ConvergenceTester.hh.

Referenced by calc_stat_history(), G4ConvergenceTester(), and ShowHistory().

G4double G4ConvergenceTester::r_1
private

Definition at line 141 of file G4ConvergenceTester.hh.

Referenced by calStat(), and ShowResult().

std::vector< G4double > G4ConvergenceTester::r_history
private
G4double G4ConvergenceTester::sd
private

Definition at line 126 of file G4ConvergenceTester.hh.

Referenced by calStat(), GetStandardDeviation(), and ShowResult().

G4double G4ConvergenceTester::sd_1
private

Definition at line 140 of file G4ConvergenceTester.hh.

Referenced by calStat().

std::vector< G4double > G4ConvergenceTester::sd_history
private

Definition at line 150 of file G4ConvergenceTester.hh.

Referenced by calc_stat_history(), G4ConvergenceTester(), and ShowHistory().

G4double G4ConvergenceTester::shift
private

Definition at line 131 of file G4ConvergenceTester.hh.

Referenced by calStat(), GetShift(), and ShowResult().

G4double G4ConvergenceTester::shift_1
private

Definition at line 142 of file G4ConvergenceTester.hh.

Referenced by calStat(), and ShowResult().

std::vector< G4double > G4ConvergenceTester::shift_history
private

Definition at line 154 of file G4ConvergenceTester.hh.

Referenced by calc_stat_history(), G4ConvergenceTester(), and ShowHistory().

G4bool G4ConvergenceTester::showHistory
private

Definition at line 171 of file G4ConvergenceTester.hh.

Referenced by calc_stat_history(), ShowHistory(), and ShowResult().

G4double G4ConvergenceTester::slope
private

Definition at line 159 of file G4ConvergenceTester.hh.

Referenced by calc_slope_fit(), and ShowResult().

G4bool G4ConvergenceTester::statsAreUpdated
private

Definition at line 169 of file G4ConvergenceTester.hh.

Referenced by AddScore(), calStat(), CheckIsUpdated(), and ShowResult().

G4double G4ConvergenceTester::sum
private

Definition at line 119 of file G4ConvergenceTester.hh.

Referenced by AddScore(), and calStat().

G4Timer* G4ConvergenceTester::timer
private

Definition at line 121 of file G4ConvergenceTester.hh.

Referenced by AddScore(), G4ConvergenceTester(), and ~G4ConvergenceTester().

G4double G4ConvergenceTester::var
private

Definition at line 125 of file G4ConvergenceTester.hh.

Referenced by calStat(), GetVariance(), and ShowResult().

G4double G4ConvergenceTester::var_1
private

Definition at line 139 of file G4ConvergenceTester.hh.

Referenced by calStat(), and ShowResult().

std::vector< G4double > G4ConvergenceTester::var_history
private
G4double G4ConvergenceTester::vov
private

Definition at line 132 of file G4ConvergenceTester.hh.

Referenced by calStat(), GetVOV(), and ShowResult().

G4double G4ConvergenceTester::vov_1
private

Definition at line 143 of file G4ConvergenceTester.hh.

Referenced by calStat().

std::vector< G4double > G4ConvergenceTester::vov_history
private

The documentation for this class was generated from the following files: