19 produces<edm::ValueMap<float>>(
"dR2Mean");
20 produces<edm::ValueMap<float>>(
"majW");
21 produces<edm::ValueMap<float>>(
"minW");
22 produces<edm::ValueMap<float>>(
"frac01");
23 produces<edm::ValueMap<float>>(
"frac02");
24 produces<edm::ValueMap<float>>(
"frac03");
25 produces<edm::ValueMap<float>>(
"frac04");
26 produces<edm::ValueMap<float>>(
"ptD");
27 produces<edm::ValueMap<float>>(
"beta");
28 produces<edm::ValueMap<float>>(
"pull");
29 produces<edm::ValueMap<float>>(
"jetR");
30 produces<edm::ValueMap<float>>(
"jetRchg");
31 produces<edm::ValueMap<int>>(
"nCharged");
50 unsigned int nJet =
srcJet->size();
52 std::vector<float> dR2Mean(nJet, -1);
53 std::vector<float> majW(nJet, -1);
54 std::vector<float> minW(nJet, -1);
55 std::vector<float> frac01(nJet, -1);
56 std::vector<float> frac02(nJet, -1);
57 std::vector<float> frac03(nJet, -1);
58 std::vector<float> frac04(nJet, -1);
59 std::vector<float>
ptD(nJet, -1);
60 std::vector<float>
beta(nJet, -1);
61 std::vector<float> pull(nJet, -1);
62 std::vector<float>
jetR(nJet, -1);
63 std::vector<float> jetRchg(nJet, -1);
66 for (
unsigned int ij = 0; ij < nJet; ij++) {
71 dR2Mean[ij] = pileupJetIdProd[jetRef].dR2Mean();
72 majW[ij] = pileupJetIdProd[jetRef].majW();
73 minW[ij] = pileupJetIdProd[jetRef].minW();
74 frac01[ij] = pileupJetIdProd[jetRef].frac01();
75 frac02[ij] = pileupJetIdProd[jetRef].frac02();
76 frac03[ij] = pileupJetIdProd[jetRef].frac03();
77 frac04[ij] = pileupJetIdProd[jetRef].frac04();
78 ptD[ij] = pileupJetIdProd[jetRef].ptD();
79 beta[ij] = pileupJetIdProd[jetRef].beta();
80 pull[ij] = pileupJetIdProd[jetRef].pull();
81 jetR[ij] = pileupJetIdProd[jetRef].jetR();
82 jetRchg[ij] = pileupJetIdProd[jetRef].jetRchg();
83 nCharged[ij] = pileupJetIdProd[jetRef].nCharged();
88 filler_dR2Mean.
insert(
srcJet, dR2Mean.begin(), dR2Mean.end());
89 filler_dR2Mean.
fill();
106 filler_frac01.
insert(
srcJet, frac01.begin(), frac01.end());
107 filler_frac01.
fill();
112 filler_frac02.
insert(
srcJet, frac02.begin(), frac02.end());
113 filler_frac02.
fill();
118 filler_frac03.
insert(
srcJet, frac03.begin(), frac03.end());
119 filler_frac03.
fill();
124 filler_frac04.
insert(
srcJet, frac04.begin(), frac04.end());
125 filler_frac04.
fill();
154 filler_jetRchg.
insert(
srcJet, jetRchg.begin(), jetRchg.end());
155 filler_jetRchg.
fill();
161 filler_nCharged.
fill();
171 desc.add<
edm::InputTag>(
"srcPileupJetId")->setComment(
"StoredPileupJetIdentifier ValueMap input collection");
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void insert(const H &h, I begin, I end)
~PileupJetIDVarProducer() override
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< edm::ValueMap< StoredPileupJetIdentifier > > srcPileupJetId_
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edm::View< pat::Jet > > srcJet_
PileupJetIDVarProducer(const edm::ParameterSet &iConfig)