30 deltaR_(iConfig.getParameter<double>(
"deltaR")),
32 consumes<
reco::JetFlavourInfoMatchingCollection>(iConfig.getParameter<
edm::
InputTag>(
"jetFlavourInfos"))) {
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);
63 unsigned int ncand = 0;
76 partonFlavour.push_back(jetFlavourInfoMatching.second.getPartonFlavour());
77 hadronFlavour.push_back(jetFlavourInfoMatching.second.getHadronFlavour());
78 nBHadrons.push_back(jetFlavourInfoMatching.second.getbHadrons().size());
79 nCHadrons.push_back(jetFlavourInfoMatching.second.getcHadrons().size());
92 auto tab = std::make_unique<nanoaod::FlatTable>(ncand,
name_,
false,
true);
93 tab->addColumn<int16_t>(
"partonFlavour",
partonFlavour,
"flavour from parton matching");
94 tab->addColumn<uint8_t>(
"hadronFlavour",
hadronFlavour,
"flavour from hadron ghost clustering");
95 tab->addColumn<uint8_t>(
"nBHadrons",
nBHadrons,
"number of b-hadrons");
96 tab->addColumn<uint8_t>(
"nCHadrons",
nCHadrons,
"number of c-hadrons");
GenJetFlavourTableProducer(const edm::ParameterSet &iConfig)
~GenJetFlavourTableProducer() override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< reco::JetFlavourInfoMatchingCollection > jetFlavourInfosToken_
edm::EDGetTokenT< std::vector< reco::GenJet > > src_
Jets made from MC generator particles.
#define DEFINE_FWK_MODULE(type)
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)