fastjet_areas_2.1.0.cc File Reference

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

Include dependency graph for fastjet_areas_2.1.0.cc:

fastjet/PseudoJet.hhfastjet/ClusterSequenceActiveArea.hhfastjet/internal/numconsts.hhfastjet/internal/base.hhfastjet/ClusterSequenceAreaBase.hhfastjet/ClusterSequenceActiveAreaExplicitGhosts.hhfastjet/ActiveAreaSpec.hhfastjet/ClusterSequenceWithArea.hhfastjet/ClusterSequence.hhfastjet/internal/LimitedWarning.hhfastjet/RangeDefinition.hhfastjet/internal/DynamicNearestNeighbours.hhfastjet/Error.hhfastjet/JetDefinition.hhfastjet/GhostedAreaSpec.hhfastjet/internal/BasicRandom.hh

Go to the source code of this file.

Functions

void print_jets (const fastjet::ClusterSequenceWithArea &clust_seq, const vector< fastjet::PseudoJet > &unsorted_jets)
 a function that pretty prints a list of jets
int main (int argc, char **argv)
 an example program showing how to use fastjet


Function Documentation

int main ( int  argc,
char **  argv 
)

an example program showing how to use fastjet

Definition at line 58 of file fastjet_areas_2.1.0.cc.

References fastjet::Best, fastjet::ClusterSequence::inclusive_jets(), fastjet::kt_algorithm, print_jets(), and fastjet::ClusterSequence::strategy_string().

00058                                   {
00059   
00060   vector<fastjet::PseudoJet> input_particles;
00061   
00062   // read in input particles
00063   double px, py , pz, E;
00064   while (cin >> px >> py >> pz >> E) {
00065     // create a fastjet::PseudoJet with these components and put it onto
00066     // back of the input_particles vector
00067     input_particles.push_back(fastjet::PseudoJet(px,py,pz,E)); 
00068   }
00069   
00070   // create an object that represents your choice of jet finder and 
00071   // the associated parameters
00072   double Rparam = 1.0;
00073   fastjet::Strategy strategy = fastjet::Best;
00074   fastjet::JetDefinition jet_def(fastjet::kt_algorithm, Rparam, strategy);
00075 
00076   // create an object that specifies how we to define the (active) area
00077   double ghost_etamax = 6.0;
00078   int    active_area_repeats = 3;
00079   double ghost_area    = 0.01;
00080   fastjet::ActiveAreaSpec area_spec(ghost_etamax, active_area_repeats, 
00081                                     ghost_area);
00082 
00083   // run the jet clustering with the above jet definition
00084   fastjet::ClusterSequenceActiveArea clust_seq(input_particles, 
00085                                                jet_def, area_spec);
00086 
00087   // tell the user what was done
00088   cout << "Strategy adopted by FastJet was "<<
00089        clust_seq.strategy_string()<<endl<<endl;
00090 
00091   // extract the inclusive jets with pt > 5 GeV, sorted by pt
00092   double ptmin = 5.0;
00093   vector<fastjet::PseudoJet> inclusive_jets = clust_seq.inclusive_jets(ptmin);
00094 
00095   // print them out
00096   cout << "Printing inclusive jets with pt > "<< ptmin<<" GeV\n";
00097   cout << "---------------------------------------\n";
00098   print_jets(clust_seq, inclusive_jets);
00099   cout << endl;
00100 
00101 
00102 }

void print_jets ( const fastjet::ClusterSequenceWithArea ,
const vector< fastjet::PseudoJet > &   
)

a function that pretty prints a list of jets


Generated on Thu Jan 3 19:04:33 2008 for fastjet by  doxygen 1.5.2