CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PrimaryVertexAssignment.h
Go to the documentation of this file.
1 #ifndef CommonTools_PFCandProducer_PrimaryVertexAssignment_
2 #define CommonTools_PFCandProducer_PrimaryVertexAssignment_
3 
5 
9 
11 
17 
19  public:
21 
23  maxDzSigForPrimaryAssignment_(iConfig.getParameter<double>("maxDzSigForPrimaryAssignment")),
24  maxDzForPrimaryAssignment_(iConfig.getParameter<double>("maxDzForPrimaryAssignment")),
25  maxJetDeltaR_(iConfig.getParameter<double>("maxJetDeltaR")),
26  minJetPt_(iConfig.getParameter<double>("minJetPt")),
27  maxDistanceToJetAxis_(iConfig.getParameter<double>("maxDistanceToJetAxis")),
28  maxDzForJetAxisAssigment_(iConfig.getParameter<double>("maxDzForJetAxisAssigment")),
29  maxDxyForJetAxisAssigment_(iConfig.getParameter<double>("maxDxyForJetAxisAssigment")),
30  maxDxySigForNotReconstructedPrimary_(iConfig.getParameter<double>("maxDxySigForNotReconstructedPrimary")),
31  maxDxyForNotReconstructedPrimary_(iConfig.getParameter<double>("maxDxyForNotReconstructedPrimary"))
32  {}
33 
35 
36  std::pair<int,PrimaryVertexAssignment::Quality> chargedHadronVertex(const reco::VertexCollection& vertices,
37  const reco::TrackRef& trackRef,
38 // const reco::Track & track,
40  const TransientTrackBuilder & builder) const;
41 
42 /* std::pair<int,PrimaryVertexAssignment::Quality> chargedHadronVertex(const reco::VertexCollection& vertices,
43  const reco::TrackRef & track,
44  const edm::View<reco::Candidate> & jets,
45  const TransientTrackBuilder & builder) const {
46  return chargedHadronVertex(vertices,track,*track,jets,builder);
47  }
48  std::pair<int,PrimaryVertexAssignment::Quality> chargedHadronVertex(const reco::VertexCollection& vertices,
49  const reco::Candidate & baseCand,
50  const edm::View<reco::Candidate> & jets,
51  const TransientTrackBuilder & builder) const {
52  if(baseCand.bestTrack()!=0)
53  return chargedHadronVertex(vertices,edm::Ref<reco::TrackCollection>(),*(baseCand.bestTrack()),jets,builder);
54  }
55 */
56 
57  std::pair<int,PrimaryVertexAssignment::Quality> chargedHadronVertex( const reco::VertexCollection& vertices,
58  const reco::PFCandidate& pfcand,
60  const TransientTrackBuilder& builder) const {
61  if(pfcand.trackRef().isNull())
62  return std::pair<int,PrimaryVertexAssignment::Quality>(-1,PrimaryVertexAssignment::Unassigned);
63  return chargedHadronVertex(vertices,pfcand.trackRef(),jets,builder);
64  }
65  std::pair<int,PrimaryVertexAssignment::Quality> chargedHadronVertex( const reco::VertexCollection& vertices,
66  const reco::RecoChargedRefCandidate& chcand,
68  const TransientTrackBuilder& builder) const {
69  if(chcand.track().isNull())
70  return std::pair<int,PrimaryVertexAssignment::Quality>(-1,PrimaryVertexAssignment::Unassigned);
71  return chargedHadronVertex(vertices,chcand.track(),jets,builder);
72  }
73 
74 
75  private :
78  double maxJetDeltaR_;
79  double minJetPt_;
85 };
86 
87 #endif
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
std::pair< int, PrimaryVertexAssignment::Quality > chargedHadronVertex(const reco::VertexCollection &vertices, const reco::PFCandidate &pfcand, const edm::View< reco::Candidate > &jets, const TransientTrackBuilder &builder) const
PrimaryVertexAssignment(const edm::ParameterSet &iConfig)
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:433
vector< PseudoJet > jets
std::pair< int, PrimaryVertexAssignment::Quality > chargedHadronVertex(const reco::VertexCollection &vertices, const reco::RecoChargedRefCandidate &chcand, const edm::View< reco::Candidate > &jets, const TransientTrackBuilder &builder) const
bool isNull() const
Checks for null.
Definition: Ref.h:247
std::pair< int, PrimaryVertexAssignment::Quality > chargedHadronVertex(const reco::VertexCollection &vertices, const reco::TrackRef &trackRef, const edm::View< reco::Candidate > &jets, const TransientTrackBuilder &builder) const
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:39