Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:09

0001 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexFitter.h"
0002 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexUpdator.h"
0003 #include "RecoVertex/VertexTools/interface/SequentialVertexSmoother.h"
0004 #include "RecoVertex/VertexTools/interface/DummyVertexSmoother.h"
0005 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexTrackUpdator.h"
0006 #include "RecoVertex/KalmanVertexFit/interface/KalmanSmoothedVertexChi2Estimator.h"
0007 #include "RecoVertex/KalmanVertexFit/interface/KalmanTrackToTrackCovCalculator.h"
0008 #include "RecoVertex/LinearizationPointFinders/interface/FsmwLinearizationPointFinder.h"
0009 
0010 KalmanVertexFitter::KalmanVertexFitter(bool useSmoothing) {
0011   edm::ParameterSet pSet = defaultParameters();
0012   setup(pSet, useSmoothing);
0013 }
0014 
0015 KalmanVertexFitter::KalmanVertexFitter(const edm::ParameterSet& pSet, bool useSmoothing) { setup(pSet, useSmoothing); }
0016 
0017 void KalmanVertexFitter::setup(const edm::ParameterSet& pSet, bool useSmoothing) {
0018   if (useSmoothing) {
0019     KalmanVertexTrackUpdator<5> vtu;
0020     KalmanSmoothedVertexChi2Estimator<5> vse;
0021     KalmanTrackToTrackCovCalculator<5> covCalc;
0022     SequentialVertexSmoother<5> smoother(vtu, vse, covCalc);
0023     theSequentialFitter = new SequentialVertexFitter<5>(pSet,
0024                                                         FsmwLinearizationPointFinder(20, -2., 0.4, 10.),
0025                                                         KalmanVertexUpdator<5>(),
0026                                                         smoother,
0027                                                         LinearizedTrackStateFactory());
0028   } else {
0029     DummyVertexSmoother<5> smoother;
0030     theSequentialFitter = new SequentialVertexFitter<5>(pSet,
0031                                                         FsmwLinearizationPointFinder(20, -2., 0.4, 10.),
0032                                                         KalmanVertexUpdator<5>(),
0033                                                         smoother,
0034                                                         LinearizedTrackStateFactory());
0035   }
0036 }
0037 
0038 edm::ParameterSet KalmanVertexFitter::defaultParameters() const {
0039   edm::ParameterSet pSet;
0040   pSet.addParameter<double>("maxDistance", 0.01);
0041   pSet.addParameter<int>("maxNbrOfIterations", 10);  //10
0042   return pSet;
0043 }