Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:13:36

0001 import FWCore.ParameterSet.Config as cms
0002 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
0003 
0004 from DQMOffline.Trigger.SiPixel_OfflineMonitoring_HistogramManager_cfi import *
0005 
0006 # order is important and it should follow ordering in hltSiPixelPhase1ClustersConf VPSet
0007 hltSiPixelPhase1ClustersCharge = hltDefaultHistoDigiCluster.clone(
0008   name = "charge",
0009   title = "Cluster Charge",
0010   range_min = 0, range_max = 200e3, range_nbins = 200,
0011   xlabel = "Charge (electrons)",
0012 
0013   specs = VPSet(
0014     #StandardSpecification2DProfile,
0015     hltStandardSpecificationPixelmapProfile,
0016     StandardSpecificationTrend,
0017 #    StandardSpecifications1D,
0018     hltStandardSpecifications1D,
0019     StandardSpecificationTrend2D
0020   )
0021 )
0022 
0023 hltSiPixelPhase1ClustersBigPixelCharge = DefaultHistoDigiCluster.clone(
0024   name = "bigpixelcharge",
0025   title = "Big Pixel Charge",
0026   range_min = 0, range_max = 80e3, range_nbins = 100,
0027   xlabel = "Charge (electrons)",
0028   enabled=False,
0029 
0030   specs = VPSet(
0031     Specification().groupBy("PXBarrel").save(),
0032     Specification().groupBy("PXForward").save(),
0033     Specification().groupBy("PXBarrel/PXLayer").save(),
0034     Specification().groupBy("PXForward/PXDisk").save()
0035   )
0036 )
0037 
0038 hltSiPixelPhase1ClustersNotBigPixelCharge = DefaultHistoDigiCluster.clone(
0039   name = "notbigpixelcharge",
0040   title = "Not Big Pixel Charge",
0041   range_min = 0, range_max = 80e3, range_nbins = 100,
0042   xlabel = "Charge (electrons)",
0043   enabled=False,
0044 
0045   specs = VPSet(
0046     Specification().groupBy("PXBarrel").save(),
0047     Specification().groupBy("PXForward").save(),
0048     Specification().groupBy("PXBarrel/PXLayer").save(),
0049     Specification().groupBy("PXForward/PXDisk").save()
0050   )
0051 )
0052 
0053 hltSiPixelPhase1ClustersSize = hltDefaultHistoDigiCluster.clone(
0054   enabled = cms.bool(False), # TO BE CHECKED IF NEEDED
0055   name = "size",
0056   title = "Total Cluster Size",
0057   range_min = 0, range_max = 30, range_nbins = 30,
0058   xlabel = "size[pixels]",
0059   specs = VPSet(
0060     #StandardSpecification2DProfile,
0061     hltStandardSpecificationPixelmapProfile,
0062     StandardSpecificationTrend,
0063 #    StandardSpecifications1D,
0064     hltStandardSpecifications1D,
0065     StandardSpecificationTrend2D
0066   )
0067 )
0068 
0069 hltSiPixelPhase1ClustersSizeX = hltDefaultHistoDigiCluster.clone(
0070   enabled = cms.bool(False), # TO BE CHECKED IF NEEDED
0071   name = "sizeX",
0072   title = "Cluster Size in X",
0073   range_min = 0, range_max = 30, range_nbins = 30,
0074   xlabel = "size[pixels]",
0075   specs = VPSet(
0076     #StandardSpecification2DProfile,
0077     #StandardSpecificationPixelmapProfile,
0078     #StandardSpecificationTrend,
0079 #    StandardSpecifications1D,
0080     hltStandardSpecifications1D,
0081     #StandardSpecificationTrend2D
0082   )
0083 )
0084 
0085 hltSiPixelPhase1ClustersSizeY = hltDefaultHistoDigiCluster.clone(
0086   enabled = cms.bool(False), # TO BE CHECKED IF NEEDED
0087   name = "sizeY",
0088   title = "Cluster Size in Y",
0089   range_min = 0, range_max = 30, range_nbins = 30,
0090   xlabel = "size[pixels]",
0091   specs = VPSet(
0092     #StandardSpecification2DProfile,
0093     #StandardSpecificationPixelmapProfile,
0094     #StandardSpecificationTrend,
0095 #    StandardSpecifications1D,
0096     hltStandardSpecifications1D,
0097     #StandardSpecificationTrend2D
0098   )
0099 )
0100 
0101 
0102 hltSiPixelPhase1ClustersNClusters = hltDefaultHistoDigiCluster.clone(
0103   name = "clusters",
0104   title = "Clusters",
0105 #  range_min = 0, range_max = 40000, range_nbins = 2000,
0106   range_min = 0, range_max = 40000, range_nbins = 40000,
0107   xlabel = "clusters",
0108   dimensions = 0,
0109   specs = VPSet(
0110 #    StandardSpecificationOccupancy,
0111 #    StandardSpecification2DProfile_Num,
0112     StandardSpecificationTrend_Num,
0113     hltStandardSpecifications1D_Num,
0114 
0115   )
0116 )
0117 
0118 
0119 hltSiPixelPhase1ClustersNClustersInclusive = hltDefaultHistoDigiCluster.clone(
0120   name = "clusters",
0121   title = "Clusters",
0122 #  range_min = 0, range_max = 40000, range_nbins = 2000,
0123   range_min = 0, range_max = 40000, range_nbins = 40000,
0124   xlabel = "clusters",
0125   dimensions = 0,
0126   specs = VPSet(
0127     StandardSpecificationInclusive_Num,
0128 #    Specification().groupBy("PXAll").save(),
0129   )
0130 )
0131 
0132 
0133 hltSiPixelPhase1ClustersEventrate = hltDefaultHistoDigiCluster.clone(
0134   name = "clustereventrate",
0135   title = "Number of Events with clusters",
0136   ylabel = "#Events",
0137   dimensions = 0,
0138   specs = VPSet(
0139     Specification().groupBy("Lumisection")
0140                    .groupBy("", "EXTEND_X").save(),
0141     Specification().groupBy("BX")
0142                    .groupBy("", "EXTEND_X").save()
0143     )
0144 
0145 )
0146 
0147 
0148 hltSiPixelPhase1ClustersPositionB = hltDefaultHistoDigiCluster.clone(
0149   name = "clusterposition_zphi",
0150   title = "Cluster Positions",
0151   range_min   =  -60, range_max   =  60, range_nbins   = 600,
0152   range_y_min = -3.2, range_y_max = 3.2, range_y_nbins = 200,
0153   xlabel = "Global Z", ylabel = "Global \phi",
0154   dimensions = 2,
0155   specs = VPSet(
0156     Specification().groupBy("PXBarrel/PXLayer").save(),
0157 #    Specification().groupBy("PXBarrel").save(),
0158   )
0159 )
0160 
0161 hltSiPixelPhase1ClustersPositionF = hltDefaultHistoDigiCluster.clone(
0162   name = "clusterposition_xy",
0163   title = "Cluster Positions",
0164   xlabel = "Global X", ylabel = "Global Y",
0165   range_min   = -20, range_max   = 20, range_nbins   = 200,
0166   range_y_min = -20, range_y_max = 20, range_y_nbins = 200,
0167   dimensions = 2,
0168   specs = VPSet(
0169     Specification().groupBy("PXForward/PXDisk").save(),
0170 #    Specification().groupBy("PXForward").save(),
0171   )
0172 )
0173 
0174 hltSiPixelPhase1ClustersPositionXZ = hltDefaultHistoDigiCluster.clone(
0175   enabled = False, # only for debugging geometry
0176   name = "clusterposition_xz",
0177   title = "Cluster Positions",
0178   xlabel = "Global X", ylabel = "Global Z",
0179   range_min   = -20, range_max   = 20, range_nbins   = 200,
0180   range_y_min = -60, range_y_max = 60, range_y_nbins = 1200,
0181   dimensions = 2,
0182   specs = VPSet(
0183   )
0184 )
0185 
0186 hltSiPixelPhase1ClustersPositionYZ = hltDefaultHistoDigiCluster.clone(
0187   enabled = False, # only for debugging geometry
0188   name = "clusterposition_yz",
0189   title = "Cluster Positions",
0190   xlabel = "Global Y", ylabel = "Global Z",
0191   range_min   = -20, range_max   = 20, range_nbins   = 200,
0192   range_y_min = -60, range_y_max = 60, range_y_nbins = 1200,
0193   dimensions = 2,
0194   specs = VPSet(
0195   )
0196 )
0197 
0198 hltSiPixelPhase1ClustersSizeVsEta = hltDefaultHistoDigiCluster.clone(
0199   name = "sizeyvseta",
0200   title = "Cluster Size along Beamline vs. Cluster position #eta",
0201   xlabel = "Cluster #eta",
0202   ylabel = "length [pixels]",
0203   range_min = -3.2, range_max  = 3.2, range_nbins   = 40,
0204   range_y_min =  0, range_y_max = 40, range_y_nbins = 40,
0205   dimensions = 2,
0206   specs = VPSet(
0207     Specification().groupBy("PXBarrel").save()
0208   )
0209 )
0210 
0211 hltSiPixelPhase1ClustersReadoutCharge = hltDefaultHistoReadout.clone(
0212   enabled = cms.bool(False),
0213   name = "charge",
0214   title = "Cluster Charge",
0215   range_min = 0, range_max = 200e3, range_nbins = 200, ## e-
0216   xlabel = "Charge (electrons)",
0217   specs = VPSet(
0218     Specification(PerReadout).groupBy("PXBarrel/Shell/Sector").save(),
0219     Specification(PerReadout).groupBy("PXForward/HalfCylinder").save(),
0220 
0221     Specification(PerReadout).groupBy("PXBarrel/Shell/Sector/OnlineBlock")
0222                              .groupBy("PXBarrel/Shell/Sector", "EXTEND_Y").save(),
0223     Specification(PerReadout).groupBy("PXForward/HalfCylinder/OnlineBlock")
0224                              .groupBy("PXForward/HalfCylinder", "EXTEND_Y").save(),
0225   )
0226 )
0227 
0228 hltSiPixelPhase1ClustersReadoutNClusters = hltDefaultHistoReadout.clone(
0229   enabled = cms.bool(False),
0230   name = "clusters",
0231   title = "Clusters",
0232   range_min = 0, range_max = 40000, range_nbins = 40000,
0233   xlabel = "clusters",
0234   dimensions = 0,
0235   specs = VPSet(
0236     Specification(PerReadout).groupBy("PXBarrel/Shell/Sector/DetId/Event").reduce("COUNT")
0237                              .groupBy("PXBarrel/Shell/Sector").save(),
0238     Specification(PerReadout).groupBy("PXForward/HalfCylinder/DetId/Event").reduce("COUNT")
0239                              .groupBy("PXForward/HalfCylinder").save(),
0240 
0241     Specification(PerReadout).groupBy("PXBarrel/Shell/Sector/DetId/Event").reduce("COUNT")
0242                              .groupBy("PXBarrel/Shell/Sector/Lumisection").reduce("MEAN")
0243                              .groupBy("PXBarrel/Shell/Sector", "EXTEND_X").save(),
0244     Specification(PerReadout).groupBy("PXForward/HalfCylinder/DetId/Event").reduce("COUNT")
0245                              .groupBy("PXForward/HalfCylinder/Lumisection").reduce("MEAN")
0246                              .groupBy("PXForward/HalfCylinder", "EXTEND_X").save(),
0247   )
0248 )
0249 
0250 hltSiPixelPhase1ClustersPixelToStripRatio = hltDefaultHistoDigiCluster.clone(
0251   name = "cluster_ratio",
0252   title = "Pixel to Strip clusters ratio",
0253 
0254   xlabel = "ratio",
0255   dimensions = 1,
0256 
0257   specs = VPSet(
0258     Specification().groupBy("PXAll").save(100, 0, 1),
0259     Specification().groupBy("PXAll/Lumisection")
0260                    .reduce("MEAN")
0261                    .groupBy("PXAll", "EXTEND_X")
0262                    .save(),
0263     Specification().groupBy("PXAll/BX")
0264                    .reduce("MEAN")
0265                    .groupBy("PXAll", "EXTEND_X")
0266                    .save(),
0267   )
0268 )
0269 
0270 hltSiPixelPhase1ClustersConf = cms.VPSet(
0271   hltSiPixelPhase1ClustersCharge,
0272   hltSiPixelPhase1ClustersBigPixelCharge,
0273   hltSiPixelPhase1ClustersNotBigPixelCharge,
0274   hltSiPixelPhase1ClustersSize,
0275   hltSiPixelPhase1ClustersSizeX,
0276   hltSiPixelPhase1ClustersSizeY,
0277   hltSiPixelPhase1ClustersNClusters,
0278   hltSiPixelPhase1ClustersNClustersInclusive,
0279   hltSiPixelPhase1ClustersEventrate,
0280   hltSiPixelPhase1ClustersPositionB,
0281   hltSiPixelPhase1ClustersPositionF,
0282   hltSiPixelPhase1ClustersPositionXZ,
0283   hltSiPixelPhase1ClustersPositionYZ,
0284   hltSiPixelPhase1ClustersSizeVsEta,
0285   hltSiPixelPhase1ClustersReadoutCharge,
0286   hltSiPixelPhase1ClustersReadoutNClusters,
0287   hltSiPixelPhase1ClustersPixelToStripRatio
0288 )
0289 
0290 ## Uncomment to add trigger event flag settings
0291 import DQM.SiPixelPhase1Common.TriggerEventFlag_cfi as triggerflag
0292 hltSiPixelPhase1ClustersTriggers = cms.VPSet(
0293 #   triggerflag.genericTriggerEventFlag4HLTdb,
0294 #   triggerflag.genericTriggerEventFlag4L1bd,
0295 )
0296 
0297 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0298 hltSiPixelPhase1ClustersAnalyzer = DQMEDAnalyzer('SiPixelPhase1Clusters',
0299         pixelSrc    = cms.InputTag("hltSiPixelClusters"),
0300         stripSrc    = cms.InputTag("hltSiStripRawToClustersFacility"),
0301         histograms  = hltSiPixelPhase1ClustersConf,
0302         geometry    = hltSiPixelPhase1Geometry,
0303         triggerflag = hltSiPixelPhase1ClustersTriggers,
0304 )
0305 
0306 hltSiPixelPhase1ClustersHarvester = DQMEDHarvester("SiPixelPhase1Harvester",
0307         histograms = hltSiPixelPhase1ClustersConf,
0308         geometry   = hltSiPixelPhase1Geometry
0309 )