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

fastjet::SISConePlugin Class Reference

SISConePlugin is a plugin for fastjet (v2.1 upwards) that provides an interface to the seedless infrared safe cone jet finder by Gregory Soyez and Gavin Salam. More...

#include <SISConePlugin.hh>

Inheritance diagram for fastjet::SISConePlugin:

Inheritance graph
[legend]
Collaboration diagram for fastjet::SISConePlugin:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SISConePlugin (double cone_radius, double overlap_threshold=0.5, int n_pass_max=1, double protojet_ptmin=0.0, bool caching=false, bool split_merge_on_transverse_mass=true)
 Constructor for the SISCone Plugin class.
 SISConePlugin (double cone_radius, double overlap_threshold, int n_pass_max, bool caching)
 backwards compatible constructor for the SISCone Plugin class (avoid using this in future).
 SISConePlugin (const SISConePlugin &plugin)
 copy constructor
double cone_radius () const
 the cone radius
double overlap_threshold () const
 Fraction of overlap energy in a jet above which jets are merged and below which jets are split.
int n_pass_max () const
 the maximum number of passes of stable-cone searching (<=0 is same as infinity).
double protojet_ptmin () const
 minimum pt for a protojet to be considered in the split-merge step of the algorithm
bool split_merge_on_transverse_mass () const
 indicates whether the split-merge orders on transverse mass or not.
void set_split_merge_on_transverse_mass (bool val)
bool caching () const
 indicates whether caching is turned on or not.
virtual std::string description () const
 return a textual description of the jet-definition implemented in this plugin
virtual void run_clustering (ClusterSequence &) const
 given a ClusterSequence that has been filled up with initial particles, the following function should fill up the rest of the ClusterSequence, using the following member functions of ClusterSequence:
  • plugin_do_ij_recombination(.


Private Attributes

double _cone_radius
double _overlap_threshold
int _n_pass_max
double _protojet_ptmin
bool _caching
bool _split_merge_on_transverse_mass

Static Private Attributes

static std::auto_ptr< SISConePluginstored_plugin
static std::auto_ptr< std::vector<
PseudoJet > > 
stored_particles
static std::auto_ptr< siscone::Csiscone > stored_siscone

Detailed Description

SISConePlugin is a plugin for fastjet (v2.1 upwards) that provides an interface to the seedless infrared safe cone jet finder by Gregory Soyez and Gavin Salam.

As of 2006-12-26, this plugin is beta, as is the SISCone code itself.

SISCone uses geometrical techniques to exhaustively consider all possible distinct cones. It then finds out which ones are stable and sends the result to the Tevatron Run-II type split-merge procedure for overlapping cones.

Four parameters govern the "physics" of the algorithm:

One parameter governs some internal algorithmic shortcuts:

The final jets can be accessed by requestion the inclusive_jets(...) from the ClusterSequence object. Note that these PseudoJets have their user_index() set to the index of the pass in which they were found (first pass = 0). NB: This does not currently work for jets that consist of a single particle.

For further information on the details of the algorithm see the SISCone paper; for documentation about the implementation, see the siscone/doc/html/index.html file.

Definition at line 75 of file SISConePlugin.hh.


Constructor & Destructor Documentation

fastjet::SISConePlugin::SISConePlugin double  cone_radius,
double  overlap_threshold = 0.5,
int  n_pass_max = 1,
double  protojet_ptmin = 0.0,
bool  caching = false,
bool  split_merge_on_transverse_mass = true
[inline]
 

Constructor for the SISCone Plugin class.

Definition at line 79 of file SISConePlugin.hh.

Referenced by run_clustering().

fastjet::SISConePlugin::SISConePlugin double  cone_radius,
double  overlap_threshold,
int  n_pass_max,
bool  caching
[inline]
 

backwards compatible constructor for the SISCone Plugin class (avoid using this in future).

Definition at line 94 of file SISConePlugin.hh.

fastjet::SISConePlugin::SISConePlugin const SISConePlugin plugin  )  [inline]
 

