50 produces<reco::JetFlavourInfoMatchingCollection>();
71 assert(genJets->size() == genJetFlavourInfos->
size());
76 for (
unsigned int i=0;
i<genJets->size();++
i){
78 slimmedGenJetRef = (*slimmedGenJetAssociation)[genJets->refAt(
i)];
79 if(!slimmedGenJetRef)
continue;
80 (*jetFlavourInfos)[
reco::JetBaseRef(slimmedGenJetRef)] = (*genJetFlavourInfos)[
i].second;
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EDGetTokenT< edm::View< reco::Jet > > slimmedGenJetsToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#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
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
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_