CMS 3D CMS Logo

VertexAssociationSelector.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_PatUtils_interface_VertexAssociationSelector_h
00002 #define PhysicsTools_PatUtils_interface_VertexAssociationSelector_h
00003 
00004 #include "DataFormats/VertexReco/interface/Vertex.h"
00005 #include "DataFormats/Candidate/interface/Candidate.h"
00006 #include "DataFormats/PatCandidates/interface/Vertexing.h"
00007 
00008 namespace pat {
00009     class VertexAssociationSelector {
00010         public:
00014             struct Config {
00015                 Config() : dZ(0), dR(0), sigmasZ(0), sigmasR(0) {} //, sigmas3d(0) {}
00017                 float dZ, dR, sigmasZ, sigmasR; //, sigmas3d; 
00018             };
00019 #if 0            
00021             class SelectCandidates {
00022                 public:
00023                     SelectCandidates(const VertexAssociationSelector &asso, const reco::Vertex &vtx) : vtx_(vtx), asso_(asso) { }
00024                     bool operator()(const reco::Candidate &c) const { return asso_(c, vtx_); }
00025                 private:
00026                     const reco::Vertex              & vtx_;
00027                     const VertexAssociationSelector & asso_;
00028             };
00030             class SelectVertices {
00031                 public:
00032                     SelectVertices(const VertexAssociationSelector &asso, const reco::Candidate &cand) : cand_(cand), asso_(asso) { }
00033                     bool operator()(const reco::Vertex &vtx) const { return asso_(cand_, vtx); }
00034                 private:
00035                     const reco::Candidate           & cand_;
00036                     const VertexAssociationSelector & asso_;
00037             };
00038 #endif
00039 
00041             VertexAssociationSelector() {} 
00043             VertexAssociationSelector(const Config & conf) ;
00044 
00046             bool operator()(const pat::VertexAssociation & vass) const ;
00047 
00051             bool operator()(const reco::Candidate &c, const reco::Vertex &) const ;
00052 
00053             pat::VertexAssociation simpleAssociation(const reco::Candidate &c, const reco::VertexRef & vtx) const ;
00054 #if 0
00056             SelectCandidates selectCandidates(const reco::Vertex    & vtx ) const { return SelectCandidates(*this, vtx  ); }
00057 
00059             SelectVertices   selectVertices(  const reco::Candidate & cand) const { return SelectVertices(  *this, cand ); }
00060 #endif
00061         private:
00062             Config conf_;
00063 
00064     }; // class
00065 } // namespace
00066 
00067 #endif

Generated on Tue Jun 9 17:41:48 2009 for CMSSW by  doxygen 1.5.4