Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:08:28

0001 import FWCore.ParameterSet.Config as cms
0002 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
0003 from DQM.SiPixelPhase1Common.HistogramManager_cfi import *
0004 import DQM.SiPixelPhase1Common.TriggerEventFlag_cfi as trigger
0005 
0006 SiPixelPhase1TrackEfficiencyValid = DefaultHistoTrack.clone(
0007   name = "valid",
0008   title = "Valid Hits",
0009   range_min = 0, range_max = 50, range_nbins = 50,
0010   xlabel = "valid hits",
0011   dimensions = 0,
0012 
0013   specs = VPSet(
0014     StandardSpecifications1D_Num,
0015     #StandardSpecification2DProfile_Num, #for this we have the on track clusters map (i.e the same thing)
0016 
0017     Specification().groupBy("PXBarrel/PXLayer/Event") #this will produce inclusive counts per Layer/Disk
0018                              .reduce("COUNT")    
0019                              .groupBy("PXBarrel/PXLayer")
0020                              .save(nbins=50, xmin=0, xmax=1500),
0021     Specification().groupBy("PXForward/PXDisk/Event")
0022                              .reduce("COUNT")    
0023                              .groupBy("PXForward/PXDisk/")
0024                              .save(nbins=50, xmin=0, xmax=1500),
0025   )
0026 )
0027 
0028 SiPixelPhase1TrackEfficiencyInactive = DefaultHistoTrack.clone(
0029   name = "inactive",
0030   title = "Inactive Hits",
0031   xlabel = "inactive hits",
0032   range_min = 0, range_max = 25, range_nbins = 25,
0033   dimensions = 0,
0034 
0035   specs = VPSet(
0036     StandardSpecification2DProfile_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=50, xmin=0, xmax=100),
0042     Specification().groupBy("PXForward/PXDisk/Event")
0043                              .reduce("COUNT")    
0044                              .groupBy("PXForward/PXDisk/")
0045                              .save(nbins=50, xmin=0, xmax=100),
0046   )
0047 )
0048 
0049 SiPixelPhase1TrackEfficiencyMissing = DefaultHistoTrack.clone(
0050   name = "missing",
0051   title = "Missing Hits",
0052   range_min = 0, range_max = 25, range_nbins = 25,
0053   xlabel = "missing hits",
0054   dimensions = 0,
0055 
0056   specs = VPSet(
0057     StandardSpecifications1D_Num,
0058     StandardSpecification2DProfile_Num,
0059 
0060     Specification().groupBy("PXBarrel/PXLayer/Event") #this will produce inclusive counts per Layer/Disk
0061                              .reduce("COUNT")    
0062                              .groupBy("PXBarrel/PXLayer")
0063                              .save(nbins=50, xmin=0, xmax=100),
0064     Specification().groupBy("PXForward/PXDisk/Event")
0065                              .reduce("COUNT")    
0066                              .groupBy("PXForward/PXDisk/")
0067                              .save(nbins=50, xmin=0, xmax=100),
0068   )
0069 )
0070 
0071 SiPixelPhase1TrackEfficiencyEfficiency = SiPixelPhase1TrackEfficiencyValid.clone(
0072   name = "hitefficiency",
0073   title = "Hit Efficiency",
0074   xlabel = "#valid/(#valid+#missing)",
0075   dimensions = 1,
0076   specs = VPSet(
0077     StandardSpecification2DProfile,
0078     
0079     #profiles per layer and shell
0080     Specification(PerLadder).groupBy("PXBarrel/Shell/PXLayer/SignedLadder")
0081                             .reduce("MEAN")
0082                             .groupBy("PXBarrel/Shell/PXLayer", "EXTEND_X")
0083                             .save(),
0084     Specification(PerLadder).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade")
0085                             .reduce("MEAN")
0086                             .groupBy("PXForward/HalfCylinder/PXRing/PXDisk", "EXTEND_X")
0087                             .save(),
0088     #per layer
0089     Specification().groupBy("PXBarrel/PXLayer")
0090                    .reduce("MEAN")
0091                    .groupBy("PXBarrel", "EXTEND_X")
0092                    .save(),
0093     Specification().groupBy("PXForward/PXDisk")
0094                    .reduce("MEAN")
0095                    .groupBy("PXForward", "EXTEND_X")
0096                    .save(),
0097 
0098     Specification(PerLayer2D)
0099             .groupBy("PXBarrel/PXLayer/Lumisection")
0100             .groupBy("PXBarrel/PXLayer", "EXTEND_X")
0101                         .groupBy("PXBarrel", "EXTEND_Y")
0102                         .reduce("MEAN")
0103                         .save(),
0104     Specification(PerLayer2D)
0105             .groupBy("PXForward/PXDisk/Lumisection")
0106                         .groupBy("PXForward/PXDisk", "EXTEND_X")
0107                         .groupBy("PXForward", "EXTEND_Y")
0108                         .reduce("MEAN")
0109                         .save(),
0110   )
0111 )
0112 
0113 SiPixelPhase1TrackEfficiencyVertices= DefaultHistoTrack.clone(
0114     name = "num_vertices",
0115     title = "PrimaryVertices",
0116     xlabel= "# Vertices",
0117     dimensions = 1,
0118     range_min = -0.5,
0119     range_max = 100.5, 
0120     range_nbins =101,
0121     specs = VPSet(
0122         Specification().groupBy("")
0123                    .save(),
0124         Specification().groupBy("/Lumisection")
0125                    .reduce("MEAN")
0126                    .groupBy("","EXTEND_X")
0127                    .save()
0128    )
0129 )
0130 
0131 from Configuration.Eras.Modifier_run3_common_cff import run3_common
0132 run3_common.toModify(SiPixelPhase1TrackEfficiencyVertices, range_max = 150.5, range_nbins=151)
0133 
0134 SiPixelPhase1TrackEfficiencyConf = cms.VPSet(
0135   SiPixelPhase1TrackEfficiencyValid,
0136   SiPixelPhase1TrackEfficiencyMissing,
0137   SiPixelPhase1TrackEfficiencyInactive,
0138   SiPixelPhase1TrackEfficiencyEfficiency,
0139   SiPixelPhase1TrackEfficiencyVertices
0140 )
0141 
0142 
0143 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0144 SiPixelPhase1TrackEfficiencyAnalyzer = DQMEDAnalyzer('SiPixelPhase1TrackEfficiency',
0145         clusters = cms.InputTag("siPixelClusters"),
0146         tracks = cms.InputTag("generalTracks"),
0147         trajectoryInput = cms.InputTag("refittedForPixelDQM"), 
0148         primaryvertices = cms.InputTag("offlinePrimaryVertices"),
0149         tracker = cms.InputTag("MeasurementTrackerEvent"),
0150         histograms = SiPixelPhase1TrackEfficiencyConf,
0151         geometry = SiPixelPhase1Geometry,
0152         triggerflags = trigger.SiPixelPhase1Triggers,
0153         VertexCut = cms.untracked.bool(True)
0154 )
0155 
0156 SiPixelPhase1TrackEfficiencyHarvester = DQMEDHarvester("SiPixelPhase1Harvester",
0157         histograms = SiPixelPhase1TrackEfficiencyConf,
0158         geometry = SiPixelPhase1Geometry
0159 )