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 
45 # Default histogram configuration. This is _not_ used automatically, but you
46 # can import and pass this (or clones of it) in the plugin config.
47 DefaultHisto = cms.PSet(
48  # Setting this to False hides all plots of this HistogramManager. It does not even record any data.
49  enabled = cms.bool(True),
50 
51  # a.k.a. online harvesting. Might be useful in offline for custom harvesting,
52  # but the main purpose is online, where this is on by default.
53  perLumiHarvesting = cms.bool(False),
54 
55  # If False, no histograms are booked for DetIds where any column is undefined.
56  # since or-columns are not supported any longer, this has to be False, otherwise
57  # you will see a PXBarrel_UNDEFINED with endcap modules and the other way round.
58  # It could still be useful for debugging, to see if there is more UNDEFINED
59  # than expected.
60  bookUndefined = cms.bool(False),
61 
62  # where the plots should go.
63  topFolderName = cms.string("PixelPhase1"),
64 
65  # Histogram parameters
66  name = cms.string("unnamed"),
67  title = cms.string("Histogram of Something"),
68  xlabel = cms.string("something"),
69  ylabel = cms.string("count"),
70  dimensions = cms.int32(1),
71  range_min = cms.double(0),
72  range_max = cms.double(100),
73  range_nbins = cms.int32(100),
74  range_y_min = cms.double(0),
75  range_y_max = cms.double(100),
76  range_y_nbins = cms.int32(100),
77 
78  # This structure is output by the SpecficationBuilder.
79  specs = cms.VPSet()
80  # cms.PSet(spec =
81  # cms.VPset(
82  # cms.PSet(
83  # type = GROUPBY,
84  # stage = FIRST,
85  # columns = cms.vstring("P1PXBBarrel|P1PXECEndcap", "DetId"),
86  # arg = cms.string("")
87  # ),
88  # cms.PSet(
89  # type = SAVE,
90  # stage = STAGE1,
91  # columns = cms.vstring(),
92  # arg = cms.string("")
93  # )
94  # )
95  # )
96  #)
97 )
98 
99 DefaultHistoDigiCluster=DefaultHisto.clone()
100 DefaultHistoDigiCluster.topFolderName= cms.string("PixelPhase1/Phase1_MechanicalView")
101 
102 DefaultHistoSummary=DefaultHisto.clone()
103 DefaultHistoSummary.topFolderName= cms.string("PixelPhase1/Summary")
104 
105 DefaultHistoTrack=DefaultHisto.clone()
106 DefaultHistoTrack.topFolderName= cms.string("PixelPhase1/Tracks")
107 
108 DefaultHistoReadout=DefaultHisto.clone()
109 DefaultHistoReadout.topFolderName= cms.string("PixelPhase1/FED/Readout")
110 
111 # Commonly used specifications.
112 StandardSpecifications1D = [
113  # The column names are either defined in the GeometryInterface.cc or read from TrackerTopology.
114  # Endcap names side by side. The "/" separates columns and also defines how the output folders are nested.
115 
116  # per-ladder and profiles
117  Specification(PerLadder).groupBy("PXBarrel/Shell/PXLayer/SignedLadder")
118  .save()
119  .reduce("MEAN")
120  .groupBy("PXBarrel/Shell/PXLayer", "EXTEND_X")
121  .save(),
122  Specification(PerLadder).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade")
123  .save()
124  .reduce("MEAN")
125  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk", "EXTEND_X")
126  .save()
127  .groupBy("PXForward/HalfCylinder/PXRing/", "EXTEND_X")
128  .save(),
129  Specification().groupBy("PXBarrel").save(),
130  Specification().groupBy("PXForward").save(),
131  Specification(PerLayer1D).groupBy("PXBarrel/Shell/PXLayer").save(),
132  Specification(PerLayer1D).groupBy("PXForward/HalfCylinder/PXRing/PXDisk").save(),
133 
134  Specification(PerModule).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName").save(),
135  Specification(PerModule).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName").save(),
136 
137  Specification(PerLadder).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXPanel")
138  .reduce("MEAN")
139  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade","EXTEND_X")
140  .save(),
141  Specification(PerLadder).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/SignedModule")
142  .reduce("MEAN")
143  .groupBy("PXBarrel/Shell/PXLayer/SignedLadder", "EXTEND_X")
144  .save(),
145  Specification().groupBy("PXBarrel/PXLayer")
146  .save(),
147  Specification().groupBy("PXForward/PXDisk")
148  .save()
149 
150 
151 ]
152 
153 StandardSpecificationTrend = [
154  Specification().groupBy("PXBarrel/Lumisection")
155  .reduce("MEAN")
156  .groupBy("PXBarrel", "EXTEND_X")
157  .save(),
158  Specification().groupBy("PXForward/Lumisection")
159  .reduce("MEAN")
160  .groupBy("PXForward", "EXTEND_X")
161  .save()
162 ]
163 
164 StandardSpecificationTrend2D = [
165  Specification().groupBy("PXBarrel/PXLayer/Lumisection")
166  .reduce("MEAN")
167  .groupBy("PXBarrel/PXLayer", "EXTEND_X")
168  .groupBy("PXBarrel", "EXTEND_Y")
169  .save(),
170  Specification().groupBy("PXForward/PXDisk/Lumisection")
171  .reduce("MEAN")
172  .groupBy("PXForward/PXDisk","EXTEND_X")
173  .groupBy("PXForward", "EXTEND_Y")
174  .save()
175 ]
176 
177 StandardSpecification2DProfile = [
178  Specification(PerLayer2D)
179  .groupBy("PXBarrel/PXLayer/SignedLadder/SignedModule")
180  .groupBy("PXBarrel/PXLayer/SignedLadder", "EXTEND_X")
181  .groupBy("PXBarrel/PXLayer", "EXTEND_Y")
182  .reduce("MEAN")
183  .save(),
184  Specification(PerLayer2D)
185  .groupBy("PXForward/PXRing/SignedBladePanel/PXDisk")
186  .groupBy("PXForward/PXRing/SignedBladePanel", "EXTEND_X")
187  .groupBy("PXForward/PXRing", "EXTEND_Y")
188  .reduce("MEAN")
189  .save(),
190 ]
191 
192 StandardSpecification2DOccupancy = [
193  Specification(PerLayer2D)
194  .groupBy("PXBarrel/PXLayer/SignedLadder/SignedModule")
195  .groupBy("PXBarrel/PXLayer/SignedLadder", "EXTEND_X")
196  .groupBy("PXBarrel/PXLayer", "EXTEND_Y")
197  .save(),
198  Specification(PerLayer2D)
199  .groupBy("PXForward/PXRing/SignedBladePanel/PXDisk")
200  .groupBy("PXForward/PXRing/SignedBladePanel", "EXTEND_X")
201  .groupBy("PXForward/PXRing", "EXTEND_Y")
202  .save(),
203 ]
204 
205 StandardSpecificationPixelmapProfile = [#produces pixel map with the mean (TProfile)
206  Specification(PerLayer2D)
207  .groupBy("PXBarrel/PXLayer/SignedLadderCoord/SignedModuleCoord")
208  .groupBy("PXBarrel/PXLayer/SignedLadderCoord", "EXTEND_X")
209  .groupBy("PXBarrel/PXLayer", "EXTEND_Y")
210  .reduce("MEAN")
211  .save(),
212  Specification(PerLayer2D)
213  .groupBy("PXForward/PXRing/SignedBladePanelCoord/SignedDiskCoord")
214  .groupBy("PXForward/PXRing/SignedBladePanelCoord", "EXTEND_X")
215  .groupBy("PXForward/PXRing", "EXTEND_Y")
216  .reduce("MEAN")
217  .save(),
218 ]
219 
220 StandardSpecificationOccupancy = [ #this produces pixel maps with counting
221  Specification(PerLayer2D)
222  .groupBy("PXBarrel/PXLayer/SignedLadderCoord/SignedModuleCoord")
223  .groupBy("PXBarrel/PXLayer/SignedLadderCoord", "EXTEND_X")
224  .groupBy("PXBarrel/PXLayer", "EXTEND_Y")
225  .save(),
226  Specification(PerLayer2D)
227  .groupBy("PXForward/PXRing/SignedBladePanelCoord/SignedDiskCoord")
228  .groupBy("PXForward/PXRing/SignedBladePanelCoord", "EXTEND_X")
229  .groupBy("PXForward/PXRing", "EXTEND_Y")
230  .save()
231  #Specification(PerLayer2D) # FPIX as one plot
232  # .groupBy("PXForward/SignedShiftedBladePanelCoord/SignedDiskRingCoord")
233  # .groupBy("PXForward/SignedShiftedBladePanelCoord", "EXTEND_X")
234  # .groupBy("PXForward", "EXTEND_Y")
235  # .save(),
236 ]
237 
238 # the same for NDigis and friends. Needed due to technical limitations...
239 StandardSpecifications1D_Num = [
240  Specification(PerLadder).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/DetId/Event")
241  .reduce("COUNT") # per-event counting
242  .groupBy("PXBarrel/Shell/PXLayer/SignedLadder").save()
243  .reduce("MEAN")
244  .groupBy("PXBarrel/Shell/PXLayer", "EXTEND_X")
245  .save(),
246  Specification(PerModule).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName/Event")
247  .reduce("COUNT")
248  .groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName")
249  .save(),
250  Specification(PerLadder).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/DetId/Event")
251  .reduce("COUNT") # per-event counting
252  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade").save()
253  .reduce("MEAN")
254  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/", "EXTEND_X")
255  .save()
256  .groupBy("PXForward/HalfCylinder/PXRing/", "EXTEND_X")
257  .save(),
258  Specification(PerModule).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName/Event")
259  .reduce("COUNT")
260  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName")
261  .save(),
262 
263  Specification(PerLadder).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXPanel/Event")
264  .reduce("COUNT")
265  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXPanel")
266  .reduce("MEAN")
267  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade","EXTEND_X")
268  .save(),
269  Specification(PerLadder).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXBModule/Event")
270  .reduce("COUNT")
271  .groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXBModule")
272  .reduce("MEAN")
273  .groupBy("PXBarrel/Shell/PXLayer/SignedLadder", "EXTEND_X")
274  .save(),
275 ]
276 
277 
278 StandardSpecificationInclusive_Num = [#to count inclusively objects in substructures (BPix, FPix)
279  Specification().groupBy("PXBarrel/Event")
280  .reduce("COUNT")
281  .groupBy("PXBarrel")
282  .save(),
283  Specification().groupBy("PXForward/Event")
284  .reduce("COUNT")
285  .groupBy("PXForward")
286  .save(),
287  Specification().groupBy("PXAll/Event")
288  .reduce("COUNT")
289  .groupBy("PXAll")
290  .save(),
291 ]
292 
293 StandardSpecificationTrend_Num = [
294 
295  Specification().groupBy("PXBarrel/PXLayer/Event")
296  .reduce("COUNT")
297  .groupBy("PXBarrel/PXLayer/Lumisection")
298  .reduce("MEAN")
299  .groupBy("PXBarrel/PXLayer","EXTEND_X")
300  .groupBy("PXBarrel", "EXTEND_Y")
301  .save(),
302  Specification().groupBy("PXBarrel/Event")
303  .reduce("COUNT")
304  .groupBy("PXBarrel/Lumisection")
305  .reduce("MEAN")
306  .groupBy("PXBarrel", "EXTEND_X")
307  .save(),
308  Specification().groupBy("PXForward/PXDisk/Event")
309  .reduce("COUNT")
310  .groupBy("PXForward/PXDisk/Lumisection")
311  .reduce("MEAN")
312  .groupBy("PXForward/PXDisk","EXTEND_X")
313  .groupBy("PXForward", "EXTEND_Y")
314  .save(),
315  Specification().groupBy("PXForward/Event")
316  .reduce("COUNT")
317  .groupBy("PXForward/Lumisection")
318  .reduce("MEAN")
319  .groupBy("PXForward", "EXTEND_X")
320  .save(),
321  Specification().groupBy("PXAll/Event")
322  .reduce("COUNT")
323  .groupBy("PXAll/Lumisection")
324  .reduce("MEAN")
325  .groupBy("PXAll", "EXTEND_X")
326  .save(),
327 ]
328 
329 
330 StandardSpecification2DProfile_Num = [
331 
332  Specification(PerLayer2D)
333  .groupBy("PXBarrel/PXLayer/SignedLadder/SignedModule" + "/DetId/Event")
334  .reduce("COUNT")
335  .groupBy("PXBarrel/PXLayer/SignedLadder/SignedModule")
336  .reduce("MEAN")
337  .groupBy("PXBarrel/PXLayer/SignedLadder", "EXTEND_X")
338  .groupBy("PXBarrel/PXLayer", "EXTEND_Y")
339  .save(),
340  Specification(PerLayer2D)
341  .groupBy("DetId/Event")
342  .reduce("COUNT")
343  .groupBy("PXForward/PXRing/PXDisk/SignedBladePanel")
344  .reduce("MEAN")
345  .groupBy("PXForward/PXRing/PXDisk", "EXTEND_Y")
346  .groupBy("PXForward/PXRing", "EXTEND_X")
347  .save(),
348 ]
349 
350 # function that makes a VPSet but flattens the argument list if needed
351 def VPSet(*args):
352  l = []
353  for a in args:
354  if isinstance(a, cms.VPSet) or isinstance(a, Specification):
355  e = [a]
356  else:
357  e = list(a)
358  l = l+e
359  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