36 #include "fastjet/contrib/SoftKiller.hh"
72 : Rho_EtaMax_(iConfig.getParameter<double>(
"Rho_EtaMax")), rParam_(iConfig.getParameter<double>(
"rParam")) {
75 produces<edm::ValueMap<LorentzVector> >(
"SoftKillerP4s");
76 produces<PFOutputCollection>();
93 std::vector<fastjet::PseudoJet> fjInputs;
95 fjInputs.push_back(fastjet::PseudoJet(
i->px(),
i->py(),
i->pz(),
i->energy()));
96 fjInputs.back().set_user_index(
i - ibegin);
102 double pt_threshold = 0.;
103 std::vector<fastjet::PseudoJet> soft_killed_event;
104 soft_killer.apply(fjInputs, soft_killed_event, pt_threshold);
113 for (
auto j = fjInputs.begin(), jend = fjInputs.end();
j != jend; ++
j) {
118 auto val =
j->user_index();
119 auto skmatch = find_if(soft_killed_event.begin(), soft_killed_event.end(), [&
val](fastjet::PseudoJet
const&
i) {
120 return i.user_index() ==
val;
123 if (skmatch != soft_killed_event.end()) {
124 pVec.SetPxPyPzE(skmatch->px(), skmatch->py(), skmatch->pz(), skmatch->E());
126 pVec.SetPxPyPzE(0., 0., 0., 0.);
129 skP4s.push_back(pVec);
130 pOutput->push_back(pCand);