Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:11:24

0001 import FWCore.ParameterSet.Config as cms
0002 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
0003 import DQM.SiPixelPhase1Common.TriggerEventFlag_cfi as trigger
0004 
0005 # this might also go into te Common config,as we do not reference it
0006 from DQM.SiPixelPhase1Common.HistogramManager_cfi import *
0007 
0008 SiPixelPhase1DigisADC = DefaultHistoDigiCluster.clone(
0009   name = "adc",
0010   title = "Digi ADC values",
0011   xlabel = "adc readout",
0012   range_min = -0.5,
0013   range_max = 255.5,
0014   range_nbins = 32,
0015   specs = VPSet(
0016     StandardSpecificationTrend,
0017     StandardSpecificationTrend2D,
0018     StandardSpecificationPixelmapProfile,# ROC level map
0019     StandardSpecification2DProfile, # module level map
0020     StandardSpecifications1D
0021   )
0022 )
0023 
0024 SiPixelPhase1DigisNdigis = DefaultHistoDigiCluster.clone(
0025   name = "digis", # 'Count of' added automatically
0026   title = "Digis",
0027   xlabel = "digis",
0028   range_min = 0,
0029   range_max = 300,
0030   range_nbins = 50,
0031   dimensions = 0, # this is a count
0032 
0033   specs = VPSet(
0034     StandardSpecificationTrend_Num,
0035     StandardSpecification2DProfile_Num,
0036     StandardSpecifications1D_Num,
0037     
0038     Specification().groupBy("PXBarrel/PXLayer/Event") #this will produce inclusive counts per Layer/Disk
0039                              .reduce("COUNT")    
0040                              .groupBy("PXBarrel/PXLayer")
0041                              .save(nbins=100, xmin=0, xmax=40000),
0042     Specification().groupBy("PXForward/PXDisk/Event")
0043                              .reduce("COUNT")    
0044                              .groupBy("PXForward/PXDisk/")
0045                              .save(nbins=100, xmin=0, xmax=20000),
0046   )
0047 )
0048 
0049 
0050 SiPixelPhase1ClustersNdigisInclusive = DefaultHistoDigiCluster.clone(
0051   name = "digis",
0052   title = "Digis",
0053   range_min = 0, range_max = 100000, range_nbins = 100,
0054   xlabel = "digis",
0055   dimensions = 0,
0056   specs = VPSet(
0057     StandardSpecificationInclusive_Num
0058   )
0059 )
0060 
0061 
0062 SiPixelPhase1DigisNdigisPerFED = DefaultHisto.clone( #to be removed?
0063   name = "feddigis", # This is the same as above up to the ranges. maybe we 
0064   title = "Digis",   # should allow setting the range per spec, but OTOH a 
0065   xlabel = "digis",  # HistogramManager is almost free.
0066   range_min = 0,
0067   range_max = 4000,
0068   range_nbins = 200,
0069   dimensions = 0, 
0070   specs = VPSet(
0071     Specification().groupBy("FED/Event")
0072                    .reduce("COUNT")
0073                    .groupBy("FED")
0074                    .reduce("MEAN")
0075                    .groupBy("", "EXTEND_X")
0076                    .save()
0077   )
0078 )
0079 
0080 SiPixelPhase1DigisNdigisPerFEDtrend = DefaultHisto.clone(                                                                                                                                                   
0081   name = "feddigistrend", # This is the same as above up to the ranges. maybe we                                                                                                                                            
0082   title = "Digis",   # should allow setting the range per spec, but OTOH a                                                                                                                                             
0083   xlabel = "digis",  # HistogramManager is almost free.                                                                                                                                                                
0084   range_min = 0,
0085   range_max = 1000,
0086   range_nbins = 200,
0087   dimensions = 0,
0088   #enabled = False,
0089   specs = VPSet(
0090   Specification().groupBy("FED/Event") #produce the mean number of digis per event and FED per lumisection
0091                    .reduce("COUNT")
0092                    .groupBy("FED/LumiBlock")
0093                    .reduce("MEAN")
0094                    .groupBy("FED", "EXTEND_X")
0095                    .groupBy("", "EXTEND_Y")
0096                    .save(),
0097   Specification().groupBy("FED/Event") #produce the mean number of digis per event and FED per lumisection
0098                    .reduce("COUNT")
0099                    .groupBy("LumiBlock")
0100                    .reduce("MEAN")
0101                    .groupBy("", "EXTEND_X")
0102                    .save()
0103   )
0104 )
0105 
0106 SiPixelPhase1DigisEvents = DefaultHistoDigiCluster.clone(
0107   name = "eventrate",
0108   title = "Rate of Pixel Events",
0109   xlabel = "LumiBlock",
0110   ylabel = "#Events",
0111   dimensions = 0,
0112   specs = VPSet(
0113 
0114     Specification().groupBy("LumiBlock")
0115                    .reduce("MEAN")
0116                    .groupBy("", "EXTEND_X").save(),
0117     Specification().groupBy("BX")
0118                    .groupBy("", "EXTEND_X").save()
0119   )
0120 )
0121 
0122 SiPixelPhase1DigisHitmap = DefaultHistoDigiCluster.clone(
0123   name = "digi_occupancy",
0124   title = "Digi Occupancy",
0125   ylabel = "#digis",
0126   dimensions = 0,
0127   specs = VPSet(
0128     Specification(PerModule).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName/row/col")
0129                    .groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName/row", "EXTEND_X")
0130                    .groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName", "EXTEND_Y")
0131                    .save(),
0132     Specification(PerModule).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName/col")
0133                    .groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName", "EXTEND_X")
0134                    .save(),
0135     Specification(PerModule).groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName/row")
0136                    .groupBy("PXBarrel/Shell/PXLayer/SignedLadder/PXModuleName", "EXTEND_X")
0137                    .save(),
0138     Specification(PerModule).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName/row/col")
0139                    .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName/row", "EXTEND_X")
0140                    .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName", "EXTEND_Y")
0141                    .save(),
0142     Specification(PerModule).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName/col")
0143                    .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName", "EXTEND_X")
0144                    .save(),
0145     Specification(PerModule).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName/row")
0146                    .groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade/PXModuleName", "EXTEND_X")
0147                    .save(),
0148     StandardSpecificationOccupancy,
0149   )
0150 )
0151 
0152 SiPixelPhase1DigisOccupancy = DefaultHistoReadout.clone(
0153   name = "occupancy",
0154   title = "Digi Occupancy",
0155   dimensions = 0,
0156   specs = VPSet(
0157     Specification(PerReadout).groupBy("PXBarrel/FED/Channel")
0158                              .groupBy("PXBarrel/FED", "EXTEND_X").save(),
0159 
0160     #Specification(PerReadout).groupBy("PXBarrel/FED/Channel/RocInLink") #Deactivating 2D maps giving redundant information
0161     #                         .groupBy("PXBarrel/FED/Channel", "EXTEND_Y")
0162     #                         .groupBy("PXBarrel/FED", "EXTEND_X").save(),
0163 
0164     Specification(PerReadout).groupBy("PXForward/FED/Channel")
0165                              .groupBy("PXForward/FED", "EXTEND_X").save(),
0166 
0167     #Specification(PerReadout).groupBy("PXForward/FED/Channel/RocInLink")
0168     #                         .groupBy("PXForward/FED/Channel", "EXTEND_Y")
0169     #                         .groupBy("PXForward/FED", "EXTEND_X").save(),
0170 
0171     Specification(PerReadout).groupBy("PXBarrel/FED")
0172                              .groupBy("PXBarrel", "EXTEND_X").save(),
0173 
0174     Specification(PerReadout).groupBy("PXForward/FED")
0175                              .groupBy("PXForward", "EXTEND_X").save(),
0176 
0177   )
0178 )
0179 
0180 from Configuration.Eras.Modifier_run3_common_cff import run3_common
0181 run3_common.toModify(SiPixelPhase1ClustersNdigisInclusive, range_max = 150000, range_nbins=150)
0182 
0183 
0184 # This has to match the order of the names in the C++ enum.
0185 SiPixelPhase1DigisConf = cms.VPSet(
0186   SiPixelPhase1DigisADC,
0187   SiPixelPhase1DigisNdigis,
0188   SiPixelPhase1ClustersNdigisInclusive,
0189   SiPixelPhase1DigisNdigisPerFED,
0190   SiPixelPhase1DigisNdigisPerFEDtrend,
0191   SiPixelPhase1DigisEvents,
0192   SiPixelPhase1DigisHitmap,
0193   SiPixelPhase1DigisOccupancy,
0194 )
0195 
0196 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0197 SiPixelPhase1DigisAnalyzer = DQMEDAnalyzer('SiPixelPhase1Digis',
0198         src = cms.InputTag("siPixelDigis"), 
0199         histograms = SiPixelPhase1DigisConf,
0200         geometry = SiPixelPhase1Geometry,
0201         triggerflags = trigger.SiPixelPhase1Triggers
0202 )
0203 
0204 SiPixelPhase1DigisHarvester = DQMEDHarvester("SiPixelPhase1Harvester",
0205         histograms = SiPixelPhase1DigisConf,
0206         geometry = SiPixelPhase1Geometry
0207 )