Fork me on GitHub

source: git/external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh@ 8c872c8

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 8c872c8 was 973b92a, checked in by Pavel Demin <pavel.demin@…>, 9 years ago

update FastJet library to 3.1.3 and Nsubjettiness library to 2.2.1

  • Property mode set to 100644
File size: 7.8 KB
Line 
1// Nsubjettiness Package
2// Questions/Comments? jthaler@jthaler.net
3//
4// Copyright (c) 2011-14
5// Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
6//
7// $Id: NjettinessPlugin.hh 822 2015-06-15 23:52:57Z jthaler $
8//----------------------------------------------------------------------
9// This file is part of FastJet contrib.
10//
11// It is free software; you can redistribute it and/or modify it under
12// the terms of the GNU General Public License as published by the
13// Free Software Foundation; either version 2 of the License, or (at
14// your option) any later version.
15//
16// It is distributed in the hope that it will be useful, but WITHOUT
17// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
19// License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this code. If not, see <http://www.gnu.org/licenses/>.
23//----------------------------------------------------------------------
24
25#ifndef __FASTJET_CONTRIB_NJETTINESSPLUGIN_HH__
26#define __FASTJET_CONTRIB_NJETTINESSPLUGIN_HH__
27
28#include <fastjet/config.h>
29
30#include "Njettiness.hh"
31#include "MeasureDefinition.hh"
32#include "AxesDefinition.hh"
33#include "TauComponents.hh"
34
35#include "fastjet/ClusterSequence.hh"
36#include "fastjet/JetDefinition.hh"
37
38#include <string>
39#include <climits>
40
41FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
42
43
44namespace contrib {
45
46
47/// \class NjettinessPlugin
48/// \brief Implements the N-jettiness Jet Algorithm
49/**
50 * An exclusive jet finder that identifies N jets; first N axes are found, then
51 * particles are assigned to the nearest (DeltaR) axis and for each axis the
52 * corresponding jet is simply the four-momentum sum of these particles.
53 *
54 * As of version 2.2, it is recommended to use the XConePlugin, which has
55 * sensible default values for jet finding.
56 *
57 * Axes can be found in several ways, specified by the AxesDefinition argument.
58 * The recommended AxesDefinitions for jet finding (different than for jet shapes)
59 * OnePass_AntiKT(R0) : one-pass minimization from anti-kT starting point
60 * OnePass_GenET_GenKT_Axes(delta, p, R0) : one-pass min. from GenET/KT
61 * OnePass_WTA_GenKT_Axes(p, R0) : one-pass min from WTA/GenKT
62 * For recommendations on which axes to use, please see the README file.
63 *
64 * Jet regions are determined by the MeasureDefinition. The recommended choices
65 * for jet finding are
66 * ConicalMeasure(beta,R0) : perfect cones in rapidity/azimuth plane
67 * XConeMeasure(beta,R0) : approximate cones based on dot product distances.
68 *
69 * Other measures introduced in version 2.2 include OriginalGeometricMeasure,
70 * ModifiedGeometricMeasure, and ConicalGeometricMeasure, which define N-jettiness
71 * through dot products of particle momenta with light-like axes. OriginalGeometricMeasure
72 * produces football-shaped jets due to its central weighting of the beam measure,
73 * but ModifiedGeometric and ConicalGeometric both deform the original geometric measure
74 * to allow for cone-shaped jets. The size of these cones can be controlled through Rcutoff
75 * just as in the other measures. See the README file or MeasureDefinition.hh for information
76 * on how to call these measures.
77 *
78 */
79class NjettinessPlugin : public JetDefinition::Plugin {
80public:
81
82 /// Constructor with same arguments as Nsubjettiness (N, AxesDefinition, MeasureDefinition)
83 NjettinessPlugin(int N,
84 const AxesDefinition & axes_def,
85 const MeasureDefinition & measure_def)
86 : _njettinessFinder(axes_def, measure_def), _N(N) {}
87
88
89 /// Description
90 virtual std::string description () const;
91 /// Jet radius (this does not make sense yet)
92 virtual double R() const {return -1.0;} // TODO: make this not stupid
93
94 /// The actually clustering, which first called Njettiness and then creates a dummy ClusterSequence
95 virtual void run_clustering(ClusterSequence&) const;
96
97 /// For using manual axes with Njettiness Plugin
98 void setAxes(const std::vector<fastjet::PseudoJet> & myAxes) {
99 // Cross check that manual axes are being used is in Njettiness
100 _njettinessFinder.setAxes(myAxes);
101 }
102
103 /// Destructor
104 virtual ~NjettinessPlugin() {}
105
106private:
107
108 Njettiness _njettinessFinder; ///< The core Njettiness that does the heavy lifting
109 int _N; ///< Number of exclusive jets to find.
110
111 /// Warning if the user tries to use v1.0.3 constructor.
112 static LimitedWarning _old_constructor_warning;
113
114public:
115
116 // Alternative constructors that define the measure via enums and parameters
117 // These constructors are deprecated and will be removed in a future version.
118
119 /// \deprecated
120 /// Old-style constructor with 0 arguments (DEPRECATED)
121 NjettinessPlugin(int N,
122 Njettiness::AxesMode axes_mode,
123 Njettiness::MeasureMode measure_mode)
124 : _njettinessFinder(axes_mode, measure_mode, 0), _N(N) {
125 _old_constructor_warning.warn("NjettinessPlugin: You are using the old style constructor. This is deprecated as of v2.1 and will be removed in v3.0. Please use the NjettinessPlugin constructor based on AxesDefinition and MeasureDefinition instead.");
126 }
127
128 /// \deprecated
129 /// Old-style constructor with 1 argument (DEPRECATED)
130 NjettinessPlugin(int N,
131 Njettiness::AxesMode axes_mode,
132 Njettiness::MeasureMode measure_mode,
133 double para1)
134 : _njettinessFinder(axes_mode, measure_mode, 1, para1), _N(N) {
135 _old_constructor_warning.warn("NjettinessPlugin: You are using the old style constructor. This is deprecated as of v2.1 and will be removed in v3.0. Please use the NjettinessPlugin constructor based on AxesDefinition and MeasureDefinition instead.");
136
137 }
138
139 /// \deprecated
140 /// Old-style constructor with 2 arguments (DEPRECATED)
141 NjettinessPlugin(int N,
142 Njettiness::AxesMode axes_mode,
143 Njettiness::MeasureMode measure_mode,
144 double para1,
145 double para2)
146 : _njettinessFinder(axes_mode, measure_mode, 2, para1, para2), _N(N) {
147 _old_constructor_warning.warn("NjettinessPlugin: You are using the old style constructor. This is deprecated as of v2.1 and will be removed in v3.0. Please use the NjettinessPlugin constructor based on AxesDefinition and MeasureDefinition instead.");
148
149 }
150
151 /// \deprecated
152 /// Old-style constructor with 3 arguments (DEPRECATED)
153 NjettinessPlugin(int N,
154 Njettiness::AxesMode axes_mode,
155 Njettiness::MeasureMode measure_mode,
156 double para1,
157 double para2,
158 double para3)
159 : _njettinessFinder(axes_mode, measure_mode, 3, para1, para2, para3), _N(N) {
160 _old_constructor_warning.warn("NjettinessPlugin: You are using the old style constructor. This is deprecated as of v2.1 and will be removed in v3.0. Please use the NjettinessPlugin constructor based on AxesDefinition and MeasureDefinition instead.");
161 }
162
163 /// \deprecated
164 /// Old-style constructor for backwards compatibility with v1.0, when NormalizedCutoffMeasure was the only option
165 NjettinessPlugin(int N,
166 Njettiness::AxesMode mode,
167 double beta,
168 double R0,
169 double Rcutoff=std::numeric_limits<double>::max())
170 : _njettinessFinder(mode, NormalizedCutoffMeasure(beta, R0, Rcutoff)), _N(N) {
171 _old_constructor_warning.warn("NjettinessPlugin: You are using the old style constructor. This is deprecated as of v2.1 and will be removed in v3.0. Please use the NjettinessPlugin constructor based on AxesDefinition and MeasureDefinition instead.");
172 }
173
174
175};
176
177} // namespace contrib
178
179FASTJET_END_NAMESPACE
180
181#endif // __FASTJET_CONTRIB_NJETTINESSPLUGIN_HH__
Note: See TracBrowser for help on using the repository browser.