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);
102 auto newmerged = iEvent.
put(
std::move(merged),
"merged");
106 filler.
insert(newmerged, hasTauAncValues.begin(), hasTauAncValues.end());
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void endStream() override
~GenJetGenPartMerger() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< GenJet > GenJetCollection
collection of GenJet objects
void insert(const H &h, I begin, I end)
void beginStream(edm::StreamID) override
void setCharge(Charge q) final
set electric charge
GenJetGenPartMerger(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
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_
void setPdgId(int pdgId) final
void setP4(const LorentzVector &p4) final
set 4-momentum