43 #include "fastjet/ClusterSequence.hh"
54 vector<PseudoJet> input_particles;
56 double px, py , pz, E;
57 while (cin >> px >> py >> pz >> E) {
60 input_particles.push_back(
PseudoJet(px,py,pz,E));
76 vector<PseudoJet> inclusive_jets =
sorted_by_pt(clust_seq.inclusive_jets(ptmin));
90 double dcut = pow(Rsub/R,2);
93 cout <<
"Ran " << jet_def.description() << endl;
94 cout <<
"Showing the jets above " << ptmin <<
" GeV" << endl;
95 cout <<
"And their subjets for Rsub = " << Rsub << endl;
96 printf(
"%10s %15s %15s %15s %15s\n",
"jet #",
"rapidity",
"phi",
"pt",
"n constituents");
99 for (
unsigned int i = 0; i < inclusive_jets.size(); i++) {
101 vector<PseudoJet> subjets =
sorted_by_pt(inclusive_jets[i].exclusive_subjets(dcut));
105 printf(
"%5u %15.8f %15.8f %15.8f %8d\n", i,
106 inclusive_jets[i].rap(), inclusive_jets[i].phi(),
107 inclusive_jets[i].perp(),
int(inclusive_jets[i].constituents().size()));
109 for (
unsigned int j=0; j<subjets.size(); j++)
110 printf(
" sub%4u %15.8f %15.8f %15.8f %8u\n", j,
111 subjets[j].rap(), subjets[j].phi(),
113 (
unsigned int) subjets[j].constituents().size());
vector< PseudoJet > sorted_by_pt(const vector< PseudoJet > &jets)
return a vector of jets sorted into decreasing kt2
int main()
an example program showing how to use fastjet
Class to contain pseudojets, including minimal information of use to jet-clustering routines...
class that is intended to hold a full definition of the jet clusterer