52 PATVertexAssociationProducer::PATVertexAssociationProducer(
const edm::ParameterSet& iConfig) :
53 particles_( iConfig.existsAs<
VInputTag>(
"candidates") ?
54 iConfig.getParameter<
VInputTag>(
"candidates") :
55 VInputTag(1, iConfig.getParameter<edm::InputTag>(
"candidates")) ),
58 produces<VertexAssociationMap>();
67 using namespace edm;
using namespace std;
74 vector<pat::VertexAssociation> assos;
81 assos.clear(); assos.reserve(cands->size());
83 for (
size_t i = 0,
n = cands->size();
i <
n; ++
i) {
87 filler.
insert(cands, assos.begin(), assos.end());
#define DEFINE_FWK_MODULE(type)
void insert(const H &h, I begin, I end)
pat::helper::VertexingHelper vertexing_
~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)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< edm::InputTag > VInputTag
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.