53 std::vector<float> puppiMultiplicities;
54 std::vector<float> neutralPuppiMultiplicities;
55 std::vector<float> neutralHadronPuppiMultiplicities;
56 std::vector<float> photonPuppiMultiplicities;
57 std::vector<float> HFHadronPuppiMultiplicities;
58 std::vector<float> HFEMPuppiMultiplicities;
60 for (
auto const&
c : *
jets) {
61 float puppiMultiplicity = 0;
62 float neutralPuppiMultiplicity = 0;
63 float neutralHadronPuppiMultiplicity = 0;
64 float photonPuppiMultiplicity = 0;
65 float HFHadronPuppiMultiplicity = 0;
66 float HFEMPuppiMultiplicity = 0;
68 for (
unsigned i = 0;
i <
c.numberOfDaughters();
i++) {
71 puppiMultiplicity +=
weight;
75 neutralHadronPuppiMultiplicity +=
weight;
76 neutralPuppiMultiplicity +=
weight;
79 photonPuppiMultiplicity +=
weight;
80 neutralPuppiMultiplicity +=
weight;
83 HFHadronPuppiMultiplicity +=
weight;
84 neutralPuppiMultiplicity +=
weight;
87 HFEMPuppiMultiplicity +=
weight;
88 neutralPuppiMultiplicity +=
weight;
93 puppiMultiplicities.push_back(puppiMultiplicity);
94 neutralPuppiMultiplicities.push_back(neutralPuppiMultiplicity);
95 neutralHadronPuppiMultiplicities.push_back(neutralHadronPuppiMultiplicity);
96 photonPuppiMultiplicities.push_back(photonPuppiMultiplicity);
97 HFHadronPuppiMultiplicities.push_back(HFHadronPuppiMultiplicity);
98 HFEMPuppiMultiplicities.push_back(HFEMPuppiMultiplicity);
103 puppiMultiplicities_filler.insert(
jets, puppiMultiplicities.begin(), puppiMultiplicities.end());
104 puppiMultiplicities_filler.fill();
105 evt.
put(
std::move(puppiMultiplicities_out),
"puppiMultiplicity");
107 std::unique_ptr<edm::ValueMap<float> > neutralPuppiMultiplicities_out(
new edm::ValueMap<float>());
109 neutralPuppiMultiplicities_filler.insert(
jets, neutralPuppiMultiplicities.begin(), neutralPuppiMultiplicities.end());
110 neutralPuppiMultiplicities_filler.fill();
111 evt.
put(
std::move(neutralPuppiMultiplicities_out),
"neutralPuppiMultiplicity");
113 std::unique_ptr<edm::ValueMap<float> > neutralHadronPuppiMultiplicities_out(
new edm::ValueMap<float>());
115 neutralHadronPuppiMultiplicities_filler.insert(
116 jets, neutralHadronPuppiMultiplicities.begin(), neutralHadronPuppiMultiplicities.end());
117 neutralHadronPuppiMultiplicities_filler.fill();
118 evt.
put(
std::move(neutralHadronPuppiMultiplicities_out),
"neutralHadronPuppiMultiplicity");
120 std::unique_ptr<edm::ValueMap<float> > photonPuppiMultiplicities_out(
new edm::ValueMap<float>());
122 photonPuppiMultiplicities_filler.insert(
jets, photonPuppiMultiplicities.begin(), photonPuppiMultiplicities.end());
123 photonPuppiMultiplicities_filler.fill();
124 evt.
put(
std::move(photonPuppiMultiplicities_out),
"photonPuppiMultiplicity");
126 std::unique_ptr<edm::ValueMap<float> > HFHadronPuppiMultiplicities_out(
new edm::ValueMap<float>());
128 HFHadronPuppiMultiplicities_filler.insert(
129 jets, HFHadronPuppiMultiplicities.begin(), HFHadronPuppiMultiplicities.end());
130 HFHadronPuppiMultiplicities_filler.fill();
131 evt.
put(
std::move(HFHadronPuppiMultiplicities_out),
"HFHadronPuppiMultiplicity");
135 HFEMPuppiMultiplicities_filler.insert(
jets, HFEMPuppiMultiplicities.begin(), HFEMPuppiMultiplicities.end());
136 HFEMPuppiMultiplicities_filler.fill();
137 evt.
put(
std::move(HFEMPuppiMultiplicities_out),
"HFEMPuppiMultiplicity");