6 #include "fastjet/ClusterSequence.hh"
7 #include "fastjet/JetDefinition.hh"
18 m_jetdef = fastjet::JetDefinition(jetalg, 1.5) ;
23 m_jetdef = fastjet::JetDefinition(jetalg,
p) ;
30 std::vector<fastjet::PseudoJet> constituents =
jet.constituents();
31 return result(constituents);
36 void decomposeToJetMass(fastjet::PseudoJet &
jet,
double massCut, std::vector<fastjet::PseudoJet> & outSubJets){
38 if(
jet.m() < massCut ) {
39 outSubJets.push_back(
jet);
44 fastjet::PseudoJet
p1,
p2;
45 if( !
jet.has_parents (
p1,
p2) ) return ;
46 decomposeToJetMass(
p1, massCut, outSubJets);
47 decomposeToJetMass(
p2, massCut, outSubJets);
53 double Qw::result(std::vector<fastjet::PseudoJet> &constituents)
const {
57 size_t nconst = constituents.size();
58 if( nconst < 3 )
return 0;
65 std::vector<fastjet::PseudoJet> outjets;
69 outjets= cs.exclusive_jets(3);
75 outjets= cs.exclusive_jets(3);
76 fastjet::PseudoJet sumTot(0,0,0,0) ;
77 sumTot = outjets[0] + outjets[1] + outjets[2];
80 std::vector<fastjet::PseudoJet> tmp_subjets; tmp_subjets.reserve(4);
81 decomposeToJetMass(outjets[0],
m_massCut , tmp_subjets);
82 decomposeToJetMass(outjets[1],
m_massCut , tmp_subjets);
83 decomposeToJetMass(outjets[2],
m_massCut , tmp_subjets);
85 outjets = fastjet::sorted_by_pt( tmp_subjets) ;
90 fastjet::PseudoJet sumSubJ(0,0,0,0);
91 sumSubJ = outjets[0] + outjets[1] + outjets[2];
92 scaleF = sumTot.pt()/sumSubJ.pt();
98 outjets = fastjet::sorted_by_pt(cs.inclusive_jets());
102 size_t nsubjets = outjets.size();
103 if( nsubjets < 3 )
return 0;
107 fastjet::PseudoJet sumTot(0,0,0,0), sumSubJ(0,0,0,0);
108 for( fastjet::PseudoJet&
c: constituents) sumTot+=
c;
113 for( fastjet::PseudoJet&
c: outjets ) sumSubJ+=
c;
114 scaleF = sumTot.pt()/sumSubJ.pt();
120 double m12 = (outjets[0]+outjets[1]).
m();
121 double m23 = (outjets[2]+outjets[1]).
m();
122 double m13 = (outjets[2]+outjets[0]).
m();