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 SiPixelPhase1TrackResidualsResidualsX = DefaultHistoTrack.clone(
0007 name = "residual_x",
0008 title = "Track Residuals X",
0009 range_min = -0.1, range_max = 0.1, range_nbins = 100,
0010 xlabel = "(x_rec - x_pred) [cm]",
0011 dimensions = 1,
0012 specs = VPSet(
0013 StandardSpecification2DProfile,
0014 Specification().groupBy("PXBarrel/PXLayer").saveAll(),
0015 Specification().groupBy("PXForward/PXDisk").saveAll(),
0016
0017 Specification().groupBy("PXBarrel/PXLayer/LumiBlock")
0018 .reduce("MEAN")
0019 .groupBy("PXBarrel/PXLayer", "EXTEND_X")
0020 .save(),
0021
0022 Specification().groupBy("PXForward/PXDisk/LumiBlock")
0023 .reduce("MEAN")
0024 .groupBy("PXForward/PXDisk", "EXTEND_X")
0025 .save(),
0026
0027 Specification(PerLayer1D).groupBy("PXBarrel/Shell/PXLayer").save(),
0028 Specification(PerLayer1D).groupBy("PXForward/HalfCylinder/PXRing/PXDisk").save()
0029 )
0030 )
0031
0032 SiPixelPhase1TrackResidualsResidualsY = SiPixelPhase1TrackResidualsResidualsX.clone(
0033 name = "residual_y",
0034 title = "Track Residuals Y",
0035 xlabel = "(y_rec - y_pred) [cm]",
0036 )
0037
0038 SiPixelPhase1TrackResidualsResOnEdgeX = DefaultHistoTrack.clone(
0039 name = "residual_OnEdge_x",
0040 title = "Track Residuals X (OnEdge Clusters)",
0041 range_min = -0.1, range_max = 0.1, range_nbins = 100,
0042 xlabel = "(x_rec - x_pred) [cm]",
0043 dimensions = 1,
0044 specs = VPSet(
0045 Specification().groupBy("PXBarrel/PXLayer").saveAll(),
0046 Specification().groupBy("PXForward/PXDisk").saveAll(),
0047 Specification(PerLayer1D).groupBy("PXBarrel/Shell/PXLayer").save(),
0048 Specification(PerLayer1D).groupBy("PXForward/HalfCylinder/PXRing/PXDisk").save()
0049 )
0050 )
0051
0052 SiPixelPhase1TrackResidualsResOnEdgeY = SiPixelPhase1TrackResidualsResOnEdgeX.clone(
0053 name = "residual_OnEdge_y",
0054 title = "Track Residuals Y (OnEdge Clusters)",
0055 xlabel = "(y_rec - y_pred) [cm]",
0056 )
0057
0058
0059 SiPixelPhase1TrackResidualsResOtherBadX = DefaultHistoTrack.clone(
0060 name = "residual_OtherBad_x",
0061 title = "Track Residuals X (OtherBad Clusters)",
0062 range_min = -0.1, range_max = 0.1, range_nbins = 100,
0063 xlabel = "(x_rec - x_pred) [cm]",
0064 dimensions = 1,
0065 specs = VPSet(
0066 Specification().groupBy("PXBarrel/PXLayer").saveAll(),
0067 Specification().groupBy("PXForward/PXDisk").saveAll(),
0068 Specification(PerLayer1D).groupBy("PXBarrel/Shell/PXLayer").save(),
0069 Specification(PerLayer1D).groupBy("PXForward/HalfCylinder/PXRing/PXDisk").save()
0070 )
0071 )
0072
0073 SiPixelPhase1TrackResidualsResOtherBadY = SiPixelPhase1TrackResidualsResOtherBadX.clone(
0074 name = "residual_OtherBad_y",
0075 title = "Track Residuals Y (OtherBad Clusters)",
0076 xlabel = "(y_rec - y_pred) [cm]",
0077 )
0078
0079
0080 SiPixelPhase1TrackNormResX = DefaultHistoTrack.clone(
0081 topFolderName= cms.string("PixelPhase1/Tracks/ResidualsExtra"),
0082 name = "NormRes_x",
0083 title = "Normalized Residuals X",
0084 range_min = -5, range_max = 5, range_nbins = 100,
0085 xlabel = "(x_rec - x_pred)/x_err",
0086 dimensions = 1,
0087 specs = VPSet(
0088 Specification().groupBy("PXBarrel/PXLayer").saveAll(),
0089 Specification().groupBy("PXForward/PXDisk").saveAll(),
0090 Specification(PerLayer1D).groupBy("PXBarrel/Shell/PXLayer").save(),
0091 Specification(PerLayer1D).groupBy("PXForward/HalfCylinder/PXRing/PXDisk").save()
0092 )
0093 )
0094
0095 SiPixelPhase1TrackNormResY = SiPixelPhase1TrackNormResX.clone(
0096 name = "NormRes_y",
0097 title = "Normalized Residuals Y",
0098 range_min = -5, range_max = 5, range_nbins = 100,
0099 xlabel = "(y_rec - y_pred)/y_err",
0100 )
0101
0102 SiPixelPhase1TrackDRnRX = DefaultHistoTrack.clone(
0103 topFolderName= cms.string("PixelPhase1/Tracks/ResidualsExtra"),
0104 name = "DRnR_x",
0105 title = "Distribution of RMS of Normalized Residuals X",
0106 range_min = -5, range_max = 5, range_nbins = 100,
0107 xlabel = "#sigma_{(x_rec - x_pred)/x_err}",
0108 dimensions = 1,
0109 specs = VPSet(
0110 StandardSpecification2DProfile
0111 )
0112 )
0113
0114 SiPixelPhase1TrackDRnRY = SiPixelPhase1TrackDRnRX.clone(
0115 name = "DRnR_y",
0116 title = "Distribution of RMS of Normalized Residuals Y",
0117 range_min = -5, range_max = 5, range_nbins = 100,
0118 xlabel = "#sigma_{(y_rec - y_pred)/y_err}",
0119 )
0120
0121
0122 SiPixelPhase1TrackResidualsConf = cms.VPSet(
0123 SiPixelPhase1TrackResidualsResidualsX,
0124 SiPixelPhase1TrackResidualsResidualsY,
0125 SiPixelPhase1TrackResidualsResOnEdgeX,
0126 SiPixelPhase1TrackResidualsResOnEdgeY,
0127 SiPixelPhase1TrackResidualsResOtherBadX,
0128 SiPixelPhase1TrackResidualsResOtherBadY,
0129 SiPixelPhase1TrackNormResX,
0130 SiPixelPhase1TrackNormResY,
0131 SiPixelPhase1TrackDRnRX,
0132 SiPixelPhase1TrackDRnRY
0133 )
0134
0135 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0136 SiPixelPhase1TrackResidualsAnalyzer = DQMEDAnalyzer('SiPixelPhase1TrackResiduals',
0137 trajectoryInput = cms.string("refittedForPixelDQM"),
0138 Tracks = cms.InputTag("refittedForPixelDQM"),
0139 vertices = cms.InputTag("offlinePrimaryVertices"),
0140 histograms = SiPixelPhase1TrackResidualsConf,
0141 geometry = SiPixelPhase1Geometry,
0142 triggerflags = trigger.SiPixelPhase1Triggers,
0143 VertexCut = cms.untracked.bool(True)
0144 )
0145
0146 SiPixelPhase1TrackResidualsHarvester = DQMEDHarvester("SiPixelPhase1Harvester",
0147 histograms = SiPixelPhase1TrackResidualsConf,
0148 geometry = SiPixelPhase1Geometry
0149 )