45 genJetFlavourInfosToken_(
46 consumes<
reco::JetFlavourInfoMatchingCollection>(iConfig.getParameter<
edm::
InputTag>(
"genJetFlavourInfos"))),
48 iConfig.getParameter<
edm::
InputTag>(
"slimmedGenJetAssociation"))) {
49 produces<reco::JetFlavourInfoMatchingCollection>();
73 for (
unsigned int i = 0;
i <
genJets->size(); ++
i) {
74 slimmedGenJetRef = (*slimmedGenJetAssociation)[
genJets->refAt(
i)];
75 if (!slimmedGenJetRef)
77 (*jetFlavourInfos)[
reco::JetBaseRef(slimmedGenJetRef)] = (*genJetFlavourInfos)[
i].second;
const edm::EDGetTokenT< edm::View< reco::Jet > > slimmedGenJetsToken_
#define DEFINE_FWK_MODULE(type)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
Transfers the JetFlavourInfos from the original GenJets to the slimmedGenJets in MiniAOD.
~GenJetFlavourInfoPreserver() override
edm::RefToBaseProd< reco::Jet > JetRefBaseProd
GenJetFlavourInfoPreserver(const edm::ParameterSet &iConfig)
edm::RefToBase< Jet > JetBaseRef
const edm::EDGetTokenT< reco::JetFlavourInfoMatchingCollection > genJetFlavourInfosToken_
const edm::EDGetTokenT< edm::View< reco::GenJet > > genJetsToken_
const edm::EDGetTokenT< edm::Association< std::vector< reco::GenJet > > > slimmedGenJetAssociationToken_