53 PATVertexAssociationProducer::PATVertexAssociationProducer(
const edm::ParameterSet& iConfig) :
54 particles_( iConfig.existsAs<
VInputTag>(
"candidates") ?
55 iConfig.getParameter<
VInputTag>(
"candidates") :
57 vertexing_(iConfig, consumesCollector())
62 produces<VertexAssociationMap>();
71 using namespace edm;
using namespace std;
78 vector<pat::VertexAssociation> assos;
85 assos.clear(); assos.reserve(cands->size());
87 for (
size_t i = 0,
n = cands->size();
i <
n; ++
i) {
91 filler.
insert(cands, assos.begin(), assos.end());
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void insert(const H &h, I begin, I end)
pat::helper::VertexingHelper vertexing_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
~PATVertexAssociationProducer()
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
PATVertexAssociationProducer(const edm::ParameterSet &iConfig)
std::vector< edm::InputTag > VInputTag
std::vector< edm::EDGetTokenT< edm::View< reco::Candidate > > > particlesTokens_
edm::ValueMap< pat::VertexAssociation > VertexAssociationMap
void newEvent(const edm::Event &event)
To be called for each new event, reads in the vertex collection.
Produces VertexAssociation and a ValueMap to the originating reco jets.
std::vector< edm::InputTag > particles_
Produces and/or checks pat::VertexAssociation's.