CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
fftjetcommon_cfi.py
Go to the documentation of this file.
1 import math
2 import FWCore.ParameterSet.Config as cms
4 
5 # Common definitions for FFTJet interface modules
6 
7 # Some useful constants
8 fftjet_large_int = pow(2,31) - 1
9 
10 # Global phi-to-eta bandwidth ratio
11 fftjet_phi_to_eta_bw_ratio = 1.0
12 
13 # Are we including the complete event at the lowest scale
14 # of the clustering tree?
15 fftjet_insert_complete_event = False
16 fftjet_complete_event_scale = 0.05
17 
18 # The standard eta range for various algos
19 fftjet_standard_eta_range = 5.2
20 
21 # Provide several feasible energy discretization grid configurations.
22 # The width of eta bins is 0.087. We want to choose the binning
23 # so that FFT is efficient. At the same time, we have to prevent
24 # wrap-around energy leakage during convolutions from one eta side
25 # to another. Note that the CMS calorimeter extends up to eta of 5.191.
26 fftjet_grid_256_72 = cms.PSet(
27  nEtaBins = cms.uint32(256),
28  etaMin = cms.double(-11.136),
29  etaMax = cms.double(11.136),
30  nPhiBins = cms.uint32(72),
31  phiBin0Edge = cms.double(0.0),
32  title = cms.untracked.string("256 x 72")
33 )
34 
35 fftjet_grid_192_72 = cms.PSet(
36  nEtaBins = cms.uint32(192),
37  etaMin = cms.double(-8.352),
38  etaMax = cms.double(8.352),
39  nPhiBins = cms.uint32(72),
40  phiBin0Edge = cms.double(0.0),
41  title = cms.untracked.string("192 x 72")
42 )
43 
44 fftjet_grid_144_72 = cms.PSet(
45  nEtaBins = cms.uint32(144),
46  etaMin = cms.double(-6.264),
47  etaMax = cms.double(6.264),
48  nPhiBins = cms.uint32(72),
49  phiBin0Edge = cms.double(0.0),
50  title = cms.untracked.string("144 x 72")
51 )
52 
53 fftjet_grid_128_72 = cms.PSet(
54  nEtaBins = cms.uint32(128),
55  etaMin = cms.double(-5.568),
56  etaMax = cms.double(5.568),
57  nPhiBins = cms.uint32(72),
58  phiBin0Edge = cms.double(0.0),
59  title = cms.untracked.string("128 x 72")
60 )
61 
62 fftjet_grid_256_128 = cms.PSet(
63  nEtaBins = cms.uint32(256),
64  etaMin = cms.double(-2.0*math.pi),
65  etaMax = cms.double(2.0*math.pi),
66  nPhiBins = cms.uint32(128),
67  phiBin0Edge = cms.double(0.0),
68  title = cms.untracked.string("256 x 128")
69 )
70 
71 fftjet_grid_512_256 = cms.PSet(
72  nEtaBins = cms.uint32(512),
73  etaMin = cms.double(-2.0*math.pi),
74  etaMax = cms.double(2.0*math.pi),
75  nPhiBins = cms.uint32(256),
76  phiBin0Edge = cms.double(0.0),
77  title = cms.untracked.string("512 x 256")
78 )
79 
80 #
81 # Definitions for anomalous towers
82 #
83 fftjet_anomalous_tower_default = anom.AnomalousCellParameters
84 
85 fftjet_anomalous_tower_allpass = cms.PSet(
86  maxBadEcalCells = cms.uint32(fftjet_large_int),
87  maxRecoveredEcalCells = cms.uint32(fftjet_large_int),
88  maxProblematicEcalCells = cms.uint32(fftjet_large_int),
89  maxBadHcalCells = cms.uint32(fftjet_large_int),
90  maxRecoveredHcalCells = cms.uint32(fftjet_large_int),
91  maxProblematicHcalCells = cms.uint32(fftjet_large_int)
92 )
93 
94 #
95 # Peak selectors
96 #
97 fftjet_peak_selector_allpass = cms.PSet(
98  Class = cms.string("AllPeaksPass")
99 )
100 
101 #
102 # 50 scales (49 intervals) from 0.087 to 0.6 in log space correspond
103 # to the pattern recognition kernel bandwidth increase of 4.0% per scale.
104 # This set of scales is useful for generic jet reconstruction with
105 # variable jet size and for multiresolution studies.
106 #
107 fftjet_patreco_scales_50 = cms.PSet(
108  Class = cms.string("EquidistantInLogSpace"),
109  minScale = cms.double(0.087),
110  maxScale = cms.double(0.6),
111  nScales = cms.uint32(50)
112 )
113 
114 #
115 # Scales from 0.05 to 0.6, with 4.0% step.
116 # Appropriate for use with the 512 x 256 grid.
117 #
118 fftjet_patreco_scales_64 = cms.PSet(
119  Class = cms.string("EquidistantInLogSpace"),
120  minScale = cms.double(0.05),
121  maxScale = cms.double(0.6),
122  nScales = cms.uint32(64)
123 )
124 
125 #
126 # Various sets of scales with 3 values (and 2 intervals).
127 # Central scale is to be used for single-resolution jet
128 # reconstruction. Using 3 scales instead of 1 allows for
129 # determination of varios "speed" quantities for peaks.
130 #
131 fftjet_patreco_scales_3_at_010 = cms.PSet(
132  Class = cms.string("EquidistantInLogSpace"),
133  minScale = cms.double(0.10/1.04),
134  maxScale = cms.double(0.10*1.04),
135  nScales = cms.uint32(3)
136 )
137 fftjet_patreco_scales_3_at_015 = cms.PSet(
138  Class = cms.string("EquidistantInLogSpace"),
139  minScale = cms.double(0.15/1.04),
140  maxScale = cms.double(0.15*1.04),
141  nScales = cms.uint32(3)
142 )
143 fftjet_patreco_scales_3_at_017 = cms.PSet(
144  Class = cms.string("EquidistantInLogSpace"),
145  minScale = cms.double(0.17/1.04),
146  maxScale = cms.double(0.17*1.04),
147  nScales = cms.uint32(3)
148 )
149 fftjet_patreco_scales_3_at_020 = cms.PSet(
150  Class = cms.string("EquidistantInLogSpace"),
151  minScale = cms.double(0.20/1.04),
152  maxScale = cms.double(0.20*1.04),
153  nScales = cms.uint32(3)
154 )
155 fftjet_patreco_scales_3_at_025 = cms.PSet(
156  Class = cms.string("EquidistantInLogSpace"),
157  minScale = cms.double(0.25/1.04),
158  maxScale = cms.double(0.25*1.04),
159  nScales = cms.uint32(3)
160 )
161 fftjet_patreco_scales_3_at_050 = cms.PSet(
162  Class = cms.string("EquidistantInLogSpace"),
163  minScale = cms.double(0.50/1.04),
164  maxScale = cms.double(0.50*1.04),
165  nScales = cms.uint32(3)
166 )
167 
168 #
169 # Here, the distance calculator for the tree is a simple eta-phi
170 # distance with fixed bandwidth values in eta and phi. However,
171 # if the "etaDependentScaleFactors" are given in the module
172 # configuration, it makes a lot of sense to use eta-dependent
173 # eta-to-phi bandwidth ratio.
174 #
175 fftjet_fixed_bandwidth_distance = cms.PSet(
176  Class = cms.string("PeakEtaPhiDistance"),
177  etaToPhiBandwidthRatio = cms.double(1.0/fftjet_phi_to_eta_bw_ratio)
178 )
179 
180 #
181 # A placeholder for the tree distance calculator with eta-dependent
182 # eta-to-phi bandwidth ratio (must be modified for meaningful use).
183 # Inside the interpolator, bandwidth ratio points are placed at the
184 # cell centers.
185 #
186 fftjet_variable_bandwidth_distance = cms.PSet(
187  Class = cms.string("PeakEtaDependentDistance"),
188  Interpolator = cms.PSet(
189  xmin = cms.double(-5.2),
190  xmax = cms.double(5.2),
191  flow = cms.double(1.0),
192  fhigh = cms.double(1.0),
193  data = cms.vdouble(1.0, 1.0)
194  )
195 )
196 
197 #
198 # Various jet membership functions
199 #
200 fftjet_jet_membership_cone = cms.PSet(
201  Class = cms.string("Linear2d"),
202  sx = cms.double(math.sqrt(1.0/fftjet_phi_to_eta_bw_ratio)),
203  sy = cms.double(math.sqrt(fftjet_phi_to_eta_bw_ratio)),
204  scalePower = cms.int32(1),
205  kernelParameters = cms.vdouble()
206 )
207 
208 #
209 # Background/noise membership functions
210 #
211 fftjet_noise_membership_smallconst = cms.PSet(
212  Class = cms.string("GaussianNoiseMembershipFcn"),
213  minWeight = cms.double(1.0e-8),
214  prior = cms.double(0.0)
215 )
216 
217 #
218 # Distance between jets for convergence determination
219 #
220 fftjet_convergence_jet_distance = cms.PSet(
221  Class = cms.string("JetConvergenceDistance"),
222  etaToPhiBandwidthRatio = cms.double(1.0/fftjet_phi_to_eta_bw_ratio),
223  relativePtBandwidth = cms.double(1.0)
224 )
225 
226 #
227 # Various peak functors
228 #
229 fftjet_peakfunctor_const_zero = cms.PSet(
230  Class = cms.string("ConstDouble"),
231  value = cms.double(0.0)
232 )
233 
234 fftjet_peakfunctor_const_one = cms.PSet(
235  Class = cms.string("ConstDouble"),
236  value = cms.double(1.0)
237 )
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40