Fork me on GitHub

source: git/external/fastjet/PseudoJetStructureBase.cc@ 264bf40

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 264bf40 was d7d2da3, checked in by pavel <pavel@…>, 12 years ago

move branches/ModularDelphes to trunk

  • Property mode set to 100644
File size: 8.7 KB
RevLine 
[d7d2da3]1//STARTHEADER
2// $Id$
3//
4// Copyright (c) 2005-2011, 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 and are described in hep-ph/0512210. If you use
16// FastJet as part of work towards a scientific publication, please
17// include a citation to the FastJet paper.
18//
19// FastJet is distributed in the hope that it will be useful,
20// but WITHOUT ANY WARRANTY; without even the implied warranty of
21// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22// GNU General Public License for more details.
23//
24// You should have received a copy of the GNU General Public License
25// along with FastJet. If not, see <http://www.gnu.org/licenses/>.
26//----------------------------------------------------------------------
27//ENDHEADER
28
29
30#include "fastjet/PseudoJetStructureBase.hh"
31#include "fastjet/Error.hh"
32#include "fastjet/PseudoJet.hh"
33#include "fastjet/ClusterSequence.hh"
34#include "fastjet/ClusterSequenceAreaBase.hh"
35
36using namespace std;
37
38FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
39
40// PseudoJetStructureBase implementation
41//
42// Contains any information related to the clustering that should be
43// directly accessible to PseudoJet.
44//
45// By default, this class implements basic access to the
46// ClusterSequence related to a PseudoJet (like its constituents or
47// its area). But it can be overloaded in order e.g. to give access
48// to the jet substructure.
49//
50// Note that it accesses the underlying ClusterSequence through a
51// ClusterSequenceWrapper object so it can check when the former goes
52// out of scope.
53//
54
55
56//-------------------------------------------------------------
57// Direct access to the associated ClusterSequence object.
58//
59// Get access to the associated ClusterSequence (if any)
60//-------------------------------------------------------------
61
62// get a (const) pointer to the parent ClusterSequence (NULL if
63// inexistent)
64const ClusterSequence* PseudoJetStructureBase::associated_cluster_sequence() const{
65 return NULL;
66}
67
68// if the jet has a valid associated cluster sequence then return a
69// pointer to it; otherwise throw an error
70//
71// by default, an Error is thrown
72const ClusterSequence * PseudoJetStructureBase::validated_cs() const{
73 throw Error("This PseudoJet structure is not associated with a valid ClusterSequence");
74}
75
76// if the jet has valid area information then return a pointer to
77// the associated ClusterSequenceAreaBase object; otherwise throw an error
78//
79// by default, an Error is thrown
80const ClusterSequenceAreaBase * PseudoJetStructureBase::validated_csab() const{
81 throw Error("This PseudoJet structure is not associated with a valid cluster sequence with area");
82}
83
84
85//-------------------------------------------------------------
86// Methods for access to information about jet structure
87//
88// These allow access to jet constituents, and other jet
89// subtructure information. They only work if the jet is associated
90// with a ClusterSequence.
91//-------------------------------------------------------------
92
93// check if it has been recombined with another PseudoJet in which
94// case, return its partner through the argument. Otherwise,
95// 'partner' is set to 0.
96//
97// by default, an Error is thrown
98bool PseudoJetStructureBase::has_partner(const PseudoJet & /*reference */, PseudoJet & /*partner*/) const{
99 throw Error("This PseudoJet structure has no implementation for has_partner");
100}
101
102// check if it has been recombined with another PseudoJet in which
103// case, return its child through the argument. Otherwise, 'child'
104// is set to 0.
105//
106// by default, an Error is thrown
107bool PseudoJetStructureBase::has_child(const PseudoJet & /*reference*/, PseudoJet & /*child*/) const{
108 throw Error("This PseudoJet structure has no implementation for has_child");
109}
110
111// check if it is the product of a recombination, in which case
112// return the 2 parents through the 'parent1' and 'parent2'
113// arguments. Otherwise, set these to 0.
114//
115// by default, an Error is thrown
116bool PseudoJetStructureBase::has_parents(const PseudoJet & /*reference*/, PseudoJet &/*parent1*/, PseudoJet &/*parent2*/) const{
117 throw Error("This PseudoJet structure has no implementation for has_parents");
118}
119
120// check if the reference PseudoJet is contained in the second one
121// passed as argument.
122//
123// by default, an Error is thrown
124bool PseudoJetStructureBase::object_in_jet(const PseudoJet & /*reference*/, const PseudoJet & /*jet*/) const{
125 throw Error("This PseudoJet structure has no implementation for is_inside");
126}
127
128// retrieve the constituents.
129//
130// by default, an Error is thrown
131vector<PseudoJet> PseudoJetStructureBase::constituents(const PseudoJet &/*reference*/) const{
132 throw Error("This PseudoJet structure has no implementation for constituents");
133}
134
135// return a vector of all subjets of the current jet (in the sense
136// of the exclusive algorithm) that would be obtained when running
137// the algorithm with the given dcut.
138//
139// Time taken is O(m ln m), where m is the number of subjets that
140// are found. If m gets to be of order of the total number of
141// constituents in the jet, this could be substantially slower than
142// just getting that list of constituents.
143//
144// by default, an Error is thrown
145vector<PseudoJet> PseudoJetStructureBase::exclusive_subjets (const PseudoJet & /*reference*/, const double & /*dcut*/) const{
146 throw Error("This PseudoJet structure has no implementation for exclusive_subjets");
147}
148
149// return the size of exclusive_subjets(...); still n ln n with same
150// coefficient, but marginally more efficient than manually taking
151// exclusive_subjets.size()
152//
153// by default, an Error is thrown
154int PseudoJetStructureBase::n_exclusive_subjets(const PseudoJet & /*reference*/, const double & /*dcut*/) const{
155 throw Error("This PseudoJet structure has no implementation for n_exclusive_subjets");
156}
157
158// return the list of subjets obtained by unclustering the supplied
159// jet down to n subjets (or all constituents if there are fewer
160// than n).
161//
162// by default, an Error is thrown
163vector<PseudoJet> PseudoJetStructureBase::exclusive_subjets_up_to (const PseudoJet & /*reference*/, int /*nsub*/) const{
164 throw Error("This PseudoJet structure has no implementation for exclusive_subjets");
165}
166
167// return the dij that was present in the merging nsub+1 -> nsub
168// subjets inside this jet.
169//
170// by default, an Error is thrown
171double PseudoJetStructureBase::exclusive_subdmerge(const PseudoJet & /*reference*/, int /*nsub*/) const{
172 throw Error("This PseudoJet structure has no implementation for exclusive_submerge");
173}
174
175// return the maximum dij that occurred in the whole event at the
176// stage that the nsub+1 -> nsub merge of subjets occurred inside
177// this jet.
178//
179// by default, an Error is thrown
180double PseudoJetStructureBase::exclusive_subdmerge_max(const PseudoJet & /*reference*/, int /*nsub*/) const{
181 throw Error("This PseudoJet structure has no implementation for exclusive_submerge_max");
182}
183
184
185// retrieve the pieces building the jet.
186//
187// by default, an Error is thrown
188std::vector<PseudoJet> PseudoJetStructureBase::pieces(const PseudoJet & /*reference*/) const{
189 throw Error("This PseudoJet structure has no implementation for pieces");
190}
191
192// the following ones require a computation of the area in the
193// parent ClusterSequence (See ClusterSequenceAreaBase for details)
194//------------------------------------------------------------------
195
196// return the jet (scalar) area.
197//
198// by default, an Error is thrown
199double PseudoJetStructureBase::area(const PseudoJet & /*reference*/) const{
200 throw Error("This PseudoJet structure has no implementation for area");
201}
202
203// return the error (uncertainty) associated with the determination
204// of the area of this jet.
205//
206// by default, an Error is thrown
207double PseudoJetStructureBase::area_error(const PseudoJet & /*reference*/) const{
208 throw Error("This PseudoJet structure has no implementation for area_error");
209}
210
211// return the jet 4-vector area.
212//
213// by default, an Error is thrown
214PseudoJet PseudoJetStructureBase::area_4vector(const PseudoJet & /*reference*/) const{
215 throw Error("This PseudoJet structure has no implementation for area_4vector");
216}
217
218// true if this jet is made exclusively of ghosts.
219//
220// by default, an Error is thrown
221bool PseudoJetStructureBase::is_pure_ghost(const PseudoJet & /*reference*/) const{
222 throw Error("This PseudoJet structure has no implementation for is_pure_ghost");
223}
224
225FASTJET_END_NAMESPACE
Note: See TracBrowser for help on using the repository browser.