CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/RecoVertex/KinematicFit/interface/KinematicConstrainedVertexFitter.h

Go to the documentation of this file.
00001 #ifndef KinematicConstrainedVertexFitter_H
00002 #define KinematicConstrainedVertexFitter_H
00003 
00004 #include "RecoVertex/KinematicFitPrimitives/interface/RefCountedKinematicTree.h"
00005 #include "RecoVertex/KinematicFitPrimitives/interface/MultiTrackKinematicConstraint.h"
00006 #include "RecoVertex/VertexTools/interface/LinearizationPointFinder.h"
00007 #include "RecoVertex/KinematicFit/interface/KinematicConstrainedVertexUpdator.h"
00008 #include "RecoVertex/KinematicFit/interface/VertexKinematicConstraint.h"
00009 #include "RecoVertex/KinematicFit/interface/ConstrainedTreeBuilder.h"
00010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00011 
00021 class KinematicConstrainedVertexFitter{
00022 
00023 public:
00024 
00028  KinematicConstrainedVertexFitter();
00029   
00033  KinematicConstrainedVertexFitter(const LinearizationPointFinder& fnd);
00034   
00035  ~KinematicConstrainedVertexFitter();
00036 
00042  void setParameters(const edm::ParameterSet& pSet);
00043 
00048  RefCountedKinematicTree fit(std::vector<RefCountedKinematicParticle> part) {
00049    return fit(part, 0, 0);
00050  }
00051 
00055  RefCountedKinematicTree fit(std::vector<RefCountedKinematicParticle> part,
00056                             MultiTrackKinematicConstraint * cs) {
00057    return fit(part, cs, 0);
00058  };
00059     
00063  RefCountedKinematicTree fit(std::vector<RefCountedKinematicParticle> part,
00064                            MultiTrackKinematicConstraint * cs,
00065                            GlobalPoint * pt);
00066 
00067 //return the number of iterations
00068  int getNit() const;
00069 //return the value of the constraint equation
00070  float getCSum() const;
00071 
00072 private:
00073 
00074  void defaultParameters();
00075 
00076  float theMaxDelta; //maximum (delta parameter)^2/(sigma parameter)^2 per iteration for convergence
00077  int theMaxStep;                                       
00078  float theMaxReducedChiSq; //max of initial (after 2 iterations) chisq/dof value
00079  float theMinChiSqImprovement; //minimum required improvement in chisq to avoid fit termination for cases exceeding theMaxReducedChiSq
00080  LinearizationPointFinder * finder;                                    
00081  KinematicConstrainedVertexUpdator * updator;
00082  VertexKinematicConstraint * vCons;
00083  ConstrainedTreeBuilder * tBuilder;
00084  int iterations;
00085  float csum;
00086 };
00087 
00088 #endif