copy constructor

Definition at line 106 of file SISConePlugin.hh.

00106                                                {
00107     *this = plugin;
00108   }


Member Function Documentation

bool fastjet::SISConePlugin::caching  )  const [inline]
 

indicates whether caching is turned on or not.

Definition at line 131 of file SISConePlugin.hh.

Referenced by description(), and run_clustering().

00131 {return _caching ;}

double fastjet::SISConePlugin::cone_radius  )  const [inline]
 

the cone radius

Definition at line 111 of file SISConePlugin.hh.

Referenced by description(), and run_clustering().

00111 {return _cone_radius        ;}

string fastjet::SISConePlugin::description  )  const [virtual]
 

return a textual description of the jet-definition implemented in this plugin

Implements fastjet::JetDefinition::Plugin.

Definition at line 20 of file SISConePlugin.cc.

References _split_merge_on_transverse_mass, caching(), cone_radius(), n_pass_max(), overlap_threshold(), and protojet_ptmin().

00020                                          {
00021   ostringstream desc;
00022   
00023   const string on = "on";
00024   const string off = "off";
00025   const string pt2m2 = "mt=sqrt(pt^2+m^2)";
00026   const string pt2 = "pt (IR unsafe)";
00027 
00028   desc << "SISCone jet finder with " ;
00029   desc << "cone_radius = "       << cone_radius        () << ", ";
00030   desc << "overlap_threshold = " << overlap_threshold  () << ", ";
00031   desc << "n_pass_max = "        << n_pass_max         () << ", ";
00032   desc << "protojet_ptmin = "    << protojet_ptmin()      << ", ";
00033   desc << "split-merge uses " << (_split_merge_on_transverse_mass ? 
00034                                    pt2m2 : pt2) << ", ";
00035   desc << "caching turned "      << (caching() ? on : off);
00036 
00037   // create a fake scones object so that we can find out more about it
00038   Csiscone siscone;
00039   if (siscone.merge_identical_protocones) {
00040     desc << ", and (IR unsafe) merge_indentical_protocones=true" ;
00041   }
00042 
00043   return desc.str();
00044 }

int fastjet::SISConePlugin::n_pass_max  )  const [inline]
 

the maximum number of passes of stable-cone searching (<=0 is same as infinity).

Definition at line 119 of file SISConePlugin.hh.

Referenced by description(), and run_clustering().

00119 {return _n_pass_max  ;}

double fastjet::SISConePlugin::overlap_threshold  )  const [inline]
 

Fraction of overlap energy in a jet above which jets are merged and below which jets are split.

Definition at line 115 of file SISConePlugin.hh.

Referenced by description(), and run_clustering().

00115 {return _overlap_threshold  ;}

double fastjet::SISConePlugin::protojet_ptmin  )  const [inline]
 

minimum pt for a protojet to be considered in the split-merge step of the algorithm

Definition at line 123 of file SISConePlugin.hh.

Referenced by description(), and run_clustering().

00123 {return _protojet_ptmin  ;}

void fastjet::SISConePlugin::run_clustering ClusterSequence  )  const [virtual]
 

given a ClusterSequence that has been filled up with initial particles, the following function should fill up the rest of the ClusterSequence, using the following member functions of ClusterSequence:

  • plugin_do_ij_recombination(.

..)

  • plugin_do_iB_recombination(...)

Implements fastjet::JetDefinition::Plugin.

Definition at line 54 of file SISConePlugin.cc.

