#include "fastjet/PseudoJet.hh"#include "fastjet/ClusterSequence.hh"#include <iostream>#include <sstream>#include <vector>#include <cstdio>

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 & | clust_seq, | |
| const vector< fastjet::PseudoJet > & | jets | |||
| ) |
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 74 of file run_jet_finder.cc.
Referenced by main().
00075 { 00076 00077 // read in input particles 00078 double px, py , pz, E; 00079 string line; 00080 while (getline(input, line)) { 00081 if (line.substr(0,1) == "#") {continue;} 00082 istringstream linestream(line); 00083 linestream >> px >> py >> pz >> E; 00084 // create a fastjet::PseudoJet with these components and put it onto 00085 // back of the input_particles vector 00086 input_particles.push_back(fastjet::PseudoJet(px,py,pz,E)); 00087 } 00088 00089 }
| 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 48 of file run_jet_finder.cc.
References fastjet::JetDefinition::description(), fastjet::ClusterSequence::inclusive_jets(), print_jets(), and fastjet::ClusterSequence::unclustered_particles().
Referenced by main().
00049 { 00050 00051 // run the jet clustering with the above jet definition 00052 fastjet::ClusterSequence clust_seq(input_particles, jet_def); 00053 00054 // tell the user what was done 00055 cout << "Ran " << jet_def.description() << endl; 00056 00057 // extract the inclusive jets with pt > 5 GeV 00058 double ptmin = 5.0; 00059 vector<fastjet::PseudoJet> inclusive_jets = clust_seq.inclusive_jets(ptmin); 00060 00061 // print them out 00062 cout << "Printing inclusive jets with pt > "<< ptmin<<" GeV\n"; 00063 cout << "---------------------------------------\n"; 00064 print_jets(clust_seq, inclusive_jets); 00065 cout << endl; 00066 00067 // print out unclustered stuff 00068 cout << clust_seq.unclustered_particles().size() << " particles unclustered" << endl << endl; 00069 }
1.5.7.1