31 #include <fastjet/tools/RestFrameNSubjettinessTagger.hh>
32 #include <fastjet/tools/Boost.hh>
33 #include <fastjet/ClusterSequence.hh>
38 FASTJET_BEGIN_NAMESPACE
46 string RestFrameNSubjettinessTagger::description()
const{
48 oss <<
"RestFrameNSubjettiness tagger that performs clustering in the jet rest frame with "
49 << _subjet_def.description()
50 <<
", supplemented with cuts tau_2 < " << _t2cut
51 <<
" and cos(theta_s) < " << _costscut;
62 throw(
"The jet you try to tag needs to have accessible constituents");
66 for (
unsigned int i=0; i<rest_input.size(); i++)
67 rest_input[i].unboost(jet);
70 vector<PseudoJet> subjets = (_use_exclusive)
81 double ct0 = (j0.px()*jet.px() + j0.py()*jet.py() + j0.pz()*jet.pz())
83 double ct1 = (j1.px()*jet.px() + j1.py()*jet.py() + j1.pz()*jet.pz())
85 if ((ct0 > _costscut) || (ct1 > _costscut))
return PseudoJet();
89 for (
unsigned int i=0; i<rest_input.size(); i++)
90 tau2 += min(dot_product(rest_input[i], j0),
91 dot_product(rest_input[i], j1));
93 tau2 *= (2.0/jet.
m2());
106 PseudoJet subjet_lab1 = cs_structure->
jets()[cs_rest.
history()[subjets[0].cluster_hist_index()].jetp_index];
107 PseudoJet subjet_lab2 = cs_structure->
jets()[cs_rest.
history()[subjets[0].cluster_hist_index()].jetp_index];
109 PseudoJet result_local = join<StructureType>(subjet_lab1,subjet_lab2);
113 s->_costhetas = max(ct0, ct1);
122 FASTJET_END_NAMESPACE