#include "fastjet/PseudoJet.hh"#include "fastjet/ClusterSequence.hh"#include <iostream>#include <sstream>#include <vector>Include dependency graph for run_jet_finder.cc:

Go to the source code of this file.
Functions | |
| void | print_jets (const fastjet::ClusterSequence &clust_seq, const vector< fastjet::PseudoJet > &jets) |
| a function that pretty prints a list of jets | |
| void | run_jet_finder (const vector< fastjet::PseudoJet > &input_particles, const fastjet::JetDefinition &jet_def) |
| subroutine that runs fastjet (on input particles from cin) using an arbitrary jet definition supplied as an argument | |
| void | read_input_particles (istream &input, vector< fastjet::PseudoJet > &input_particles) |
| a function that reads particles from the supplied istream | |
| void print_jets | ( | const fastjet::ClusterSequence & | , | |
| const vector< fastjet::PseudoJet > & | ||||
| ) |
a function that pretty prints a list of jets
| void read_input_particles | ( | istream & | input, | |
| vector< fastjet::PseudoJet > & | input_particles | |||
| ) |
a function that reads particles from the supplied istream
Definition at line 73 of file run_jet_finder.cc.
Referenced by main().
00074 { 00075 00076 // read in input particles 00077 double px, py , pz, E; 00078 string line; 00079 while (getline(input, line)) { 00080 if (line.substr(0,1) == "#") {continue;} 00081 istringstream linestream(line); 00082 linestream >> px >> py >> pz >> E; 00083 // create a fastjet::PseudoJet with these components and put it onto 00084 // back of the input_particles vector 00085 input_particles.push_back(fastjet::PseudoJet(px,py,pz,E)); 00086 } 00087 00088 }
| void run_jet_finder | ( | const vector< fastjet::PseudoJet > & | input_particles, | |
| const fastjet::JetDefinition & | jet_def | |||
| ) |
subroutine that runs fastjet (on input particles from cin) using an arbitrary jet definition supplied as an argument
Definition at line 47 of file run_jet_finder.cc.
References fastjet::JetDefinition::description(), fastjet::ClusterSequence::inclusive_jets(), print_jets(), and fastjet::ClusterSequence::unclustered_particles().
Referenced by main().
00048 { 00049 00050 // run the jet clustering with the above jet definition 00051 fastjet::ClusterSequence clust_seq(input_particles, jet_def); 00052 00053 // tell the user what was done 00054 cout << "Ran " << jet_def.description() << endl; 00055 00056 // extract the inclusive jets with pt > 5 GeV 00057 double ptmin = 5.0; 00058 vector<fastjet::PseudoJet> inclusive_jets = clust_seq.inclusive_jets(ptmin); 00059 00060 // print them out 00061 cout << "Printing inclusive jets with pt > "<< ptmin<<" GeV\n"; 00062 cout << "---------------------------------------\n"; 00063 print_jets(clust_seq, inclusive_jets); 00064 cout << endl; 00065 00066 // print out unclustered stuff 00067 cout << clust_seq.unclustered_particles().size() << " particles unclustered" << endl << endl; 00068 }
1.5.2