CMS 3D CMS Logo

MuonIdVal.cc
Go to the documentation of this file.
2 
5  iConfig = ps;
6  inputMuonCollection_ = iConfig.getParameter<edm::InputTag>("inputMuonCollection");
7  inputDTRecSegment4DCollection_ = iConfig.getParameter<edm::InputTag>("inputDTRecSegment4DCollection");
8  inputCSCSegmentCollection_ = iConfig.getParameter<edm::InputTag>("inputCSCSegmentCollection");
9  inputMuonTimeExtraValueMap_ = iConfig.getParameter<edm::InputTag>("inputMuonTimeExtraValueMap");
10  inputMuonCosmicCompatibilityValueMap_ = iConfig.getParameter<edm::InputTag>("inputMuonCosmicCompatibilityValueMap");
11  inputMuonShowerInformationValueMap_ = iConfig.getParameter<edm::InputTag>("inputMuonShowerInformationValueMap");
12  useTrackerMuons_ = iConfig.getUntrackedParameter<bool>("useTrackerMuons");
13  useGlobalMuons_ = iConfig.getUntrackedParameter<bool>("useGlobalMuons");
14  useTrackerMuonsNotGlobalMuons_ = iConfig.getUntrackedParameter<bool>("useTrackerMuonsNotGlobalMuons");
15  useGlobalMuonsNotTrackerMuons_ = iConfig.getUntrackedParameter<bool>("useGlobalMuonsNotTrackerMuons");
16  makeEnergyPlots_ = iConfig.getUntrackedParameter<bool>("makeEnergyPlots");
17  makeTimePlots_ = iConfig.getUntrackedParameter<bool>("makeTimePlots");
18  make2DPlots_ = iConfig.getUntrackedParameter<bool>("make2DPlots");
19  makeAllChamberPlots_ = iConfig.getUntrackedParameter<bool>("makeAllChamberPlots");
20  makeCosmicCompatibilityPlots_ = iConfig.getUntrackedParameter<bool>("makeCosmicCompatibilityPlots");
21  makeShowerInformationPlots_ = iConfig.getUntrackedParameter<bool>("makeShowerInformationPlots");
23 
24  inputMuonCollectionToken_ = consumes<reco::MuonCollection>(inputMuonCollection_);
25  inputDTRecSegment4DCollectionToken_ = consumes<DTRecSegment4DCollection>(inputDTRecSegment4DCollection_);
26  inputCSCSegmentCollectionToken_ = consumes<CSCSegmentCollection>(inputCSCSegmentCollection_);
28  consumes<reco::MuonTimeExtraMap>(edm::InputTag(inputMuonTimeExtraValueMap_.label(), "combined"));
30  consumes<reco::MuonTimeExtraMap>(edm::InputTag(inputMuonTimeExtraValueMap_.label(), "csc"));
32  consumes<reco::MuonTimeExtraMap>(edm::InputTag(inputMuonTimeExtraValueMap_.label(), "dt"));
34  consumes<edm::ValueMap<reco::MuonCosmicCompatibility>>(inputMuonCosmicCompatibilityValueMap_);
36  consumes<edm::ValueMap<reco::MuonShower>>(inputMuonShowerInformationValueMap_);
37 
38  subsystemname_ = iConfig.getUntrackedParameter<std::string>("subSystemFolder", "YourSubsystem");
39 }
40 
42 
44  char name[100], title[200];
46 
47  // trackerMuon == 0; globalMuon == 1; trackerMuon && !globalMuon == 2;
48  // globalMuon && !trackerMuon == 3
49  for (unsigned int i = 0; i < 4; i++) {
50  if ((i == 0 && !useTrackerMuons_) || (i == 1 && !useGlobalMuons_))
51  continue;
53  continue;
54  if (i == 0)
55  ibooker.setCurrentFolder(baseFolder_ + "/TrackerMuons");
56  if (i == 1)
57  ibooker.setCurrentFolder(baseFolder_ + "/GlobalMuons");
58  if (i == 2)
59  ibooker.setCurrentFolder(baseFolder_ + "/TrackerMuonsNotGlobalMuons");
60  if (i == 3)
61  ibooker.setCurrentFolder(baseFolder_ + "/GlobalMuonsNotTrackerMuons");
62 
63  if (makeEnergyPlots_) {
64  hEnergyEMBarrel[i] = ibooker.book1D("hEnergyEMBarrel", "Energy in ECAL Barrel", 100, -0.5, 2.);
65  hEnergyHABarrel[i] = ibooker.book1D("hEnergyHABarrel", "Energy in HCAL Barrel", 100, -4., 12.);
66  hEnergyHO[i] = ibooker.book1D("hEnergyHO", "Energy HO", 100, -2., 5.);
67  hEnergyEMEndcap[i] = ibooker.book1D("hEnergyEMEndcap", "Energy in ECAL Endcap", 100, -0.5, 2.);
68  hEnergyHAEndcap[i] = ibooker.book1D("hEnergyHAEndcap", "Energy in HCAL Endcap", 100, -4., 12.);
69  }
70 
71  if (makeTimePlots_) {
72  hMuonTimeNDOF[i] = ibooker.book1D("hMuonTimeNDOF", "MuonTime NDOF", 52, -1.5, 50.5);
73  hMuonTimeTimeAtIpInOut[i] = ibooker.book1D("hMuonTimeTimeAtIpInOut", "MuonTime TimeAtIpInOut", 100, -20., 20.);
75  ibooker.book1D("hMuonTimeTimeAtIpInOutErr", "MuonTime TimeAtIpInOutErr", 100, 0., 8.);
76  hMuonTimeTimeAtIpOutIn[i] = ibooker.book1D("hMuonTimeTimeAtIpOutIn", "MuonTime TimeAtIpOutIn", 100, -1., 75.);
78  ibooker.book1D("hMuonTimeTimeAtIpOutInErr", "MuonTime TimeAtIpOutInErr", 100, 0., 8.);
80  ibooker.book1D("hMuonTimeExtraCombinedNDOF", "MuonTimeExtra Combined NDOF", 52, -1.5, 50.5);
82  ibooker.book1D("hMuonTimeExtraCombinedTimeAtIpInOut", "MuonTimeExtra Combined TimeAtIpInOut", 100, -20., 20.);
84  "hMuonTimeExtraCombinedTimeAtIpInOutErr", "MuonTimeExtra Combined TimeAtIpInOutErr", 100, 0., 8.);
86  ibooker.book1D("hMuonTimeExtraCombinedTimeAtIpOutIn", "MuonTimeExtra Combined TimeAtIpOutIn", 100, -1., 75.);
88  "hMuonTimeExtraCombinedTimeAtIpOutInErr", "MuonTimeExtra Combined TimeAtIpOutInErr", 100, 0., 8.);
89  hMuonTimeExtraCSCNDOF[i] = ibooker.book1D("hMuonTimeExtraCSCNDOF", "MuonTimeExtra CSC NDOF", 52, -1.5, 50.5);
91  ibooker.book1D("hMuonTimeExtraCSCTimeAtIpInOut", "MuonTimeExtra CSC TimeAtIpInOut", 100, -20., 20.);
93  ibooker.book1D("hMuonTimeExtraCSCTimeAtIpInOutErr", "MuonTimeExtra CSC TimeAtIpInOutErr", 100, 0., 8.);
95  ibooker.book1D("hMuonTimeExtraCSCTimeAtIpOutIn", "MuonTimeExtra CSC TimeAtIpOutIn", 100, -1., 75.);
97  ibooker.book1D("hMuonTimeExtraCSCTimeAtIpOutInErr", "MuonTimeExtra CSC TimeAtIpOutInErr", 100, 0., 8.);
98  hMuonTimeExtraDTNDOF[i] = ibooker.book1D("hMuonTimeExtraDTNDOF", "MuonTimeExtra DT NDOF", 52, -1.5, 50.5);
100  ibooker.book1D("hMuonTimeExtraDTTimeAtIpInOut", "MuonTimeExtra DT TimeAtIpInOut", 100, -20., 20.);
102  ibooker.book1D("hMuonTimeExtraDTTimeAtIpInOutErr", "MuonTimeExtra DT TimeAtIpInOutErr", 100, 0., 8.);
104  ibooker.book1D("hMuonTimeExtraDTTimeAtIpOutIn", "MuonTimeExtra DT TimeAtIpOutIn", 100, -1., 75.);
106  ibooker.book1D("hMuonTimeExtraDTTimeAtIpOutInErr", "MuonTimeExtra DT TimeAtIpOutInErr", 100, 0., 8.);
107  }
108 
109  hCaloCompat[i] = ibooker.book1D("hCaloCompat", "Calo Compatibility", 101, -0.05, 1.05);
110  hSegmentCompat[i] = ibooker.book1D("hSegmentCompat", "Segment Compatibility", 101, -0.05, 1.05);
111  if (make2DPlots_)
112  hCaloSegmentCompat[i] = ibooker.book2D(
113  "hCaloSegmentCompat", "Calo Compatibility vs. Segment Compatibility", 101, -0.05, 1.05, 101, -0.05, 1.05);
114  hMuonQualityTrkRelChi2[i] = ibooker.book1D("hMuonQualityTrkRelChi2", "MuonQuality TrkRelChi2", 100, 0., 1.5);
115  hMuonQualityStaRelChi2[i] = ibooker.book1D("hMuonQualityStaRelChi2", "MuonQuality StaRelChi2", 100, 0., 3.);
116  hMuonQualityTrkKink[i] = ibooker.book1D("hMuonQualityTrkKink", "MuonQuality TrkKink", 100, 0., 150.);
118  ibooker.book1D("hGlobalMuonPromptTightBool", "GlobalMuonPromptTight Boolean", 2, -0.5, 1.5);
119  hTMLastStationLooseBool[i] = ibooker.book1D("hTMLastStationLooseBool", "TMLastStationLoose Boolean", 2, -0.5, 1.5);
120  hTMLastStationTightBool[i] = ibooker.book1D("hTMLastStationTightBool", "TMLastStationTight Boolean", 2, -0.5, 1.5);
122  ibooker.book1D("hTM2DCompatibilityLooseBool", "TM2DCompatibilityLoose Boolean", 2, -0.5, 1.5);
124  ibooker.book1D("hTM2DCompatibilityTightBool", "TM2DCompatibilityTight Boolean", 2, -0.5, 1.5);
125  hTMOneStationLooseBool[i] = ibooker.book1D("hTMOneStationLooseBool", "TMOneStationLoose Boolean", 2, -0.5, 1.5);
126  hTMOneStationTightBool[i] = ibooker.book1D("hTMOneStationTightBool", "TMOneStationTight Boolean", 2, -0.5, 1.5);
128  "hTMLastStationOptimizedLowPtLooseBool", "TMLastStationOptimizedLowPtLoose Boolean", 2, -0.5, 1.5);
130  "hTMLastStationOptimizedLowPtTightBool", "TMLastStationOptimizedLowPtTight Boolean", 2, -0.5, 1.5);
132  ibooker.book1D("hGMTkChiCompatibilityBool", "GMTkChiCompatibility Boolean", 2, -0.5, 1.5);
134  ibooker.book1D("hGMStaChiCompatibilityBool", "GMStaChiCompatibility Boolean", 2, -0.5, 1.5);
135  hGMTkKinkTightBool[i] = ibooker.book1D("hGMTkKinkTightBool", "GMTkKinkTight Boolean", 2, -0.5, 1.5);
137  ibooker.book1D("hTMLastStationAngLooseBool", "TMLastStationAngLoose Boolean", 2, -0.5, 1.5);
139  ibooker.book1D("hTMLastStationAngTightBool", "TMLastStationAngTight Boolean", 2, -0.5, 1.5);
141  ibooker.book1D("hTMOneStationAngLooseBool", "TMOneStationAngLoose Boolean", 2, -0.5, 1.5);
143  ibooker.book1D("hTMOneStationAngTightBool", "TMOneStationAngTight Boolean", 2, -0.5, 1.5);
145  "hTMLastStationOptimizedBarrelLowPtLooseBool", "TMLastStationOptimizedBarrelLowPtLoose Boolean", 2, -0.5, 1.5);
147  "hTMLastStationOptimizedBarrelLowPtTightBool", "TMLastStationOptimizedBarrelLowPtTight Boolean", 2, -0.5, 1.5);
148 
151  ibooker.book1D("hCombinedCosmicCompat", "hCombinedCosmicCompatibility float", 40, 0., 10.);
152  hTimeCosmicCompat[i] = ibooker.book1D("hTimeCosmicCompat", "hTimeCosmicCompatibility float", 6, 0., 3.);
153  hB2BCosmicCompat[i] = ibooker.book1D("hB2BCosmicCompat", "Number of back-to-back partners", 10, 0, 10);
154  hOverlapCosmicCompat[i] = ibooker.book1D("hOverlapCosmicCompat", "Overlap between muons and 1Leg", 2, 0, 2);
155  }
156 
157  // by station
158  for (int station = 0; station < 4; ++station) {
160  sprintf(name, "hMuonShowerSizeT%i", station + 1);
161  sprintf(title, "Station %i Transverse Cluster Size", station + 1);
162  hMuonShowerSizeT[i][station] = ibooker.book1D(name, title, 1000, 0, 500);
163  sprintf(name, "hMuonShowerDeltaR%i", station + 1);
164  sprintf(title, "Station %i DeltaR", station + 1);
165  hMuonShowerDeltaR[i][station] = ibooker.book1D(name, title, 5000, 0, 0.5);
166  sprintf(name, "hMuonAllHits%i", station + 1);
167  sprintf(title, "Station %i Number of 1D DT or 2D CSC RecHits", station + 1);
168  hMuonAllHits[i][station] = ibooker.book1D(name, title, 400, 0, 400);
169  sprintf(name, "hMuonHitsFromSegments%i", station + 1);
170  sprintf(title, "Station %i Hits used by 4D DT or 3D CSC Segments", station + 1);
171  hMuonHitsFromSegments[i][station] = ibooker.book1D(name, title, 400, 0, 400);
172  sprintf(name, "hMuonUncorrelatedHits%i", station + 1);
173  sprintf(title, "Station %i Uncorrelated Hits", station + 1);
174  hMuonUncorrelatedHits[i][station] = ibooker.book1D(name, title, 400, 0, 400);
175  }
176 
177  sprintf(name, "hDT%iPullxPropErr", station + 1);
178  sprintf(title, "DT Station %i Pull X w/ Propagation Error Only", station + 1);
179  hDTPullxPropErr[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
180 
181  sprintf(name, "hDT%iPulldXdZPropErr", station + 1);
182  sprintf(title, "DT Station %i Pull DxDz w/ Propagation Error Only", station + 1);
183  hDTPulldXdZPropErr[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
184 
185  if (station < 3) {
186  sprintf(name, "hDT%iPullyPropErr", station + 1);
187  sprintf(title, "DT Station %i Pull Y w/ Propagation Error Only", station + 1);
188  hDTPullyPropErr[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
189 
190  sprintf(name, "hDT%iPulldYdZPropErr", station + 1);
191  sprintf(title, "DT Station %i Pull DyDz w/ Propagation Error Only", station + 1);
192  hDTPulldYdZPropErr[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
193  }
194 
195  sprintf(name, "hDT%iDistWithSegment", station + 1);
196  sprintf(title, "DT Station %i Dist When There Is A Segment", station + 1);
197  hDTDistWithSegment[i][station] = ibooker.book1D(name, title, 100, -140., 30.);
198 
199  sprintf(name, "hDT%iDistWithNoSegment", station + 1);
200  sprintf(title, "DT Station %i Dist When There Is No Segment", station + 1);
201  hDTDistWithNoSegment[i][station] = ibooker.book1D(name, title, 100, -140., 30.);
202 
203  sprintf(name, "hDT%iPullDistWithSegment", station + 1);
204  sprintf(title, "DT Station %i Pull Dist When There Is A Segment", station + 1);
205  hDTPullDistWithSegment[i][station] = ibooker.book1D(name, title, 100, -140., 30.);
206 
207  sprintf(name, "hDT%iPullDistWithNoSegment", station + 1);
208  sprintf(title, "DT Station %i Pull Dist When There Is No Segment", station + 1);
209  hDTPullDistWithNoSegment[i][station] = ibooker.book1D(name, title, 100, -140., 30.);
210 
211  sprintf(name, "hCSC%iPullxPropErr", station + 1);
212  sprintf(title, "CSC Station %i Pull X w/ Propagation Error Only", station + 1);
213  hCSCPullxPropErr[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
214 
215  sprintf(name, "hCSC%iPulldXdZPropErr", station + 1);
216  sprintf(title, "CSC Station %i Pull DxDz w/ Propagation Error Only", station + 1);
217  hCSCPulldXdZPropErr[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
218 
219  sprintf(name, "hCSC%iPullyPropErr", station + 1);
220  sprintf(title, "CSC Station %i Pull Y w/ Propagation Error Only", station + 1);
221  hCSCPullyPropErr[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
222 
223  sprintf(name, "hCSC%iPulldYdZPropErr", station + 1);
224  sprintf(title, "CSC Station %i Pull DyDz w/ Propagation Error Only", station + 1);
225  hCSCPulldYdZPropErr[i][station] = ibooker.book1D(name, title, 100, -50., 50.);
226 
227  sprintf(name, "hCSC%iDistWithSegment", station + 1);
228  sprintf(title, "CSC Station %i Dist When There Is A Segment", station + 1);
229  hCSCDistWithSegment[i][station] = ibooker.book1D(name, title, 100, -70., 20.);
230 
231  sprintf(name, "hCSC%iDistWithNoSegment", station + 1);
232  sprintf(title, "CSC Station %i Dist When There Is No Segment", station + 1);
233  hCSCDistWithNoSegment[i][station] = ibooker.book1D(name, title, 100, -70., 20.);
234 
235  sprintf(name, "hCSC%iPullDistWithSegment", station + 1);
236  sprintf(title, "CSC Station %i Pull Dist When There Is A Segment", station + 1);
237  hCSCPullDistWithSegment[i][station] = ibooker.book1D(name, title, 100, -70., 20.);
238 
239  sprintf(name, "hCSC%iPullDistWithNoSegment", station + 1);
240  sprintf(title, "CSC Station %i Pull Dist When There Is No Segment", station + 1);
241  hCSCPullDistWithNoSegment[i][station] = ibooker.book1D(name, title, 100, -70., 20.);
242  } // station
243  }
244 
245  if (make2DPlots_) {
246  ibooker.setCurrentFolder(baseFolder_);
248  ibooker.book2D("hSegmentIsAssociatedRZ", "R-Z of Associated Segments", 2140, -1070., 1070., 850, 0., 850.);
250  ibooker.book2D("hSegmentIsAssociatedXY", "X-Y of Associated Segments", 1700, -850., 850., 1700, -850., 850.);
252  "hSegmentIsNotAssociatedRZ", "R-Z of Not Associated Segments", 2140, -1070., 1070., 850, 0., 850.);
254  "hSegmentIsNotAssociatedXY", "X-Y of Not Associated Segments", 1700, -850., 850., 1700, -850., 850.);
255  hSegmentIsBestDrAssociatedRZ = ibooker.book2D("hSegmentIsBestDrAssociatedRZ",
256  "R-Z of Best in Station by #DeltaR Associated Segments",
257  2140,
258  -1070.,
259  1070.,
260  850,
261  0.,
262  850.);
263  hSegmentIsBestDrAssociatedXY = ibooker.book2D("hSegmentIsBestDrAssociatedXY",
264  "X-Y of Best in Station by #DeltaR Associated Segments",
265  1700,
266  -850.,
267  850.,
268  1700,
269  -850.,
270  850.);
271  hSegmentIsBestDrNotAssociatedRZ = ibooker.book2D("hSegmentIsBestDrNotAssociatedRZ",
272  "R-Z of Best in Station by #DeltaR Not Associated Segments",
273  2140,
274  -1070.,
275  1070.,
276  850,
277  0.,
278  850.);
279  hSegmentIsBestDrNotAssociatedXY = ibooker.book2D("hSegmentIsBestDrNotAssociatedXY",
280  "X-Y of Best in Station by #DeltaR Not Associated Segments",
281  1700,
282  -850.,
283  850.,
284  1700,
285  -850.,
286  850.);
287  }
288 
290  ibooker.setCurrentFolder(baseFolder_ + "/TrackerMuons");
291 
292  // by chamber
293  for (int station = 0; station < 4; ++station) {
294  // DT wheels: -2 -> 2
295  for (int wheel = 0; wheel < 5; ++wheel) {
296  // DT sectors: 1 -> 14
297  for (int sector = 0; sector < 14; ++sector) {
298  sprintf(name, "hDTChamberDx_%i_%i_%i", station + 1, wheel - 2, sector + 1);
299  sprintf(title, "DT Chamber Delta X: Station %i Wheel %i Sector %i", station + 1, wheel - 2, sector + 1);
300  hDTChamberDx[station][wheel][sector] = ibooker.book1D(name, title, 100, -100., 100.);
301 
302  if (station < 3) {
303  sprintf(name, "hDTChamberDy_%i_%i_%i", station + 1, wheel - 2, sector + 1);
304  sprintf(title, "DT Chamber Delta Y: Station %i Wheel %i Sector %i", station + 1, wheel - 2, sector + 1);
305  hDTChamberDy[station][wheel][sector] = ibooker.book1D(name, title, 100, -150., 150.);
306  }
307 
308  sprintf(name, "hDTChamberEdgeXWithSegment_%i_%i_%i", station + 1, wheel - 2, sector + 1);
309  sprintf(title,
310  "DT Chamber Edge X When There Is A Segment: Station %i Wheel "
311  "%i Sector %i",
312  station + 1,
313  wheel - 2,
314  sector + 1);
315  hDTChamberEdgeXWithSegment[station][wheel][sector] = ibooker.book1D(name, title, 100, -140., 30.);
316 
317  sprintf(name, "hDTChamberEdgeXWithNoSegment_%i_%i_%i", station + 1, wheel - 2, sector + 1);
318  sprintf(title,
319  "DT Chamber Edge X When There Is No Segment: Station %i "
320  "Wheel %i Sector %i",
321  station + 1,
322  wheel - 2,
323  sector + 1);
324  hDTChamberEdgeXWithNoSegment[station][wheel][sector] = ibooker.book1D(name, title, 100, -140., 30.);
325 
326  sprintf(name, "hDTChamberEdgeYWithSegment_%i_%i_%i", station + 1, wheel - 2, sector + 1);
327  sprintf(title,
328  "DT Chamber Edge Y When There Is A Segment: Station %i Wheel "
329  "%i Sector %i",
330  station + 1,
331  wheel - 2,
332  sector + 1);
333  hDTChamberEdgeYWithSegment[station][wheel][sector] = ibooker.book1D(name, title, 100, -140., 30.);
334 
335  sprintf(name, "hDTChamberEdgeYWithNoSegment_%i_%i_%i", station + 1, wheel - 2, sector + 1);
336  sprintf(title,
337  "DT Chamber Edge Y When There Is No Segment: Station %i "
338  "Wheel %i Sector %i",
339  station + 1,
340  wheel - 2,
341  sector + 1);
342  hDTChamberEdgeYWithNoSegment[station][wheel][sector] = ibooker.book1D(name, title, 100, -140., 30.);
343  } // sector
344  } // wheel
345 
346  // CSC endcaps: 1 -> 2
347  for (int endcap = 0; endcap < 2; ++endcap) {
348  // CSC rings: 1 -> 4
349  for (int ring = 0; ring < 4; ++ring) {
350  // CSC chambers: 1 -> 36
351  for (int chamber = 0; chamber < 36; ++chamber) {
352  sprintf(name, "hCSCChamberDx_%i_%i_%i_%i", endcap + 1, station + 1, ring + 1, chamber + 1);
353  sprintf(title,
354  "CSC Chamber Delta X: Endcap %i Station %i Ring %i Chamber %i",
355  endcap + 1,
356  station + 1,
357  ring + 1,
358  chamber + 1);
359  hCSCChamberDx[endcap][station][ring][chamber] = ibooker.book1D(name, title, 100, -50., 50.);
360 
361  sprintf(name, "hCSCChamberDy_%i_%i_%i_%i", endcap + 1, station + 1, ring + 1, chamber + 1);
362  sprintf(title,
363  "CSC Chamber Delta Y: Endcap %i Station %i Ring %i Chamber %i",
364  endcap + 1,
365  station + 1,
366  ring + 1,
367  chamber + 1);
368  hCSCChamberDy[endcap][station][ring][chamber] = ibooker.book1D(name, title, 100, -50., 50.);
369 
370  sprintf(name, "hCSCChamberEdgeXWithSegment_%i_%i_%i_%i", endcap + 1, station + 1, ring + 1, chamber + 1);
371  sprintf(title,
372  "CSC Chamber Edge X When There Is A Segment: Endcap %i "
373  "Station %i Ring %i Chamber %i",
374  endcap + 1,
375  station + 1,
376  ring + 1,
377  chamber + 1);
378  hCSCChamberEdgeXWithSegment[endcap][station][ring][chamber] = ibooker.book1D(name, title, 100, -70., 20.);
379 
380  sprintf(name, "hCSCChamberEdgeXWithNoSegment_%i_%i_%i_%i", endcap + 1, station + 1, ring + 1, chamber + 1);
381  sprintf(title,
382  "CSC Chamber Edge X When There Is No Segment: Endcap %i "
383  "Station %i Ring %i Chamber %i",
384  endcap + 1,
385  station + 1,
386  ring + 1,
387  chamber + 1);
388  hCSCChamberEdgeXWithNoSegment[endcap][station][ring][chamber] = ibooker.book1D(name, title, 100, -70., 20.);
389 
390  sprintf(name, "hCSCChamberEdgeYWithSegment_%i_%i_%i_%i", endcap + 1, station + 1, ring + 1, chamber + 1);
391  sprintf(title,
392  "CSC Chamber Edge Y When There Is A Segment: Endcap %i "
393  "Station %i Ring %i Chamber %i",
394  endcap + 1,
395  station + 1,
396  ring + 1,
397  chamber + 1);
398  hCSCChamberEdgeYWithSegment[endcap][station][ring][chamber] = ibooker.book1D(name, title, 100, -70., 20.);
399 
400  sprintf(name, "hCSCChamberEdgeYWithNoSegment_%i_%i_%i_%i", endcap + 1, station + 1, ring + 1, chamber + 1);
401  sprintf(title,
402  "CSC Chamber Edge Y When There Is No Segment: Endcap %i "
403  "Station %i Ring %i Chamber %i",
404  endcap + 1,
405  station + 1,
406  ring + 1,
407  chamber + 1);
408  hCSCChamberEdgeYWithNoSegment[endcap][station][ring][chamber] = ibooker.book1D(name, title, 100, -70., 20.);
409  } // chamber
410  } // ring
411  } // endcap
412  } // station
413  }
414 }
415 
417  using namespace edm;
418  using namespace reco;
419 
428 
430 
431  unsigned int muonIdx = 0;
432  for (MuonCollection::const_iterator muon = muonCollectionH_->begin(); muon != muonCollectionH_->end(); ++muon) {
433  // trackerMuon == 0; globalMuon == 1; trackerMuon && !globalMuon == 2;
434  // globalMuon && !trackerMuon == 3
435  for (unsigned int i = 0; i < 4; i++) {
436  if (i == 0 && (!useTrackerMuons_ || !muon->isTrackerMuon()))
437  continue;
438  if (i == 1 && (!useGlobalMuons_ || !muon->isGlobalMuon()))
439  continue;
440  if (i == 2 && (!useTrackerMuonsNotGlobalMuons_ || (!(muon->isTrackerMuon() && !muon->isGlobalMuon()))))
441  continue;
442  if (i == 3 && (!useGlobalMuonsNotTrackerMuons_ || (!(muon->isGlobalMuon() && !muon->isTrackerMuon()))))
443  continue;
444 
445  if (makeEnergyPlots_ && muon->isEnergyValid()) {
446  // EM
447  if (fabs(muon->eta()) > 1.479)
448  hEnergyEMEndcap[i]->Fill(muon->calEnergy().em);
449  else
450  hEnergyEMBarrel[i]->Fill(muon->calEnergy().em);
451  // HAD
452  if (fabs(muon->eta()) > 1.4)
453  hEnergyHAEndcap[i]->Fill(muon->calEnergy().had);
454  else
455  hEnergyHABarrel[i]->Fill(muon->calEnergy().had);
456  // HO
457  if (fabs(muon->eta()) < 1.26)
458  hEnergyHO[i]->Fill(muon->calEnergy().ho);
459  }
460 
461  if (makeTimePlots_) {
462  if (muon->isTimeValid()) {
463  hMuonTimeNDOF[i]->Fill(muon->time().nDof);
464  hMuonTimeTimeAtIpInOut[i]->Fill(muon->time().timeAtIpInOut);
465  hMuonTimeTimeAtIpInOutErr[i]->Fill(muon->time().timeAtIpInOutErr);
466  hMuonTimeTimeAtIpOutIn[i]->Fill(muon->time().timeAtIpOutIn);
467  hMuonTimeTimeAtIpOutInErr[i]->Fill(muon->time().timeAtIpOutInErr);
468  }
469 
470  MuonRef muonRef(muonCollectionH_, muonIdx);
471  MuonTimeExtra combinedMuonTimeExtra = (*combinedMuonTimeExtraValueMapH_)[muonRef];
472  MuonTimeExtra cscMuonTimeExtra = (*cscMuonTimeExtraValueMapH_)[muonRef];
473  MuonTimeExtra dtMuonTimeExtra = (*dtMuonTimeExtraValueMapH_)[muonRef];
474 
475  hMuonTimeExtraCombinedNDOF[i]->Fill(combinedMuonTimeExtra.nDof());
476  hMuonTimeExtraCombinedTimeAtIpInOut[i]->Fill(combinedMuonTimeExtra.timeAtIpInOut());
478  hMuonTimeExtraCombinedTimeAtIpOutIn[i]->Fill(combinedMuonTimeExtra.timeAtIpOutIn());
480  hMuonTimeExtraCSCNDOF[i]->Fill(cscMuonTimeExtra.nDof());
481  hMuonTimeExtraCSCTimeAtIpInOut[i]->Fill(cscMuonTimeExtra.timeAtIpInOut());
483  hMuonTimeExtraCSCTimeAtIpOutIn[i]->Fill(cscMuonTimeExtra.timeAtIpOutIn());
485  hMuonTimeExtraDTNDOF[i]->Fill(dtMuonTimeExtra.nDof());
486  hMuonTimeExtraDTTimeAtIpInOut[i]->Fill(dtMuonTimeExtra.timeAtIpInOut());
488  hMuonTimeExtraDTTimeAtIpOutIn[i]->Fill(dtMuonTimeExtra.timeAtIpOutIn());
490  }
491 
492  if (muon->isCaloCompatibilityValid())
493  hCaloCompat[i]->Fill(muon->caloCompatibility());
495  if (make2DPlots_ && muon->isCaloCompatibilityValid())
496  hCaloSegmentCompat[i]->Fill(muon->caloCompatibility(), muon::segmentCompatibility(*muon));
497  if (muon->isQualityValid()) {
498  hMuonQualityTrkRelChi2[i]->Fill(muon->combinedQuality().trkRelChi2);
499  hMuonQualityStaRelChi2[i]->Fill(muon->combinedQuality().staRelChi2);
500  hMuonQualityTrkKink[i]->Fill(muon->combinedQuality().trkKink);
501  }
522 
524  MuonRef muonRef(muonCollectionH_, muonIdx);
525  MuonCosmicCompatibility muonCosmicCompatibility = (*muonCosmicCompatibilityValueMapH_)[muonRef];
526  hCombinedCosmicCompat[i]->Fill(muonCosmicCompatibility.cosmicCompatibility);
527  hTimeCosmicCompat[i]->Fill(muonCosmicCompatibility.timeCompatibility);
528  hB2BCosmicCompat[i]->Fill(muonCosmicCompatibility.backToBackCompatibility);
529  hOverlapCosmicCompat[i]->Fill(muonCosmicCompatibility.overlapCompatibility);
530  }
531 
532  // by station
533  for (int station = 0; station < 4; ++station) {
535  MuonRef muonRef(muonCollectionH_, muonIdx);
536  MuonShower muonShowerInformation = (*muonShowerInformationValueMapH_)[muonRef];
537 
538  hMuonShowerSizeT[i][station]->Fill((muonShowerInformation.stationShowerSizeT).at(station));
539  hMuonShowerDeltaR[i][station]->Fill((muonShowerInformation.stationShowerDeltaR.at(station)));
540  hMuonAllHits[i][station]->Fill((muonShowerInformation.nStationHits.at(station)));
541  hMuonHitsFromSegments[i][station]->Fill((muonShowerInformation.nStationCorrelatedHits.at(station)));
543  muonShowerInformation.nStationCorrelatedHits.at(station));
544  }
545 
547  muon->pullX(station + 1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration, false));
549  muon->pullDxDz(station + 1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration, false));
550 
551  if (station < 3) {
553  muon->pullY(station + 1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration, false));
555  muon->pullDyDz(station + 1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration, false));
556  }
557 
558  float distance = muon->trackDist(station + 1, MuonSubdetId::DT);
559  float error = muon->trackDistErr(station + 1, MuonSubdetId::DT);
560  if (error == 0)
561  error = 0.000001;
562 
563  if (muon->numberOfSegments(station + 1, MuonSubdetId::DT, Muon::NoArbitration) > 0) {
566  } else {
569  }
570 
572  muon->pullX(station + 1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration, false));
574  muon->pullDxDz(station + 1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration, false));
576  muon->pullY(station + 1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration, false));
578  muon->pullDyDz(station + 1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration, false));
579 
580  distance = muon->trackDist(station + 1, MuonSubdetId::CSC);
581  error = muon->trackDistErr(station + 1, MuonSubdetId::CSC);
582  if (error == 0)
583  error = 0.000001;
584 
585  if (muon->numberOfSegments(station + 1, MuonSubdetId::CSC, Muon::NoArbitration) > 0) {
588  } else {
591  }
592  } // station
593  }
594 
595  if (!useTrackerMuons_ || !muon->isTrackerMuon())
596  continue;
597  if (makeAllChamberPlots_) {
598  // by chamber
599  for (std::vector<MuonChamberMatch>::const_iterator chamberMatch = muon->matches().begin();
600  chamberMatch != muon->matches().end();
601  ++chamberMatch) {
602  int station = chamberMatch->station();
603 
604  if (chamberMatch->detector() == MuonSubdetId::DT) {
605  DTChamberId dtId(chamberMatch->id.rawId());
606  int wheel = dtId.wheel();
607  int sector = dtId.sector();
608 
609  if (chamberMatch->segmentMatches.empty()) {
610  Fill(hDTChamberEdgeXWithNoSegment[station - 1][wheel + 2][sector - 1], chamberMatch->edgeX);
611  Fill(hDTChamberEdgeYWithNoSegment[station - 1][wheel + 2][sector - 1], chamberMatch->edgeY);
612  } else {
613  Fill(hDTChamberEdgeXWithSegment[station - 1][wheel + 2][sector - 1], chamberMatch->edgeX);
614  Fill(hDTChamberEdgeYWithSegment[station - 1][wheel + 2][sector - 1], chamberMatch->edgeY);
615 
616  for (std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
617  segmentMatch != chamberMatch->segmentMatches.end();
618  ++segmentMatch) {
619  if (segmentMatch->isMask(MuonSegmentMatch::BestInChamberByDR)) {
620  Fill(hDTChamberDx[station - 1][wheel + 2][sector - 1], chamberMatch->x - segmentMatch->x);
621  if (station < 4)
622  Fill(hDTChamberDy[station - 1][wheel + 2][sector - 1], chamberMatch->y - segmentMatch->y);
623  break;
624  }
625  } // segmentMatch
626  }
627 
628  continue;
629  }
630 
631  if (chamberMatch->detector() == MuonSubdetId::CSC) {
632  CSCDetId cscId(chamberMatch->id.rawId());
633  int endcap = cscId.endcap();
634  int ring = cscId.ring();
635  int chamber = cscId.chamber();
636 
637  if (chamberMatch->segmentMatches.empty()) {
638  Fill(hCSCChamberEdgeXWithNoSegment[endcap - 1][station - 1][ring - 1][chamber - 1], chamberMatch->edgeX);
639  Fill(hCSCChamberEdgeYWithNoSegment[endcap - 1][station - 1][ring - 1][chamber - 1], chamberMatch->edgeY);
640  } else {
641  Fill(hCSCChamberEdgeXWithSegment[endcap - 1][station - 1][ring - 1][chamber - 1], chamberMatch->edgeX);
642  Fill(hCSCChamberEdgeYWithSegment[endcap - 1][station - 1][ring - 1][chamber - 1], chamberMatch->edgeY);
643 
644  for (std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
645  segmentMatch != chamberMatch->segmentMatches.end();
646  ++segmentMatch) {
647  if (segmentMatch->isMask(MuonSegmentMatch::BestInChamberByDR)) {
648  Fill(hCSCChamberDx[endcap - 1][station - 1][ring - 1][chamber - 1], chamberMatch->x - segmentMatch->x);
649  Fill(hCSCChamberDy[endcap - 1][station - 1][ring - 1][chamber - 1], chamberMatch->y - segmentMatch->y);
650  break;
651  }
652  } // segmentMatch
653  }
654  }
655  } // chamberMatch
656  }
657  ++muonIdx;
658  } // muon
659 
660  if (!make2DPlots_)
661  return;
662 
664  segment != dtSegmentCollectionH_->end();
665  ++segment) {
666  LocalPoint segmentLocalPosition = segment->localPosition();
667  LocalVector segmentLocalDirection = segment->localDirection();
668  LocalError segmentLocalPositionError = segment->localPositionError();
669  LocalError segmentLocalDirectionError = segment->localDirectionError();
670  const GeomDet *segmentGeomDet = geometry_->idToDet(segment->geographicalId());
671  GlobalPoint segmentGlobalPosition = segmentGeomDet->toGlobal(segment->localPosition());
672  bool segmentFound = false;
673  bool segmentBestDrFound = false;
674 
675  for (MuonCollection::const_iterator muon = muonCollectionH_->begin(); muon != muonCollectionH_->end(); ++muon) {
676  if (!muon->isMatchesValid())
677  continue;
678 
679  for (std::vector<MuonChamberMatch>::const_iterator chamberMatch = muon->matches().begin();
680  chamberMatch != muon->matches().end();
681  ++chamberMatch) {
682  for (std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
683  segmentMatch != chamberMatch->segmentMatches.end();
684  ++segmentMatch) {
685  if (fabs(segmentMatch->x - segmentLocalPosition.x()) < 1E-6 &&
686  fabs(segmentMatch->y - segmentLocalPosition.y()) < 1E-6 &&
687  fabs(segmentMatch->dXdZ - segmentLocalDirection.x() / segmentLocalDirection.z()) < 1E-6 &&
688  fabs(segmentMatch->dYdZ - segmentLocalDirection.y() / segmentLocalDirection.z()) < 1E-6 &&
689  fabs(segmentMatch->xErr - sqrt(segmentLocalPositionError.xx())) < 1E-6 &&
690  fabs(segmentMatch->yErr - sqrt(segmentLocalPositionError.yy())) < 1E-6 &&
691  fabs(segmentMatch->dXdZErr - sqrt(segmentLocalDirectionError.xx())) < 1E-6 &&
692  fabs(segmentMatch->dYdZErr - sqrt(segmentLocalDirectionError.yy())) < 1E-6) {
693  segmentFound = true;
694  if (segmentMatch->isMask(reco::MuonSegmentMatch::BestInStationByDR))
695  segmentBestDrFound = true;
696  break;
697  }
698  } // segmentMatch
699  if (segmentFound)
700  break;
701  } // chamberMatch
702  if (segmentFound)
703  break;
704  } // muon
705 
706  if (segmentFound) {
707  hSegmentIsAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
708  hSegmentIsAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
709 
710  if (segmentBestDrFound) {
711  hSegmentIsBestDrAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
712  hSegmentIsBestDrAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
713  }
714  } else {
715  hSegmentIsNotAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
716  hSegmentIsNotAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
717  hSegmentIsBestDrNotAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
718  hSegmentIsBestDrNotAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
719  }
720  } // dt segment
721 
723  segment != cscSegmentCollectionH_->end();
724  ++segment) {
725  LocalPoint segmentLocalPosition = segment->localPosition();
726  LocalVector segmentLocalDirection = segment->localDirection();
727  LocalError segmentLocalPositionError = segment->localPositionError();
728  LocalError segmentLocalDirectionError = segment->localDirectionError();
729  const GeomDet *segmentGeomDet = geometry_->idToDet(segment->geographicalId());
730  GlobalPoint segmentGlobalPosition = segmentGeomDet->toGlobal(segment->localPosition());
731  bool segmentFound = false;
732  bool segmentBestDrFound = false;
733 
734  for (MuonCollection::const_iterator muon = muonCollectionH_->begin(); muon != muonCollectionH_->end(); ++muon) {
735  if (!muon->isMatchesValid())
736  continue;
737 
738  for (std::vector<MuonChamberMatch>::const_iterator chamberMatch = muon->matches().begin();
739  chamberMatch != muon->matches().end();
740  ++chamberMatch) {
741  for (std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
742  segmentMatch != chamberMatch->segmentMatches.end();
743  ++segmentMatch) {
744  if (fabs(segmentMatch->x - segmentLocalPosition.x()) < 1E-6 &&
745  fabs(segmentMatch->y - segmentLocalPosition.y()) < 1E-6 &&
746  fabs(segmentMatch->dXdZ - segmentLocalDirection.x() / segmentLocalDirection.z()) < 1E-6 &&
747  fabs(segmentMatch->dYdZ - segmentLocalDirection.y() / segmentLocalDirection.z()) < 1E-6 &&
748  fabs(segmentMatch->xErr - sqrt(segmentLocalPositionError.xx())) < 1E-6 &&
749  fabs(segmentMatch->yErr - sqrt(segmentLocalPositionError.yy())) < 1E-6 &&
750  fabs(segmentMatch->dXdZErr - sqrt(segmentLocalDirectionError.xx())) < 1E-6 &&
751  fabs(segmentMatch->dYdZErr - sqrt(segmentLocalDirectionError.yy())) < 1E-6) {
752  segmentFound = true;
753  if (segmentMatch->isMask(reco::MuonSegmentMatch::BestInStationByDR))
754  segmentBestDrFound = true;
755  break;
756  }
757  } // segmentMatch
758  if (segmentFound)
759  break;
760  } // chamberMatch
761  if (segmentFound)
762  break;
763  } // muon
764 
765  if (segmentFound) {
766  hSegmentIsAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
767  hSegmentIsAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
768 
769  if (segmentBestDrFound) {
770  hSegmentIsBestDrAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
771  hSegmentIsBestDrAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
772  }
773  } else {
774  hSegmentIsNotAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
775  hSegmentIsNotAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
776  hSegmentIsBestDrNotAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
777  hSegmentIsBestDrNotAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
778  }
779  } // csc segment
780 }
781 
783  if (fabs(f) > 900000)
784  return;
785  // if (fabs(f) < 1E-8) return;
786  me->Fill(f);
787 }
788 
789 // define this as a plug-in
MonitorElement * hDTChamberEdgeXWithSegment[4][5][14]
Definition: MuonIdVal.h:203
~MuonIdVal() override
Definition: MuonIdVal.cc:41
MonitorElement * hMuonAllHits[4][4]
Definition: MuonIdVal.h:177
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::EDGetTokenT< CSCSegmentCollection > inputCSCSegmentCollectionToken_
Definition: MuonIdVal.h:80
MonitorElement * hDTDistWithNoSegment[4][4]
Definition: MuonIdVal.h:186
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MonitorElement * hMuonTimeExtraDTTimeAtIpInOut[4]
Definition: MuonIdVal.h:135
MonitorElement * hDTDistWithSegment[4][4]
Definition: MuonIdVal.h:185
bool makeShowerInformationPlots_
Definition: MuonIdVal.h:95
MonitorElement * hCSCChamberEdgeXWithNoSegment[2][4][4][36]
Definition: MuonIdVal.h:210
T perp() const
Definition: PV3DBase.h:69
MonitorElement * hDTPulldYdZPropErr[4][3]
Definition: MuonIdVal.h:184
MonitorElement * hDTChamberEdgeXWithNoSegment[4][5][14]
Definition: MuonIdVal.h:204
MonitorElement * hSegmentCompat[4]
Definition: MuonIdVal.h:142
MonitorElement * hMuonTimeTimeAtIpInOut[4]
Definition: MuonIdVal.h:120
MonitorElement * hMuonTimeTimeAtIpOutIn[4]
Definition: MuonIdVal.h:122
edm::Handle< reco::MuonTimeExtraMap > cscMuonTimeExtraValueMapH_
Definition: MuonIdVal.h:102
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
T z() const
Definition: PV3DBase.h:61
MonitorElement * hSegmentIsAssociatedXY
Definition: MuonIdVal.h:216
edm::EDGetTokenT< reco::MuonCollection > inputMuonCollectionToken_
Definition: MuonIdVal.h:78
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: MuonIdVal.cc:416
bool makeTimePlots_
Definition: MuonIdVal.h:91
MonitorElement * hTMLastStationOptimizedLowPtLooseBool[4]
Definition: MuonIdVal.h:154
MonitorElement * hTMLastStationLooseBool[4]
Definition: MuonIdVal.h:148
MonitorElement * hMuonUncorrelatedHits[4][4]
Definition: MuonIdVal.h:179
MonitorElement * hEnergyHAEndcap[4]
Definition: MuonIdVal.h:116
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: MuonIdVal.cc:43
MonitorElement * hDTPullDistWithNoSegment[4][4]
Definition: MuonIdVal.h:188
MonitorElement * hCSCChamberEdgeYWithNoSegment[2][4][4][36]
Definition: MuonIdVal.h:212
edm::EDGetTokenT< edm::ValueMap< reco::MuonCosmicCompatibility > > inputMuonCosmicCompatibilityValueMapToken_
Definition: MuonIdVal.h:84
MonitorElement * hSegmentIsBestDrNotAssociatedRZ
Definition: MuonIdVal.h:221
MonitorElement * hMuonTimeExtraCombinedTimeAtIpInOutErr[4]
Definition: MuonIdVal.h:126
MonitorElement * hMuonTimeTimeAtIpInOutErr[4]
Definition: MuonIdVal.h:121
MonitorElement * hB2BCosmicCompat[4]
Definition: MuonIdVal.h:169
bool makeEnergyPlots_
Definition: MuonIdVal.h:90
virtual void Fill(MonitorElement *, float)
Definition: MuonIdVal.cc:782
edm::Handle< DTRecSegment4DCollection > dtSegmentCollectionH_
Definition: MuonIdVal.h:99
MonitorElement * hCSCChamberDy[2][4][4][36]
Definition: MuonIdVal.h:208
edm::InputTag inputMuonTimeExtraValueMap_
Definition: MuonIdVal.h:75
MonitorElement * hEnergyEMEndcap[4]
Definition: MuonIdVal.h:115
MonitorElement * hTMLastStationOptimizedBarrelLowPtLooseBool[4]
Definition: MuonIdVal.h:163
MonitorElement * hCSCPullxPropErr[4][4]
Definition: MuonIdVal.h:189
MonitorElement * hMuonTimeExtraDTNDOF[4]
Definition: MuonIdVal.h:134
edm::EDGetTokenT< reco::MuonTimeExtraMap > inputMuonTimeExtraValueMapDTToken_
Definition: MuonIdVal.h:82
MonitorElement * hMuonTimeExtraCSCTimeAtIpOutIn[4]
Definition: MuonIdVal.h:132
MonitorElement * hCSCPulldXdZPropErr[4][4]
Definition: MuonIdVal.h:190
float timeAtIpOutInErr() const
Definition: MuonTimeExtra.h:49
MonitorElement * hEnergyHABarrel[4]
Definition: MuonIdVal.h:113
MonitorElement * hCSCPulldYdZPropErr[4][4]
Definition: MuonIdVal.h:192
std::string const & label() const
Definition: InputTag.h:36
MonitorElement * hMuonTimeExtraCSCTimeAtIpOutInErr[4]
Definition: MuonIdVal.h:133
MonitorElement * hTMLastStationAngLooseBool[4]
Definition: MuonIdVal.h:159
MonitorElement * hMuonTimeExtraDTTimeAtIpOutInErr[4]
Definition: MuonIdVal.h:138
MonitorElement * hMuonTimeNDOF[4]
Definition: MuonIdVal.h:119
const GeomDet * idToDet(DetId) const override
MonitorElement * hMuonTimeExtraCSCTimeAtIpInOut[4]
Definition: MuonIdVal.h:130
MonitorElement * hTMOneStationAngTightBool[4]
Definition: MuonIdVal.h:162
static const unsigned int BestInStationByDR
MonitorElement * hMuonTimeExtraCombinedNDOF[4]
Definition: MuonIdVal.h:124
float timeAtIpInOutErr() const
Definition: MuonTimeExtra.h:44
float timeAtIpInOut() const
Definition: MuonTimeExtra.h:43
MonitorElement * hMuonTimeTimeAtIpOutInErr[4]
Definition: MuonIdVal.h:123
MonitorElement * hGMStaChiCompatibilityBool[4]
Definition: MuonIdVal.h:157
std::string baseFolder_
Definition: MuonIdVal.h:96
T getUntrackedParameter(std::string const &, T const &) const
void Fill(long long x)
MonitorElement * hDTChamberDx[4][5][14]
Definition: MuonIdVal.h:201
MonitorElement * hGMTkChiCompatibilityBool[4]
Definition: MuonIdVal.h:156
float backToBackCompatibility
cosmic-likeness based on presence of a track in opp side: 0 == no matching opp tracks ...
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
edm::ESHandle< GlobalTrackingGeometry > geometry_
Definition: MuonIdVal.h:107
float yy() const
Definition: LocalError.h:24
T x() const
Definition: PV3DBase.h:59
MonitorElement * hSegmentIsBestDrNotAssociatedXY
Definition: MuonIdVal.h:222
T y() const
Definition: PV3DBase.h:60
MonitorElement * hTMLastStationTightBool[4]
Definition: MuonIdVal.h:149
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< reco::MuonTimeExtraMap > inputMuonTimeExtraValueMapCSCToken_
Definition: MuonIdVal.h:83
edm::Handle< CSCSegmentCollection > cscSegmentCollectionH_
Definition: MuonIdVal.h:100
edm::EDGetTokenT< edm::ValueMap< reco::MuonShower > > inputMuonShowerInformationValueMapToken_
Definition: MuonIdVal.h:85
edm::InputTag inputMuonCosmicCompatibilityValueMap_
Definition: MuonIdVal.h:76
bool useTrackerMuons_
Definition: MuonIdVal.h:86
MonitorElement * hTMLastStationOptimizedBarrelLowPtTightBool[4]
Definition: MuonIdVal.h:164
MonitorElement * hDTPulldXdZPropErr[4][4]
Definition: MuonIdVal.h:182
T sqrt(T t)
Definition: SSEVec.h:19
MonitorElement * hCombinedCosmicCompat[4]
Definition: MuonIdVal.h:167
edm::EDGetTokenT< DTRecSegment4DCollection > inputDTRecSegment4DCollectionToken_
Definition: MuonIdVal.h:79
edm::Handle< reco::MuonCollection > muonCollectionH_
Definition: MuonIdVal.h:98
edm::Handle< reco::MuonTimeExtraMap > combinedMuonTimeExtraValueMapH_
Definition: MuonIdVal.h:101
MonitorElement * hOverlapCosmicCompat[4]
Definition: MuonIdVal.h:170
MonitorElement * hCSCDistWithNoSegment[4][4]
Definition: MuonIdVal.h:194
MonitorElement * hSegmentIsBestDrAssociatedXY
Definition: MuonIdVal.h:220
MonitorElement * hCSCChamberEdgeYWithSegment[2][4][4][36]
Definition: MuonIdVal.h:211
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
double f[11][100]
int nDof() const
number of measurements used in timing calculation
Definition: MuonTimeExtra.h:22
edm::Handle< edm::ValueMap< reco::MuonShower > > muonShowerInformationValueMapH_
Definition: MuonIdVal.h:105
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
MonitorElement * hCSCChamberDx[2][4][4][36]
Definition: MuonIdVal.h:207
MonitorElement * hTMLastStationAngTightBool[4]
Definition: MuonIdVal.h:160
MonitorElement * hMuonQualityStaRelChi2[4]
Definition: MuonIdVal.h:145
MonitorElement * hMuonQualityTrkKink[4]
Definition: MuonIdVal.h:146
MonitorElement * hSegmentIsNotAssociatedXY
Definition: MuonIdVal.h:218
MonitorElement * hTM2DCompatibilityLooseBool[4]
Definition: MuonIdVal.h:150
MonitorElement * hMuonTimeExtraCSCTimeAtIpInOutErr[4]
Definition: MuonIdVal.h:131
MonitorElement * hCaloSegmentCompat[4]
Definition: MuonIdVal.h:143
MonitorElement * hGMTkKinkTightBool[4]
Definition: MuonIdVal.h:158
MonitorElement * hMuonTimeExtraCombinedTimeAtIpInOut[4]
Definition: MuonIdVal.h:125
bool useGlobalMuons_
Definition: MuonIdVal.h:87
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
bool makeAllChamberPlots_
Definition: MuonIdVal.h:93
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
edm::Handle< edm::ValueMap< reco::MuonCosmicCompatibility > > muonCosmicCompatibilityValueMapH_
Definition: MuonIdVal.h:104
float timeCompatibility
cosmic-likeness based on time: 0 == prompt-like
MonitorElement * hMuonShowerDeltaR[4][4]
Definition: MuonIdVal.h:176
MonitorElement * hGlobalMuonPromptTightBool[4]
Definition: MuonIdVal.h:147
MonitorElement * hDTChamberEdgeYWithSegment[4][5][14]
Definition: MuonIdVal.h:205
MonitorElement * hMuonTimeExtraCombinedTimeAtIpOutIn[4]
Definition: MuonIdVal.h:127
MonitorElement * hSegmentIsAssociatedRZ
Definition: MuonIdVal.h:215
std::string subsystemname_
Definition: MuonIdVal.h:69
MonitorElement * hDTPullDistWithSegment[4][4]
Definition: MuonIdVal.h:187
edm::EDGetTokenT< reco::MuonTimeExtraMap > inputMuonTimeExtraValueMapCombToken_
Definition: MuonIdVal.h:81
MonitorElement * hCSCPullDistWithSegment[4][4]
Definition: MuonIdVal.h:195
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > trackingGeomToken_
Definition: MuonIdVal.h:108
bool makeCosmicCompatibilityPlots_
Definition: MuonIdVal.h:94
edm::InputTag inputDTRecSegment4DCollection_
Definition: MuonIdVal.h:73
MonitorElement * hMuonHitsFromSegments[4][4]
Definition: MuonIdVal.h:178
MonitorElement * hCSCDistWithSegment[4][4]
Definition: MuonIdVal.h:193
edm::ParameterSet iConfig
Definition: MuonIdVal.h:66
MuonIdVal(const edm::ParameterSet &)
Definition: MuonIdVal.cc:3
MonitorElement * hTMOneStationTightBool[4]
Definition: MuonIdVal.h:153
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
MonitorElement * hTM2DCompatibilityTightBool[4]
Definition: MuonIdVal.h:151
edm::Handle< reco::MuonTimeExtraMap > dtMuonTimeExtraValueMapH_
Definition: MuonIdVal.h:103
float timeAtIpOutIn() const
b) particle is moving from outside in
Definition: MuonTimeExtra.h:48
MonitorElement * hMuonTimeExtraDTTimeAtIpOutIn[4]
Definition: MuonIdVal.h:137
MonitorElement * hSegmentIsNotAssociatedRZ
Definition: MuonIdVal.h:217
fixed size matrix
HLT enums.
MonitorElement * hSegmentIsBestDrAssociatedRZ
Definition: MuonIdVal.h:219
MonitorElement * hTMOneStationLooseBool[4]
Definition: MuonIdVal.h:152
MonitorElement * hCSCChamberEdgeXWithSegment[2][4][4][36]
Definition: MuonIdVal.h:209
MonitorElement * hDTChamberDy[3][5][14]
Definition: MuonIdVal.h:202
MonitorElement * hTMOneStationAngLooseBool[4]
Definition: MuonIdVal.h:161
edm::InputTag inputCSCSegmentCollection_
Definition: MuonIdVal.h:74
MonitorElement * hDTPullyPropErr[4][3]
Definition: MuonIdVal.h:183
bool make2DPlots_
Definition: MuonIdVal.h:92
MonitorElement * hMuonQualityTrkRelChi2[4]
Definition: MuonIdVal.h:144
MonitorElement * hCSCPullyPropErr[4][4]
Definition: MuonIdVal.h:191
MonitorElement * hEnergyEMBarrel[4]
Definition: MuonIdVal.h:112
MonitorElement * hMuonTimeExtraCombinedTimeAtIpOutInErr[4]
Definition: MuonIdVal.h:128
static constexpr int DT
Definition: MuonSubdetId.h:11
bool useGlobalMuonsNotTrackerMuons_
Definition: MuonIdVal.h:89
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
edm::InputTag inputMuonCollection_
Definition: MuonIdVal.h:72
MonitorElement * hTMLastStationOptimizedLowPtTightBool[4]
Definition: MuonIdVal.h:155
MonitorElement * hCaloCompat[4]
Definition: MuonIdVal.h:141
bool useTrackerMuonsNotGlobalMuons_
Definition: MuonIdVal.h:88
MonitorElement * hMuonTimeExtraDTTimeAtIpInOutErr[4]
Definition: MuonIdVal.h:136
MonitorElement * hDTPullxPropErr[4][4]
Definition: MuonIdVal.h:181
float cosmicCompatibility
combined cosmic-likeness: 0 == not cosmic-like
static constexpr int CSC
Definition: MuonSubdetId.h:12
MonitorElement * hMuonShowerSizeT[4][4]
Definition: MuonIdVal.h:175
float overlapCompatibility
cosmic-likeness based on overlap with traversing cosmic muon (only muon/STA hits are used) ...
MonitorElement * hDTChamberEdgeYWithNoSegment[4][5][14]
Definition: MuonIdVal.h:206
MonitorElement * hTimeCosmicCompat[4]
Definition: MuonIdVal.h:168
float xx() const
Definition: LocalError.h:22
Definition: Run.h:45
MonitorElement * hCSCPullDistWithNoSegment[4][4]
Definition: MuonIdVal.h:196
MonitorElement * hMuonTimeExtraCSCNDOF[4]
Definition: MuonIdVal.h:129
MonitorElement * hEnergyHO[4]
Definition: MuonIdVal.h:114
edm::InputTag inputMuonShowerInformationValueMap_
Definition: MuonIdVal.h:77