Ticket #248: 0001-Sort-jets-by-p_t.patch
File 0001-Sort-jets-by-p_t.patch, 1.8 KB (added by , 12 years ago) |
---|
-
PHASIC++/Scales/Fastjet_Scale_Setter.C
From 8d08cd0141439abb114ddd791f108dadabb96abb Mon Sep 17 00:00:00 2001 From: Valery Yundin <yuvalery@gmail.com> Date: Sun, 29 Apr 2012 10:27:25 +0200 Subject: [PATCH] Sort jets by p_t --- PHASIC++/Scales/Fastjet_Scale_Setter.C | 2 +- PHASIC++/Selectors/Fastjet_Selector.C | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PHASIC++/Scales/Fastjet_Scale_Setter.C b/PHASIC++/Scales/Fastjet_Scale_Setter.C index 42f4232..cfb8086 100644
a b double Fastjet_Scale_Setter::Calculate 171 171 (fastjet::PseudoJet(momenta[i][1],momenta[i][2], 172 172 momenta[i][3],momenta[i][0])); 173 173 fastjet::ClusterSequence cs(input,*p_jdef); 174 std::vector<fastjet::PseudoJet> jets (cs.inclusive_jets());174 std::vector<fastjet::PseudoJet> jets = fastjet::sorted_by_pt(cs.inclusive_jets()); 175 175 size_t idx(2); 176 176 for (size_t i(0);i<jets.size();++i) { 177 177 Vec4D pj(jets[i].E(),jets[i].px(),jets[i].py(),jets[i].pz()); -
PHASIC++/Selectors/Fastjet_Selector.C
diff --git a/PHASIC++/Selectors/Fastjet_Selector.C b/PHASIC++/Selectors/Fastjet_Selector.C index 5d350b7..39d02a6 100644
a b bool Fastjet_Selector::Trigger(const Vec4D_Vector &p) 173 173 } 174 174 175 175 fastjet::ClusterSequence cs(input,*p_jdef); 176 jets =cs.inclusive_jets();176 jets = fastjet::sorted_by_pt(cs.inclusive_jets()); 177 177 m_p.clear(); 178 178 for (size_t i(0);i<jets.size();++i) { 179 179 Vec4D pj(jets[i].E(),jets[i].px(),jets[i].py(),jets[i].pz()); … … bool Fastjet_Selector::JetTrigger(const Vec4D_Vector &p, 202 202 } 203 203 204 204 fastjet::ClusterSequence cs(input,*p_jdef); 205 jets =cs.inclusive_jets();205 jets = fastjet::sorted_by_pt(cs.inclusive_jets()); 206 206 207 207 m_p.clear(); 208 208 for (size_t i(0);i<jets.size();++i) {