Fork me on GitHub

Changeset 35cdc46 in git for external/fastjet/PseudoJet.cc


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/PseudoJet.cc

    r5b5a56b r35cdc46  
    1 //STARTHEADER
    2 // $Id$
    3 //
    4 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//FJSTARTHEADER
     2// $Id: PseudoJet.cc 3565 2014-08-11 15:24:39Z salam $
     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
     
    176178// return the product, coeff * jet
    177179PseudoJet operator* (double coeff, const PseudoJet & jet) {
     180  // see the comment in operator*= about ensuring valid rap phi
     181  // before a multiplication to handle case of multiplication by
     182  // zero, while maintaining rapidity and phi
     183  jet._ensure_valid_rap_phi();
    178184  //return PseudoJet(coeff*jet.four_mom());
    179185  // the following code is hopefully more efficient
     
    198204/// multiply the jet's momentum by the coefficient
    199205void PseudoJet::operator*=(double coeff) {
     206  // operator*= aims to maintain the rapidity and azimuth
     207  // for the PseudoJet; if they have already been evaluated
     208  // this is fine, but if they haven't and coeff is sufficiently
     209  // small as to cause a zero or underflow result, then a subsequent
     210  // invocation of rap or phi will lead to a non-sensical result.
     211  // So, here, we preemptively ensure that rapidity and phi
     212  // are correctly cached
     213  _ensure_valid_rap_phi();
    200214  _px *= coeff;
    201215  _py *= coeff;
     
    261275
    262276//----------------------------------------------------------------------
    263 /// transform this jet (given in lab) into a jet in the rest
    264 /// frame of prest
     277/// transform this jet (given in the rest frame of prest) into a jet
     278/// in the lab frame
    265279//
    266280// NB: code adapted from that in herwig f77 (checked how it worked
     
    288302
    289303//----------------------------------------------------------------------
    290 /// transform this jet (given in the rest frame of prest) into a jet
    291 /// in the lab frame;
     304/// transform this jet (given in lab) into a jet in the rest
     305/// frame of prest 
    292306//
    293307// NB: code adapted from that in herwig f77 (checked how it worked
     
    587601// an Error is thrown if this PseudoJet has no currently valid
    588602// associated ClusterSequence
    589 std::vector<PseudoJet> PseudoJet::exclusive_subjets (const double & dcut) const {
     603std::vector<PseudoJet> PseudoJet::exclusive_subjets (const double dcut) const {
    590604  return validated_structure_ptr()->exclusive_subjets(*this, dcut);
    591605}
     
    598612// an Error is thrown if this PseudoJet has no currently valid
    599613// associated ClusterSequence
    600 int PseudoJet::n_exclusive_subjets(const double & dcut) const {
     614int PseudoJet::n_exclusive_subjets(const double dcut) const {
    601615  return validated_structure_ptr()->n_exclusive_subjets(*this, dcut);
    602616}
Note: See TracChangeset for help on using the changeset viewer.