CMS 3D CMS Logo

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