FitStateInitial Class Reference

#include <FitStateInitial.h>

Inheritance diagram for FitStateInitial:

FitState List of all members.

Public Member Functions

void Iterate (FitContext &context) const
const std::string & Name () const

Detailed Description

Author:
Sergei avva@fnal.gov

Definition at line 14 of file FitStateInitial.h.


Member Function Documentation

void FitStateInitial::Iterate ( FitContext context  )  const [virtual]

Iterate

Implements FitState.

Definition at line 48 of file FitStateInitial.cxx.

References TrackEstimator::EstimateTrackParams(), FitContext::fConvergenceMaster, FitContext::fCurrentFit, FitContext::fData, FitContext::fEstimator, FitContext::fMatCalc, FitContext::fNPlanesFit, FitContext::fSwimmer, FitStateFactory::GetFitState(), ConvergenceMaster::GetMaskUCur(), ConvergenceMaster::GetMaskVCur(), ConvergenceMaster::GetNPlanesCur(), ConvergenceMaster::GetNPlanesMin(), MatrixCalculator::GetTrackOut(), FitStateFactory::Instance(), Msg::kInfo, MSG, FitContext::Print(), DataFT::SetInitial(), FitContext::SetLastGoodFitParams(), FitContext::SetState(), DataFT::SetUHitUse(), DataFT::SetVHitUse(), and MatrixCalculator::Solve().

00049 {
00050     // apply the maximum mask that still leaves 
00051     // enough hits ( > fNHitsInViewMin ) to fit in
00052     // both U and V
00053     context.fData.SetUHitUse( context.fConvergenceMaster.GetMaskUCur() );
00054     context.fData.SetVHitUse( context.fConvergenceMaster.GetMaskVCur() );
00055 
00056     // get an inital rough estimate of the track parameters
00057     context.fCurrentFit = context.fEstimator->EstimateTrackParams(context);
00058 
00059     //
00060     context.SetLastGoodFitParams(context.fCurrentFit);
00061     
00062     // set initial number of planes to fit
00063     // context.fNPlanesToFit = context.fConvergenceMaster.GetNPlanesCur();
00064     
00065     // set input track parameters     
00066     context.fNPlanesFit = context.fData.SetInitial(context.fCurrentFit, 
00067                 context.fConvergenceMaster.GetNPlanesCur(), *context.fSwimmer);
00068                                     //context.fNPlanesToFit, *context.fSwimmer);
00069                                         
00070     // bad failure - stop iterations
00071     if ( context.fNPlanesFit < context.fConvergenceMaster.GetNPlanesMin() ){
00072         context.SetState(FitStateFactory::Instance().GetFitState("Final"));
00073         context.Print();
00074         MSG("FitTrackSA",Msg::kInfo) << "Switched from Initial to Final\n";
00075         return;        
00076     }
00077         
00078     // perform iteration
00079     context.fMatCalc.Solve(context.fData);
00080     context.fCurrentFit = context.fMatCalc.GetTrackOut();
00081     
00082     //context.SetLastGoodFitParams(context.fCurrentFit);
00083     //context.fLastGoodFit.SetNPlanes(context.fNPlanesFit);
00084     
00085     context.SetState(FitStateFactory::Instance().GetFitState("Iterating"));
00086     context.Print();
00087     MSG("FitTrackSA",Msg::kInfo) << "Switched from Initial to Iterating\n";
00088     return;
00089 
00090 }

const std::string & FitStateInitial::Name (  )  const [virtual]

Name() - return name of the state

Implements FitState.

Definition at line 42 of file FitStateInitial.cxx.

References INITIAL_FIT_STATE.

00043 {
00044     return INITIAL_FIT_STATE;
00045 }    


The documentation for this class was generated from the following files:
Generated on Mon Sep 1 00:51:35 2014 for loon by  doxygen 1.4.7