Produces and/or checks pat::VertexAssociation's. More...
#include "PhysicsTools/PatAlgos/interface/VertexingHelper.h"
Public Member Functions | |
bool | enabled () const |
returns true if this was given a non dummy configuration More... | |
void | newEvent (const edm::Event &event) |
To be called for each new event, reads in the vertex collection. More... | |
void | newEvent (const edm::Event &event, const edm::EventSetup &setup) |
template<typename AnyCandRef > | |
pat::VertexAssociation | operator() (const AnyCandRef &) const |
VertexingHelper () | |
VertexingHelper (const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC) | |
Private Member Functions | |
pat::VertexAssociation | associate (const reco::Candidate &) const |
reco::TrackBaseRef | getTrack_ (const reco::Candidate &c) const |
Get out the track from the Candidate / RecoCandidate / PFCandidate. More... | |
Private Attributes | |
pat::VertexAssociationSelector | assoSelector_ |
selector of associations More... | |
bool | enabled_ |
true if it has non null configuration More... | |
bool | playback_ |
true if it's just reading the associations from the event More... | |
edm::ESHandle < TransientTrackBuilder > | ttBuilder_ |
bool | useTracks_ |
use tracks inside candidates More... | |
edm::EDGetTokenT < edm::ValueMap < pat::VertexAssociation > > | vertexAssociationsToken_ |
edm::Handle< edm::ValueMap < pat::VertexAssociation > > | vertexAssoMap_ |
edm::Handle < reco::VertexCollection > | vertexHandle_ |
edm::EDGetTokenT < reco::VertexCollection > | verticesToken_ |
Produces and/or checks pat::VertexAssociation's.
The VertexingHelper produces pat::VertexAssociation, or reads them from the event, and can use them to select if a candidate is good or not.
Definition at line 46 of file VertexingHelper.h.
|
inline |
Definition at line 48 of file VertexingHelper.h.
pat::helper::VertexingHelper::VertexingHelper | ( | const edm::ParameterSet & | iConfig, |
edm::ConsumesCollector && | iC | ||
) |
Definition at line 11 of file VertexingHelper.cc.
References assoSelector_, edm::ParameterSet::empty(), enabled_, edm::hlt::Exception, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), playback_, useTracks_, vertexAssociationsToken_, and verticesToken_.
|
private |
Try to associated this candidate to a vertex. If no association is found passing all cuts, return a null association
Definition at line 55 of file VertexingHelper.cc.
References end, edm::hlt::Exception, edm::RefToBase< T >::isNull(), pat::VertexAssociation::setDistances(), reco::TransientTrack::trajectoryStateClosestToPoint(), groupFilesInBlocks::tt, and reco::Candidate::vertex().
|
inline |
returns true if this was given a non dummy configuration
Definition at line 52 of file VertexingHelper.h.
References enabled_.
Referenced by pat::PATGenericParticleProducer::produce().
|
private |
Get out the track from the Candidate / RecoCandidate / PFCandidate.
Definition at line 85 of file VertexingHelper.cc.
References reco::RecoCandidate::bestTrackRef(), trackerHits::c, and reco::PFCandidate::trackRef().
void pat::helper::VertexingHelper::newEvent | ( | const edm::Event & | event | ) |
To be called for each new event, reads in the vertex collection.
Definition at line 39 of file VertexingHelper.cc.
References edm::Event::getByToken().
Referenced by pat::PATVertexAssociationProducer::produce(), and pat::PATGenericParticleProducer::produce().
void pat::helper::VertexingHelper::newEvent | ( | const edm::Event & | event, |
const edm::EventSetup & | setup | ||
) |
To be called for each new event, reads in the vertex collection and the tracking info You need this if 'useTrack' is true
Definition at line 48 of file VertexingHelper.cc.
References edm::EventSetup::get().
pat::VertexAssociation pat::helper::VertexingHelper::operator() | ( | const AnyCandRef & | cand | ) | const |
Return true if this candidate is associated to a valid vertex AnyCandRef should be a Ref<>, RefToBase<> or Ptr to a Candidate object
Definition at line 98 of file VertexingHelper.h.
|
private |
selector of associations
Definition at line 74 of file VertexingHelper.h.
Referenced by VertexingHelper().
|
private |
true if it has non null configuration
Definition at line 68 of file VertexingHelper.h.
Referenced by enabled(), and VertexingHelper().
|
private |
true if it's just reading the associations from the event
Definition at line 71 of file VertexingHelper.h.
Referenced by VertexingHelper().
|
private |
Definition at line 81 of file VertexingHelper.h.
|
private |
use tracks inside candidates
Definition at line 80 of file VertexingHelper.h.
Referenced by VertexingHelper().
|
private |
Definition at line 84 of file VertexingHelper.h.
Referenced by VertexingHelper().
|
private |
Definition at line 85 of file VertexingHelper.h.
|
private |
Definition at line 78 of file VertexingHelper.h.
|
private |
Definition at line 77 of file VertexingHelper.h.
Referenced by VertexingHelper().