Changeset 35cdc46 in git for external/fastjet/plugins/GridJet/fastjet/GridJetPlugin.hh
- Timestamp:
- Sep 3, 2014, 3:18:54 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- be2222c
- Parents:
- 5b5a56b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/fastjet/plugins/GridJet/fastjet/GridJetPlugin.hh
r5b5a56b r35cdc46 1 #ifndef __ GRIDJETPLUGIN_HH__2 #define __ GRIDJETPLUGIN_HH__1 #ifndef __FASTJET_GRIDJETPLUGIN_HH__ 2 #define __FASTJET_GRIDJETPLUGIN_HH__ 3 3 4 // STARTHEADER4 //FJSTARTHEADER 5 5 // $Id: GridJetPlugin.hh 2267 2011-06-20 15:10:23Z salam $ 6 6 // 7 // Copyright (c) 20 11, Matteo Cacciari, GavinSalam and Gregory Soyez7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez 8 8 // 9 9 //---------------------------------------------------------------------- … … 16 16 // 17 17 // 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 19 20 // 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. 21 23 // 22 24 // FastJet is distributed in the hope that it will be useful, … … 28 30 // along with FastJet. If not, see <http://www.gnu.org/licenses/>. 29 31 //---------------------------------------------------------------------- 30 // ENDHEADER32 //FJENDHEADER 31 33 32 34 33 35 #include "fastjet/JetDefinition.hh" 36 37 // makes it easy to switch back and forth between use of 38 // RectangularGrid or not; this got enabled in FJ3.1 39 #define FASTJET_GRIDJET_USEFJGRID 40 41 #ifdef FASTJET_GRIDJET_USEFJGRID 42 #include "fastjet/RectangularGrid.hh" 43 #endif 34 44 35 45 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh … … 49 59 /// but is rather provided for comparison purposes with the 50 60 /// GridMedianBackgroundEstimator (which is even faster). 51 class GridJetPlugin : public JetDefinition::Plugin { 61 class GridJetPlugin : public JetDefinition::Plugin 62 #ifdef FASTJET_GRIDJET_USEFJGRID 63 , RectangularGrid 64 #endif 65 { 52 66 public: 53 /// Mainconstructor for the GridJetPlugin Plugin class.67 /// Basic constructor for the GridJetPlugin Plugin class. 54 68 /// 55 69 /// \param ymax The maximal rapidity extent of the grid … … 62 76 const JetDefinition & post_jet_def = JetDefinition()); 63 77 64 /// copy constructor 65 GridJetPlugin (const GridJetPlugin & plugin) { 66 *this = plugin; 67 } 78 #ifdef FASTJET_GRIDJET_USEFJGRID 79 /// Constructor for the GridJetPlugin Plugin class that allows 80 /// full control over the underlying grid. New in FastJet 3.1. 81 /// 82 /// \param grid The maximal rapidity extent of the grid 83 /// \param post_jet_def if present, and not == JetDefinition() 84 /// (which has undefined_jet_algorithm), then 85 /// run the post_jet_def on the result of the grid 86 /// clustering. 87 GridJetPlugin (const RectangularGrid & grid, 88 const JetDefinition & post_jet_def = JetDefinition()); 89 #endif // FASTJET_GRIDJET_USEFJGRID 90 91 92 93 // /// copy constructor 94 // GridJetPlugin (const GridJetPlugin & plugin) { 95 // *this = plugin; 96 // } 68 97 69 98 // the things that are required by base class … … 75 104 virtual double R() const; 76 105 106 // As of FastJet 3.1 the following functions become available through 107 // the underlying RectangularGrid class. 108 #ifndef FASTJET_GRIDJET_USEFJGRID 77 109 /// returns the actual rapidity spacing of the grid 78 110 double drap() const {return _dy;} … … 83 115 /// returns the maximum rapidity of the grid 84 116 double rapmax() const {return _ymax;} 117 #endif 85 118 86 119 private: 87 120 121 #ifndef FASTJET_GRIDJET_USEFJGRID 88 122 void setup_grid(); 89 123 90 int igrid(const PseudoJet & p) const; 124 int n_tiles() const {return _ntotal;} 125 int n_good_tiles() const {return _ntotal;} 126 127 int tile_index(const PseudoJet & p) const; 128 bool tile_is_good(int /* itile */) const {return true;} 91 129 92 130 double _ymin, _ymax, _dy, _dphi, _requested_grid_spacing; 93 131 int _ny, _nphi, _ntotal; 132 #endif 94 133 95 134 JetDefinition _post_jet_def; … … 99 138 FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh 100 139 101 #endif // __ GRIDJETPLUGIN_HH__140 #endif // __FASTJET_GRIDJETPLUGIN_HH__ 102 141
Note:
See TracChangeset
for help on using the changeset viewer.