Index: external/fastjet/ClusterSequence.cc
===================================================================
--- external/fastjet/ClusterSequence.cc	(revision 1f1f858be3b07de5df7883fba72ff0a8ab002b56)
+++ external/fastjet/ClusterSequence.cc	(revision c1ce3fea879c763e18da0cb50ebce00718f4d770)
@@ -1,4 +1,4 @@
 //FJSTARTHEADER
-// $Id: ClusterSequence.cc 3685 2014-09-11 20:15:00Z salam $
+// $Id: ClusterSequence.cc 3809 2015-02-20 13:05:13Z soyez $
 //
 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
@@ -372,6 +372,6 @@
     _plugin_activated = false;
 
+  } else if (_strategy == N2MHTLazy9AntiKtSeparateGhosts) {
 #ifndef __FJCORE__
-  } else if (_strategy == N2MHTLazy9AntiKtSeparateGhosts) {
     // attempt to use an external tiling routine -- it manipulates
     // the CS history via the plugin mechanism
@@ -1471,7 +1471,22 @@
   assert(local_step == step_number);
 
+  // sanity check: make sure the particles have not already been recombined
+  //
+  // Note that good practice would make this an assert (since this is
+  // a serious internal issue). However, we decided to throw an
+  // InternalError so that the end user can decide to catch it and
+  // retry the clustering with a different strategy.
+
   assert(parent1 >= 0);
+  if (_history[parent1].child != Invalid){
+    throw InternalError("trying to recomine an object that has previsously been recombined");
+  }
   _history[parent1].child = local_step;
-  if (parent2 >= 0) {_history[parent2].child = local_step;}
+  if (parent2 >= 0) {
+    if (_history[parent2].child != Invalid){
+      throw InternalError("trying to recomine an object that has previsously been recombined");
+    }
+    _history[parent2].child = local_step;
+  }
 
   // get cross-referencing right from PseudoJets
Index: external/fastjet/Error.hh
===================================================================
--- external/fastjet/Error.hh	(revision 1f1f858be3b07de5df7883fba72ff0a8ab002b56)
+++ external/fastjet/Error.hh	(revision c1ce3fea879c763e18da0cb50ebce00718f4d770)
@@ -3,5 +3,5 @@
 
 //FJSTARTHEADER
-// $Id: Error.hh 3694 2014-09-18 13:21:54Z soyez $
+// $Id: Error.hh 3809 2015-02-20 13:05:13Z soyez $
 //
 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
@@ -96,4 +96,23 @@
 
 
+/// @ingroup error_handling
+/// \class InternalError
+/// class corresponding to critical internal errors
+/// 
+/// This is an error class (derived from Error) meant for serious,
+/// critical, internal errors that we still want to be catchable by an
+/// end-user [e.g. a serious issue in clustering where the end-user
+/// can catch it and retry with a different strategy]
+///
+/// Please directly contact the FastJet authors if you see such an
+/// error.
+class InternalError : public Error{
+public:
+  /// ctor with error message:
+  /// just add a bit of info to the message and pass it to the base class
+  InternalError(const std::string & message_in) : Error(std::string("*** CRITICAL INTERNAL FASTJET ERROR *** CONTACT THE AUTHORS *** ") + message_in){ }
+};
+
+
 FASTJET_END_NAMESPACE
 
Index: external/fastjet/LazyTiling25.cc
===================================================================
--- external/fastjet/LazyTiling25.cc	(revision 1f1f858be3b07de5df7883fba72ff0a8ab002b56)
+++ external/fastjet/LazyTiling25.cc	(revision c1ce3fea879c763e18da0cb50ebce00718f4d770)
@@ -1,4 +1,4 @@
 //FJSTARTHEADER
-// $Id: LazyTiling25.cc 3477 2014-07-29 14:34:39Z salam $
+// $Id: LazyTiling25.cc 3808 2015-02-20 11:24:53Z soyez $
 //
 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
@@ -365,5 +365,7 @@
   for (Tile25 ** near_tile = tile.begin_tiles; near_tile != tile.end_tiles; near_tile++){
     if ((*near_tile)->tagged) continue;
-    double dist = _distance_to_tile(jet, *near_tile);
+    // here we are not allowed to miss a tile due to some rounding
+    // error. We therefore allow for a margin of security
+    double dist = _distance_to_tile(jet, *near_tile) - tile_edge_security_margin;
     // cout << "      max info looked at tile " << *near_tile - &_tiles[0] 
     // 	 << ", dist = " << dist << " " << (*near_tile)->max_NN_dist
Index: external/fastjet/LazyTiling9.cc
===================================================================
--- external/fastjet/LazyTiling9.cc	(revision 1f1f858be3b07de5df7883fba72ff0a8ab002b56)
+++ external/fastjet/LazyTiling9.cc	(revision c1ce3fea879c763e18da0cb50ebce00718f4d770)
@@ -1,4 +1,4 @@
 //FJSTARTHEADER
-// $Id: LazyTiling9.cc 3477 2014-07-29 14:34:39Z salam $
+// $Id: LazyTiling9.cc 3808 2015-02-20 11:24:53Z soyez $
 //
 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
@@ -348,5 +348,7 @@
   for (Tile2 ** near_tile = tile.begin_tiles; near_tile != tile.end_tiles; near_tile++){
     if ((*near_tile)->tagged) continue;
-    double dist = _distance_to_tile(jet, *near_tile);
+    // here we are not allowed to miss a tile due to some rounding
+    // error. We therefore allow for a margin of security
+    double dist = _distance_to_tile(jet, *near_tile) - tile_edge_security_margin;
     // cout << "      max info looked at tile " << *near_tile - &_tiles[0] 
     // 	 << ", dist = " << dist << " " << (*near_tile)->max_NN_dist
Index: external/fastjet/LazyTiling9Alt.cc
===================================================================
--- external/fastjet/LazyTiling9Alt.cc	(revision 1f1f858be3b07de5df7883fba72ff0a8ab002b56)
+++ external/fastjet/LazyTiling9Alt.cc	(revision c1ce3fea879c763e18da0cb50ebce00718f4d770)
@@ -1,4 +1,4 @@
 //FJSTARTHEADER
-// $Id: LazyTiling9Alt.cc 3477 2014-07-29 14:34:39Z salam $
+// $Id: LazyTiling9Alt.cc 3808 2015-02-20 11:24:53Z soyez $
 //
 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
@@ -319,5 +319,7 @@
   for (Tile::TileFnPair * near_tile = tile.begin_tiles; near_tile != tile.end_tiles; near_tile++){
     if ((near_tile->first)->tagged) continue;
-    double dist = (tile.*(near_tile->second))(jet);
+    // here we are not allowed to miss a tile due to some rounding
+    // error. We therefore allow for a margin of security
+    double dist = (tile.*(near_tile->second))(jet) - tile_edge_security_margin;
     // cout << "      max info looked at tile " << *near_tile - &_tiles[0] 
     // 	 << ", dist = " << dist << " " << (*near_tile)->max_NN_dist
Index: external/fastjet/LazyTiling9SeparateGhosts.cc
===================================================================
--- external/fastjet/LazyTiling9SeparateGhosts.cc	(revision 1f1f858be3b07de5df7883fba72ff0a8ab002b56)
+++ external/fastjet/LazyTiling9SeparateGhosts.cc	(revision c1ce3fea879c763e18da0cb50ebce00718f4d770)
@@ -1,4 +1,4 @@
 //FJSTARTHEADER
-// $Id: LazyTiling9SeparateGhosts.cc 3596 2014-08-12 15:27:19Z soyez $
+// $Id: LazyTiling9SeparateGhosts.cc 3808 2015-02-20 11:24:53Z soyez $
 //
 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
@@ -298,5 +298,7 @@
   for (Tile3 ** near_tile = tile.begin_tiles; near_tile != tile.end_tiles; near_tile++){
     if ((*near_tile)->tagged) continue;
-    double dist = _distance_to_tile(jet, *near_tile);
+    // here we are not allowed to miss a tile due to some rounding
+    // error. We therefore allow for a margin of security
+    double dist = _distance_to_tile(jet, *near_tile) - tile_edge_security_margin;
     // cout << "      max info looked at tile " << *near_tile - &_tiles[0] 
     // 	 << ", dist = " << dist << " " << (*near_tile)->max_NN_dist
Index: external/fastjet/VERSION
===================================================================
--- external/fastjet/VERSION	(revision 1f1f858be3b07de5df7883fba72ff0a8ab002b56)
+++ external/fastjet/VERSION	(revision c1ce3fea879c763e18da0cb50ebce00718f4d770)
@@ -1,1 +1,1 @@
-3.1.1
+3.1.2
Index: external/fastjet/config_auto.h
===================================================================
--- external/fastjet/config_auto.h	(revision 1f1f858be3b07de5df7883fba72ff0a8ab002b56)
+++ external/fastjet/config_auto.h	(revision c1ce3fea879c763e18da0cb50ebce00718f4d770)
@@ -151,5 +151,5 @@
 /* Define to the full name and version of this package. */
 #ifndef FASTJET_PACKAGE_STRING 
-#define FASTJET_PACKAGE_STRING  "FastJet 3.1.1" 
+#define FASTJET_PACKAGE_STRING  "FastJet 3.1.2" 
 #endif
 
@@ -161,5 +161,5 @@
 /* Define to the version of this package. */
 #ifndef FASTJET_PACKAGE_VERSION 
-#define FASTJET_PACKAGE_VERSION  "3.1.1" 
+#define FASTJET_PACKAGE_VERSION  "3.1.2" 
 #endif
 
@@ -171,5 +171,5 @@
 /* Version number of package */
 #ifndef FASTJET_VERSION 
-#define FASTJET_VERSION  "3.1.1" 
+#define FASTJET_VERSION  "3.1.2" 
 #endif
 
@@ -186,10 +186,10 @@
 /* Version of the package under the form XYYZZ (instead of X.Y.Z) */
 #ifndef FASTJET_VERSION_NUMBER 
-#define FASTJET_VERSION_NUMBER  30101 
+#define FASTJET_VERSION_NUMBER  30102 
 #endif
 
 /* Patch version of this package */
 #ifndef FASTJET_VERSION_PATCHLEVEL 
-#define FASTJET_VERSION_PATCHLEVEL  1 
+#define FASTJET_VERSION_PATCHLEVEL  2 
 #endif
 
Index: external/fastjet/config_raw.h
===================================================================
--- external/fastjet/config_raw.h	(revision 1f1f858be3b07de5df7883fba72ff0a8ab002b56)
+++ external/fastjet/config_raw.h	(revision c1ce3fea879c763e18da0cb50ebce00718f4d770)
@@ -92,5 +92,5 @@
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "FastJet 3.1.1"
+#define PACKAGE_STRING "FastJet 3.1.2"
 
 /* Define to the one symbol short name of this package. */
@@ -98,5 +98,5 @@
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "3.1.1"
+#define PACKAGE_VERSION "3.1.2"
 
 /* Define to 1 if you have the ANSI C header files. */
@@ -104,5 +104,5 @@
 
 /* Version number of package */
-#define VERSION "3.1.1"
+#define VERSION "3.1.2"
 
 /* Major version of this package */
@@ -113,8 +113,8 @@
 
 /* Version of the package under the form XYYZZ (instead of X.Y.Z) */
-#define VERSION_NUMBER 30101
+#define VERSION_NUMBER 30102
 
 /* Patch version of this package */
-#define VERSION_PATCHLEVEL 1
+#define VERSION_PATCHLEVEL 2
 
 /* Pre-release version of this package */
Index: external/fastjet/config_win.h
===================================================================
--- external/fastjet/config_win.h	(revision 1f1f858be3b07de5df7883fba72ff0a8ab002b56)
+++ external/fastjet/config_win.h	(revision c1ce3fea879c763e18da0cb50ebce00718f4d770)
@@ -1,9 +1,9 @@
-#define FASTJET_PACKAGE_STRING  "FastJet 3.1.1"
-#define FASTJET_PACKAGE_VERSION  "3.1.1"
-#define FASTJET_VERSION  "3.1.1"
+#define FASTJET_PACKAGE_STRING  "FastJet 3.1.2"
+#define FASTJET_PACKAGE_VERSION  "3.1.2"
+#define FASTJET_VERSION  "3.1.2"
 #define FASTJET_VERSION_MAJOR       3
 #define FASTJET_VERSION_MINOR       1
-#define FASTJET_VERSION_PATCHLEVEL  1
-#define FASTJET_VERSION_NUMBER      30101
+#define FASTJET_VERSION_PATCHLEVEL  2
+#define FASTJET_VERSION_NUMBER      30102
 
 /* The ATLASCone plugin is disabled by default*/
Index: external/fastjet/internal/LazyTiling9Alt.hh
===================================================================
--- external/fastjet/internal/LazyTiling9Alt.hh	(revision 1f1f858be3b07de5df7883fba72ff0a8ab002b56)
+++ external/fastjet/internal/LazyTiling9Alt.hh	(revision c1ce3fea879c763e18da0cb50ebce00718f4d770)
@@ -3,5 +3,5 @@
 
 //FJSTARTHEADER
-// $Id: LazyTiling9Alt.hh 3477 2014-07-29 14:34:39Z salam $
+// $Id: LazyTiling9Alt.hh 3808 2015-02-20 11:24:53Z soyez $
 //
 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
@@ -37,4 +37,37 @@
 
 FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
+
+/// Rounding errors in the Lazy strategies may cause the following
+/// problem: when browsing tiles in the vicinity of the particles
+/// being clustered in order to decide which of these tiles may
+/// contain particles that need to be updated (because theit NN is one
+/// of the particles that are currently clustered), we discard tiles
+/// that are deemed "too far from the cell" by the "max_NN_dist"
+/// criterion. Because of rounding error, this condition can sometimes
+/// miss cases where an update is needed.
+///
+/// An example of this happens if a particle '1' is, say, at the lower
+/// edge of the rapidity of a given tile, with a particle '2' in the
+/// tile directly on its left at the same rapidity. Assume also that
+/// max_NN_dist in 2's tile corresponds to the distance between 2 and
+/// teh tile of 1. If 2 is 1's NN then in case 2 gets clustered, 1's
+/// NN needs to be updated. However, rounding errors in the
+/// calculation of the distance between 1 and 2 may result is
+/// something slightly larger than the max_NN_dist in 2's tile.
+///
+/// This situation corresponds to the bug reported by Jochen Olt on
+/// February 12 2015 [see issue-tracker/2015-02-infinite-loop],
+/// causing an infinite loop.
+///
+/// To prevent this, the simplest solution is, when looking at tiles
+/// to browse for updateds, to add a margin of security close to the
+/// edges of the cell, i.e. instead of updating only tiles for which
+/// distance<=max_NN_dist, we will update tiles for which
+/// distance<=max_NN_dist+tile_edge_security_margin.
+///
+/// Note that this does not need to be done when computing nearest
+/// neighbours [rounding errors are tolerated there] but it is
+/// critical when tracking points that have to be updated.
+const double tile_edge_security_margin=1.0e-7;
 
 /// structure analogous to BriefJet, but with the extra information
Index: external/fastjet/plugins/SISCone/config.h
===================================================================
--- external/fastjet/plugins/SISCone/config.h	(revision 1f1f858be3b07de5df7883fba72ff0a8ab002b56)
+++ external/fastjet/plugins/SISCone/config.h	(revision c1ce3fea879c763e18da0cb50ebce00718f4d770)
@@ -54,7 +54,4 @@
 #define PACKAGE_TARNAME "siscone"
 
-/* Define to the home page for this package. */
-/* #undef PACKAGE_URL */
-
 /* Define to the version of this package. */
 #define PACKAGE_VERSION "3.0.0"
Index: external/fastjet/tools/Filter.hh
===================================================================
--- external/fastjet/tools/Filter.hh	(revision 1f1f858be3b07de5df7883fba72ff0a8ab002b56)
+++ external/fastjet/tools/Filter.hh	(revision c1ce3fea879c763e18da0cb50ebce00718f4d770)
@@ -3,5 +3,5 @@
 
 //FJSTARTHEADER
-// $Id: Filter.hh 3494 2014-07-30 20:38:48Z soyez $
+// $Id: Filter.hh 3845 2015-03-08 08:35:36Z soyez $
 //
 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
@@ -142,5 +142,5 @@
   /// Set a subtractor that is applied to all individual subjets before
   /// deciding which ones to keep. It takes precedence over a non-zero rho.
-  void set_subtractor(const FunctionOfPseudoJet<PseudoJet> * subtractor) {_subtractor = subtractor;}
+  void set_subtractor(const FunctionOfPseudoJet<PseudoJet> * subtractor_in) {_subtractor = subtractor_in;}
 
   /// runs the filtering and sets kept and rejected to be the jets of interest
