Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #include "RecoVertex/GaussianSumVertexFit/interface/AdaptiveGsfVertexFitter.h"
0002 #include "RecoVertex/VertexTools/interface/DummyVertexSmoother.h"
0003 #include "RecoVertex/GaussianSumVertexFit/interface/GsfVertexSmoother.h"
0004 #include "RecoVertex/GaussianSumVertexFit/interface/MultiPerigeeLTSFactory.h"
0005 #include "RecoVertex/GaussianSumVertexFit/interface/GsfVertexTrackCompatibilityEstimator.h"
0006 #include "RecoVertex/VertexTools/interface/GeometricAnnealing.h"
0007 
0008 AdaptiveGsfVertexFitter::AdaptiveGsfVertexFitter(const edm::ParameterSet& pSet, const LinearizationPointFinder& linP) {
0009   bool limitComponents_ = pSet.getParameter<bool>("limitComponents");
0010 
0011   DeepCopyPointerByClone<GsfVertexMerger> theMerger;
0012 
0013   if (limitComponents_) {
0014     theMerger = new GsfVertexMerger(pSet.getParameter<edm::ParameterSet>("GsfMergerParameters"));
0015   }
0016 
0017   theFitter = new AdaptiveVertexFitter(GeometricAnnealing(),
0018                                        linP,
0019                                        GsfVertexUpdator(limitComponents_, &*theMerger),
0020                                        GsfVertexTrackCompatibilityEstimator(),
0021                                        GsfVertexSmoother(limitComponents_, &*theMerger),
0022                                        MultiPerigeeLTSFactory());
0023   theFitter->gsfIntermediarySmoothing(true);
0024 
0025   /**
0026    *   Reads the configurable parameters.
0027    *   \param maxshift if the vertex moves further than this (in cm),
0028    *   then we re-iterate.
0029    *   \param maxlpshift if the vertex moves further than this,
0030    *   then we re-linearize the tracks.
0031    *   \param maxstep that's the maximum of iterations that we allow for.
0032    *   \param weightthreshold that's the minimum track weight
0033    *   for a track to be considered "significant".
0034    *   If fewer than two tracks are significant, an exception is thrown.
0035    */
0036   theFitter->setParameters(pSet.getParameter<double>("maxshift"),
0037                            pSet.getParameter<double>("maxlpshift"),
0038                            pSet.getParameter<int>("maxstep"),
0039                            pSet.getParameter<double>("weightthreshold"));
0040 }
0041 
0042 AdaptiveGsfVertexFitter::AdaptiveGsfVertexFitter(const AdaptiveGsfVertexFitter& original) {
0043   theFitter = original.theFitter->clone();
0044 }
0045 
0046 AdaptiveGsfVertexFitter::~AdaptiveGsfVertexFitter() { delete theFitter; }