34 produces<reco::PFCandidateCollection>();
40 descriptions.
add(
"pfTICLProducer", desc);
47 const auto ticl_candidates = *ticl_cand_h;
49 auto candidates = std::make_unique<reco::PFCandidateCollection>();
51 for (
const auto& ticl_cand : ticl_candidates) {
52 const auto abs_pdg_id =
std::abs(ticl_cand.pdgId());
53 const auto charge = ticl_cand.charge();
54 const auto& four_mom = ticl_cand.p4();
55 double ecal_energy = 0.;
57 for (
const auto&
t : ticl_cand.tracksters()) {
58 double ecal_energy_fraction =
t->raw_em_pt() /
t->raw_pt();
59 ecal_energy +=
t->raw_energy() * ecal_energy_fraction;
61 double hcal_energy = ticl_cand.rawEnergy() - ecal_energy;
63 hcal_energy = hcal_energy < 0 ? 0 : hcal_energy;
90 candidate.setEcalEnergy(ecal_energy, ecal_energy);
91 candidate.setHcalEnergy(hcal_energy, hcal_energy);
92 if (candidate.charge()) {
96 candidate.setTrackRef(ref);
98 candidate.setTime(ticl_cand.time(), ticl_cand.timeError());