Fork me on GitHub

source: git/external/fastjet/AreaDefinition.hh@ cfc3160

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

move branches/ModularDelphes to trunk

  • Property mode set to 100644
File size: 5.0 KB
RevLine 
[d7d2da3]1//STARTHEADER
2// $Id: AreaDefinition.hh 2687 2011-11-14 11:17:51Z soyez $
3//
4// Copyright (c) 2006-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#ifndef __FASTJET_AREADEFINITION_HH__
31#define __FASTJET_AREADEFINITION_HH__
32
33#include "fastjet/GhostedAreaSpec.hh"
34
35FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
36
37//----------------------------------------------------------------------
38//
39/// @ingroup area_classes
40/// \class VoronoiAreaSpec
41/// Specification for the computation of the Voronoi jet area
42///
43/// class for holding a "Voronoi area" specification; an area will be
44/// assigned to each particle, which is the area of the intersection
45/// of the particle's Voronoi cell with a circle of radius
46/// R*effective_Rfact.
47///
48class VoronoiAreaSpec {
49public:
50
51 /// default constructor (effective_Rfact = 1);
52 VoronoiAreaSpec() : _effective_Rfact(1.0) {};
53
54 /// constructor that allows you to set effective_Rfact.
55 VoronoiAreaSpec(double effective_Rfact_in) :
56 _effective_Rfact(effective_Rfact_in) {};
57
58 /// return the value of effective_Rfact
59 double effective_Rfact() const {return _effective_Rfact;}
60
61 /// return a textual description of the area definition.
62 std::string description() const;
63
64private:
65 double _effective_Rfact;
66};
67
68
69/// the different types of area that are supported
70enum AreaType {invalid_area = -1,
71 active_area = 0, active_area_explicit_ghosts = 1,
72 one_ghost_passive_area = 10, passive_area = 11,
73 voronoi_area=20};
74
75
76//----------------------------------------------------------------------
77/// @ingroup area_classes
78/// \class AreaDefinition
79/// class that holds a generic area definition
80class AreaDefinition {
81public:
82
83 /// default constructor, which provides a ghosted active area, with
84 /// sensible defaults for the ghosts.
85 AreaDefinition() {
86 _area_type = active_area;
87 _ghost_spec = GhostedAreaSpec();
88 }
89
90 /// constructor for an area definition based on an area type and a
91 /// ghosted area specification
92 AreaDefinition(AreaType type, const GhostedAreaSpec & spec) {
93 _ghost_spec = spec;
94 _area_type = type;
95 assert(type != voronoi_area);
96 }
97
98 /// constructor for an area definition based on an area type and a
99 /// voronoi area specification (type must be voronoi_area)
100 AreaDefinition(AreaType type, const VoronoiAreaSpec & spec) {
101 _voronoi_spec = spec;
102 _area_type = type;
103 assert(type == voronoi_area);
104 }
105
106 /// constructor for an area definition based on an area type and
107 /// which attempts to provide sensible defaults for everything else
108 AreaDefinition(AreaType type) {
109 _area_type = type;
110 if (type == voronoi_area) {
111 _voronoi_spec = VoronoiAreaSpec();
112 } else {
113 _ghost_spec = GhostedAreaSpec();
114 }
115 }
116
117 /// constructor for an area definition based on an ghosted area
118 /// specification, and an option to select which ghosted area you want
119 AreaDefinition(const GhostedAreaSpec & spec, AreaType type = active_area) {
120 _ghost_spec = spec;
121 _area_type = type;
122 assert(type != voronoi_area);
123 }
124
125 /// constructor for an area definition based on a voronoi area
126 /// specification
127 AreaDefinition(const VoronoiAreaSpec & spec) {
128 _voronoi_spec = spec;
129 _area_type = voronoi_area;
130 }
131
132 /// return a description of the current area definition
133 std::string description() const;
134
135 /// return info about the type of area being used by this defn
136 AreaType area_type() const {return _area_type;}
137
138 /// return a reference to the active area spec
139 const GhostedAreaSpec & ghost_spec() const {return _ghost_spec;}
140 GhostedAreaSpec & ghost_spec() {return _ghost_spec;}
141
142 /// return a reference to the voronoi area spec
143 const VoronoiAreaSpec & voronoi_spec() const {return _voronoi_spec;}
144
145private:
146
147 AreaType _area_type;
148 GhostedAreaSpec _ghost_spec;
149 VoronoiAreaSpec _voronoi_spec;
150};
151
152FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
153
154
155#endif // __FASTJET_AREADEFINITION_HH__
Note: See TracBrowser for help on using the repository browser.