CMS 3D CMS Logo

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