fastjet 2.4.5
Functions
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 fastjet::antikt_algorithm, fastjet::cambridge_algorithm, fastjet::kt_algorithm, read_input_particles(), and run_jet_finder().

                                {

  // read input particles
  vector<fastjet::PseudoJet> input_particles;
  read_input_particles(cin, input_particles);
  
  // we will have four jet definitions, and the first two will be
  // plugins
  vector<fastjet::JetDefinition> jet_defs;
  vector<fastjet::JetDefinition::Plugin *> plugins;

  // common parameters
  double jet_radius = 0.7;
  //double jet_radius = 1.0;
  double overlap_threshold = 0.5;

  // set up a pxcone jet definition (if wanted -- requires f77, and you
  // should compile the pxcone plugin (not there by default))
#ifdef ENABLE_PLUGIN_PXCONE
  double min_jet_energy = 5.0;
  bool   E_scheme_jets = false;
  plugins.push_back( new fastjet::PxConePlugin (jet_radius, min_jet_energy, 
                                        overlap_threshold, E_scheme_jets));
  jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
#endif // ENABLE_PLUGIN_PXCONE



  // set up a CDF midpoint jet definition
#ifdef ENABLE_PLUGIN_CDFCONES
  double seed_threshold = 1.0;
  double cone_area_fraction = 1.0;
  int    max_pair_size = 2;
  int    max_iterations = 100;
  plugins.push_back(new fastjet::CDFMidPointPlugin(seed_threshold, jet_radius, 
                                          cone_area_fraction, max_pair_size,
                                          max_iterations, overlap_threshold));
  jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
#endif

  // set up a siscone jet definition
#ifdef ENABLE_PLUGIN_SISCONE
  int npass = 0;               // do infinite number of passes
  double protojet_ptmin = 0.0; // use all protojets
  plugins.push_back(new fastjet::SISConePlugin (jet_radius, overlap_threshold, 
                                                npass, protojet_ptmin));
  jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
#endif

  // set up a d0runiicone jet definition
#ifdef ENABLE_PLUGIN_D0RUNIICONE
  double min_jet_Et = 6.0; // earlier D0 analyses used 8 GeV
  plugins.push_back(new fastjet::D0RunIIConePlugin (jet_radius, min_jet_Et, 
                                              overlap_threshold));
  jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
#endif // ENABLE_PLUGIN_D0RUNIICONE

  // set up a trackjet
#ifdef ENABLE_PLUGIN_TRACKJET
  plugins.push_back(new fastjet::TrackJetPlugin(jet_radius));
  jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
#endif // ENABLE_PLUGIN_TRACKJET
  // set up a atlascone
#ifdef ENABLE_PLUGIN_ATLASCONE
  plugins.push_back(new fastjet::ATLASConePlugin(jet_radius));
  jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
#endif // ENABLE_PLUGIN_ATLASCONE
  // set up a eecambridge
#ifdef ENABLE_PLUGIN_EECAMBRIDGE
  double ycut = 0.08;
  plugins.push_back(new fastjet::EECambridgePlugin(ycut));
  jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
#endif // ENABLE_PLUGIN_EECAMBRIDGE
  // set up a jade
#ifdef ENABLE_PLUGIN_JADE
  plugins.push_back(new fastjet::JadePlugin());
  jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
#endif // ENABLE_PLUGIN_JADE
  // set up a cmsiterativecone
#ifdef ENABLE_PLUGIN_CMSITERATIVECONE
  double cms_seed_threshold = 1.0;
  plugins.push_back(new fastjet::CMSIterativeConePlugin(jet_radius, cms_seed_threshold));
  jet_defs.push_back(fastjet::JetDefinition(plugins.back()));
#endif // ENABLE_PLUGIN_CMSITERATIVECONE
  // end of the plugins instantiation (don't modify this line)

  // set up kt and cam/aachen definitions
  jet_defs.push_back(fastjet::JetDefinition(fastjet::kt_algorithm, jet_radius));
  jet_defs.push_back(fastjet::JetDefinition(fastjet::cambridge_algorithm, 
                                            jet_radius));
  jet_defs.push_back(fastjet::JetDefinition(fastjet::antikt_algorithm, 
                                            jet_radius));

  // call the example jet-finding routine with each of jet definitions
  for (vector<fastjet::JetDefinition>::const_iterator jd_it = jet_defs.begin();
       jd_it != jet_defs.end(); jd_it++) {
    run_jet_finder(input_particles, *jd_it);
  }

  // clean up plugin memory.
  for (vector<fastjet::JetDefinition>::const_iterator jd_it = jet_defs.begin();
       jd_it != jet_defs.end(); jd_it++) {
    if (jd_it->plugin() != NULL) delete jd_it->plugin();
  }
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines