Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:22

0001 #ifndef _KalmanTrimmedVertexFinder_H_
0002 #define _KalmanTrimmedVertexFinder_H_
0003 
0004 #include "RecoVertex/TrimmedKalmanVertexFinder/interface/ConfigurableTrimmedVertexFinder.h"
0005 
0006 /** User-friendly wrapper around ConfigurableTrimmedVertexFinder. <BR>
0007  *  Chooses the KalmanVertexFit classes as vertex fitting classes 
0008  *  used by the TrimmedVertexFinder. <BR>
0009  *  KalmanTrimmedVertexFinder is configurable 
0010  *  using the same set() methods as ConfigurableTrimmedVertexFinder. 
0011  */
0012 
0013 class KalmanTrimmedVertexFinder : public VertexReconstructor {
0014 public:
0015   KalmanTrimmedVertexFinder();
0016   KalmanTrimmedVertexFinder(const KalmanTrimmedVertexFinder& other);
0017   ~KalmanTrimmedVertexFinder() override;
0018 
0019   /** Clone method
0020    */
0021   KalmanTrimmedVertexFinder* clone() const override { return new KalmanTrimmedVertexFinder(*this); }
0022 
0023   inline std::vector<TransientVertex> vertices(const std::vector<reco::TransientTrack>& tracks) const override {
0024     return theFinder->vertices(tracks);
0025   }
0026 
0027   inline std::vector<TransientVertex> vertices(const std::vector<reco::TransientTrack>& tracks,
0028                                                const reco::BeamSpot& s) const override {
0029     return theFinder->vertices(tracks, s);
0030   }
0031 
0032   inline std::vector<TransientVertex> vertices(const std::vector<reco::TransientTrack>& tracks,
0033                                                std::vector<reco::TransientTrack>& unused) const {
0034     return theFinder->vertices(tracks, unused, reco::BeamSpot(), false);
0035   }
0036 
0037   inline std::vector<TransientVertex> vertices(const std::vector<reco::TransientTrack>& tracks,
0038                                                std::vector<reco::TransientTrack>& unused,
0039                                                const reco::BeamSpot& spot,
0040                                                bool usespot = false) const {
0041     return theFinder->vertices(tracks, unused, spot, usespot);
0042   }
0043 
0044   /** Access to parameters
0045    */
0046   inline float ptCut() const { return theFinder->ptCut(); }
0047   inline float trackCompatibilityCut() const { return theFinder->trackCompatibilityCut(); }
0048   inline float trackCompatibilityToSV() const { return theFinder->trackCompatibilityToSV(); }
0049   inline float vertexFitProbabilityCut() const { return theFinder->vertexFitProbabilityCut(); }
0050   inline int maxNbOfVertices() const { return theFinder->maxNbOfVertices(); }
0051 
0052   /** Set parameters
0053    */
0054 
0055   void setParameters(const edm::ParameterSet&);
0056 
0057   inline void setPtCut(float cut) { theFinder->setPtCut(cut); }
0058   inline void setTrackCompatibilityCut(float cut) { theFinder->setTrackCompatibilityCut(cut); }
0059   inline void setTrackCompatibilityToSV(float cut) { theFinder->setTrackCompatibilityToSV(cut); }
0060   inline void setVertexFitProbabilityCut(float cut) { theFinder->setVertexFitProbabilityCut(cut); }
0061   inline void setMaxNbOfVertices(int max) { theFinder->setMaxNbOfVertices(max); }
0062 
0063 private:
0064   ConfigurableTrimmedVertexFinder* theFinder;
0065   using VertexReconstructor::vertices;
0066 };
0067 
0068 #endif