References fastjet::SISConeExtras::_jet_def_plugin, fastjet::SISConeExtras::_most_ambiguous_split, fastjet::SISConeExtras::_protocones, caching(), cone_radius(), fastjet::PseudoJet::E(), fastjet::have_same_momentum(), fastjet::ClusterSequence::jets(), n_pass_max(), overlap_threshold(), fastjet::ClusterSequence::plugin_associate_extras(), fastjet::ClusterSequence::plugin_record_iB_recombination(), fastjet::ClusterSequence::plugin_record_ij_recombination(), protojet_ptmin(), fastjet::PseudoJet::px(), fastjet::PseudoJet::py(), fastjet::PseudoJet::pz(), fastjet::PseudoJet::set_user_index(), SISConePlugin(), split_merge_on_transverse_mass(), stored_particles, stored_plugin, and stored_siscone.

00054                                                                     {
00055 
00056 
00057   Csiscone * siscone;
00058   Csiscone   local_siscone;
00059 
00060   unsigned n = clust_seq.jets().size();
00061 
00062   bool new_siscone = true; // by default we'll be running it
00063 
00064   if (caching()) {
00065 
00066     // Establish if we have a cached run with the same R, npass and
00067     // particles. If not then do any tidying up / reallocation that's
00068     // necessary for the next round of caching, otherwise just set
00069     // relevant pointers so that we can reuse and old run.
00070     if (stored_siscone.get() != 0) {
00071       new_siscone = !(stored_plugin->cone_radius()   == cone_radius()
00072                       && stored_plugin->n_pass_max() == n_pass_max()  
00073                       && stored_particles->size()    == n);
00074       if (!new_siscone) {
00075         for(unsigned i = 0; i < n; i++) {
00076           // only check momentum because indices will be correctly dealt
00077           // with anyway when extracting the clustering order.
00078           new_siscone |= !have_same_momentum(clust_seq.jets()[i], 
00079                                              (*stored_particles)[i]);
00080         }
00081       }
00082     } 
00083       
00084     // allocate the new siscone, etc., if need be
00085     if (new_siscone) {
00086       stored_siscone  .reset( new Csiscone                           );
00087       stored_particles.reset( new vector<PseudoJet>(clust_seq.jets()));
00088       stored_plugin   .reset( new SISConePlugin(*this)               );
00089     }
00090 
00091     siscone = stored_siscone.get();
00092   } else {
00093     siscone = &local_siscone;
00094   }
00095 
00096   if (new_siscone) {
00097     // transfer fastjet initial particles into the siscone type
00098     vector<Cmomentum> siscone_momenta(n);
00099     for(unsigned i = 0; i < n; i++) {
00100       const PseudoJet & p = clust_seq.jets()[i]; // shorthand
00101       siscone_momenta[i] = Cmomentum(p.px(), p.py(), p.pz(), p.E());
00102     }
00103     
00104     // run the jet finding
00105     siscone->compute_jets(siscone_momenta, cone_radius(), overlap_threshold(),
00106                           n_pass_max(), protojet_ptmin(), 
00107                           split_merge_on_transverse_mass());
00108   } else {
00109     // just run the overlap part of the jets.
00110     siscone->recompute_jets(overlap_threshold(), protojet_ptmin(), 
00111                             split_merge_on_transverse_mass());
00112   }
00113 
00114   // extract the jets [in reverse order -- to get nice ordering in pt at end]
00115   int njet = siscone->jets.size();
00116 
00117   for (int ijet = njet-1; ijet >= 0; ijet--) {
00118     const Cjet & jet = siscone->jets[ijet]; // shorthand
00119     
00120     // Successively merge the particles that make up the cone jet
00121     // until we have all particles in it.  Start off with the zeroth
00122     // particle.
00123     int jet_k = jet.contents[0];
00124     for (unsigned ipart = 1; ipart < jet.contents.size(); ipart++) {
00125       // take the last result of the merge
00126       int jet_i = jet_k;
00127       // and the next element of the jet
00128       int jet_j = jet.contents[ipart];
00129       // and merge them (with a fake dij)
00130       double dij = 0.0;
00131 
00132       // create the new jet by hand so that we can adjust its user index
00133       PseudoJet newjet = clust_seq.jets()[jet_i] + clust_seq.jets()[jet_j];
00134 
00135       // set the user index to be the pass in which the jet was discovered
00136       newjet.set_user_index(jet.pass);
00137         
00138       clust_seq.plugin_record_ij_recombination(jet_i, jet_j, dij, newjet, jet_k);
00139     }
00140     // we have merged all the jet's particles into a single object, so now
00141     // "declare" it to be a beam (inclusive) jet.
00142     // [NB: put a sensible looking d_iB just to be nice...]
00143     double d_iB = clust_seq.jets()[jet_k].perp2();
00144     clust_seq.plugin_record_iB_recombination(jet_k, d_iB);
00145   }
00146 
00147   // now copy the list of protocones into an "extras" objects
00148   SISConeExtras * extras = new SISConeExtras;
00149   for (unsigned ipass = 0; ipass < siscone->protocones_list.size(); ipass++) {
00150     for (unsigned ipc = 0; ipc < siscone->protocones_list[ipass].size(); ipc++) {
00151       double rap = siscone->protocones_list[ipass][ipc].eta;
00152       double phi = siscone->protocones_list[ipass][ipc].phi;
00153       PseudoJet protocone(cos(phi),sin(phi),sinh(rap),cosh(rap));
00154       //PseudoJet protocone(siscone->protocones_list[ipass][ipc]);
00155       protocone.set_user_index(ipass);
00156       extras->_protocones.push_back(protocone);
00157     }
00158   }
00159   extras->_most_ambiguous_split = siscone->most_ambiguous_split;
00160 
00161   // tell it what the jet definition was
00162   extras->_jet_def_plugin = this;
00163 
00164   // give the extras object to the cluster sequence.
00165   clust_seq.plugin_associate_extras(auto_ptr<ClusterSequence::Extras>(extras));
00166 }

