Fork me on GitHub

Ignore:
Timestamp:
Sep 3, 2014, 3:18:54 PM (10 years ago)
Author:
Pavel Demin <demin@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
be2222c
Parents:
5b5a56b
Message:

upgrade FastJet to version 3.1.0-beta.1, upgrade Nsubjettiness to version 2.1.0, add SoftKiller version 1.0.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/fastjet/JetDefinition.hh

    r5b5a56b r35cdc46  
    1 //STARTHEADER
    2 // $Id: JetDefinition.hh 2687 2011-11-14 11:17:51Z soyez $
    3 //
    4 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1#ifndef __FASTJET_JETDEFINITION_HH__
     2#define __FASTJET_JETDEFINITION_HH__
     3
     4//FJSTARTHEADER
     5// $Id: JetDefinition.hh 3523 2014-08-02 13:15:21Z salam $
     6//
     7// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    58//
    69//----------------------------------------------------------------------
     
    1316//
    1417//  The algorithms that underlie FastJet have required considerable
    15 //  development and are described in hep-ph/0512210. If you use
     18//  development. They are described in the original FastJet paper,
     19//  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
    1620//  FastJet as part of work towards a scientific publication, please
    17 //  include a citation to the FastJet paper.
     21//  quote the version you use and include a citation to the manual and
     22//  optionally also to hep-ph/0512210.
    1823//
    1924//  FastJet is distributed in the hope that it will be useful,
     
    2530//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2631//----------------------------------------------------------------------
    27 //ENDHEADER
    28 
    29 #ifndef __FASTJET_JETDEFINITION_HH__
    30 #define __FASTJET_JETDEFINITION_HH__
     32//FJENDHEADER
    3133
    3234#include<cassert>
     
    4749/// clustering events with kt and cambridge style algorithms.
    4850enum Strategy {
    49   /// fastest form about 500..10^4
     51  /// Like N2MHTLazy9 in a number of respects, but does not calculate
     52  /// ghost-ghost distances and so does not carry out ghost-ghost
     53  /// recombination.
     54  ///
     55  /// If you want active ghosted areas, then this is only suitable for
     56  /// use with the anti-kt algorithm (or genkt with negative p), and
     57  /// does not produce any pure ghost jets. If used with active areas
     58  /// with Kt or Cam algorithms it will actually produce a passive
     59  /// area.
     60  ///
     61  /// Particles are deemed to be ghosts if their pt is below a
     62  /// threshold (currently 1e-50, hard coded as ghost_limit in
     63  /// LazyTiling9SeparateGhosts).
     64  ///
     65  /// Currently for events with a couple of thousand normal particles
     66  /// and O(10k) ghosts, this can be quicker than N2MHTLazy9, which
     67  /// would otherwise be the best strategy.
     68  ///
     69  /// New in FJ3.1
     70  N2MHTLazy9AntiKtSeparateGhosts   = -10,
     71  /// only looks into a neighbouring tile for a particle's nearest
     72  /// neighbour (NN) if that particle's in-tile NN is further than the
     73  /// distance to the edge of the neighbouring tile. Uses tiles of
     74  /// size R and a 3x3 tile grid around the particle.
     75  /// New in FJ3.1
     76  N2MHTLazy9   = -7,
     77  /// Similar to N2MHTLazy9, but uses tiles of size R/2 and a 5x5 tile
     78  /// grid around the particle.
     79  /// New in FJ3.1
     80  N2MHTLazy25   = -6,
     81  /// Like to N2MHTLazy9 but uses slightly different optimizations,
     82  /// e.g. for calculations of distance to nearest tile; as of
     83  /// 2014-07-18 it is slightly slower and not recommended for
     84  /// production use. To considered deprecated.
     85  /// New in FJ3.1
     86  N2MHTLazy9Alt   = -5,
     87  /// faster that N2Tiled above about 500 particles; differs from it
     88  /// by retainig the di(closest j) distances in a MinHeap (sort of
     89  /// priority queue) rather than a simple vector.
    5090  N2MinHeapTiled   = -4,
    5191  /// fastest from about 50..500
     
    5797  /// worse even than the usual N^3 algorithms
    5898  N3Dumb      =  0,
    59   /// automatic selection of the best (based on N)
     99  /// automatic selection of the best (based on N), including
     100  /// the LazyTiled strategies that are new to FJ3.1
    60101  Best        =  1,
    61102  /// best of the NlnN variants -- best overall for N>10^4.
     
    79120  /// (Does not work for R>=2pi)
    80121  NlnNCam      = 12, // 2piMultD
     122  /// the automatic strategy choice that was being made in FJ 3.0
     123  /// (restricted to strategies that were present in FJ 3.0)
     124  BestFJ30     =  21,
    81125  /// the plugin has been used...
    82126  plugin_strategy = 999
     
    87131/// \enum JetAlgorithm
    88132/// the various families of jet-clustering algorithm
     133//
     134// [Remember to update the "is_spherical()" routine if any further
     135// spherical algorithms are added to the list below]
    89136enum JetAlgorithm {
    90137  /// the longitudinally invariant kt algorithm
     
    102149  /// where p = extra_param()
    103150  genkt_algorithm=3,
    104   /// a version of cambridge with a special distance measure for particles
    105   /// whose pt is < extra_param()
     151  /// a version of cambridge with a special distance measure for
     152  /// particles whose pt is < extra_param(); this is not usually
     153  /// intended for end users, but is instead automatically selected
     154  /// when requesting a passive Cambridge area.
    106155  cambridge_for_passive_algorithm=11,
    107156  /// a version of genkt with a special distance measure for particles
    108157  /// whose pt is < extra_param() [relevant for passive areas when p<=0]
     158  /// ***** NB: THERE IS CURRENTLY NO IMPLEMENTATION FOR THIS ALG *******
    109159  genkt_for_passive_algorithm=13,
    110160  //.................................................................
     
    244294                const Recombiner * recombiner_in,
    245295                Strategy strategy_in = Best) {
    246     *this = JetDefinition(jet_algorithm_in, R_in, external_scheme, strategy_in);
     296    *this = JetDefinition(jet_algorithm_in, R_in, xtra_param_in, external_scheme, strategy_in);
    247297    _recombiner = recombiner_in;
    248     set_extra_param(xtra_param_in);
    249298  }
    250299
     
    284333                RecombinationScheme recomb_scheme_in = E_scheme,
    285334                int nparameters_in = 1);
     335
     336  /// cluster the supplied particles and returns a vector of resulting
     337  /// jets, sorted by pt (or energy in the case of spherical,
     338  /// i.e. e+e-, algorithms). This routine currently only makes
     339  /// sense for "inclusive" type algorithms.
     340  template <class L>
     341  std::vector<PseudoJet> operator()(const std::vector<L> & particles) const;
    286342 
    287343  /// R values larger than max_allowable_R are not allowed.
     
    297353
    298354  /// set the recombiner class to the one provided
     355  ///
     356  /// Note that in order to associate to a jet definition a recombiner
     357  /// from another jet definition, it is strongly recommended to use
     358  /// the set_recombiner(const JetDefinition &) method below. The
     359  /// latter correctly handles the situations where the jet definition
     360  /// owns the recombiner (i.e. where delete_recombiner_when_unused
     361  /// has been called). In such cases, using set_recombiner(const
     362  /// Recombiner *) may lead to memory corruption.
    299363  void set_recombiner(const Recombiner * recomb) {
    300     if (_recombiner_shared()) _recombiner_shared.reset(recomb);
     364    if (_shared_recombiner()) _shared_recombiner.reset(recomb);
    301365    _recombiner = recomb;
    302366    _default_recombiner = DefaultRecombiner(external_scheme);
    303367  }
    304368
     369  /// set the recombiner to be the same as the one of 'other_jet_def'
     370  ///
     371  /// Note that this is the recommended method to associate to a jet
     372  /// definition the recombiner from another jet definition. Compared
     373  /// to the set_recombiner(const Recombiner *) above, it correctly
     374  /// handles the case where the jet definition owns the recombiner
     375  /// (i.e. where delete_recombiner_when_unused has been called)
     376  void set_recombiner(const JetDefinition &other_jet_def);
     377
    305378  /// calling this tells the JetDefinition to handle the deletion of
    306   /// the recombiner when it is no longer used
     379  /// the recombiner when it is no longer used. (Should not be called
     380  /// if the recombiner was initialised from a JetDef whose recombiner
     381  /// was already scheduled to delete itself - memory handling will
     382  /// already be automatic across both JetDef's in that case).
    307383  void delete_recombiner_when_unused();
    308384
     
    310386  const Plugin * plugin() const {return _plugin;};
    311387
    312   /// allows to let the JetDefinition handle the deletion of the
     388  /// calling this causes the JetDefinition to handle the deletion of the
    313389  /// plugin when it is no longer used
    314390  void delete_plugin_when_unused();
     
    333409  void set_extra_param(double xtra_param) {_extra_param = xtra_param;}
    334410
    335   /// return a pointer to the currently defined recombiner.
     411  /// returns a pointer to the currently defined recombiner.
    336412  ///
    337413  /// Warning: the pointer may be to an internal recombiner (for
     
    347423
    348424  /// returns true if the current jet definitions shares the same
    349   /// recombiner as teh one passed as an argument
     425  /// recombiner as the one passed as an argument
    350426  bool has_same_recombiner(const JetDefinition &other_jd) const;
     427
     428  /// returns true if the jet definition involves an algorithm
     429  /// intended for use on a spherical geometry (e.g. e+e- algorithms,
     430  /// as opposed to most pp algorithms, which use a cylindrical,
     431  /// rapidity-phi geometry).
     432  bool is_spherical() const;
    351433
    352434  /// return a textual description of the current jet definition
    353435  std::string description() const;
    354436
     437  /// returns a description not including the recombiner information
     438  std::string description_no_recombiner() const;
     439
     440  /// a short textual description of the algorithm jet_alg
     441  static std::string algorithm_description(const JetAlgorithm jet_alg);
     442
     443  /// the number of parameters associated to a given jet algorithm
     444  static unsigned int n_parameters_for_algorithm(const JetAlgorithm jet_alg);
    355445
    356446public:
     
    462552    virtual bool exclusive_sequence_meaningful() const {return false;}
    463553
     554    /// returns true if the plugin implements an algorithm intended
     555    /// for use on a spherical geometry (e.g. e+e- algorithms, as
     556    /// opposed to most pp algorithms, which use a cylindrical,
     557    /// rapidity-phi geometry).
     558    virtual bool is_spherical() const {return false;}
     559
    464560    /// a destructor to be replaced if necessary in derived classes...
    465561    virtual ~Plugin() {};
     
    481577  DefaultRecombiner _default_recombiner;
    482578  const Recombiner * _recombiner;
    483   SharedPtr<const Recombiner> _recombiner_shared;
     579  SharedPtr<const Recombiner> _shared_recombiner;
    484580
    485581};
     
    516612
    517613
    518 
    519 
    520 
    521614FASTJET_END_NAMESPACE
    522615
     616// include ClusterSequence which includes the implementation of the
     617// templated JetDefinition::operator()(...) member
     618#include "fastjet/ClusterSequence.hh"
     619
     620
    523621#endif // __FASTJET_JETDEFINITION_HH__
Note: See TracChangeset for help on using the changeset viewer.