13#include "KtJet/KtEvent.h" 
   14#include "KtJet/KtLorentzVector.h" 
   20void print_jets (
const vector<KtLorentzVector> &);
 
   24int main (
int argc, 
char ** argv) {
 
   26  vector<KtLorentzVector> input_particles;
 
   29  double px, py , pz, E;
 
   30  while (cin >> px >> py >> pz >> E) {
 
   33    input_particles.push_back(KtLorentzVector(px,py,pz,E)); 
 
   39  KtEvent clust_seq(input_particles,4,2,1,Rparam);
 
   43  vector<KtLorentzVector> temporary_jets = clust_seq.getJetsPt();
 
   44  vector<KtLorentzVector> inclusive_jets;
 
   45  for (
unsigned int i = 0; i < temporary_jets.size(); i++) {
 
   46    if (temporary_jets[i].perp() >= ptmin) {
 
   47      inclusive_jets.push_back(temporary_jets[i]);}
 
   52  cout << 
"Printing inclusive jets with pt > "<< ptmin<<
" GeV\n";
 
   53  cout << 
"---------------------------------------\n";
 
   62  clust_seq.findJetsD(dcut * Rparam*Rparam);
 
   63  vector<KtLorentzVector> exclusive_jets = clust_seq.getJetsPt();
 
   66  cout << 
"Printing exclusive jets with dcut = "<< dcut<<
" GeV^2\n";
 
   67  cout << 
"--------------------------------------------\n";
 
   76void print_jets (
const vector<KtLorentzVector> & jets) {
 
   79  printf(
"%5s %15s %15s %15s %15s\n",
"jet #", 
"rapidity", 
 
   80         "phi", 
"pt", 
"n constituents");
 
   83  for (
unsigned int i = 0; i < jets.size(); i++) {
 
   84    int n_constituents = jets[i].getConstituents().size();
 
   85    double phi = jets[i].phi();
 
   86    if (phi < 0.0) {phi += 6.283185307179586476925286766559005768394;}
 
   87    printf(
"%5u %15.8f %15.8f %15.8f %8u\n",
 
   88           i, jets[i].rapidity(), phi,
 
   89           jets[i].perp(), n_constituents);
 
int main()
an example program showing how to use fastjet
 
void print_jets(const vector< fastjet::PseudoJet > &)
a function that pretty prints a list of jets