CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/PhysicsTools/PatAlgos/interface/PATPrimaryVertexSelector.h

Go to the documentation of this file.
00001 #ifndef PatAlgos_PATPrimaryVertexSelector_H_
00002 #define PatAlgos_PATPrimaryVertexSelector_H_
00003 
00016 #include "FWCore/Framework/interface/Event.h"
00017 #include "FWCore/Framework/interface/EventSetup.h"
00018 #include "DataFormats/Common/interface/Handle.h"
00019 #include "DataFormats/VertexReco/interface/Vertex.h"
00020 #include "DataFormats/VertexReco/interface/VertexFwd.h"
00021 
00022 class PATPrimaryVertexSelector {
00023 public:
00024   typedef reco::VertexCollection collection;
00025   typedef std::vector<const reco::Vertex*> container;
00026   typedef container::const_iterator const_iterator;
00027   PATPrimaryVertexSelector (const edm::ParameterSet& cfg);
00029   const_iterator begin() const { return selected_.begin(); }
00031   const_iterator end() const { return selected_.end(); }
00033   void select(const edm::Handle<collection>&, const edm::Event&, const edm::EventSetup&);
00035   size_t size() const { return selected_.size(); }
00037   bool operator() (const reco::Vertex*, const reco::Vertex*) const;
00038 private:
00040   void getVertexVariables (const reco::Vertex&, unsigned int&, double&) const;
00042   bool acceptTrack (const reco::Track&) const;
00043 
00044 private:
00045   container selected_;               
00046   unsigned int multiplicityCut_;     
00047   float ptSumCut_;                   
00048   float trackEtaCut_;                
00049   float chi2Cut_;                    
00050   float dr2Cut_;                     
00051   float dzCut_;                      
00052 };
00053 
00054 #endif
00055