#include "FjPseudoJet.hh"
#include "FjClusterSequence.hh"
#include <iostream>
#include <sstream>
#include <vector>
Include dependency graph for fastjet_example_v1_interface.cc:
Go to the source code of this file.
Functions | |
void | print_jets (const FjClusterSequence &clust_seq, const vector< FjPseudoJet > &jets) |
a function that pretty prints a list of jets | |
int | main (int argc, char **argv) |
an example program showing how to use fastjet |
int main | ( | int | argc, | |
char ** | argv | |||
) |
an example program showing how to use fastjet
Definition at line 54 of file fastjet_example_v1_interface.cc.
References Best, fastjet::ClusterSequence::exclusive_jets(), fastjet::ClusterSequence::inclusive_jets(), print_jets(), and fastjet::ClusterSequence::strategy_string().
00054 { 00055 00056 vector<FjPseudoJet> input_particles; 00057 00058 // read in input particles 00059 double px, py , pz, E; 00060 while (cin >> px >> py >> pz >> E) { 00061 // create a FjPseudoJet with these components and put it onto 00062 // back of the input_particles vector 00063 input_particles.push_back(FjPseudoJet(px,py,pz,E)); 00064 } 00065 00066 // run the jet clustering with option R=1.0 and strategy=Best 00067 double Rparam = 1.0; 00068 FjClusterSequence clust_seq(input_particles, Rparam, Best); 00069 00070 // tell the user what was done 00071 cout << "Strategy adopted by FastJet was "<< 00072 clust_seq.strategy_string()<<endl<<endl; 00073 00074 // extract the inclusive jets with pt > 5 GeV, sorted by pt 00075 double ptmin = 5.0; 00076 vector<FjPseudoJet> inclusive_jets = clust_seq.inclusive_jets(ptmin); 00077 00078 // print them out 00079 cout << "Printing inclusive jets with pt > "<< ptmin<<" GeV\n"; 00080 cout << "---------------------------------------\n"; 00081 print_jets(clust_seq, inclusive_jets); 00082 cout << endl; 00083 00084 // extract the exclusive jets with dcut = 25 GeV^2 00085 double dcut = 25.0; 00086 vector<FjPseudoJet> exclusive_jets = clust_seq.exclusive_jets(dcut); 00087 00088 // print them out 00089 cout << "Printing exclusive jets with dcut = "<< dcut<<" GeV^2\n"; 00090 cout << "--------------------------------------------\n"; 00091 print_jets(clust_seq, exclusive_jets); 00092 00093 00094 }
void print_jets | ( | const FjClusterSequence & | , | |
const vector< FjPseudoJet > & | ||||
) |
a function that pretty prints a list of jets