CMS 3D CMS Logo

RecoTauVertexAssociator.h
Go to the documentation of this file.
1 #ifndef RecoTauTag_RecoTau_RecoTauVertexAssociator_h
2 #define RecoTauTag_RecoTau_RecoTauVertexAssociator_h
3 
4 /* RecoTauVertexAssociator
5  *
6  * Authors: Evan K. Friis, Christian Veelken, UC Davis
7  * Michalis Bachtis, UW Madison
8  *
9  * The associatedVertex member function retrieves the vertex from the event
10  * associated to a given tau. This class is configured using a cms.PSet.
11  *
12  * The required arguments are:
13  * o primaryVertexSrc - InputTag with the vertex collection
14  * o useClosestPV - Use the "closest to lead track in z" to find the vertex.
15  *
16  * The setEvent method must be called at least once per event.
17  *
18  */
19 
26 
29 
31 
33 
34 #include <map>
35 
36 // Forward declarations
37 namespace edm {
38  class ParameterSet;
39  class Event;
40 } // namespace edm
41 
42 namespace reco {
43  class PFTau;
44  class Jet;
45 } // namespace reco
46 
47 namespace reco {
48  namespace tau {
49 
51  public:
53 
62  reco::VertexRef associatedVertex(const PFTau& tau, bool useJet = false) const;
65 
67  void setEvent(const edm::Event& evt);
68  const Track* getLeadTrack(const Jet&) const;
69  const TrackBaseRef getLeadTrackRef(const Jet&) const;
70  const CandidatePtr getLeadCand(const Jet&) const;
71 
72  private:
75  std::unique_ptr<StringCutObjectSelector<reco::Vertex>> vertexSelector_;
76  std::vector<reco::VertexRef> selectedVertices_;
79  //PJ adding quality cuts
80  std::unique_ptr<RecoTauQualityCuts> qcuts_;
85  // containers for holding vertices associated to jets
86  typedef std::map<const reco::Jet*, reco::VertexRef> JetToVtxAssoc;
87  std::unique_ptr<JetToVtxAssoc> jetToVertexAssociation_;
90  };
91 
92  } // namespace tau
93 } // namespace reco
94 
95 #endif /* end of include guard: RecoTauTag_RecoTau_RecoTauVertexAssociator_h */
std::map< const reco::Jet *, reco::VertexRef > JetToVtxAssoc
std::unique_ptr< JetToVtxAssoc > jetToVertexAssociation_
unsigned long long EventNumber_t
void setEvent(const edm::Event &evt)
Load the vertices from the event.
reco::VertexRef associatedVertex(const Jet &jet) const
std::vector< reco::VertexRef > selectedVertices_
Definition: Jet.py:1
const TrackBaseRef getLeadTrackRef(const Jet &) const
const Track * getLeadTrack(const Jet &) const
RecoTauVertexAssociator(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
std::unique_ptr< RecoTauQualityCuts > qcuts_
edm::EDGetTokenT< reco::VertexCollection > vxToken_
fixed size matrix
HLT enums.
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > vertexSelector_
const CandidatePtr getLeadCand(const Jet &) const