30 deltaR_(iConfig.getParameter<double>(
"deltaR")),
33 produces<nanoaod::FlatTable>();
41 desc.
add<
edm::InputTag>(
"jetFlavourInfos")->setComment(
"input flavour info collection");
42 desc.
add<
std::string>(
"name")->setComment(
"name of the genJet FlatTable we are extending with flavour information");
43 desc.
add<
std::string>(
"cut")->setComment(
"cut on input genJet collection");
44 desc.
add<
double>(
"deltaR")->setComment(
"deltaR to match genjets");
45 descriptions.
add(
"genJetFlavourTable", desc);
69 unsigned int ncand = 0;
79 partonFlavour.push_back(jetFlavourInfoMatching.second.getPartonFlavour());
80 hadronFlavour.push_back(jetFlavourInfoMatching.second.getHadronFlavour());
86 partonFlavour.push_back(0);
87 hadronFlavour.push_back(0);
91 auto tab = std::make_unique<nanoaod::FlatTable>(ncand,
name_,
false,
true);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
GenJetFlavourTableProducer(const edm::ParameterSet &iConfig)
~GenJetFlavourTableProducer() override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::JetFlavourInfoMatchingCollection > jetFlavourInfosToken_
edm::EDGetTokenT< std::vector< reco::GenJet > > src_
Jets made from MC generator particles.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void produce(edm::Event &, edm::EventSetup const &) override
JetFlavourInfoMatchingCollection::value_type JetFlavourInfoMatching
const StringCutObjectSelector< reco::GenJet > cut_
void add(std::string const &label, ParameterSetDescription const &psetDescription)