sherpa is hosted by Hepforge, IPPP Durham
close Warning: Can't synchronize with repository "(default)" (/hepforge/svn/sherpa does not appear to be a Subversion repository.). Look in the Trac log for more information.

Ticket #248: 0001-Sort-jets-by-p_t.patch

File 0001-Sort-jets-by-p_t.patch, 1.8 KB (added by Generic User (don't modify these fields), 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 
    171171      (fastjet::PseudoJet(momenta[i][1],momenta[i][2],
    172172                          momenta[i][3],momenta[i][0]));
    173173  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());
    175175  size_t idx(2);
    176176  for (size_t i(0);i<jets.size();++i) {
    177177    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) 
    173173  }
    174174 
    175175  fastjet::ClusterSequence cs(input,*p_jdef);
    176   jets=cs.inclusive_jets();
     176  jets = fastjet::sorted_by_pt(cs.inclusive_jets());
    177177  m_p.clear();
    178178  for (size_t i(0);i<jets.size();++i) {
    179179    Vec4D pj(jets[i].E(),jets[i].px(),jets[i].py(),jets[i].pz());
    bool Fastjet_Selector::JetTrigger(const Vec4D_Vector &p, 
    202202  }
    203203 
    204204  fastjet::ClusterSequence cs(input,*p_jdef);
    205   jets=cs.inclusive_jets();
     205  jets = fastjet::sorted_by_pt(cs.inclusive_jets());
    206206
    207207  m_p.clear();
    208208  for (size_t i(0);i<jets.size();++i) {