#include <FitContext.h>
Definition at line 25 of file FitContext.h.
|
||||||||||||||||||||
|
ctor Definition at line 30 of file FitContext.cxx. References ConvergenceMaster::BuildMasks(), Config(), fConvergenceMaster, fData, fNHitsInViewMin, fState, FitStateFactory::GetFitState(), FitStateFactory::Instance(), and ConvergenceMaster::SetNHitsInViewMin(). 00031 : 00032 fTrackContext(context), fState(0), 00033 fSwimmer(swimmer), fEstimator(estimator), 00034 fData(ac, context), 00035 fConvergenceMaster(), 00036 fMatCalc(ac, context), 00037 fNIterationsStep(0), fNIterationsTotal(0), 00038 // fNPlanesToFit(0), 00039 fNPlanesFit(0), 00040 fCurrentFit(ConstFT::NTrackParams), fTimesConverged(0), fLastGoodFit(), 00041 fDChi2(ConstFT::InitialDChi2), fNTriesDiverges(0), fNHitsInViewMin(4), 00042 fNMaxIterations(100), fNMaxDiverging(1), fConvergenceCond(0.1) 00043 { 00044 TracerSA trace( 00045 "FitContext::FitContext(const AlgConfig&,const TrackContext&,SwimSwimmer*)" 00046 ); 00047 00048 Config(ac); 00049 00050 fState = FitStateFactory::Instance().GetFitState(std::string("Initial")); 00051 00052 fConvergenceMaster.SetNHitsInViewMin(fNHitsInViewMin); 00053 fConvergenceMaster.BuildMasks(fData); 00054 }
|
|
|
dtor Definition at line 60 of file FitContext.cxx. 00061 {
00062 TracerSA trace("FitContext::~FitContext()");
00063 }
|
|
|
get configurable parameters from AlgConfig Definition at line 69 of file FitContext.cxx. References fConvergenceCond, fNHitsInViewMin, fNMaxDiverging, fNMaxIterations, Registry::GetDouble(), Registry::GetInt(), and Registry::KeyExists(). Referenced by FitContext(). 00070 {
00071 TracerSA trace("FitContext::Config(const AlgConfig&)");
00072
00073 if ( ac.KeyExists("NHitsInViewMin") ) {
00074 fNHitsInViewMin = ac.GetInt("NHitsInViewMin");
00075 }
00076 if ( ac.KeyExists("NMaxIterations") ) {
00077 fNMaxIterations = ac.GetInt("NMaxIterations");
00078 }
00079 if ( ac.KeyExists("NMaxDiverging") ) {
00080 fNMaxDiverging = ac.GetInt("NMaxDiverging");
00081 }
00082 if ( ac.KeyExists("ConvergenceCond") ) {
00083 fConvergenceCond = ac.GetDouble("ConvergenceCond");
00084 }
00085 }
|
|
|
Definition at line 197 of file FitContext.cxx. References NtpFitSA::bfcalib, fData, fTrackContext, TrackContext::GetPrange(), DataFT::GetUMean(), DataFT::GetVMean(), NtpFitSABFieldCalib::prange, NtpFitSABFieldCalib::umean, and NtpFitSABFieldCalib::vmean. Referenced by MakeNtpFitSA(). 00198 {
00199 TracerSA trace("FitContext::FillNtpBFieldCalib()");
00200 //ntp.bfcalib.bin = segment.GetBin();
00201 ntp.bfcalib.prange = fTrackContext.GetPrange();
00202 //ntp.bfcalib.pmc = segment.GetPtrue();
00203 ntp.bfcalib.umean = fData.GetUMean();
00204 ntp.bfcalib.vmean = fData.GetVMean();
00205 }
|
|
|
|
|
|
Definition at line 67 of file FitContext.h. 00067 { return fCpu; };
|
|
|
Definition at line 65 of file FitContext.h. 00065 { return &fData; };
|
|
|
Definition at line 56 of file FitContext.h. Referenced by TrackEstimatorRange::EstimateTrackParams(). 00056 { return fTrackContext.GetPrange(); };
|
|
|
|
|
|
This is the basic iteration - it calls fState->Iterate Definition at line 91 of file FitContext.cxx. References fState, and FitState::Iterate(). Referenced by AlgFitTrackSA::DoFit().
|
|
|
Definition at line 113 of file FitContext.cxx. References FillNtpBFieldCalib(), FillNtpFitSA(), FillNtpFitSR(), FillNtpPlaneInfo(), fTrackContext, TrackContext::GetDir(), and NtpFitSA::zdir. Referenced by AlgFitTrackSA::DoFit(). 00114 {
00115 TracerSA trace("FitContext::MakeNtpFitSA()");
00116
00117 NtpFitSA ntp;
00118
00119 // Fill
00120 ntp.zdir = fTrackContext.GetDir();
00121 FillNtpFitSA(ntp);
00122 FillNtpPlaneInfo(ntp);
00123 FillNtpBFieldCalib(ntp);
00124 FillNtpFitSR(ntp);
00125
00126 return ntp;
00127 }
|
|
|
print out FitContext for debugging Definition at line 306 of file FitContext.cxx. References fConvergenceMaster, fCurrentFit, fDChi2, fNIterationsStep, fNIterationsTotal, fNPlanesFit, ConvergenceMaster::GetNPlanesCur(), and MSGSTREAM. Referenced by FitStateIterating::Iterate(), and FitStateInitial::Iterate(). 00307 {
00308 TracerSA trace("FitContext::Print()");
00309 MsgStream *mftsa = &MSGSTREAM("FitTrackSA", Msg::kInfo);
00310
00311 (*mftsa) << "Step " << fNIterationsStep << "/" << fNIterationsTotal
00312 //<< "; #ToFit=" << fNPlanesToFit
00313 << "; #ToFit=" << fConvergenceMaster.GetNPlanesCur()
00314 << "; #Fit=" << fNPlanesFit << "; dchi2=" << fDChi2
00315 << "; q/p=" << fCurrentFit(kQoverP) << "\n";
00316
00317 }
|
|
|
print out FitContext for debugging Definition at line 293 of file FitContext.cxx. References fCurrentFit, and MSGSTREAM. Referenced by SetFitParams(). 00294 {
00295 TracerSA trace("FitContext::PrintCurrentFit()");
00296 MsgStream *mftsa = &MSGSTREAM("FitTrackSA", Msg::kInfo);
00297
00298 (*mftsa) << "U=" << fCurrentFit(kU) << "; dU/dZ=" << fCurrentFit(kdUdZ)
00299 << "; V=" << fCurrentFit(kV) << "; dV/dZ=" << fCurrentFit(kdVdZ)
00300 << "; Q/P=" << fCurrentFit(kQoverP) << "\n";
00301 }
|
|
|
Definition at line 68 of file FitContext.h. Referenced by AlgFitTrackSA::DoFit(). 00068 { fCpu = cpu; };
|
|
|
Definition at line 265 of file FitContext.cxx. References fCurrentFit, and PrintCurrentFit(). 00266 {
00267 TracerSA trace("FitContext::SetFitParams(const TVectorD&)");
00268 fCurrentFit = fit;
00269 PrintCurrentFit();
00270 }
|
|
|
Definition at line 275 of file FitContext.cxx. References fCurrentFit, fLastGoodFit, and FitResult::GetTrackOut(). Referenced by FitStateDiverged::Iterate(). 00276 {
00277 TracerSA trace("FitContext::SetFromLastGoodFit()");
00278 fCurrentFit = fLastGoodFit.GetTrackOut();
00279 }
|
|
|
used by track estimator to set initial track parameters Definition at line 284 of file FitContext.cxx. References fLastGoodFit, and FitResult::SetTrackOut(). Referenced by FitStateInitial::Iterate(). 00285 {
00286 TracerSA trace("FitContext::SetLastGoodFitParams(const TVectorD&)");
00287 fLastGoodFit.SetTrackOut(fit);
00288 }
|
|
|
switch to given FitState Definition at line 101 of file FitContext.cxx. References fState, MSG, and FitState::Name(). Referenced by FitStateIterating::Iterate(), FitStateInitial::Iterate(), FitStateDiverged::Iterate(), and FitStateConverged::Iterate(). 00102 {
00103 TracerSA trace("FitContext::SetState(const FitState*)");
00104 fState = state;
00105 MSG("FitTrackSA",Msg::kDebug) << "Switched to "
00106 << state->Name() << " state.\n";
00107 }
|
|
|
Definition at line 129 of file FitContext.h. Referenced by Config(), and FitStateIterating::Iterate(). |
|
|
Definition at line 100 of file FitContext.h. Referenced by FitContext(), FitStateIterating::Iterate(), FitStateInitial::Iterate(), FitStateDiverged::Iterate(), FitStateConverged::Iterate(), and Print(). |
|
|
Definition at line 131 of file FitContext.h. |
|
|
Definition at line 113 of file FitContext.h. Referenced by FitStateIterating::Iterate(), FitStateInitial::Iterate(), Print(), PrintCurrentFit(), SetFitParams(), and SetFromLastGoodFit(). |
|
|
data holder/manipulator Definition at line 95 of file FitContext.h. Referenced by TrackEstimatorRange::EstimateTrackParams(), TrackEstimatorFixed::EstimateTrackParams(), FillNtpBFieldCalib(), FillNtpFitSA(), FillNtpPlaneInfo(), FitContext(), FitStateIterating::Iterate(), FitStateInitial::Iterate(), FitStateDiverged::Iterate(), and FitStateConverged::Iterate(). |
|
|
Definition at line 119 of file FitContext.h. Referenced by FitStateIterating::Iterate(), FitStateDiverged::Iterate(), FitStateConverged::Iterate(), and Print(). |
|
|
Initial estimation of the track parameters Definition at line 90 of file FitContext.h. Referenced by FitStateInitial::Iterate(). |
|
|
Definition at line 117 of file FitContext.h. Referenced by FillNtpFitSA(), FitStateConverged::Iterate(), SetFromLastGoodFit(), and SetLastGoodFitParams(). |
|
|
Definition at line 105 of file FitContext.h. Referenced by FitStateIterating::Iterate(), FitStateInitial::Iterate(), and FitStateConverged::Iterate(). |
|
|
Definition at line 123 of file FitContext.h. Referenced by Config(), and FitContext(). |
|
|
Definition at line 107 of file FitContext.h. Referenced by FitStateIterating::Iterate(), FitStateDiverged::Iterate(), FitStateConverged::Iterate(), and Print(). |
|
|
Definition at line 108 of file FitContext.h. Referenced by FitStateIterating::Iterate(), and Print(). |
|
|
Definition at line 127 of file FitContext.h. Referenced by Config(), and FitStateIterating::Iterate(). |
|
|
Definition at line 125 of file FitContext.h. Referenced by Config(), and FitStateIterating::Iterate(). |
|
|
Definition at line 111 of file FitContext.h. Referenced by FitStateIterating::Iterate(), FitStateInitial::Iterate(), and Print(). |
|
|
Definition at line 121 of file FitContext.h. Referenced by FitStateIterating::Iterate(), FitStateDiverged::Iterate(), and FitStateConverged::Iterate(). |
|
|
fitter state Definition at line 80 of file FitContext.h. Referenced by AlgFitTrackSA::DoFit(), FitContext(), Iterate(), and SetState(). |
|
|
Particle swimmer Definition at line 85 of file FitContext.h. Referenced by FitStateIterating::Iterate(), and FitStateInitial::Iterate(). |
|
|
Definition at line 115 of file FitContext.h. Referenced by FillNtpFitSA(), FitStateFinal::Iterate(), and FitStateConverged::Iterate(). |
|
|
track context Definition at line 75 of file FitContext.h. Referenced by FillNtpBFieldCalib(), FillNtpFitSA(), FillNtpFitSR(), and MakeNtpFitSA(). |
1.3.9.1