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/tools/Subtractor.hh

    r5b5a56b r35cdc46  
    1 //STARTHEADER
    2 // $Id: Subtractor.hh 2577 2011-09-13 15:11:38Z salam $
    3 //
    4 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//FJSTARTHEADER
     2// $Id: Subtractor.hh 3584 2014-08-12 12:40:10Z soyez $
     3//
     4// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development and are described in hep-ph/0512210. If you use
     15//  development. They are described in the original FastJet paper,
     16//  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
    1617//  FastJet as part of work towards a scientific publication, please
    17 //  include a citation to the FastJet paper.
     18//  quote the version you use and include a citation to the manual and
     19//  optionally also to hep-ph/0512210.
    1820//
    1921//  FastJet is distributed in the hope that it will be useful,
     
    2527//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2628//----------------------------------------------------------------------
    27 //ENDHEADER
     29//FJENDHEADER
    2830
    2931#ifndef __FASTJET_TOOLS_SUBTRACTOR_HH__
     
    6163  /// define a subtractor based on a BackgroundEstimator
    6264  Subtractor(BackgroundEstimatorBase * bge) :
    63     _bge(bge), _rho(-1.0) {}
     65    _bge(bge), _rho(-1.0) { set_defaults(); }
    6466
    6567  /// define a subtractor that uses a fixed value of rho, the background
     
    6870
    6971  /// default constructor
    70   Subtractor() : _bge(0), _rho(_invalid_rho) {}
     72  Subtractor() : _bge(0), _rho(_invalid_rho) { set_defaults(); }
    7173
    7274  /// default dtor
    7375  virtual ~Subtractor(){};
     76
     77  /// @name configuring the behaviour
     78  //\{
     79  //----------------------------------------------------------------
     80
     81  /// reset all parameters to default values
     82  ///
     83  /// Note: by default, the rho_m term is not included and the safety
     84  /// test for the mass is not done. This is mostly for backwards
     85  /// compatibility with FastJet 3.0 and is highly likely to change in
     86  /// a future release of FastJet
     87  void set_defaults();
     88
     89  /// when 'use_rho_m' is true, include in the subtraction the
     90  /// correction from rho_m, the purely longitudinal,
     91  /// particle-mass-induced component of the background density per
     92  /// unit area
     93  ///
     94  /// Note: this will be switched off by default (for backwards
     95  /// compatibility with FastJet 3.0) but is highly likely to change
     96  /// in a future release of FastJet
     97  void set_use_rho_m(bool use_rho_m_in = true){
     98    if (_bge == 0) {
     99      throw Error("Subtractor: rho_m support works only for Subtractors constructed with background estimator");
     100    }
     101    _use_rho_m=use_rho_m_in;
     102  }
     103 
     104  /// returns whether or not the rho_m component is used
     105  bool use_rho_m() const{ return _use_rho_m;}
     106
     107  /// when 'safe_mass' is true, ensure that the mass of the subtracted
     108  /// 4-vector remain positive
     109  ///
     110  /// when true, if the subtracted mass is negative, we return a
     111  /// 4-vector with 0 mass, pt and phi from the subtracted 4-vector
     112  /// and the rapidity of the original, unsubtracted jet.
     113  ///
     114  /// Note: this will be switched off by default (for backwards
     115  /// compatibility with FastJet 3.0) but is highly likely to change
     116  /// in a future release of FastJet
     117  void set_safe_mass(bool safe_mass_in=true){ _safe_mass=safe_mass_in;}
     118
     119  /// returns whether or not safety tests on the mass are included
     120  bool safe_mass() const{ return _safe_mass;}
     121
     122  /// This is mostly intended for cherge-hadron-subtracted type of
     123  /// events where we wich to use vertex information to improve the
     124  /// subtraction.
     125  ///
     126  /// Given the following parameters:
     127  ///   \param sel_known_vertex    selects the particles with a
     128  ///                              known vertex origin
     129  ///   \param sel_leading_vertex  amongst the particles with a
     130  ///                              known vertex origin, select those
     131  ///                              coming from the leading vertex
     132  /// Momentum identified as coming from the leading vertex will be
     133  /// kept, momentum identified as coming from a non-leading vertex
     134  /// will be eliminated and a regular area-median subtraction will be
     135  /// applied on the 4-vector sum of the particles with unknown vertex
     136  /// origin.
     137  ///
     138  /// When this is set, we shall ensure that the pt of the subtracted
     139  /// 4-vector is at least the pt of the particles that are known to
     140  /// come from the leading vertex (if it fails, subtraction returns
     141  /// the component that is known to come from the leading vertex ---
     142  /// or, the original unsubtracted jet if it contains no particles
     143  /// from the leading vertex).  Furthermore, when safe_mass() is on, we
     144  /// also impose a similar constraint on the mass of the subtracted
     145  /// 4-vector (if the test fails, the longitudinal part of the
     146  /// subtracted 4-vector is taken from the component that is known to
     147  /// come from the leading vertex).
     148  void set_known_selectors(const Selector &sel_known_vertex,
     149                           const Selector &sel_leading_vertex){
     150    _sel_known_vertex   = sel_known_vertex;
     151    _sel_leading_vertex = sel_leading_vertex;
     152  }
     153
     154  //\}
     155
     156  /// @name description and action
     157  //\{
     158  //----------------------------------------------------------------
    74159
    75160  /// returns a jet that's subtracted
     
    82167  virtual std::string description() const;
    83168
     169  //\}
    84170protected:
     171  /// compute the 4-vector that should be subtracted from the given
     172  /// jet
     173  PseudoJet _amount_to_subtract(const PseudoJet &jet) const;
    85174
    86175  /// the tool used to estimate the background
     
    89178  /// the fixed value of rho to use if the user has selected that option
    90179  double _rho;
     180
     181  // configuration parameters/flags
     182  bool _use_rho_m;   ///< include the rho_m correction
     183  bool _safe_mass;   ///< ensures that the subtracted mass is +ve
     184
     185  Selector _sel_known_vertex;   ///< selects the particles with a
     186                                ///< known vertex origin
     187  Selector _sel_leading_vertex; ///< amongst the particles with a
     188                                ///< known vertex origin, select those
     189                                ///< coming from the leading vertex
    91190
    92191  /// a value of rho that is used as a default to label that the stored
     
    98197  // that's not allowed in an include file.
    99198  static const double _invalid_rho;
     199
     200  mutable LimitedWarning _unused_rho_m_warning;
    100201};
    101202
Note: See TracChangeset for help on using the changeset viewer.