CMS 3D CMS Logo

SiPixelPhase1Digis_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
3 import DQM.SiPixelPhase1Common.TriggerEventFlag_cfi as trigger
4 
5 # this might also go into te Common config,as we do not reference it
7 
8 SiPixelPhase1DigisADC = DefaultHistoDigiCluster.clone(
9  name = "adc",
10  title = "Digi ADC values",
11  xlabel = "adc readout",
12  range_min = -0.5,
13  range_max = 255.5,
14  range_nbins = 32,
15  specs = VPSet(
16  StandardSpecificationTrend,
17  StandardSpecificationTrend2D,
18  StandardSpecificationPixelmapProfile,# ROC level map
19  StandardSpecification2DProfile, # module level map
20  StandardSpecifications1D
21  )
22 )
23 
24 SiPixelPhase1DigisNdigis = DefaultHistoDigiCluster.clone(
25  name = "digis", # 'Count of' added automatically
26  title = "Digis",
27  xlabel = "digis",
28  range_min = 0,
29  range_max = 300,
30  range_nbins = 50,
31  dimensions = 0, # this is a count
32 
33  specs = VPSet(
34  StandardSpecificationTrend_Num,
35  StandardSpecification2DProfile_Num,
36  StandardSpecifications1D_Num,
37 
38  Specification().groupBy("PXBarrel/PXLayer/Event") #this will produce inclusive counts per Layer/Disk
39  .reduce("COUNT")
40  .groupBy("PXBarrel/PXLayer")
41  .save(nbins=100, xmin=0, xmax=40000),
42  Specification().groupBy("PXForward/PXDisk/Event")
43  .reduce("COUNT")
44  .groupBy("PXForward/PXDisk/")
45  .save(nbins=100, xmin=0, xmax=20000),
46  )
47 )
48 
49 
50 SiPixelPhase1ClustersNdigisInclusive = DefaultHistoDigiCluster.clone(
51  name = "digis",
52  title = "Digis",
53  range_min = 0, range_max = 100000, range_nbins = 100,
54  xlabel = "digis",
55  dimensions = 0,
56  specs = VPSet(
57  StandardSpecificationInclusive_Num
58  )
59 )
60 
61 
62 SiPixelPhase1DigisNdigisPerFED = DefaultHisto.clone( #to be removed?
63  name = "feddigis", # This is the same as above up to the ranges. maybe we
64  title = "Digis", # should allow setting the range per spec, but OTOH a
65  xlabel = "digis", # HistogramManager is almost free.
66  range_min = 0,
67  range_max = 4000,
68  range_nbins = 200,
69  dimensions = 0,
70  specs = VPSet(
71  Specification().groupBy("FED/Event")
72  .reduce("COUNT")
73  .groupBy("FED")
74  .reduce("MEAN")
75  .groupBy("", "EXTEND_X")
76  .save()
77  )
78 )
79 
80 SiPixelPhase1DigisNdigisPerFEDtrend = DefaultHisto.clone(
81  name = "feddigistrend", # This is the same as above up to the ranges. maybe we
82  title = "Digis", # should allow setting the range per spec, but OTOH a
83  xlabel = "digis", # HistogramManager is almost free.
84  range_min = 0,
85  range_max = 1000,
86  range_nbins = 200,
87  dimensions = 0,
88  #enabled = False,
89  specs = VPSet(
90  Specification().groupBy("FED/Event") #produce the mean number of digis per event and FED per lumisection
91  .reduce("COUNT")
92  .groupBy("FED/LumiBlock")
93  .reduce("MEAN")
94  .groupBy("FED", "EXTEND_X")
95  .groupBy("", "EXTEND_Y")
96  .save(),
97  Specification().groupBy("FED/Event") #produce the mean number of digis per event and FED per lumisection
98  .reduce("COUNT")
99  .groupBy("LumiBlock")
100  .reduce("MEAN")
101  .groupBy("", "EXTEND_X")
102  .save()
103  )
104 )
105 
106 SiPixelPhase1DigisEvents = DefaultHistoDigiCluster.clone(
107  name = "eventrate",
108  title = "Rate of Pixel Events",
109  xlabel = "LumiBlock",
110  ylabel = "#Events",
111  dimensions = 0,
112  specs = VPSet(
113 
114  Specification().groupBy("LumiBlock")
115  .reduce("MEAN")
116  .groupBy("", "EXTEND_X").save(),
117  Specification().groupBy("BX")
118  .groupBy("", "EXTEND_X").save()
119  )
120 )
121 
122 SiPixelPhase1DigisHitmap = DefaultHistoDigiCluster.clone(
123  name = "digi_occupancy",
124  title = "Digi Occupancy",
125  ylabel = "#digis",
126  dimensions = 0,
127  specs = VPSet(
128  Specification(PerModule).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName/row/col")
129  .groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName/row", "EXTEND_X")
130  .groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName", "EXTEND_Y")
131  .save(),
132  Specification(PerModule).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName/col")
133  .groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName", "EXTEND_X")
134  .save(),
135  Specification(PerModule).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName/row")
136  .groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName", "EXTEND_X")
137  .save(),
138  Specification(PerModule).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName/row/col")
139  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName/row", "EXTEND_X")
140  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName", "EXTEND_Y")
141  .save(),
142  Specification(PerModule).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName/col")
143  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName", "EXTEND_X")
144  .save(),
145  Specification(PerModule).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName/row")
146  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName", "EXTEND_X")
147  .save(),
148  StandardSpecificationOccupancy,
149  )
150 )
151 
152 SiPixelPhase1DigisOccupancy = DefaultHistoReadout.clone(
153  name = "occupancy",
154  title = "Digi Occupancy",
155  dimensions = 0,
156  specs = VPSet(
157  Specification(PerReadout).groupBy("PXBarrel/FED/Channel")
158  .groupBy("PXBarrel/FED", "EXTEND_X").save(),
159 
160  #Specification(PerReadout).groupBy("PXBarrel/FED/Channel/RocInLink") #Deactivating 2D maps giving redundant information
161  # .groupBy("PXBarrel/FED/Channel", "EXTEND_Y")
162  # .groupBy("PXBarrel/FED", "EXTEND_X").save(),
163 
164  Specification(PerReadout).groupBy("PXForward/FED/Channel")
165  .groupBy("PXForward/FED", "EXTEND_X").save(),
166 
167  #Specification(PerReadout).groupBy("PXForward/FED/Channel/RocInLink")
168  # .groupBy("PXForward/FED/Channel", "EXTEND_Y")
169  # .groupBy("PXForward/FED", "EXTEND_X").save(),
170 
171  Specification(PerReadout).groupBy("PXBarrel/FED")
172  .groupBy("PXBarrel", "EXTEND_X").save(),
173 
174  Specification(PerReadout).groupBy("PXForward/FED")
175  .groupBy("PXForward", "EXTEND_X").save(),
176 
177  )
178 )
179 
180 from Configuration.Eras.Modifier_run3_common_cff import run3_common
181 run3_common.toModify(SiPixelPhase1ClustersNdigisInclusive, range_max = 150000, range_nbins=150)
182 
183 
184 # This has to match the order of the names in the C++ enum.
185 SiPixelPhase1DigisConf = cms.VPSet(
186  SiPixelPhase1DigisADC,
187  SiPixelPhase1DigisNdigis,
188  SiPixelPhase1ClustersNdigisInclusive,
189  SiPixelPhase1DigisNdigisPerFED,
190  SiPixelPhase1DigisNdigisPerFEDtrend,
191  SiPixelPhase1DigisEvents,
192  SiPixelPhase1DigisHitmap,
193  SiPixelPhase1DigisOccupancy,
194 )
195 
196 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
197 SiPixelPhase1DigisAnalyzer = DQMEDAnalyzer('SiPixelPhase1Digis',
198  src = cms.InputTag("siPixelDigis"),
199  histograms = SiPixelPhase1DigisConf,
200  geometry = SiPixelPhase1Geometry,
201  triggerflags = trigger.SiPixelPhase1Triggers
202 )
203 
204 SiPixelPhase1DigisHarvester = DQMEDHarvester("SiPixelPhase1Harvester",
205  histograms = SiPixelPhase1DigisConf,
206  geometry = SiPixelPhase1Geometry
207 )
save
Definition: cuy.py:1164