Fork me on GitHub

Changeset 49234af in git for external/fastjet/Selector.hh


Ignore:
Timestamp:
Dec 9, 2014, 1:27:13 PM (10 years ago)
Author:
Michele <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
37deb3b, 9e991f8
Parents:
f6b6ee7 (diff), e7e90df (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'TestFastJet310b1'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/fastjet/Selector.hh

    rf6b6ee7 r49234af  
    22#define __FASTJET_SELECTOR_HH__
    33
    4 //STARTHEADER
    5 // $Id: Selector.hh 3203 2013-09-15 07:49:50Z salam $
    6 //
    7 // Copyright (c) 2009-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4//FJSTARTHEADER
     5// $Id: Selector.hh 3711 2014-09-29 13:54:51Z salam $
     6//
     7// Copyright (c) 2009-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#include "fastjet/PseudoJet.hh"
     
    6769  //----------------------------------------------------------
    6870
    69   /// returns true if a given object passes the selection criterion.
    70   /// This has to be overloaded by derived workers
     71  /// returns true if a given object passes the selection criterion,
     72  /// and is the main function that needs to be overloaded by derived
     73  /// workers.
     74  ///
     75  /// NB: this function is used only if applies_jet_by_jet() returns
     76  /// true. If it does not, then derived classes are expected to
     77  /// (re)implement the terminator function()
    7178  virtual bool pass(const PseudoJet & jet) const = 0;
    7279
    7380  /// For each jet that does not pass the cuts, this routine sets the
    74   /// pointer to 0. 
    75   ///
    76   /// It does not assume that the PseudoJet* passed as argumetn are not NULL
     81  /// pointer to 0.
     82  ///
     83  /// It does not assume that the PseudoJet* passed as argument are not NULL
    7784  virtual void terminator(std::vector<const PseudoJet *> & jets) const {
    7885    for (unsigned i = 0; i < jets.size(); i++) {
     
    133140    throw Error("this selector has no computable area");
    134141  }
     142
    135143};
    136144
     
    151159  Selector(SelectorWorker * worker_in) {_worker.reset(worker_in);}
    152160
    153 
    154161#ifndef __FJCORE__
    155162  /// ctor from a RangeDefinition
     
    186193  /// passes and then evaluating the size of the vector
    187194  unsigned int count(const std::vector<PseudoJet> & jets) const;
     195
     196  /// Return the 4-vector sum of the objects that pass the selection.
     197  ///
     198  /// This will often be more efficient that getting the vector of objects that
     199  /// passes and then evaluating the size of the vector
     200  PseudoJet sum(const std::vector<PseudoJet> & jets) const;
     201
     202  /// Return the scalar pt sum of the objects that pass the selection.
     203  ///
     204  /// This will often be more efficient that getting the vector of objects that
     205  /// passes and then evaluating the size of the vector
     206  double scalar_pt_sum(const std::vector<PseudoJet> & jets) const;
    188207
    189208  /// sift the input jets into two vectors -- those that pass the selector
     
    286305  }
    287306
    288   /// class that gets throw when a Selector is applied despite it not
     307  /// class that gets thrown when a Selector is applied despite it not
    289308  /// having a valid underlying worker.
    290309  class InvalidWorker : public Error {
     
    293312  };
    294313
    295   /// class that gets throw when a Selector is applied despite it not
    296   /// having a valid underlying worker.
     314  /// class that gets thrown when the area is requested from a Selector for which
     315  /// the area is not meaningful
    297316  class InvalidArea : public Error {
    298317  public:
     
    433452/// select objets within a distance 'radius' from the location of the
    434453/// reference jet, set by Selector::set_reference(...)
    435 Selector SelectorCircle(const double & radius);
     454Selector SelectorCircle(const double radius);
    436455
    437456/// select objets with distance from the reference jet is between 'radius_in'
    438457/// and 'radius_out'; the reference jet is set by Selector::set_reference(...)
    439 Selector SelectorDoughnut(const double & radius_in, const double & radius_out);
     458Selector SelectorDoughnut(const double radius_in, const double radius_out);
    440459
    441460/// select objets within a rapidity distance 'half_width' from the
    442461/// location of the reference jet, set by Selector::set_reference(...)
    443 Selector SelectorStrip(const double & half_width);
     462Selector SelectorStrip(const double half_width);
    444463
    445464/// select objets within rapidity distance 'half_rap_width' from the
    446465/// reference jet and azimuthal-angle distance within 'half_phi_width'; the
    447466/// reference jet is set by Selector::set_reference(...)
    448 Selector SelectorRectangle(const double & half_rap_width, const double & half_phi_width);
     467Selector SelectorRectangle(const double half_rap_width, const double half_phi_width);
    449468
    450469
Note: See TracChangeset for help on using the changeset viewer.