fastjet 2.4.3
|
#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().
{ // read in input particles double px, py , pz, E; string line; while (getline(input, line)) { if (line.substr(0,1) == "#") {continue;} istringstream linestream(line); linestream >> px >> py >> pz >> E; // create a fastjet::PseudoJet with these components and put it onto // back of the input_particles vector input_particles.push_back(fastjet::PseudoJet(px,py,pz,E)); } }
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 print_jets().
Referenced by main().
{ // run the jet clustering with the above jet definition fastjet::ClusterSequence clust_seq(input_particles, jet_def); // tell the user what was done cout << "Ran " << jet_def.description() << endl; // extract the inclusive jets with pt > 5 GeV double ptmin = 5.0; vector<fastjet::PseudoJet> inclusive_jets = clust_seq.inclusive_jets(ptmin); // print them out cout << "Printing inclusive jets with pt > "<< ptmin<<" GeV\n"; cout << "---------------------------------------\n"; print_jets(clust_seq, inclusive_jets); cout << endl; // print out unclustered stuff cout << clust_seq.unclustered_particles().size() << " particles unclustered" << endl << endl; }