FastJet  3.0.6
GridJetPlugin.hh
1 #ifndef __GRIDJETPLUGIN_HH__
2 #define __GRIDJETPLUGIN_HH__
3 
4 //STARTHEADER
5 // $Id: GridJetPlugin.hh 2267 2011-06-20 15:10:23Z salam $
6 //
7 // Copyright (c) 2011, Matteo Cacciari, Gavin Salam and Gregory Soyez
8 //
9 //----------------------------------------------------------------------
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 and are described in hep-ph/0512210. If you use
19 // FastJet as part of work towards a scientific publication, please
20 // include a citation to the FastJet paper.
21 //
22 // FastJet is distributed in the hope that it will be useful,
23 // but WITHOUT ANY WARRANTY; without even the implied warranty of
24 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 // GNU General Public License for more details.
26 //
27 // You should have received a copy of the GNU General Public License
28 // along with FastJet. If not, see <http://www.gnu.org/licenses/>.
29 //----------------------------------------------------------------------
30 //ENDHEADER
31 
32 
33 #include "fastjet/JetDefinition.hh"
34 
35 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
36 
37 // forward declaration to reduce includes
38 class ClusterSequence;
39 
40 //----------------------------------------------------------------------
41 //
42 /// @ingroup plugins
43 /// \class GridJetPlugin
44 /// plugin for fastjet (v3.0 upwards) that clusters particles such
45 /// that all particles in a given cell of a rectangular rapidity-phi
46 /// grid end up in a common "jet".
47 ///
48 /// This is not intended for use as a regular jet clustering algorithm,
49 /// but is rather provided for comparison purposes with the
50 /// GridMedianBackgroundEstimator (which is even faster).
52 public:
53  /// Main constructor for the GridJetPlugin Plugin class.
54  ///
55  /// \param ymax The maximal rapidity extent of the grid
56  /// \param requested_grid_spacing The requested grid spacing
57  /// \param post_jet_def if present, and not == JetDefinition()
58  /// (which has undefined_jet_algorithm), then
59  /// run the post_jet_def on the result of the grid
60  /// clustering.
61  GridJetPlugin (double ymax, double requested_grid_spacing,
62  const JetDefinition & post_jet_def = JetDefinition());
63 
64  /// copy constructor
65  GridJetPlugin (const GridJetPlugin & plugin) {
66  *this = plugin;
67  }
68 
69  // the things that are required by base class
70  virtual std::string description () const;
71  virtual void run_clustering(ClusterSequence &) const;
72 
73  /// This returns the sqrt(dphi*dy/pi) -- i.e. the radius that for a
74  /// circular jet would give the same area.
75  virtual double R() const;
76 
77  /// returns the actual rapidity spacing of the grid
78  double drap() const {return _dy;}
79  /// returns the actual phi spacing of the grid
80  double dphi() const {return _dphi;}
81  /// returns the minimum rapidity of the grid
82  double rapmin() const {return _ymin;}
83  /// returns the maximum rapidity of the grid
84  double rapmax() const {return _ymax;}
85 
86 private:
87 
88  void setup_grid();
89 
90  int igrid(const PseudoJet & p) const;
91 
92  double _ymin, _ymax, _dy, _dphi, _requested_grid_spacing;
93  int _ny, _nphi, _ntotal;
94 
95  JetDefinition _post_jet_def;
96 
97 };
98 
99 FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
100 
101 #endif // __GRIDJETPLUGIN_HH__
102 
deals with clustering
double rapmin() const
returns the minimum rapidity of the grid
double drap() const
returns the actual rapidity spacing of the grid
double dphi() const
returns the actual phi spacing of the grid
double rapmax() const
returns the maximum rapidity of the grid
a class that allows a user to introduce their own "plugin" jet finder
plugin for fastjet (v3.0 upwards) that clusters particles such that all particles in a given cell of ...
Class to contain pseudojets, including minimal information of use to jet-clustering routines...
Definition: PseudoJet.hh:65
class that is intended to hold a full definition of the jet clusterer
GridJetPlugin(const GridJetPlugin &plugin)
copy constructor