Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

many_algs_example.cc File Reference

#include "run_jet_finder.hh"
#include "CDFMidPointPlugin.hh"
#include "SISConePlugin.hh"
#include "PxConePlugin.hh"
#include <vector>
#include <iostream>
#include "fastjet/PseudoJet.hh"

Include dependency graph for many_algs_example.cc:

Go to the source code of this file.

Functions

int main (int argc, char **argv)


Function Documentation

int main int  argc,
char **  argv
 

Definition at line 49 of file many_algs_example.cc.

References fastjet::cambridge_algorithm, fastjet::kt_algorithm, read_input_particles(), and run_jet_finder().

00049                                 {
00050 
00051   // read input particles
00052   vector<fastjet::PseudoJet> input_particles;
00053   read_input_particles(cin, input_particles);
00054   
00055   // we will have four jet definitions, and the first two will be
00056   // plugins
00057   vector<fastjet::JetDefinition> jet_defs(5);
00058   vector<fastjet::JetDefinition::Plugin *> plugins(3);
00059 
00060   // common parameters
00061   double jet_radius = 0.7;
00062   //double jet_radius = 1.0;
00063   double overlap_threshold = 0.5;
00064 
00065 
00066   // set up a pxcone jet definition
00067   double min_jet_energy = 5.0;
00068   bool   E_scheme_jets = false;
00069   plugins[0] = new fastjet::PxConePlugin (jet_radius, min_jet_energy, 
00070                                          overlap_threshold, E_scheme_jets);
00071   jet_defs[0] = fastjet::JetDefinition(plugins[0]);
00072 
00073 
00074 
00075   // set up a CDF midpoint jet definition
00076   double seed_threshold = 1.0;
00077   double cone_area_fraction = 1.0;
00078   int    max_pair_size = 2;
00079   int    max_iterations = 100;
00080   plugins[1] = new fastjet::CDFMidPointPlugin (seed_threshold, jet_radius, 
00081                                           cone_area_fraction, max_pair_size,
00082                                           max_iterations, overlap_threshold);
00083   jet_defs[1] = fastjet::JetDefinition(plugins[1]);
00084   
00085 
00086   // set up a siscone jet definition
00087   int npass = 0;               // do infinite number of passes
00088   double protojet_ptmin = 0.0; // use all protojets
00089   plugins[2] = new fastjet::SISConePlugin (jet_radius, overlap_threshold, 
00090                                            npass, protojet_ptmin);
00091   jet_defs[2] = fastjet::JetDefinition(plugins[2]);
00092 
00093   // set up kt and cam/aachen definitions
00094   jet_defs[3] = fastjet::JetDefinition(fastjet::kt_algorithm, jet_radius);
00095   jet_defs[4] = fastjet::JetDefinition(fastjet::cambridge_algorithm, 
00096                                        jet_radius);
00097 
00098 
00099   // call the example jet-finding routine with each of jet definitions
00100   for (vector<fastjet::JetDefinition>::const_iterator jd_it = jet_defs.begin();
00101        jd_it != jet_defs.end(); jd_it++) {
00102     run_jet_finder(input_particles, *jd_it);
00103   }
00104 
00105   // clean up plugin memory.
00106   delete plugins[0];
00107   delete plugins[1];
00108   delete plugins[2];
00109 }


Generated on Fri Mar 16 15:25:40 2007 for fastjet by  doxygen 1.4.2