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_ |
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > | ttToken_ |
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 51 of file VertexingHelper.h.
|
inline |
Definition at line 53 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_, Exception, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), playback_, ttToken_, 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 HltBtagPostValidation_cff::c, Exception, edm::RefToBase< T >::isNull(), groupFilesInBlocks::tt, and L1BJetProducer_cff::vtx.
|
inline |
returns true if this was given a non dummy configuration
Definition at line 57 of file VertexingHelper.h.
References enabled_.
Referenced by pat::PATGenericParticleProducer::produce().
|
private |
Get out the track from the Candidate / RecoCandidate / PFCandidate.
Definition at line 91 of file VertexingHelper.cc.
References reco::RecoCandidate::bestTrackRef(), HltBtagPostValidation_cff::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 41 of file VertexingHelper.cc.
References iEvent.
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 49 of file VertexingHelper.cc.
References edm::EventSetup::getHandle(), and iEvent.
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 103 of file VertexingHelper.h.
References trackingPlots::assoc.
|
private |
selector of associations
Definition at line 79 of file VertexingHelper.h.
Referenced by VertexingHelper().
|
private |
true if it has non null configuration
Definition at line 73 of file VertexingHelper.h.
Referenced by enabled(), and VertexingHelper().
|
private |
true if it's just reading the associations from the event
Definition at line 76 of file VertexingHelper.h.
Referenced by VertexingHelper().
|
private |
Definition at line 87 of file VertexingHelper.h.
|
private |
Definition at line 86 of file VertexingHelper.h.
Referenced by VertexingHelper().
|
private |
use tracks inside candidates
Definition at line 85 of file VertexingHelper.h.
Referenced by VertexingHelper().
|
private |
Definition at line 90 of file VertexingHelper.h.
Referenced by VertexingHelper().
|
private |
Definition at line 91 of file VertexingHelper.h.
|
private |
Definition at line 83 of file VertexingHelper.h.
|
private |
Definition at line 82 of file VertexingHelper.h.
Referenced by VertexingHelper().