55 iConfig.getParameter<
VInputTag>(
"candidates") :
56 VInputTag(1, iConfig.getParameter<
edm::InputTag>(
"candidates")) ),
62 produces<VertexAssociationMap>();
71 using namespace edm;
using namespace std;
76 auto result = std::make_unique<VertexAssociationMap>();
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());
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
pat::helper::VertexingHelper vertexing_
#define DEFINE_FWK_MODULE(type)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
~PATVertexAssociationProducer() override
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.