#include <FitStateConverged.h>
Inheritance diagram for FitStateConverged:

Public Member Functions | |
| void | Iterate (FitContext &context) const |
| const std::string & | Name () const |
Definition at line 17 of file FitStateConverged.h.
|
|
Iterate Implements FitState. Definition at line 53 of file FitStateConverged.cxx. References FitContext::fConvergenceMaster, FitContext::fData, FitContext::fDChi2, FitContext::fLastGoodFit, FitContext::fMatCalc, FitContext::fNIterationsStep, FitContext::fNTriesDiverges, FitContext::fTimesConverged, MatrixCalculator::GetFitResult(), ConvergenceMaster::GetMaskUCur(), ConvergenceMaster::GetMaskVCur(), ConvergenceMaster::MaskIsValid(), MSG, ConvergenceMaster::NextStep(), ConvergenceMaster::SetMaskIsValid(), FitContext::SetState(), DataFT::SetUHitUse(), and DataFT::SetVHitUse(). 00054 {
00055 // reset number of iterations
00056 context.fNIterationsStep = 0;
00057 // reset number of diverging iterations
00058 context.fNTriesDiverges = 0;
00059
00060 // save fit parameters as last good fit
00061 FitResult result = context.fMatCalc.GetFitResult();
00062 context.fLastGoodFit = result;
00063 ++context.fTimesConverged;
00064
00065 if ( context.fConvergenceMaster.NextStep() ) {
00066 if ( ! context.fConvergenceMaster.MaskIsValid() ) {
00067 // apply the next mask
00068 context.fData.SetUHitUse( context.fConvergenceMaster.GetMaskUCur() );
00069 context.fData.SetVHitUse( context.fConvergenceMaster.GetMaskVCur() );
00070 context.fConvergenceMaster.SetMaskIsValid(kTRUE);
00071 MSG("FitTrackSA",Msg::kInfo) << "Updated U, V Masks.\n";
00072 }
00073 context.fDChi2 = ConstFT::InitialDChi2;
00074 context.SetState(FitStateFactory::Instance().GetFitState("Iterating"));
00075 //context.Print();
00076 MSG("FitTrackSA",Msg::kInfo) << "Switched from Converged to Iterating\n";
00077 } else {
00078 context.SetState(FitStateFactory::Instance().GetFitState("Final"));
00079 //context.Print();
00080 MSG("FitTrackSA",Msg::kInfo) << "Switched from Converged to Final\n";
00081 return;
00082 }
00083 }
|
|
|
Name() - return name of the state Implements FitState. Definition at line 44 of file FitStateConverged.cxx. 00045 {
00046 return CONVERGED_FIT_STATE;
00047 }
|
1.3.9.1