65 : dRcone_(iConfig.getParameter<double>(
"dRcone")),
66 usePAT_(iConfig.getParameter<
bool>(
"UsePAT")),
68 input_trackjets_token_(consumes<
edm::
View<
reco::TrackJet> >(iConfig.getParameter<
edm::
InputTag>(
"srcTrackJets"))),
73 produces<reco::CaloJetCollection>();
78 desc.add<
double>(
"dRcone", 0.4);
79 desc.add<
bool>(
"UsePAT",
false);
94 auto pCaloOut = std::make_unique<reco::CaloJetCollection>();
96 for (
auto const&
jet : jetsTrackJets) {
98 for (
auto const& oldjet :
jets) {
115 double eefraction = 0.;
116 double hhfraction = 0.;
126 caloen = caloen +
pf.energy() *
pf.caloFraction();
129 hadinhb +=
pf.energy() *
pf.caloFraction() *
pf.hcalFraction();
130 emineb +=
pf.energy() *
pf.caloFraction() * (1. -
pf.hcalFraction());
132 hadinhe +=
pf.energy() *
pf.caloFraction() *
pf.hcalFraction();
133 eminee +=
pf.energy() *
pf.caloFraction() * (1. -
pf.hcalFraction());
135 hadinhf +=
pf.energy() *
pf.caloFraction() *
pf.hcalFraction();
136 eminhf +=
pf.energy() *
pf.caloFraction() * (1. -
pf.hcalFraction());
142 for (
auto const& ct : cts) {
146 caloen = caloen + ct.energy();
147 hadinho += ct.energyInHO();
148 hadinhb += ct.energyInHB();
149 hadinhe += ct.energyInHE();
150 hadinhf += 0.5 * ct.energyInHF();
151 emineb += ct.energy() - ct.energyInHB() - ct.energyInHO();
152 eminee += ct.energy() - ct.energyInHE();
153 eminhf += 0.5 * ct.energyInHF();
157 eefraction = (emineb + eminee) / caloen;
158 hhfraction = (hadinhb + hadinhe + hadinhf + hadinho) / caloen;
160 double trackp =
jet.p();
166 calospe.mHadEnergyInHO = hadinho;
167 calospe.mHadEnergyInHB = hadinhb;
168 calospe.mHadEnergyInHE = hadinhe;
169 calospe.mHadEnergyInHF = hadinhf;
170 calospe.mEmEnergyInEB = emineb;
171 calospe.mEmEnergyInEE = eminee;
172 calospe.mEmEnergyInHF = eminhf;
173 calospe.mEnergyFractionEm = eefraction / caloen;
174 calospe.mEnergyFractionHadronic = hhfraction / caloen;
178 pCaloOut->push_back(mycalo);