Rivet API documentation

Rivet 4.1.3
PxConePlugin.hh
1//FJSTARTHEADER
2// $Id: PxConePlugin.hh 3433 2014-07-23 08:17:03Z salam $
3//
4// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
5//
6//----------------------------------------------------------------------
7// This file is part of FastJet.
8//
9// FastJet is free software; you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation; either version 2 of the License, or
12// (at your option) any later version.
13//
14// The algorithms that underlie FastJet have required considerable
15// development. They are described in the original FastJet paper,
16// hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
17// FastJet as part of work towards a scientific publication, please
18// quote the version you use and include a citation to the manual and
19// optionally also to hep-ph/0512210.
20//
21// FastJet is distributed in the hope that it will be useful,
22// but WITHOUT ANY WARRANTY; without even the implied warranty of
23// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24// GNU General Public License for more details.
25//
26// You should have received a copy of the GNU General Public License
27// along with FastJet. If not, see <http://www.gnu.org/licenses/>.
28//----------------------------------------------------------------------
29//FJENDHEADER
30
31#ifndef __PXCONEPLUGIN_HH__
32#define __PXCONEPLUGIN_HH__
33
34#include "fastjet/JetDefinition.hh"
35
36// questionable whether this should be in fastjet namespace or not...
37
38//FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
39namespace Rivet {
40 //----------------------------------------------------------------------
41 //
66 //
67 //----------------------------------------------------------------------
68 class PxConePlugin : public fastjet::JetDefinition::Plugin {
69 public:
70
92 PxConePlugin(double cone_radius_in,
93 double min_jet_energy_in = 5.0,
94 double overlap_threshold_in = 0.5,
95 bool E_scheme_jets_in = false)
96 : _cone_radius(cone_radius_in),
97 _min_jet_energy(min_jet_energy_in),
98 _overlap_threshold(overlap_threshold_in),
99 _E_scheme_jets(E_scheme_jets_in) {
100 std::string msg = "Using own c++ version of PxCone, since FastJet doesn't install it by default. ";
101 msg += "Please notify the Rivet authors if this behaviour should be changed.";
102 std::cerr << msg << std::endl;
103 }
104
105
106 // some functions to return info about parameters ----------------
107
109 double cone_radius() const {
110 return _cone_radius;
111 }
112
115 double min_jet_energy() const {
116 return _min_jet_energy;
117 }
118
120 double overlap_threshold() const {
121 return _overlap_threshold;
122 }
123
129 bool E_scheme_jets() const {
130 return _E_scheme_jets;
131 }
132
133
134 // the things that are required by base class
135 virtual std::string description() const;
136 virtual void run_clustering(fastjet::ClusterSequence&) const;
138 virtual double R() const {
139 return cone_radius();
140 }
141
142 private:
143
144 double _cone_radius;
145 double _min_jet_energy;
146 double _overlap_threshold;
147
148 bool _E_scheme_jets;
149
150 static bool _first_time;
151
153 void _print_banner(std::ostream* ostr) const;
154 };
155
156
157 // actual physical parameters:
158 //
159 // coner
160 // epsilon
161 // ovlim
162
163 void pxcone_(int mode, // 1=>e+e-, 2=>hadron-hadron
164 int ntrak, // Number of particles
165 int itkdm, // First dimension of PTRAK array:
166 const double* ptrak, // Array of particle 4-momenta (Px,Py,Pz,E)
167 double coner, // Cone size (half angle) in radians
168 double epslon, // Minimum Jet energy (GeV)
169 double ovlim, // Maximum fraction of overlap energy in a jet
170 int mxjet, // Maximum possible number of jets
171 int& njet, // Number of jets found
172 double* pjet, // 5-vectors of jets
173 int* ipass, // Particle k belongs to jet number IPASS(k)-1
174 // IPASS = -1 if not assosciated to a jet
175 int* ijmul, // Jet i contains IJMUL[i] particles
176 int* ierr // = 0 if all is OK ; = -1 otherwise
177 );
178
179 //FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
180}
181
182#endif
Definition LHCbCommon.hh:9