CMS 3D CMS Logo

HistogramManager_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 from DQM.SiPixelPhase1Common.SpecificationBuilder_cfi import Specification, parent
4 
5 SiPixelPhase1Geometry = cms.PSet(
6  # SPixel*Name and friends use the isUpgrade flag, so we also have it as a setting here.
7  upgradePhase = cms.int32(1),
8 
9  # module geometry. The phase1 detector has only one sort, so this is easy.
10  # the values are assumed to be 0-based, unlike most others.
11  # TODO: maybe we can use the SiPixelFrameReverter and friends to do these
12  # conversions without these parameters here.
13  module_rows = cms.int32(160),
14  module_cols = cms.int32(416),
15  roc_rows = cms.int32(80),
16  roc_cols = cms.int32(52),
17  n_rocs = cms.int32(16), # two-row geometry is assumed
18 
19  # "time geometry" parameters
20  max_lumisection = cms.int32(5000),
21  max_bunchcrossing = cms.int32(3600),
22 
23  # to select a different cabling map (for pilotBlade)
24  CablingMapLabel = cms.string(""),
25 
26  # online-specific things
27  onlineblock = cms.int32(20), # #LS after which histograms are reset
28  n_onlineblocks = cms.int32(100), # #blocks to keep for histograms with history
29 
30  # lumiblock - for coarse temporal splitting
31  lumiblock = cms.int32(10), # Number of LS to include in a block
32 
33  # other geometry parameters (n_layers, n_ladders per layer, etc.) are inferred.
34  # there are lots of geometry assuptions in the code.
35 )
36 
37 # the wrapping here is necessary to switch 'enabled' later.
38 PerModule = cms.PSet(enabled = cms.bool(True)) # normal histos per module
39 PerLadder = cms.PSet(enabled = cms.bool(True)) # histos per ladder, profiles
40 PerLayer2D = cms.PSet(enabled = cms.bool(True)) # 2D maps/profiles of layers
41 PerLayer1D = cms.PSet(enabled = cms.bool(True)) # normal histos per layer
42 PerReadout = cms.PSet(enabled = cms.bool(True)) # "Readout view", also for initial timing
43 OverlayCurvesForTiming= cms.PSet(enabled = cms.bool(False)) #switch to overlay digi/clusters curves for timing scan
44 IsOffline = cms.PSet(enabled = cms.bool(True)) # should be switch off for Online
45 
46 # Default histogram configuration. This is _not_ used automatically, but you
47 # can import and pass this (or clones of it) in the plugin config.
48 DefaultHisto = cms.PSet(
49  # Setting this to False hides all plots of this HistogramManager. It does not even record any data.
50  enabled = cms.bool(True),
51 
52  # a.k.a. online harvesting. Might be useful in offline for custom harvesting,
53  # but the main purpose is online, where this is on by default.
54  perLumiHarvesting = cms.bool(False),
55 
56  # If False, no histograms are booked for DetIds where any column is undefined.
57  # since or-columns are not supported any longer, this has to be False, otherwise
58  # you will see a PXBarrel_UNDEFINED with endcap modules and the other way round.
59  # It could still be useful for debugging, to see if there is more UNDEFINED
60  # than expected.
61  bookUndefined = cms.bool(False),
62 
63  # where the plots should go.
64  topFolderName = cms.string("PixelPhase1"),
65 
66  # Histogram parameters
67  name = cms.string("unnamed"),
68  title = cms.string("Histogram of Something"),
69  xlabel = cms.string("something"),
70  ylabel = cms.string("count"),
71  dimensions = cms.int32(1),
72  range_min = cms.double(0),
73  range_max = cms.double(100),
74  range_nbins = cms.int32(100),
75  range_y_min = cms.double(0),
76  range_y_max = cms.double(100),
77  range_y_nbins = cms.int32(100),
78 
79  # This structure is output by the SpecficationBuilder.
80  specs = cms.VPSet()
81  # cms.PSet(spec =
82  # cms.VPset(
83  # cms.PSet(
84  # type = GROUPBY,
85  # stage = FIRST,
86  # columns = cms.vstring("P1PXBBarrel|P1PXECEndcap", "DetId"),
87  # arg = cms.string("")
88  # ),
89  # cms.PSet(
90  # type = SAVE,
91  # stage = STAGE1,
92  # columns = cms.vstring(),
93  # arg = cms.string("")
94  # )
95  # )
96  # )
97  #)
98 )
99 
100 DefaultHistoDigiCluster=DefaultHisto.clone()
101 DefaultHistoDigiCluster.topFolderName= cms.string("PixelPhase1/Phase1_MechanicalView")
102 
103 DefaultHistoSummary=DefaultHisto.clone()
104 DefaultHistoSummary.topFolderName= cms.string("PixelPhase1/Summary")
105 
106 DefaultHistoTrack=DefaultHisto.clone()
107 DefaultHistoTrack.topFolderName= cms.string("PixelPhase1/Tracks")
108 
109 DefaultHistoReadout=DefaultHisto.clone()
110 DefaultHistoReadout.topFolderName= cms.string("PixelPhase1/FED/Readout")
111 
112 # Commonly used specifications.
113 StandardSpecifications1D = [
114  # The column names are either defined in the GeometryInterface.cc or read from TrackerTopology.
115  # Endcap names side by side. The "/" separates columns and also defines how the output folders are nested.
116 
117  # per-ladder and profiles
118  Specification(PerLadder).groupBy("PXBarrel/Shell/PXLayer/SignedLadder")
119  .save()
120  .reduce("MEAN")
121  .groupBy("PXBarrel/Shell/PXLayer", "EXTEND_X")
122  .save(),
123  Specification(PerLadder).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade")
124  .save()
125  .reduce("MEAN")
126  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk", "EXTEND_X")
127  .save()
128  .groupBy("PXForward/HalfCylinder/PXRing/", "EXTEND_X")
129  .save(),
130  Specification().groupBy("PXBarrel").save(),
131  Specification().groupBy("PXForward").save(),
132  Specification(PerLayer1D).groupBy("PXBarrel/Shell/PXLayer").save(),
133  Specification(PerLayer1D).groupBy("PXForward/HalfCylinder/PXRing/PXDisk").save(),
134 
135  Specification(PerModule).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName").save(),
136  Specification(PerModule).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName").save(),
137 
138  Specification(PerLadder).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXPanel")
139  .reduce("MEAN")
140  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade","EXTEND_X")
141  .save(),
142  Specification(PerLadder).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/SignedModule")
143  .reduce("MEAN")
144  .groupBy("PXBarrel/Shell/PXLayer/SignedLadder", "EXTEND_X")
145  .save(),
146  Specification().groupBy("PXBarrel/PXLayer")
147  .save(),
148  Specification().groupBy("PXForward/PXDisk")
149  .save()
150 
151 
152 ]
153 
154 StandardSpecificationTrend = [
155  Specification(PerModule).groupBy("PXBarrel/Lumisection")
156  .reduce("MEAN")
157  .groupBy("PXBarrel", "EXTEND_X")
158  .save(),
159  Specification(PerModule).groupBy("PXForward/Lumisection")
160  .reduce("MEAN")
161  .groupBy("PXForward", "EXTEND_X")
162  .save(),
163  Specification(IsOffline).groupBy("PXBarrel/LumiBlock")
164  .reduce("MEAN")
165  .groupBy("PXBarrel", "EXTEND_X")
166  .save(),
167  Specification(IsOffline).groupBy("PXForward/LumiBlock")
168  .reduce("MEAN")
169  .groupBy("PXForward", "EXTEND_X")
170  .save()
171 ]
172 
173 StandardSpecificationTrend2D = [
174  Specification(PerModule).groupBy("PXBarrel/PXLayer/Lumisection")
175  .reduce("MEAN")
176  .groupBy("PXBarrel/PXLayer", "EXTEND_X")
177  .groupBy("PXBarrel", "EXTEND_Y")
178  .save(),
179  Specification(PerModule).groupBy("PXForward/PXDisk/Lumisection")
180  .reduce("MEAN")
181  .groupBy("PXForward/PXDisk","EXTEND_X")
182  .groupBy("PXForward", "EXTEND_Y")
183  .save(),
184  Specification(IsOffline).groupBy("PXBarrel/PXLayer/LumiBlock")
185  .reduce("MEAN")
186  .groupBy("PXBarrel/PXLayer", "EXTEND_X")
187  .groupBy("PXBarrel", "EXTEND_Y")
188  .save(),
189  Specification(IsOffline).groupBy("PXForward/PXDisk/LumiBlock")
190  .reduce("MEAN")
191  .groupBy("PXForward/PXDisk","EXTEND_X")
192  .groupBy("PXForward", "EXTEND_Y")
193  .save()
194 ]
195 
196 StandardSpecification2DProfile = [
197  Specification(PerLayer2D)
198  .groupBy("PXBarrel/PXLayer/SignedLadder/SignedModule")
199  .groupBy("PXBarrel/PXLayer/SignedLadder", "EXTEND_X")
200  .groupBy("PXBarrel/PXLayer", "EXTEND_Y")
201  .reduce("MEAN")
202  .save(),
203  Specification(PerLayer2D)
204  .groupBy("PXForward/PXRing/SignedBladePanel/PXDisk")
205  .groupBy("PXForward/PXRing/SignedBladePanel", "EXTEND_X")
206  .groupBy("PXForward/PXRing", "EXTEND_Y")
207  .reduce("MEAN")
208  .save(),
209 ]
210 
211 StandardSpecification2DOccupancy = [
212  Specification(PerLayer2D)
213  .groupBy("PXBarrel/PXLayer/SignedLadder/SignedModule")
214  .groupBy("PXBarrel/PXLayer/SignedLadder", "EXTEND_X")
215  .groupBy("PXBarrel/PXLayer", "EXTEND_Y")
216  .save(),
217  Specification(PerLayer2D)
218  .groupBy("PXForward/PXRing/SignedBladePanel/PXDisk")
219  .groupBy("PXForward/PXRing/SignedBladePanel", "EXTEND_X")
220  .groupBy("PXForward/PXRing", "EXTEND_Y")
221  .save(),
222 ]
223 
224 StandardSpecificationPixelmapProfile = [#produces pixel map with the mean (TProfile)
225  Specification(PerLayer2D)
226  .groupBy("PXBarrel/PXLayer/SignedLadderCoord/SignedModuleCoord")
227  .groupBy("PXBarrel/PXLayer/SignedLadderCoord", "EXTEND_X")
228  .groupBy("PXBarrel/PXLayer", "EXTEND_Y")
229  .reduce("MEAN")
230  .save(),
231  Specification(PerLayer2D)
232  .groupBy("PXForward/PXRing/SignedBladePanelCoord/SignedDiskCoord")
233  .groupBy("PXForward/PXRing/SignedBladePanelCoord", "EXTEND_X")
234  .groupBy("PXForward/PXRing", "EXTEND_Y")
235  .reduce("MEAN")
236  .save(),
237 ]
238 
239 StandardSpecificationOccupancy = [ #this produces pixel maps with counting
240  Specification(PerLayer2D)
241  .groupBy("PXBarrel/PXLayer/SignedLadderCoord/SignedModuleCoord")
242  .groupBy("PXBarrel/PXLayer/SignedLadderCoord", "EXTEND_X")
243  .groupBy("PXBarrel/PXLayer", "EXTEND_Y")
244  .save(),
245  Specification(PerLayer2D)
246  .groupBy("PXForward/PXRing/SignedBladePanelCoord/SignedDiskCoord")
247  .groupBy("PXForward/PXRing/SignedBladePanelCoord", "EXTEND_X")
248  .groupBy("PXForward/PXRing", "EXTEND_Y")
249  .save()
250  #Specification(PerLayer2D) # FPIX as one plot
251  # .groupBy("PXForward/SignedShiftedBladePanelCoord/SignedDiskRingCoord")
252  # .groupBy("PXForward/SignedShiftedBladePanelCoord", "EXTEND_X")
253  # .groupBy("PXForward", "EXTEND_Y")
254  # .save(),
255 ]
256 
257 # the same for NDigis and friends. Needed due to technical limitations...
258 StandardSpecifications1D_Num = [
259  Specification(PerLadder).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/DetId/Event")
260  .reduce("COUNT") # per-event counting
261  .groupBy("PXBarrel/Shell/PXLayer/SignedLadder").save()
262  .reduce("MEAN")
263  .groupBy("PXBarrel/Shell/PXLayer", "EXTEND_X")
264  .save(),
265  Specification(PerModule).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName/Event")
266  .reduce("COUNT")
267  .groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName")
268  .save(),
269  Specification(PerLadder).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/DetId/Event")
270  .reduce("COUNT") # per-event counting
271  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade").save()
272  .reduce("MEAN")
273  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/", "EXTEND_X")
274  .save()
275  .groupBy("PXForward/HalfCylinder/PXRing/", "EXTEND_X")
276  .save(),
277  Specification(PerModule).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName/Event")
278  .reduce("COUNT")
279  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName")
280  .save(),
281 
282  Specification(PerLadder).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXPanel/Event")
283  .reduce("COUNT")
284  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXPanel")
285  .reduce("MEAN")
286  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade","EXTEND_X")
287  .save(),
288  Specification(PerLadder).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXBModule/Event")
289  .reduce("COUNT")
290  .groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXBModule")
291  .reduce("MEAN")
292  .groupBy("PXBarrel/Shell/PXLayer/SignedLadder", "EXTEND_X")
293  .save(),
294 ]
295 
296 
297 StandardSpecificationInclusive_Num = [#to count inclusively objects in substructures (BPix, FPix)
298  Specification().groupBy("PXBarrel/Event")
299  .reduce("COUNT")
300  .groupBy("PXBarrel")
301  .save(),
302  Specification().groupBy("PXForward/Event")
303  .reduce("COUNT")
304  .groupBy("PXForward")
305  .save(),
306  Specification().groupBy("PXAll/Event")
307  .reduce("COUNT")
308  .groupBy("PXAll")
309  .save(),
310 ]
311 
312 StandardSpecificationTrend_Num = [
313  Specification(PerModule).groupBy("PXBarrel/PXLayer/Event")
314  .reduce("COUNT")
315  .groupBy("PXBarrel/PXLayer/Lumisection")
316  .reduce("MEAN")
317  .groupBy("PXBarrel/PXLayer","EXTEND_X")
318  .groupBy("PXBarrel", "EXTEND_Y")
319  .save(),
320  Specification(PerModule).groupBy("PXBarrel/Event")
321  .reduce("COUNT")
322  .groupBy("PXBarrel/Lumisection")
323  .reduce("MEAN")
324  .groupBy("PXBarrel", "EXTEND_X")
325  .save(),
326  Specification(PerModule).groupBy("PXForward/PXDisk/Event")
327  .reduce("COUNT")
328  .groupBy("PXForward/PXDisk/Lumisection")
329  .reduce("MEAN")
330  .groupBy("PXForward/PXDisk","EXTEND_X")
331  .groupBy("PXForward", "EXTEND_Y")
332  .save(),
333  Specification(PerModule).groupBy("PXForward/Event")
334  .reduce("COUNT")
335  .groupBy("PXForward/Lumisection")
336  .reduce("MEAN")
337  .groupBy("PXForward", "EXTEND_X")
338  .save(),
339  Specification(PerModule).groupBy("PXAll/Event")
340  .reduce("COUNT")
341  .groupBy("PXAll/Lumisection")
342  .reduce("MEAN")
343  .groupBy("PXAll", "EXTEND_X")
344  .save(),
345  Specification(IsOffline).groupBy("PXBarrel/PXLayer/Event")
346  .reduce("COUNT")
347  .groupBy("PXBarrel/PXLayer/LumiBlock")
348  .reduce("MEAN")
349  .groupBy("PXBarrel/PXLayer","EXTEND_X")
350  .groupBy("PXBarrel", "EXTEND_Y")
351  .save(),
352  Specification(IsOffline).groupBy("PXBarrel/Event")
353  .reduce("COUNT")
354  .groupBy("PXBarrel/LumiBlock")
355  .reduce("MEAN")
356  .groupBy("PXBarrel", "EXTEND_X")
357  .save(),
358  Specification(IsOffline).groupBy("PXForward/PXDisk/Event")
359  .reduce("COUNT")
360  .groupBy("PXForward/PXDisk/LumiBlock")
361  .reduce("MEAN")
362  .groupBy("PXForward/PXDisk","EXTEND_X")
363  .groupBy("PXForward", "EXTEND_Y")
364  .save(),
365  Specification(IsOffline).groupBy("PXForward/Event")
366  .reduce("COUNT")
367  .groupBy("PXForward/LumiBlock")
368  .reduce("MEAN")
369  .groupBy("PXForward", "EXTEND_X")
370  .save(),
371  Specification(IsOffline).groupBy("PXAll/Event")
372  .reduce("COUNT")
373  .groupBy("PXAll/LumiBlock")
374  .reduce("MEAN")
375  .groupBy("PXAll", "EXTEND_X")
376  .save(),
377 ]
378 
379 
380 StandardSpecification2DProfile_Num = [
381 
382  Specification(PerLayer2D)
383  .groupBy("PXBarrel/PXLayer/SignedLadder/SignedModule" + "/DetId/Event")
384  .reduce("COUNT")
385  .groupBy("PXBarrel/PXLayer/SignedLadder/SignedModule")
386  .reduce("MEAN")
387  .groupBy("PXBarrel/PXLayer/SignedLadder", "EXTEND_X")
388  .groupBy("PXBarrel/PXLayer", "EXTEND_Y")
389  .save(),
390  Specification(PerLayer2D)
391  .groupBy("DetId/Event")
392  .reduce("COUNT")
393  .groupBy("PXForward/PXRing/PXDisk/SignedBladePanel")
394  .reduce("MEAN")
395  .groupBy("PXForward/PXRing/PXDisk", "EXTEND_Y")
396  .groupBy("PXForward/PXRing", "EXTEND_X")
397  .save(),
398 ]
399 
400 # function that makes a VPSet but flattens the argument list if needed
401 def VPSet(*args):
402  l = []
403  for a in args:
404  if isinstance(a, cms.VPSet) or isinstance(a, Specification):
405  e = [a]
406  else:
407  e = list(a)
408  l = l+e
409  return cms.VPSet(l)
save
Definition: cuy.py:1163
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run