56 cut_(iConfig.getParameter<
std::
string>(
"cut")),
57 tauAncToken_(consumes<
edm::ValueMap<
bool>>(iConfig.getParameter<
edm::
InputTag>(
"hasTauAnc"))) {
58 produces<reco::GenJetCollection>(
"merged");
59 produces<edm::ValueMap<bool>>(
"hasTauAnc");
73 std::vector<bool> hasTauAncValues;
84 for (
unsigned int ijet = 0; ijet < jetHandle->size(); ++ijet) {
85 auto jet = jetHandle->at(ijet);
89 hasTauAncValues.push_back((*tauAncHandle)[jetRef]);
93 for (
auto&
part : *partHandle) {
98 merged->push_back(
jet);
99 hasTauAncValues.push_back(
false);
106 filler.insert(newmerged, hasTauAncValues.begin(), hasTauAncValues.end());
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
void endStream() override
~GenJetGenPartMerger() override
#define DEFINE_FWK_MODULE(type)
std::vector< GenJet > GenJetCollection
collection of GenJet objects
void beginStream(edm::StreamID) override
GenJetGenPartMerger(const edm::ParameterSet &)
Jets made from MC generator particles.
void produce(edm::Event &, const edm::EventSetup &) override
const edm::EDGetTokenT< reco::GenJetCollection > jetToken_
const StringCutObjectSelector< reco::Candidate > cut_
const edm::EDGetTokenT< reco::GenParticleCollection > partToken_
const edm::EDGetTokenT< edm::ValueMap< bool > > tauAncToken_