Fork me on GitHub

source: git/external/fastjet/contribs/ValenciaPlugin/ValenciaPlugin.hh@ 769f65b

ImprovedOutputFile Timing llp
Last change on this file since 769f65b was f319c1d, checked in by Ulrike Schnoor <schnooru@…>, 7 years ago

added Valencia jet algorithm as fastjet/contribs and exclusive jet clustering

  • Property mode set to 100644
File size: 3.6 KB
Line 
1// $Id: ValenciaPlugin.hh 776 2015-02-24 17:53:27Z vos $
2//
3// Copyright (c) 2014, Marcel Vos and Ignacio Garcia
4//
5//----------------------------------------------------------------------
6// This file is part of FastJet contrib.
7//
8// It is free software; you can redistribute it and/or modify it under
9// the terms of the GNU General Public License as published by the
10// Free Software Foundation; either version 2 of the License, or (at
11// your option) any later version.
12//
13// It is distributed in the hope that it will be useful, but WITHOUT
14// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16// License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with this code. If not, see <http://www.gnu.org/licenses/>.
20//----------------------------------------------------------------------
21
22#ifndef __FASTJET_CONTRIB_VALENCIAJETALGORITHM_HH__
23#define __FASTJET_CONTRIB_VALENCIAJETALGORITHM_HH__
24
25#include <fastjet/internal/base.hh>
26#include "fastjet/JetDefinition.hh"
27#include "fastjet/ClusterSequence.hh"
28FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
29
30namespace contrib{
31
32//----------------------------------------------------------------------
33//
34/// ValenciaPlugin is a plugin for fastjet (v2.4 upwards)
35///
36/// It implements the Valencia algorithm, as defined in
37/// Boronat, Garcia, Vos,
38/// A new jet reconstruction algorithm for lepton colliders
39///
40///
41class ValenciaPlugin : public JetDefinition::Plugin {
42public:
43
44 /// Constructor for the Valencia Plugin class.
45 /// Three floating point arguments are specified to set the parameters
46 /// the radius parameter R has the usual meaning,
47 /// the clustering order beta (beta = 1 yields kt-style clustering,
48 /// beta = 0 purely angular clustering a la C/A and beta = -1
49 /// clusters hard, collinear radiation first, like anti-kt),
50 /// and gamma, that governs the shrinking jet size in the forward region
51 ValenciaPlugin (double R, double beta, double gamma) : _R(R), _beta(beta), _gamma(gamma){}
52
53 /// Constructor for the Valencia Plugin class.
54 /// If two arguments are specified to set the parameters
55 /// the gamma exponent is set equal to beta
56 ValenciaPlugin (double R, double beta) : _R(R), _beta(beta), _gamma(beta){}
57
58 /// copy constructor
59 ValenciaPlugin (const ValenciaPlugin & plugin) {
60 *this = plugin;
61 }
62
63 // the things that are required by base class
64 virtual std::string description () const;
65 virtual void run_clustering(ClusterSequence &) const;
66
67 /// the plugin mechanism's standard way of accessing the jet radius.
68 /// This must be set to return something sensible, even if R
69 /// does not make sense for this algorithm!
70 virtual double R() const {return _R;}
71
72 // the Valencia algorithm has a second parameter beta that governs
73 // the exponent of the energy in the inter-particle and beam distance
74 // criteria, and thus determines the clustering order
75 virtual double beta() const {return _beta;}
76
77 // the Valencia algorithm has a third parameter gamma that governs
78 // the exponent of the sin(theta) in the beam distance
79 // and thus the shrinking of the jet size in the forward region
80 virtual double gamma() const {return _gamma;}
81
82
83
84 /// avoid the warning whenever the user requests "exclusive" jets
85 /// from the cluster sequence
86 virtual bool exclusive_sequence_meaningful() const {return true;}
87
88private:
89 double _R;
90 double _beta;
91 double _gamma;
92};
93
94
95
96
97} // namespace contrib
98
99FASTJET_END_NAMESPACE
100
101#endif // __FASTJET_CONTRIB_VALENCIAJETALGORITHM_HH__
Note: See TracBrowser for help on using the repository browser.