many_algs_example.cc File Reference

#include "fastjet/config.h"
#include "run_jet_finder.hh"
#include "fastjet/SISConePlugin.hh"
#include "fastjet/CDFMidPointPlugin.hh"
#include "fastjet/CDFJetCluPlugin.hh"
#include "fastjet/D0RunIIConePlugin.hh"
#include "fastjet/TrackJetPlugin.hh"
#include "fastjet/ATLASConePlugin.hh"
#include "fastjet/EECambridgePlugin.hh"
#include "fastjet/JadePlugin.hh"
#include "fastjet/CMSIterativeConePlugin.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 81 of file many_algs_example.cc.

References antikt_algorithm, cambridge_algorithm, kt_algorithm, read_input_particles(), and run_jet_finder().

00081                                 {
00082 
00083   // read input particles
00084   vector<fastjet::PseudoJet> input_particles;
00085   read_input_particles(cin, input_particles);
00086   
00087   // we will have four jet definitions, and the first two will be
00088   // plugins
00089   vector<fastjet::JetDefinition> jet_defs;
00090   vector<fastjet::JetDefinition::Plugin *> plugins;
00091 
00092   // common parameters
00093   double jet_radius = 0.7;
00094   //double jet_radius = 1.0;
00095   double overlap_threshold = 0.5;
00096 
00097   // set up a pxcone jet definition (if wanted -- requires f77, and you
00098   // should compile the pxcone plugin (not there by default))
00099 #ifdef ENABLE_PLUGIN_PXCONE
00100   double min_jet_energy = 5.0;
00101   bool   E_scheme_jets = false;
00102   plugins.push_back( new fastjet::PxConePlugin (jet_radius, min_jet_energy, 
00103                                         overlap_threshold, E_scheme_jets));
00104   jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
00105 #endif // ENABLE_PLUGIN_PXCONE
00106 
00107 
00108 
00109   // set up a CDF midpoint jet definition
00110 #ifdef ENABLE_PLUGIN_CDFCONES
00111   double seed_threshold = 1.0;
00112   double cone_area_fraction = 1.0;
00113   int    max_pair_size = 2;
00114   int    max_iterations = 100;
00115   plugins.push_back(new fastjet::CDFMidPointPlugin(seed_threshold, jet_radius, 
00116                                           cone_area_fraction, max_pair_size,
00117                                           max_iterations, overlap_threshold));
00118   jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
00119 #endif
00120 
00121   // set up a siscone jet definition
00122 #ifdef ENABLE_PLUGIN_SISCONE
00123   int npass = 0;               // do infinite number of passes
00124   double protojet_ptmin = 0.0; // use all protojets
00125   plugins.push_back(new fastjet::SISConePlugin (jet_radius, overlap_threshold, 
00126                                                 npass, protojet_ptmin));
00127   jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
00128 #endif
00129 
00130   // set up a d0runiicone jet definition
00131 #ifdef ENABLE_PLUGIN_D0RUNIICONE
00132   double min_jet_Et = 6.0; // earlier D0 analyses used 8 GeV
00133   plugins.push_back(new fastjet::D0RunIIConePlugin (jet_radius, min_jet_Et, 
00134                                               overlap_threshold));
00135   jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
00136 #endif // ENABLE_PLUGIN_D0RUNIICONE
00137 
00138   // set up a trackjet
00139 #ifdef ENABLE_PLUGIN_TRACKJET
00140   plugins.push_back(new fastjet::TrackJetPlugin(jet_radius));
00141   jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
00142 #endif // ENABLE_PLUGIN_TRACKJET
00143   // set up a atlascone
00144 #ifdef ENABLE_PLUGIN_ATLASCONE
00145   plugins.push_back(new fastjet::ATLASConePlugin(jet_radius));
00146   jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
00147 #endif // ENABLE_PLUGIN_ATLASCONE
00148   // set up a eecambridge
00149 #ifdef ENABLE_PLUGIN_EECAMBRIDGE
00150   double ycut = 0.08;
00151   plugins.push_back(new fastjet::EECambridgePlugin(ycut));
00152   jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
00153 #endif // ENABLE_PLUGIN_EECAMBRIDGE
00154   // set up a jade
00155 #ifdef ENABLE_PLUGIN_JADE
00156   plugins.push_back(new fastjet::JadePlugin());
00157   jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
00158 #endif // ENABLE_PLUGIN_JADE
00159   // set up a cmsiterativecone
00160 #ifdef ENABLE_PLUGIN_CMSITERATIVECONE
00161   double cms_seed_threshold = 1.0;
00162   plugins.push_back(new fastjet::CMSIterativeConePlugin(jet_radius, cms_seed_threshold));
00163   jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
00164 #endif // ENABLE_PLUGIN_CMSITERATIVECONE
00165   // end of the plugins instantiation (don't modify this line)
00166 
00167   // set up kt and cam/aachen definitions
00168   jet_defs.push_back(fastjet::JetDefinition(fastjet::kt_algorithm, jet_radius));
00169   jet_defs.push_back(fastjet::JetDefinition(fastjet::cambridge_algorithm, 
00170                                             jet_radius));
00171   jet_defs.push_back(fastjet::JetDefinition(fastjet::antikt_algorithm, 
00172                                             jet_radius));
00173 
00174   // call the example jet-finding routine with each of jet definitions
00175   for (vector<fastjet::JetDefinition>::const_iterator jd_it = jet_defs.begin();
00176        jd_it != jet_defs.end(); jd_it++) {
00177     run_jet_finder(input_particles, *jd_it);
00178   }
00179 
00180   // clean up plugin memory.
00181   for (vector<fastjet::JetDefinition>::const_iterator jd_it = jet_defs.begin();
00182        jd_it != jet_defs.end(); jd_it++) {
00183     if (jd_it->plugin() != NULL) delete jd_it->plugin();
00184   }
00185 }


Generated on 26 Feb 2010 for fastjet by  doxygen 1.6.1