Go to the documentation of this file.00001 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexFitter.h"
00002 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexUpdator.h"
00003 #include "RecoVertex/VertexTools/interface/SequentialVertexSmoother.h"
00004 #include "RecoVertex/VertexTools/interface/DummyVertexSmoother.h"
00005 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexTrackUpdator.h"
00006 #include "RecoVertex/KalmanVertexFit/interface/KalmanSmoothedVertexChi2Estimator.h"
00007 #include "RecoVertex/KalmanVertexFit/interface/KalmanTrackToTrackCovCalculator.h"
00008 #include "RecoVertex/LinearizationPointFinders/interface/FsmwLinearizationPointFinder.h"
00009
00010
00011 KalmanVertexFitter::KalmanVertexFitter(bool useSmoothing )
00012 {
00013 edm::ParameterSet pSet = defaultParameters();
00014 setup(pSet, useSmoothing);
00015 }
00016
00017 KalmanVertexFitter::KalmanVertexFitter(const edm::ParameterSet& pSet, bool useSmoothing )
00018 {
00019 setup(pSet, useSmoothing);
00020 }
00021
00022 void KalmanVertexFitter::setup(const edm::ParameterSet& pSet, bool useSmoothing )
00023 {
00024 if (useSmoothing) {
00025 KalmanVertexTrackUpdator<5> vtu;
00026 KalmanSmoothedVertexChi2Estimator<5> vse;
00027 KalmanTrackToTrackCovCalculator<5> covCalc;
00028 SequentialVertexSmoother<5> smoother(vtu, vse, covCalc);
00029 theSequentialFitter
00030 = new SequentialVertexFitter<5>(pSet, FsmwLinearizationPointFinder(20, -2., 0.4, 10.),
00031 KalmanVertexUpdator<5>(),
00032 smoother, LinearizedTrackStateFactory());
00033 }
00034 else {
00035 DummyVertexSmoother<5> smoother;
00036 theSequentialFitter
00037 = new SequentialVertexFitter<5>(pSet, FsmwLinearizationPointFinder(20, -2., 0.4, 10.),
00038 KalmanVertexUpdator<5>(),
00039 smoother, LinearizedTrackStateFactory());
00040 }
00041 }
00042
00043
00044 edm::ParameterSet KalmanVertexFitter::defaultParameters() const
00045 {
00046 edm::ParameterSet pSet;
00047 pSet.addParameter<double>("maxDistance", 0.01);
00048 pSet.addParameter<int>("maxNbrOfIterations", 10);
00049 return pSet;
00050 }