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