void fastjet::SISConePlugin::set_split_merge_on_transverse_mass bool  val  )  [inline]
 

Definition at line 127 of file SISConePlugin.hh.

Referenced by main().

00127                                                     {
00128     _split_merge_on_transverse_mass = val;}

bool fastjet::SISConePlugin::split_merge_on_transverse_mass  )  const [inline]
 

indicates whether the split-merge orders on transverse mass or not.

Definition at line 126 of file SISConePlugin.hh.

Referenced by run_clustering().


Member Data Documentation

bool fastjet::SISConePlugin::_caching [private]
 

Definition at line 141 of file SISConePlugin.hh.

double fastjet::SISConePlugin::_cone_radius [private]
 

Definition at line 138 of file SISConePlugin.hh.

int fastjet::SISConePlugin::_n_pass_max [private]
 

Definition at line 139 of file SISConePlugin.hh.

double fastjet::SISConePlugin::_overlap_threshold [private]
 

Definition at line 138 of file SISConePlugin.hh.

double fastjet::SISConePlugin::_protojet_ptmin [private]
 

Definition at line 140 of file SISConePlugin.hh.

bool fastjet::SISConePlugin::_split_merge_on_transverse_mass [private]
 

Definition at line 141 of file SISConePlugin.hh.

Referenced by description().

auto_ptr< vector< PseudoJet > > fastjet::SISConePlugin::stored_particles [static, private]
 

Definition at line 17 of file SISConePlugin.cc.

Referenced by run_clustering().

auto_ptr< SISConePlugin > fastjet::SISConePlugin::stored_plugin [static, private]
 

Definition at line 16 of file SISConePlugin.cc.

Referenced by run_clustering().

auto_ptr< Csiscone > fastjet::SISConePlugin::stored_siscone [static, private]
 

Definition at line 18 of file SISConePlugin.cc.

Referenced by run_clustering().


The documentation for this class was generated from the following files:
Generated on Sat Mar 3 12:36:38 2007 for fastjet by  doxygen 1.4.2