Fork me on GitHub

Changeset 35cdc46 in git for external/fastjet/internal


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

Location:
external/fastjet/internal
Files:
5 added
16 edited

Legend:

Unmodified
Added
Removed
  • external/fastjet/internal/ClosestPair2D.hh

    r5b5a56b r35cdc46  
    1 //STARTHEADER
    2 // $Id: ClosestPair2D.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: ClosestPair2D.hh 3433 2014-07-23 08:17:03Z 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#ifndef __FASTJET_CLOSESTPAIR2D__HH__
  • external/fastjet/internal/ClosestPair2DBase.hh

    r5b5a56b r35cdc46  
    1 //STARTHEADER
    2 // $Id: ClosestPair2DBase.hh 2577 2011-09-13 15:11:38Z salam $
     1//FJSTARTHEADER
     2// $Id: ClosestPair2DBase.hh 3433 2014-07-23 08:17:03Z salam $
    33//
    4 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     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_CLOSESTPAIR2DBASE__HH__
  • external/fastjet/internal/ClusterSequence_N2.icc

    r5b5a56b r35cdc46  
    44#include "fastjet/ClusterSequence.hh"
    55
    6 //STARTHEADER
     6//FJSTARTHEADER
    77// $Id: ClusterSequence_N2.cc 1351 2009-01-09 18:03:03Z salam $
    88//
    9 // Copyright (c) 2005-2009, Matteo Cacciari, Gavin Salam and Gregory Soyez
     9// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    1010//
    1111//----------------------------------------------------------------------
     
    1818//
    1919//  The algorithms that underlie FastJet have required considerable
    20 //  development and are described in hep-ph/0512210. If you use
     20//  development. They are described in the original FastJet paper,
     21//  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
    2122//  FastJet as part of work towards a scientific publication, please
    22 //  include a citation to the FastJet paper.
     23//  quote the version you use and include a citation to the manual and
     24//  optionally also to hep-ph/0512210.
    2325//
    2426//  FastJet is distributed in the hope that it will be useful,
     
    2830//
    2931//  You should have received a copy of the GNU General Public License
    30 //  along with FastJet; if not, write to the Free Software
    31 //  Foundation, Inc.:
    32 //      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     32//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3333//----------------------------------------------------------------------
    34 //ENDHEADER
     34//FJENDHEADER
    3535
    3636//----------------------------------------------------------------------
  • external/fastjet/internal/Dnn2piCylinder.hh

    r5b5a56b r35cdc46  
    1 //STARTHEADER
    2 // $Id: Dnn2piCylinder.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: Dnn2piCylinder.hh 3442 2014-07-24 07:20:49Z 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
     
    7375  /// Returns the index of  the nearest neighbour of point labelled
    7476  /// by ii (assumes ii is valid)
    75   int NearestNeighbourIndex(const int & ii) const ;
     77  int NearestNeighbourIndex(const int ii) const ;
    7678
    7779  /// Returns the distance to the nearest neighbour of point labelled
    7880  /// by index ii (assumes ii is valid)
    79   double NearestNeighbourDistance(const int & ii) const ;
     81  double NearestNeighbourDistance(const int ii) const ;
    8082
    8183  /// Returns true iff the given index corresponds to a point that
    8284  /// exists in the DNN structure (meaning that it has been added, and
    8385  /// not removed in the meantime)
    84   bool Valid(const int & index) const;
     86  bool Valid(const int index) const;
    8587
    8688  void RemoveAndAddPoints(const std::vector<int> & indices_to_remove,
     
    216218/// initialised the class with instructions to ignore this problem the
    217219/// program will detect and ignore it, or crash.
    218 inline int Dnn2piCylinder::NearestNeighbourIndex(const int & current) const {
     220inline int Dnn2piCylinder::NearestNeighbourIndex(const int current) const {
    219221  int main_index = _mirror_info[current].main_index;
    220222  int mirror_index = _mirror_info[current].mirror_index;
     
    241243}
    242244
    243 inline double Dnn2piCylinder::NearestNeighbourDistance(const int & current) const {
     245inline double Dnn2piCylinder::NearestNeighbourDistance(const int current) const {
    244246  int main_index = _mirror_info[current].main_index;
    245247  int mirror_index = _mirror_info[current].mirror_index;
     
    256258}
    257259
    258 inline bool Dnn2piCylinder::Valid(const int & index) const {
     260inline bool Dnn2piCylinder::Valid(const int index) const {
    259261  return (_DNN->Valid(_mirror_info[index].main_index));
    260262}
  • external/fastjet/internal/Dnn3piCylinder.hh

    r5b5a56b r35cdc46  
    1 //STARTHEADER
    2 // $Id: Dnn3piCylinder.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: Dnn3piCylinder.hh 3442 2014-07-24 07:20:49Z 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
     
    7072  /// Returns the index of  the nearest neighbour of point labelled
    7173  /// by ii (assumes ii is valid)
    72   int NearestNeighbourIndex(const int & ii) const ;
     74  int NearestNeighbourIndex(const int ii) const ;
    7375
    7476  /// Returns the distance to the nearest neighbour of point labelled
    7577  /// by index ii (assumes ii is valid)
    76   double NearestNeighbourDistance(const int & ii) const ;
     78  double NearestNeighbourDistance(const int ii) const ;
    7779
    7880  /// Returns true iff the given index corresponds to a point that
    7981  /// exists in the DNN structure (meaning that it has been added, and
    8082  /// not removed in the meantime)
    81   bool Valid(const int & index) const;
     83  bool Valid(const int index) const;
    8284
    8385  void RemoveAndAddPoints(const std::vector<int> & indices_to_remove,
     
    204206/// initialised the class with instructions to ignore this problem the
    205207/// program will detect and ignore it, or crash.
    206 inline int Dnn3piCylinder::NearestNeighbourIndex(const int & current) const {
     208inline int Dnn3piCylinder::NearestNeighbourIndex(const int current) const {
    207209  int main_index = _mirror_info[current].main_index;
    208210  int mirror_index = _mirror_info[current].mirror_index;
     
    229231}
    230232
    231 inline double Dnn3piCylinder::NearestNeighbourDistance(const int & current) const {
     233inline double Dnn3piCylinder::NearestNeighbourDistance(const int current) const {
    232234  int main_index = _mirror_info[current].main_index;
    233235  int mirror_index = _mirror_info[current].mirror_index;
     
    244246}
    245247
    246 inline bool Dnn3piCylinder::Valid(const int & index) const {
     248inline bool Dnn3piCylinder::Valid(const int index) const {
    247249  return (_DNN->Valid(_mirror_info[index].main_index));
    248250}
  • external/fastjet/internal/Dnn4piCylinder.hh

    r5b5a56b r35cdc46  
    1 //STARTHEADER
    2 // $Id: Dnn4piCylinder.hh 2577 2011-09-13 15:11:38Z salam $
     1//FJSTARTHEADER
     2// $Id: Dnn4piCylinder.hh 3442 2014-07-24 07:20:49Z salam $
    33//
    4 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     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
     
    5759  /// Returns the index of  the nearest neighbour of point labelled
    5860  /// by ii (assumes ii is valid)
    59   int NearestNeighbourIndex(const int & ii) const ;
     61  int NearestNeighbourIndex(const int ii) const ;
    6062
    6163  /// Returns the distance to the nearest neighbour of point labelled
    6264  /// by index ii (assumes ii is valid)
    63   double NearestNeighbourDistance(const int & ii) const ;
     65  double NearestNeighbourDistance(const int ii) const ;
    6466
    6567  /// Returns true iff the given index corresponds to a point that
    6668  /// exists in the DNN structure (meaning that it has been added, and
    6769  /// not removed in the meantime)
    68   bool Valid(const int & index) const;
     70  bool Valid(const int index) const;
    6971
    7072  void RemoveAndAddPoints(const std::vector<int> & indices_to_remove,
     
    98100// functions defined above
    99101
    100 inline int Dnn4piCylinder::NearestNeighbourIndex(const int & current) const {
     102inline int Dnn4piCylinder::NearestNeighbourIndex(const int current) const {
    101103  return (_DNN1->NearestNeighbourDistance(current) <
    102104          _DNN2->NearestNeighbourDistance(current)) ?
     
    105107}
    106108
    107 inline double Dnn4piCylinder::NearestNeighbourDistance(const int & current) const {
     109inline double Dnn4piCylinder::NearestNeighbourDistance(const int current) const {
    108110  return (_DNN1->NearestNeighbourDistance(current) <
    109111          _DNN2->NearestNeighbourDistance(current)) ?
     
    112114}
    113115
    114 inline bool Dnn4piCylinder::Valid(const int & index) const {
     116inline bool Dnn4piCylinder::Valid(const int index) const {
    115117  return (_DNN1->Valid(index) && _DNN2->Valid(index));
    116118}
  • external/fastjet/internal/DnnPlane.hh

    r5b5a56b r35cdc46  
    1 //STARTHEADER
    2 // $Id: DnnPlane.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: DnnPlane.hh 3442 2014-07-24 07:20:49Z 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
     
    4446/// class derived from DynamicNearestNeighbours that provides an
    4547/// implementation for the Euclidean plane
     48///
     49/// This class that uses CGAL Delaunay triangulation for most of the
     50/// work (it allows for easy and efficient removal and addition of
     51/// points and circulation over a point's neighbours). The treatment
     52/// of coincident points is not supported by CGAL and is implemented
     53/// according to the method specified in
     54/// issue-tracker/2012-02-CGAL-coincident/METHOD
    4655/// \endif
    4756class DnnPlane : public DynamicNearestNeighbours {
     
    5766  /// Returns the index of  the nearest neighbour of point labelled
    5867  /// by ii (assumes ii is valid)
    59   int NearestNeighbourIndex(const int & ii) const ;
     68  int NearestNeighbourIndex(const int ii) const ;
    6069
    6170  /// Returns the distance to the nearest neighbour of point labelled
    6271  /// by index ii (assumes ii is valid)
    63   double NearestNeighbourDistance(const int & ii) const ;
     72  double NearestNeighbourDistance(const int ii) const ;
    6473
    6574  /// Returns true iff the given index corresponds to a point that
    6675  /// exists in the DNN structure (meaning that it has been added, and
    6776  /// not removed in the meantime)
    68   bool Valid(const int & index) const;
     77  bool Valid(const int index) const;
    6978
    7079  void RemoveAndAddPoints(const std::vector<int> & indices_to_remove,
     
    8089  double phi(const int i) const;
    8190
    82  private:
     91private:
    8392
    8493  /// Structure containing a vertex_handle and cached information on
     
    8897    double NNdistance;
    8998    int NNindex;
     99    int coincidence;  // ==vertex->info.val() if no coincidence
     100                      // points to the coinciding SV in case of coincidence
    90101    // later on for cylinder put a second vertex?
    91102  };
     
    95106  bool _verbose;
    96107
    97   static const bool _crash_on_coincidence = true;
    98   //static const bool _crash_on_coincidence = false;
     108  //static const bool _crash_on_coincidence = true;
     109  static const bool _crash_on_coincidence = false;
    99110
    100111  Triangulation _TR; /// CGAL object for dealing with triangulations
     
    111122  /// Determines the index and distance of the nearest neighbour to
    112123  /// point j and puts the information into the _supervertex entry for j
    113   void _SetNearest(const int & j);
     124  void _SetNearest(const int j);
    114125
    115126  //----------------------------------------------------------------------
     
    123134  /// Note that j is NOT pushed onto indices_of_updated_neighbours --
    124135  /// if you want it there, put it there yourself.
    125   void _SetAndUpdateNearest(const int & j,
     136  void _SetAndUpdateNearest(const int j,
    126137                            std::vector<int> & indices_of_updated_neighbours);
    127138
    128139  /// given a vertex_handle returned by CGAL on insertion of a new
    129   /// points, crash if it turns out that it corresponds to a vertex
    130   /// that we already knew about (usually because two points coincide)
    131   void _CrashIfVertexPresent(const Vertex_handle & vertex,
    132                              const int & its_index);
    133 
     140  /// points, returns the coinciding vertex's value if it turns out
     141  /// that it corresponds to a vertex that we already knew about
     142  /// (usually because two points coincide)
     143  int _CheckIfVertexPresent(const Vertex_handle & vertex,
     144                            const int its_index);
     145
     146  //----------------------------------------------------------------------
     147  /// if the distance between 'pref' and 'candidate' is smaller (or
     148  /// equal) than the one between 'pref' and 'near', return true and
     149  /// set 'mindist' to that distance. Note that it is assumed that
     150  /// 'mindist' is the euclidian distance between 'pref' and 'near'
     151  ///
     152  /// Note that the 'near' point is passed through its vertex rather
     153  /// than as a point. This allows us to handle cases where we have no min
     154  /// yet (near is the infinite vertex)
     155  inline bool _is_closer_to(const Point &pref,
     156                            const Point &candidate,
     157                            const Vertex_handle &near,
     158                            double & dist,
     159                            double & mindist){
     160    dist = _euclid_distance(pref, candidate);
     161    return _is_closer_to_with_hint(pref, candidate, near, dist, mindist);
     162  }
     163
     164  /// same as '_is_closer_to' except that 'dist' already contains the
     165  /// distance between 'pref' and 'candidate'
     166  inline bool _is_closer_to_with_hint(const Point &pref,
     167                                      const Point &candidate,
     168                                      const Vertex_handle &near,
     169                                      const double & dist,
     170                                      double & mindist){
     171   
     172    // check if 'dist', the pre-computed distance between 'candidate'
     173    // and 'pref' is smaller than the distance between 'pref' and its
     174    // currently registered nearest neighbour 'near' (and update
     175    // things if it is)
     176    //
     177    // Interestingly enough, it has to be pointed out that the use of
     178    // 'abs' instead of 'std::abs' returns wrong results (apparently
     179    // ints without any compiler warning)
     180    //
     181    // The (near != NULL) test is there for one single reason: when
     182    // checking that a newly inserted point is not closer than a
     183    // previous NN, if that distance comparison involves a "nearly
     184    // degenerate" distance we need to access near->point. But
     185    // sometimes, in the course of RemoveAndAddPoints, its previous NN
     186    // has been deleted and its vertex (corresponding to 'near') set
     187    // to NULL. This is not a problem as all points having a deleted
     188    // point as NN will have their NN explicitly recomputed at the end
     189    // of RemoveAndAddPoints so here we should just make sure there is
     190    // no crash... that's done by checking (near != NULL)
     191    if ((std::abs(dist-mindist)<DISTANCE_FOR_CGAL_CHECKS) &&
     192        (near != NULL) &&
     193        (_euclid_distance(candidate, near->point())<DISTANCE_FOR_CGAL_CHECKS)){
     194      // we're in a situation where there might be a rounding issue,
     195      // use CGAL's distance computation to get it right
     196      //
     197      // Note that in the test right above,
     198      // (abs(dist-mindist)<1e-12) guarantees that the current
     199      // nearest point is not the infinite vertex and thus
     200      // nearest->point() is not ill-defined
     201      if (_verbose) std::cout << "using CGAL's distance ordering" << std::endl;
     202      if (CGAL::compare_distance_to_point(pref, candidate, near->point())!=CGAL::LARGER){
     203        mindist = dist;
     204        return true;
     205      }
     206    } else if (dist <= mindist) {
     207      // Note that the use of a <= in the above expression (instead of
     208      // a strict ordering <) is important in one case: when checking
     209      // if a new point is the new NN of one of the points in its
     210      // neighbourhood, in case of distances being ==, we are sure
     211      // that 'candidate' is in a cell adjacent to 'pref' while it may
     212      // no longer be the case for 'near'
     213      mindist = dist;
     214      return true;
     215    }
     216   
     217    return false;
     218  }
     219
     220  /// if a distance between a point and 2 others is smaller than this
     221  /// and the distance between the two points is also smaller than this
     222  /// then use CGAL to compare the distances.
     223  static const double DISTANCE_FOR_CGAL_CHECKS; 
     224 
    134225};
    135226
     
    138229// functions defined above
    139230
    140 inline int DnnPlane::NearestNeighbourIndex(const int & ii) const {
     231inline int DnnPlane::NearestNeighbourIndex(const int ii) const {
    141232  return _supervertex[ii].NNindex;}
    142233
    143 inline double DnnPlane::NearestNeighbourDistance(const int & ii) const {
     234inline double DnnPlane::NearestNeighbourDistance(const int ii) const {
    144235  return _supervertex[ii].NNdistance;}
    145236
    146 inline bool DnnPlane::Valid(const int & index) const {
     237inline bool DnnPlane::Valid(const int index) const {
    147238  if (index >= 0 && index < static_cast<int>(_supervertex.size())) {
    148239    return (_supervertex[index].vertex != NULL);} else {return false;} }
  • external/fastjet/internal/DynamicNearestNeighbours.hh

    r5b5a56b r35cdc46  
    1 //STARTHEADER
    2 // $Id: DynamicNearestNeighbours.hh 2687 2011-11-14 11:17:51Z soyez $
     1//FJSTARTHEADER
     2// $Id: DynamicNearestNeighbours.hh 3619 2014-08-13 14:17:19Z salam $
    33//
    4 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     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
     
    3739#include<cassert>
    3840#include "fastjet/internal/numconsts.hh"
     41#include "fastjet/Error.hh"
    3942
    4043FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
     
    6871/// Nearest Neighbours code
    6972/// \endif
    70 class DnnError {
     73class DnnError : public Error {
    7174public:
    7275  // constructors
    73   DnnError() {;};
    74   DnnError(const std::string & message_in) {
    75     _message = message_in; std::cerr << message_in << std::endl;};
    76 
    77   std::string message() const {return _message;};
    78 
    79 private:
    80   std::string _message;
     76  //DnnError() {}
     77  DnnError(const std::string & message_in) : Error(message_in) {}
    8178};
    8279
     
    112109  /// Returns the index of the nearest neighbour of point labelled
    113110  /// by ii (assumes ii is valid)
    114   virtual int NearestNeighbourIndex(const int & ii) const = 0;
     111  virtual int NearestNeighbourIndex(const int ii) const = 0;
    115112
    116113  /// Returns the distance to the nearest neighbour of point labelled
    117114  /// by index ii (assumes ii is valid)
    118   virtual double NearestNeighbourDistance(const int & ii) const = 0;
     115  virtual double NearestNeighbourDistance(const int ii) const = 0;
    119116
    120117  /// Returns true iff the given index corresponds to a point that
    121118  /// exists in the DNN structure (meaning that it has been added, and
    122119  /// not removed in the meantime)
    123   virtual bool Valid(const int & index) const = 0;
     120  virtual bool Valid(const int index) const = 0;
    124121
    125122  /// remove the points labelled by the std::vector indices_to_remove, and
     
    141138  /// Remove the point labelled by index and return the list of
    142139  /// points whose nearest neighbours have changed in the process
    143   inline void RemovePoint (const int & index,
     140  inline void RemovePoint (const int index,
    144141                           std::vector<int> & indices_of_updated_neighbours) {
    145142    std::vector<int> indices_added;
     
    158155  /// point).
    159156  inline void RemoveCombinedAddCombination(
    160                         const int & index1, const int & index2,
     157                        const int index1, const int index2,
    161158                        const EtaPhi & newpoint,
    162159                        int & index3,
  • external/fastjet/internal/IsBase.hh

    r5b5a56b r35cdc46  
    1 //STARTHEADER
    2 // $Id: IsBase.hh 3071 2013-04-01 12:52:46Z cacciari $
     1//FJSTARTHEADER
     2// $Id: IsBase.hh 3433 2014-07-23 08:17:03Z salam $
    33//
    4 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     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_INTERNAL_IS_BASE_HH__
  • external/fastjet/internal/LimitedWarning.hh

    r5b5a56b r35cdc46  
    22#define __FASTJET_INTERNALLIMITEDWARNING_HH__
    33
    4 //STARTHEADER
    5 // $Id: LimitedWarning.hh 2577 2011-09-13 15:11:38Z salam $
     4//FJSTARTHEADER
     5// $Id: LimitedWarning.hh 3433 2014-07-23 08:17:03Z salam $
    66//
    7 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     7// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  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
    1920//  FastJet as part of work towards a scientific publication, please
    20 //  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.
    2123//
    2224//  FastJet is distributed in the hope that it will be useful,
     
    2830//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2931//----------------------------------------------------------------------
    30 //ENDHEADER
     32//FJENDHEADER
    3133
    3234
  • external/fastjet/internal/MinHeap.hh

    r5b5a56b r35cdc46  
    1 //STARTHEADER
    2 // $Id: MinHeap.hh 2577 2011-09-13 15:11:38Z salam $
     1//FJSTARTHEADER
     2// $Id: MinHeap.hh 3433 2014-07-23 08:17:03Z salam $
    33//
    4 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     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_MINHEAP__HH__
     
    5052  /// expansion to a maximum size max_size;
    5153  MinHeap (const std::vector<double> & values, unsigned int max_size) :
    52     _heap(max_size) {_initialise(values);};
     54    _heap(max_size) {initialise(values);}
     55
     56  /// do the minimal setup for a MinHeap that can reach max_size;
     57  /// initialisation must be performed later with the actual values.
     58  MinHeap (unsigned int max_size) : _heap(max_size) {}
    5359
    5460  /// constructor in which the the maximum size is the size of the values array
    5561  MinHeap (const std::vector<double> & values) :
    56     _heap(values.size()) {_initialise(values);};
    57  
     62    _heap(values.size()) {initialise(values);}
     63
     64  /// initialise the heap with the supplied values. Should only be called if
     65  /// the constructor did not supply values.
     66  void initialise(const std::vector<double> & values);
     67
    5868  /// return the location of the minimal value on the heap
    5969  inline unsigned int minloc() const {
    60     return (_heap[0].minloc) - &(_heap[0]);};
     70    return (_heap[0].minloc) - &(_heap[0]);}
    6171 
    6272  /// return the minimal value on the heap
    63   inline double       minval() const {return _heap[0].minloc->value;};
     73  inline double       minval() const {return _heap[0].minloc->value;}
    6474
    65   inline double operator[](int i) const {return _heap[i].value;};
     75  inline double operator[](int i) const {return _heap[i].value;}
    6676
    6777  /// remove the value at the specified location (i.e. replace it with
     
    8292  std::vector<ValueLoc> _heap;
    8393
    84   void _initialise(const std::vector<double> & values);
    8594
    8695
  • external/fastjet/internal/SearchTree.hh

    r5b5a56b r35cdc46  
    1 //STARTHEADER
    2 // $Id: SearchTree.hh 3107 2013-05-03 15:47:47Z salam $
     1//FJSTARTHEADER
     2// $Id: SearchTree.hh 3433 2014-07-23 08:17:03Z salam $
    33//
    4 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     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
     
    188190public:
    189191
    190   // so that it can access out _node object;
     192  // so that it can access our _node object;
    191193  // note: "class U" needed for clang (v1.1 branches/release_27) compilation
    192   template<class U> friend class SearchTree<U>::const_circulator;
     194  // 2014-07-22: as reported by Torbjorn Sjostrand,
     195  // the next line was giving a warning with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
     196  // (dependent nested name specifier 'SearchTree<U>::' for friend class declaration is not supported)
     197  // Just commenting it out, things still seem to work; same with a template of type T
     198  //template<class U> friend class SearchTree<U>::const_circulator;
     199  friend class SearchTree<T>::const_circulator;
    193200  friend class SearchTree<T>;
    194201
  • external/fastjet/internal/Triangulation.hh

    r5b5a56b r35cdc46  
    33#define __FASTJET_TRIANGULATION__
    44
    5 //STARTHEADER
    6 // $Id: Triangulation.hh 2595 2011-09-23 09:05:04Z salam $
     5//FJSTARTHEADER
     6// $Id: Triangulation.hh 3433 2014-07-23 08:17:03Z salam $
    77//
    8 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     8// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    99//
    1010//----------------------------------------------------------------------
     
    1717//
    1818//  The algorithms that underlie FastJet have required considerable
    19 //  development and are described in hep-ph/0512210. If you use
     19//  development. They are described in the original FastJet paper,
     20//  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
    2021//  FastJet as part of work towards a scientific publication, please
    21 //  include a citation to the FastJet paper.
     22//  quote the version you use and include a citation to the manual and
     23//  optionally also to hep-ph/0512210.
    2224//
    2325//  FastJet is distributed in the hope that it will be useful,
     
    2931//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3032//----------------------------------------------------------------------
    31 //ENDHEADER
     33//FJENDHEADER
    3234
    3335
  • external/fastjet/internal/Voronoi.hh

    r5b5a56b r35cdc46  
    22#define __FASTJET__VORONOI_H__
    33
    4 //STARTHEADER
    5 // $Id: Voronoi.hh 2686 2011-11-14 09:28:22Z soyez $
    6 //
    7 // Copyright (c) 1994 by AT&T Bell Laboratories (see below)
    8 //
     4//FJSTARTHEADER
     5// $Id: Voronoi.hh 3433 2014-07-23 08:17:03Z salam $
     6//
     7// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    98//
    109//----------------------------------------------------------------------
    11 // This file is included as part of FastJet but was mostly written by
    12 // S. Fortune in C, put into C++ with memory management by S
    13 // O'Sullivan, and with further interface and memeory management
    14 // modifications by Gregory Soyez.
    15 //
    16 // Permission to use, copy, modify, and distribute this software for
    17 // any purpose without fee is hereby granted, provided that this
    18 // entire notice is included in all copies of any software which is or
    19 // includes a copy or modification of this software and in all copies
    20 // of the supporting documentation for such software. THIS SOFTWARE IS
    21 // BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTY.
    22 // IN PARTICULAR, NEITHER THE AUTHORS NOR AT&T MAKE ANY REPRESENTATION
    23 // OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS
    24 // SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
    25 //
     10// This file is part of FastJet.
     11//
     12//  FastJet is free software; you can redistribute it and/or modify
     13//  it under the terms of the GNU General Public License as published by
     14//  the Free Software Foundation; either version 2 of the License, or
     15//  (at your option) any later version.
     16//
     17//  The algorithms that underlie FastJet have required considerable
     18//  development. They are described in the original FastJet paper,
     19//  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     20//  FastJet as part of work towards a scientific publication, please
     21//  quote the version you use and include a citation to the manual and
     22//  optionally also to hep-ph/0512210.
     23//
     24//  FastJet is distributed in the hope that it will be useful,
     25//  but WITHOUT ANY WARRANTY; without even the implied warranty of
     26//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     27//  GNU General Public License for more details.
     28//
     29//  You should have received a copy of the GNU General Public License
     30//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2631//----------------------------------------------------------------------
    27 //ENDHEADER
     32//FJENDHEADER
    2833
    2934
  • external/fastjet/internal/base.hh

    r5b5a56b r35cdc46  
    11
    2 //STARTHEADER
    3 // $Id: base.hh 2717 2011-11-17 14:15:46Z salam $
     2//FJSTARTHEADER
     3// $Id: base.hh 3433 2014-07-23 08:17:03Z salam $
    44//
    5 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     5// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    66//
    77//----------------------------------------------------------------------
     
    1414//
    1515//  The algorithms that underlie FastJet have required considerable
    16 //  development and are described in hep-ph/0512210. If you use
     16//  development. They are described in the original FastJet paper,
     17//  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
    1718//  FastJet as part of work towards a scientific publication, please
    18 //  include a citation to the FastJet paper.
     19//  quote the version you use and include a citation to the manual and
     20//  optionally also to hep-ph/0512210.
    1921//
    2022//  FastJet is distributed in the hope that it will be useful,
     
    2628//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2729//----------------------------------------------------------------------
    28 //ENDHEADER
     30//FJENDHEADER
    2931
    3032#ifndef __FASTJET_FASTJET_BASE_HH__
  • external/fastjet/internal/numconsts.hh

    r5b5a56b r35cdc46  
    1 //STARTHEADER
    2 // $Id: numconsts.hh 2577 2011-09-13 15:11:38Z salam $
     1//FJSTARTHEADER
     2// $Id: numconsts.hh 3433 2014-07-23 08:17:03Z salam $
    33//
    4 // Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     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
Note: See TracChangeset for help on using the changeset viewer.