51 float cone_boundaries[] = {0.05, 0.1, 0.2, 0.3, 0.4};
52 size_t ncone_boundaries =
sizeof(cone_boundaries) /
sizeof(
float);
53 std::vector<float> emFractionEnergyRings(ncone_boundaries + 1);
54 std::vector<float> chFractionEnergyRings(ncone_boundaries + 1);
55 std::vector<float> neFractionEnergyRings(ncone_boundaries + 1);
56 std::vector<float> muFractionEnergyRings(ncone_boundaries + 1);
57 float jetRawEnergy =
j.p4().E() *
j.jecFactor(
"Uncorrected");
58 int numDaughtersPt03 = 0;
59 for (
unsigned int ijcone = 0; ijcone < ncone_boundaries; ijcone++) {
60 emFractionEnergyRings[ijcone] = 0;
61 muFractionEnergyRings[ijcone] = 0;
62 chFractionEnergyRings[ijcone] = 0;
63 neFractionEnergyRings[ijcone] = 0;
65 for (
const auto&
d :
j.daughterPtrVector()) {
68 std::lower_bound(&cone_boundaries[0], &cone_boundaries[ncone_boundaries], candDr) - &cone_boundaries[0];
69 float candEnergy =
d->energy() / jetRawEnergy;
72 emFractionEnergyRings[icone] += candEnergy;
73 }
else if (
pdgid == 13) {
74 muFractionEnergyRings[icone] += candEnergy;
75 }
else if (
d->charge() != 0) {
76 chFractionEnergyRings[icone] += candEnergy;
78 neFractionEnergyRings[icone] += candEnergy;
81 numDaughtersPt03 += 1;
84 this->
setValue(
"Jet_energyRing_dR0_em_Jet_rawEnergy", emFractionEnergyRings[0]);
85 this->
setValue(
"Jet_energyRing_dR1_em_Jet_rawEnergy", emFractionEnergyRings[1]);
86 this->
setValue(
"Jet_energyRing_dR2_em_Jet_rawEnergy", emFractionEnergyRings[2]);
87 this->
setValue(
"Jet_energyRing_dR3_em_Jet_rawEnergy", emFractionEnergyRings[3]);
88 this->
setValue(
"Jet_energyRing_dR4_em_Jet_rawEnergy", emFractionEnergyRings[4]);
91 this->
setValue(
"Jet_energyRing_dR0_ch_Jet_rawEnergy", chFractionEnergyRings[0]);
92 this->
setValue(
"Jet_energyRing_dR1_ch_Jet_rawEnergy", chFractionEnergyRings[1]);
93 this->
setValue(
"Jet_energyRing_dR2_ch_Jet_rawEnergy", chFractionEnergyRings[2]);
94 this->
setValue(
"Jet_energyRing_dR3_ch_Jet_rawEnergy", chFractionEnergyRings[3]);
95 this->
setValue(
"Jet_energyRing_dR4_ch_Jet_rawEnergy", chFractionEnergyRings[4]);
98 this->
setValue(
"Jet_energyRing_dR0_mu_Jet_rawEnergy", muFractionEnergyRings[0]);
99 this->
setValue(
"Jet_energyRing_dR1_mu_Jet_rawEnergy", muFractionEnergyRings[1]);
100 this->
setValue(
"Jet_energyRing_dR2_mu_Jet_rawEnergy", muFractionEnergyRings[2]);
101 this->
setValue(
"Jet_energyRing_dR3_mu_Jet_rawEnergy", muFractionEnergyRings[3]);
102 this->
setValue(
"Jet_energyRing_dR4_mu_Jet_rawEnergy", muFractionEnergyRings[4]);
105 this->
setValue(
"Jet_energyRing_dR0_neut_Jet_rawEnergy", neFractionEnergyRings[0]);
106 this->
setValue(
"Jet_energyRing_dR1_neut_Jet_rawEnergy", neFractionEnergyRings[1]);
107 this->
setValue(
"Jet_energyRing_dR2_neut_Jet_rawEnergy", neFractionEnergyRings[2]);
108 this->
setValue(
"Jet_energyRing_dR3_neut_Jet_rawEnergy", neFractionEnergyRings[3]);
109 this->
setValue(
"Jet_energyRing_dR4_neut_Jet_rawEnergy", neFractionEnergyRings[4]);
112 this->
setValue(
"Jet_numDaughters_pt03", numDaughtersPt03);