Index: external/fastjet/Selector.hh
===================================================================
--- external/fastjet/Selector.hh	(revision d69dfe4aebfe1009f10ecbbabd92ce813ba93f3e)
+++ external/fastjet/Selector.hh	(revision be2222cc14ff474f18d30a4e0ebc21a952777df5)
@@ -2,8 +2,8 @@
 #define __FASTJET_SELECTOR_HH__
 
-//STARTHEADER
-// $Id: Selector.hh 3203 2013-09-15 07:49:50Z salam $
-//
-// Copyright (c) 2009-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
+//FJSTARTHEADER
+// $Id: Selector.hh 3504 2014-08-01 06:07:54Z soyez $
+//
+// Copyright (c) 2009-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
 //
 //----------------------------------------------------------------------
@@ -16,7 +16,9 @@
 //
 //  The algorithms that underlie FastJet have required considerable
-//  development and are described in hep-ph/0512210. If you use
+//  development. They are described in the original FastJet paper,
+//  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
 //  FastJet as part of work towards a scientific publication, please
-//  include a citation to the FastJet paper.
+//  quote the version you use and include a citation to the manual and
+//  optionally also to hep-ph/0512210.
 //
 //  FastJet is distributed in the hope that it will be useful,
@@ -28,5 +30,5 @@
 //  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
 //----------------------------------------------------------------------
-//ENDHEADER
+//FJENDHEADER
 
 #include "fastjet/PseudoJet.hh"
@@ -67,12 +69,17 @@
   //----------------------------------------------------------
 
-  /// returns true if a given object passes the selection criterion.
-  /// This has to be overloaded by derived workers
+  /// returns true if a given object passes the selection criterion,
+  /// and is the main function that needs to be overloaded by derived
+  /// workers. 
+  ///
+  /// NB: this function is used only if applies_jet_by_jet() returns
+  /// true. If it does not, then derived classes are expected to
+  /// (re)implement the terminator function()
   virtual bool pass(const PseudoJet & jet) const = 0;
 
   /// For each jet that does not pass the cuts, this routine sets the 
-  /// pointer to 0. 
-  ///
-  /// It does not assume that the PseudoJet* passed as argumetn are not NULL
+  /// pointer to 0.
+  ///
+  /// It does not assume that the PseudoJet* passed as argument are not NULL
   virtual void terminator(std::vector<const PseudoJet *> & jets) const {
     for (unsigned i = 0; i < jets.size(); i++) {
@@ -133,4 +140,5 @@
     throw Error("this selector has no computable area");
   }
+
 };
 
@@ -151,5 +159,4 @@
   Selector(SelectorWorker * worker_in) {_worker.reset(worker_in);}
 
-
 #ifndef __FJCORE__
   /// ctor from a RangeDefinition
@@ -186,4 +193,16 @@
   /// passes and then evaluating the size of the vector
   unsigned int count(const std::vector<PseudoJet> & jets) const;
+
+  /// Return the 4-vector sum of the objects that pass the selection.
+  ///
+  /// This will often be more efficient that getting the vector of objects that
+  /// passes and then evaluating the size of the vector
+  PseudoJet sum(const std::vector<PseudoJet> & jets) const;
+
+  /// Return the scalar pt sum of the objects that pass the selection.
+  ///
+  /// This will often be more efficient that getting the vector of objects that
+  /// passes and then evaluating the size of the vector
+  double scalar_pt_sum(const std::vector<PseudoJet> & jets) const;
 
   /// sift the input jets into two vectors -- those that pass the selector
@@ -433,18 +452,18 @@
 /// select objets within a distance 'radius' from the location of the
 /// reference jet, set by Selector::set_reference(...)
-Selector SelectorCircle(const double & radius); 
+Selector SelectorCircle(const double radius); 
 
 /// select objets with distance from the reference jet is between 'radius_in'
 /// and 'radius_out'; the reference jet is set by Selector::set_reference(...)
-Selector SelectorDoughnut(const double & radius_in, const double & radius_out); 
+Selector SelectorDoughnut(const double radius_in, const double radius_out); 
 
 /// select objets within a rapidity distance 'half_width' from the
 /// location of the reference jet, set by Selector::set_reference(...)
-Selector SelectorStrip(const double & half_width);
+Selector SelectorStrip(const double half_width);
 
 /// select objets within rapidity distance 'half_rap_width' from the
 /// reference jet and azimuthal-angle distance within 'half_phi_width'; the
 /// reference jet is set by Selector::set_reference(...)
-Selector SelectorRectangle(const double & half_rap_width, const double & half_phi_width);
+Selector SelectorRectangle(const double half_rap_width, const double half_phi_width);
 
 
