CMS 3D CMS Logo

SiPixelPhase1TrackEfficiency_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
4 import DQM.SiPixelPhase1Common.TriggerEventFlag_cfi as trigger
5 
6 SiPixelPhase1TrackEfficiencyValid = DefaultHistoTrack.clone(
7  name = "valid",
8  title = "Valid Hits",
9  range_min = 0, range_max = 50, range_nbins = 50,
10  xlabel = "valid hits",
11  dimensions = 0,
12 
13  specs = VPSet(
14  StandardSpecifications1D_Num,
15  #StandardSpecification2DProfile_Num, #for this we have the on track clusters map (i.e the same thing)
16 
17  Specification().groupBy("PXBarrel/PXLayer/Event") #this will produce inclusive counts per Layer/Disk
18  .reduce("COUNT")
19  .groupBy("PXBarrel/PXLayer")
20  .save(nbins=50, xmin=0, xmax=1500),
21  Specification().groupBy("PXForward/PXDisk/Event")
22  .reduce("COUNT")
23  .groupBy("PXForward/PXDisk/")
24  .save(nbins=50, xmin=0, xmax=1500),
25  )
26 )
27 
28 SiPixelPhase1TrackEfficiencyInactive = DefaultHistoTrack.clone(
29  name = "inactive",
30  title = "Inactive Hits",
31  xlabel = "inactive hits",
32  range_min = 0, range_max = 25, range_nbins = 25,
33  dimensions = 0,
34 
35  specs = VPSet(
36  StandardSpecification2DProfile_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=50, xmin=0, xmax=100),
42  Specification().groupBy("PXForward/PXDisk/Event")
43  .reduce("COUNT")
44  .groupBy("PXForward/PXDisk/")
45  .save(nbins=50, xmin=0, xmax=100),
46  )
47 )
48 
49 SiPixelPhase1TrackEfficiencyMissing = DefaultHistoTrack.clone(
50  name = "missing",
51  title = "Missing Hits",
52  range_min = 0, range_max = 25, range_nbins = 25,
53  xlabel = "missing hits",
54  dimensions = 0,
55 
56  specs = VPSet(
57  StandardSpecifications1D_Num,
58  StandardSpecification2DProfile_Num,
59 
60  Specification().groupBy("PXBarrel/PXLayer/Event") #this will produce inclusive counts per Layer/Disk
61  .reduce("COUNT")
62  .groupBy("PXBarrel/PXLayer")
63  .save(nbins=50, xmin=0, xmax=100),
64  Specification().groupBy("PXForward/PXDisk/Event")
65  .reduce("COUNT")
66  .groupBy("PXForward/PXDisk/")
67  .save(nbins=50, xmin=0, xmax=100),
68  )
69 )
70 
71 SiPixelPhase1TrackEfficiencyEfficiency = SiPixelPhase1TrackEfficiencyValid.clone(
72  name = "hitefficiency",
73  title = "Hit Efficiency",
74  xlabel = "#valid/(#valid+#missing)",
75  dimensions = 1,
76  specs = VPSet(
77  #2D profile maps per layer
78  StandardSpecification2DProfile,
79 
80  #profiles per layer and shell
81  Specification(PerLadder).groupBy("PXBarrel/Shell/PXLayer/SignedLadder")
82  .reduce("MEAN")
83  .groupBy("PXBarrel/Shell/PXLayer", "EXTEND_X")
84  .save(),
85  Specification(PerLadder).groupBy("PXForward/HalfCylinder/PXRing/PXDisk/SignedBlade")
86  .reduce("MEAN")
87  .groupBy("PXForward/HalfCylinder/PXRing/PXDisk", "EXTEND_X")
88  .save(),
89  #per layer
90  Specification().groupBy("PXBarrel/PXLayer")
91  .reduce("MEAN")
92  .groupBy("PXBarrel", "EXTEND_X")
93  .save(),
94  Specification().groupBy("PXForward/PXDisk")
95  .reduce("MEAN")
96  .groupBy("PXForward", "EXTEND_X")
97  .save()
98 
99  #StandardSpecificationPixelmapProfile
100  )
101 )
102 
103 SiPixelPhase1TrackEfficiencyVertices= DefaultHistoTrack.clone(
104  name = "num_vertices",
105  title = "PrimaryVertices",
106  xlabel= "# Vertices",
107  dimensions = 1,
108  range_min = -0.5,
109  range_max = 100.5,
110  range_nbins =101,
111  specs = VPSet(
112  Specification().groupBy("")
113  .save(),
114  Specification().groupBy("/Lumisection")
115  .reduce("MEAN")
116  .groupBy("","EXTEND_X")
117  .save()
118  )
119 )
120 
121 
122 
123 SiPixelPhase1TrackEfficiencyConf = cms.VPSet(
124  SiPixelPhase1TrackEfficiencyValid,
125  SiPixelPhase1TrackEfficiencyMissing,
126  SiPixelPhase1TrackEfficiencyInactive,
127  SiPixelPhase1TrackEfficiencyEfficiency,
128  SiPixelPhase1TrackEfficiencyVertices
129 )
130 
131 
132 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
133 SiPixelPhase1TrackEfficiencyAnalyzer = DQMEDAnalyzer('SiPixelPhase1TrackEfficiency',
134  clusters = cms.InputTag("siPixelClusters"),
135  tracks = cms.InputTag("generalTracks"),
136  primaryvertices = cms.InputTag("offlinePrimaryVertices"),
137  histograms = SiPixelPhase1TrackEfficiencyConf,
138  geometry = SiPixelPhase1Geometry,
139  triggerflags = trigger.SiPixelPhase1Triggers
140 )
141 
142 SiPixelPhase1TrackEfficiencyHarvester = DQMEDHarvester("SiPixelPhase1Harvester",
143  histograms = SiPixelPhase1TrackEfficiencyConf,
144  geometry = SiPixelPhase1Geometry
145 )
DQM Environment
save
Definition: cuy.py:1163