Fork me on GitHub

source: git/external/fastjet/plugins/SISCone/siscone.h@ 3b99510

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 3b99510 was 273e668, checked in by Pavel Demin <pavel.demin@…>, 10 years ago

upgrade FastJet to version 3.1.0

  • Property mode set to 100644
File size: 7.3 KB
RevLine 
[d7d2da3]1// -*- C++ -*-
2///////////////////////////////////////////////////////////////////////////////
3// File: siscone.h //
4// Description: header file for the main SISCone class //
5// This file is part of the SISCone project. //
6// For more details, see http://projects.hepforge.org/siscone //
7// //
8// Copyright (c) 2006 Gavin Salam and Gregory Soyez //
9// //
10// This program is free software; you can redistribute it and/or modify //
11// it under the terms of the GNU General Public License as published by //
12// the Free Software Foundation; either version 2 of the License, or //
13// (at your option) any later version. //
14// //
15// This program is distributed in the hope that it will be useful, //
16// but WITHOUT ANY WARRANTY; without even the implied warranty of //
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
18// GNU General Public License for more details. //
19// //
20// You should have received a copy of the GNU General Public License //
21// along with this program; if not, write to the Free Software //
22// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
23// //
[273e668]24// $Revision:: 369 $//
25// $Date:: 2014-09-04 16:57:55 +0200 (Thu, 04 Sep 2014) $//
[d7d2da3]26///////////////////////////////////////////////////////////////////////////////
27
28#ifndef __SISCONE_H__
29#define __SISCONE_H__
30
31#include "protocones.h"
32#include "split_merge.h"
33
34namespace siscone{
35
36/**
37 * \class Csiscone
38 * final class: gather everything to compute the jet contents.
39 *
40 * This is the class user should use.
41 * It computes the jet contents of a list of particles
42 * given a cone radius and a threshold for splitting/merging.
43 *
44 * After the call to 'perform', the vector jets is filled with
45 * the jets found. the 'contents' field of each jets contains
46 * the indices of the particles included in that jet.
47 */
48class Csiscone : public Cstable_cones, public Csplit_merge{
49 public:
50 /// default ctor
51 Csiscone();
52
53 /// default dtor
54 ~Csiscone();
55
56 /**
57 * compute the jets from a given particle set.
58 * We are doing multiple passes such pass n_pass looks for jets among
59 * all particles not put into jets during previous passes.
60 * By default the number of passes is infinite (0).
61 * \param _particles list of particles
62 * \param _radius cone radius
63 * \param _f shared energy threshold for splitting&merging
64 * \param _n_pass_max maximum number of passes (0=full search)
65 * \param _ptmin minimum pT of the protojets
66 * \param _split_merge_scale the scale choice for the split-merge procedure
67 * NOTE: SM_pt leads to IR unsafety for some events with momentum conservation.
68 * SM_Et is IR safe but not boost invariant and not implemented(!)
69 * SM_mt is IR safe for hadronic events, but not for decays of two
70 * back-to-back particles of identical mass
71 * SM_pttilde
72 * is always IR safe, and also boost invariant (default)
73 *
74 * \return the number of jets found.
75 */
76 int compute_jets(std::vector<Cmomentum> &_particles, double _radius, double _f,
77 int _n_pass_max=0, double _ptmin=0.0,
78 Esplit_merge_scale _split_merge_scale=SM_pttilde);
79
[273e668]80 /**
81 * compute the jets from a given particle set.
82 * We are doing multiple passes such pass n_pass looks for jets among
83 * all particles not put into jets during previous passes.
84 * By default the number of passes is infinite (0).
85 * \param _particles list of particles
86 * \param _radius cone radius
87 * \param _n_pass_max maximum number of passes (0=full search)
88 * \param _ptmin minimum pT of the protojets
89 * \param _ordering_scale the ordering scale to decide which stable
90 * cone is removed
91 *
92 * Note that the Csplit_merge::SM_var2_hardest_cut_off cut is not
93 * used in the progressive removal variant.
94 *
95 * \return the number of jets found.
96 */
97 int compute_jets_progressive_removal(std::vector<Cmomentum> &_particles, double _radius,
98 int _n_pass_max=0, double _ptmin=0.0,
99 Esplit_merge_scale _ordering_scale=SM_pttilde);
100
[d7d2da3]101 /**
102 * recompute the jets with a different overlap parameter.
103 * we use the same particles and R as in the preceeding call.
104 * \param _f shared energy threshold for splitting&merging
105 * \param _ptmin minimum pT of the protojets
106 * \param _split_merge_scale the scale choice for the split-merge procedure
107 * split--merge variable
108 * NOTE: using pt leads to IR unsafety for some events with momentum
109 * conservation. So we strongly advise not to change the default
110 * value.
111 * \return the number of jets found, -1 if recomputation not allowed.
112 */
113 int recompute_jets(double _f, double _ptmin = 0.0,
114 Esplit_merge_scale _split_merge_scale=SM_pttilde);
115
[273e668]116 /// list of protocones found pass-by-pass (not filled by compute_jets_progressive_removal)
[d7d2da3]117 std::vector<std::vector<Cmomentum> > protocones_list;
118
119 // random number initialisation
120 static bool init_done; ///< check random generator initialisation
121
122#ifdef DEBUG_STABLE_CONES
123 int nb_hash_cones_total, nb_hash_occupied_total;
124#endif
125
126 /**
127 * A call to this function modifies the stream
128 * used to print banners (by default cout).
129 *
130 * Please note that if you distribute 3rd party code
131 * that links with SISCone, that 3rd party code must not
132 * use this call turn off the printing of thw banner
133 * by default. This requirement reflects the spirit of
134 * clause 2c of the GNU Public License (v2), under which
135 * SISCone is distributed.
136 */
137 static void set_banner_stream(std::ostream * ostr) {_banner_ostr = ostr;}
138
139 /**
140 * returns a pointer to the stream to be used to print banners
141 * (cout by default)
142 */
143 static std::ostream * banner_stream() {return _banner_ostr;}
144
145 private:
146 bool rerun_allowed; ///< is recompute_jets allowed ?
147 static std::ostream * _banner_ostr; ///< stream to use for banners
[273e668]148
149 /// ensure things are initialised
150 void _initialise_if_needed();
151
[d7d2da3]152};
153
154
155// finally, a bunch of functions to access to
156// basic information (package name, version)
157//---------------------------------------------
158
159/**
160 * return SISCone package name.
161 * This is nothing but "SISCone", it is a replacement to the
162 * PACKAGE_NAME string defined in config.h and which is not
163 * public by default.
164 * \return the SISCone name as a string
165 */
166std::string siscone_package_name();
167
168/**
169 * return SISCone version number.
170 * \return a string of the form "X.Y.Z" with possible additional tag
171 * (alpha, beta, devel) to mention stability status
172 */
173std::string siscone_version();
174
175}
176#endif
Note: See TracBrowser for help on using the repository browser.