8 #include <fastjet/ClusterSequence.hh>
9 #include <fastjet/JetDefinition.hh>
10 #include <fastjet/PseudoJet.hh>
13 #include <fastjet/contrib/SoftDrop.hh>
23 : _verbosity(verbosity)
30 fastjet::ClusterSequence clusseq;
33 clusseq.print_banner();
37 std::ostringstream nullstream;
38 clusseq.set_fastjet_banner_stream(&nullstream);
39 clusseq.print_banner();
40 clusseq.set_fastjet_banner_stream(&std::cout);
46 os <<
" FastJetAlgo: ";
48 os <<
"ANTIKT r=" <<
_par;
50 os <<
"KT r=" <<
_par;
52 os <<
"CAMBRIDGE r=" <<
_par;
58 if (
_verbosity > 1) std::cout <<
"FastJetAlgo::process_event -- entered" << std::endl;
61 std::vector<fastjet::PseudoJet> pseudojets;
67 if (particles[
ipart]->get_e() == 0.)
continue;
69 fastjet::PseudoJet pseudojet(particles[
ipart]->get_px(),
70 particles[
ipart]->get_py(),
71 particles[
ipart]->get_pz(),
72 particles[
ipart]->get_e());
73 pseudojet.set_user_index(
ipart);
74 pseudojets.push_back(pseudojet);
78 fastjet::JetDefinition* jetdef =
nullptr;
80 jetdef =
new fastjet::JetDefinition(fastjet::antikt_algorithm,
_par, fastjet::E_scheme, fastjet::Best);
82 jetdef =
new fastjet::JetDefinition(fastjet::kt_algorithm,
_par, fastjet::E_scheme, fastjet::Best);
84 jetdef =
new fastjet::JetDefinition(fastjet::cambridge_algorithm,
_par, fastjet::E_scheme, fastjet::Best);
86 return std::vector<Jet*>();
87 fastjet::ClusterSequence jetFinder(pseudojets, *jetdef);
88 std::vector<fastjet::PseudoJet> fastjets = jetFinder.inclusive_jets();
93 std::cout <<
"FastJetAlgo::get_jets : created SoftDrop groomer configuration : " << sd.description() << std::endl;
96 std::vector<Jet*> jets;
97 for (
unsigned int ijet = 0; ijet < fastjets.size(); ++ijet)
100 jet->
set_px(fastjets[ijet].px());
101 jet->
set_py(fastjets[ijet].py());
102 jet->
set_pz(fastjets[ijet].pz());
103 jet->
set_e(fastjets[ijet].
e());
110 fastjet::PseudoJet sd_jet = sd( fastjets[ijet] );
113 std::cout <<
"original jet: pt / eta / phi / m = " << fastjets[ijet].perp() <<
" / " << fastjets[ijet].eta() <<
" / " << fastjets[ijet].phi() <<
" / " << fastjets[ijet].m() << std::endl;
114 std::cout <<
"SoftDropped jet: pt / eta / phi / m = " << sd_jet.perp() <<
" / " << sd_jet.eta() <<
" / " << sd_jet.phi() <<
" / " << sd_jet.m() << std::endl;
116 std::cout <<
" delta_R between subjets: " << sd_jet.structure_of<fastjet::contrib::SoftDrop>().delta_R() << std::endl;
117 std::cout <<
" symmetry measure(z): " << sd_jet.structure_of<fastjet::contrib::SoftDrop>().symmetry() << std::endl;
118 std::cout <<
" mass drop(mu): " << sd_jet.structure_of<fastjet::contrib::SoftDrop>().mu() << std::endl;
122 jet->
set_property( Jet::PROPERTY::prop_zg , sd_jet.structure_of<fastjet::contrib::SoftDrop>().symmetry() );
123 jet->
set_property( Jet::PROPERTY::prop_Rg , sd_jet.structure_of<fastjet::contrib::SoftDrop>().delta_R() );
124 jet->
set_property( Jet::PROPERTY::prop_mu , sd_jet.structure_of<fastjet::contrib::SoftDrop>().mu() );
129 std::vector<fastjet::PseudoJet> comps = fastjets[ijet].constituents();
130 for (
unsigned int icomp = 0; icomp < comps.size(); ++icomp)
132 Jet*
particle = particles[comps[icomp].user_index()];
145 if (
_verbosity > 1) std::cout <<
"FastJetAlgo::process_event -- exited" << std::endl;