CMS 3D CMS Logo

MuonIdVal.cc
Go to the documentation of this file.
2 
4 {
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_);
27  inputMuonTimeExtraValueMapCombToken_ = consumes<reco::MuonTimeExtraMap>(edm::InputTag(inputMuonTimeExtraValueMap_.label(), "combined"));
28  inputMuonTimeExtraValueMapDTToken_= consumes<reco::MuonTimeExtraMap>(edm::InputTag(inputMuonTimeExtraValueMap_.label(), "csc"));
29  inputMuonTimeExtraValueMapCSCToken_ = consumes<reco::MuonTimeExtraMap>(edm::InputTag(inputMuonTimeExtraValueMap_.label(), "dt"));
30  inputMuonCosmicCompatibilityValueMapToken_ = consumes<edm::ValueMap<reco::MuonCosmicCompatibility> >(inputMuonCosmicCompatibilityValueMap_);
31  inputMuonShowerInformationValueMapToken_ = consumes<edm::ValueMap<reco::MuonShower> >(inputMuonShowerInformationValueMap_);
32 
33  subsystemname_ = iConfig.getUntrackedParameter<std::string>("subSystemFolder", "YourSubsystem") ;
34 }
35 
37 
38 
40 {
41  char name[100], title[200];
42  ibooker.setCurrentFolder(baseFolder_) ;
43 
44  // trackerMuon == 0; globalMuon == 1; trackerMuon && !globalMuon == 2; globalMuon && !trackerMuon == 3
45  for (unsigned int i = 0; i < 4; i++) {
46  if ((i == 0 && ! useTrackerMuons_) || (i == 1 && ! useGlobalMuons_)) continue;
47  if ((i == 2 && ! useTrackerMuonsNotGlobalMuons_) || (i == 3 && ! useGlobalMuonsNotTrackerMuons_)) continue;
48  if (i == 0) ibooker.setCurrentFolder(baseFolder_+"/TrackerMuons");
49  if (i == 1) ibooker.setCurrentFolder(baseFolder_+"/GlobalMuons");
50  if (i == 2) ibooker.setCurrentFolder(baseFolder_+"/TrackerMuonsNotGlobalMuons");
51  if (i == 3) ibooker.setCurrentFolder(baseFolder_+"/GlobalMuonsNotTrackerMuons");
52 
53  if (makeEnergyPlots_) {
54  hEnergyEMBarrel[i] = ibooker.book1D("hEnergyEMBarrel", "Energy in ECAL Barrel", 100, -0.5, 2.);
55  hEnergyHABarrel[i] = ibooker.book1D("hEnergyHABarrel", "Energy in HCAL Barrel", 100, -4., 12.);
56  hEnergyHO[i] = ibooker.book1D("hEnergyHO", "Energy HO", 100, -2., 5.);
57  hEnergyEMEndcap[i] = ibooker.book1D("hEnergyEMEndcap", "Energy in ECAL Endcap", 100, -0.5, 2.);
58  hEnergyHAEndcap[i] = ibooker.book1D("hEnergyHAEndcap", "Energy in HCAL Endcap", 100, -4., 12.);
59  }
60 
61  if (makeTimePlots_) {
62  hMuonTimeNDOF[i] = ibooker.book1D("hMuonTimeNDOF", "MuonTime NDOF", 52, -1.5, 50.5);
63  hMuonTimeTimeAtIpInOut[i] = ibooker.book1D("hMuonTimeTimeAtIpInOut", "MuonTime TimeAtIpInOut", 100, -20., 20.);
64  hMuonTimeTimeAtIpInOutErr[i] = ibooker.book1D("hMuonTimeTimeAtIpInOutErr", "MuonTime TimeAtIpInOutErr", 100, 0., 8.);
65  hMuonTimeTimeAtIpOutIn[i] = ibooker.book1D("hMuonTimeTimeAtIpOutIn", "MuonTime TimeAtIpOutIn", 100, -1., 75.);
66  hMuonTimeTimeAtIpOutInErr[i] = ibooker.book1D("hMuonTimeTimeAtIpOutInErr", "MuonTime TimeAtIpOutInErr", 100, 0., 8.);
67  hMuonTimeExtraCombinedNDOF[i] = ibooker.book1D("hMuonTimeExtraCombinedNDOF", "MuonTimeExtra Combined NDOF", 52, -1.5, 50.5);
68  hMuonTimeExtraCombinedTimeAtIpInOut[i] = ibooker.book1D("hMuonTimeExtraCombinedTimeAtIpInOut", "MuonTimeExtra Combined TimeAtIpInOut", 100, -20., 20.);
69  hMuonTimeExtraCombinedTimeAtIpInOutErr[i] = ibooker.book1D("hMuonTimeExtraCombinedTimeAtIpInOutErr", "MuonTimeExtra Combined TimeAtIpInOutErr", 100, 0., 8.);
70  hMuonTimeExtraCombinedTimeAtIpOutIn[i] = ibooker.book1D("hMuonTimeExtraCombinedTimeAtIpOutIn", "MuonTimeExtra Combined TimeAtIpOutIn", 100, -1., 75.);
71  hMuonTimeExtraCombinedTimeAtIpOutInErr[i] = ibooker.book1D("hMuonTimeExtraCombinedTimeAtIpOutInErr", "MuonTimeExtra Combined TimeAtIpOutInErr", 100, 0., 8.);
72  hMuonTimeExtraCSCNDOF[i] = ibooker.book1D("hMuonTimeExtraCSCNDOF", "MuonTimeExtra CSC NDOF", 52, -1.5, 50.5);
73  hMuonTimeExtraCSCTimeAtIpInOut[i] = ibooker.book1D("hMuonTimeExtraCSCTimeAtIpInOut", "MuonTimeExtra CSC TimeAtIpInOut", 100, -20., 20.);
74  hMuonTimeExtraCSCTimeAtIpInOutErr[i] = ibooker.book1D("hMuonTimeExtraCSCTimeAtIpInOutErr", "MuonTimeExtra CSC TimeAtIpInOutErr", 100, 0., 8.);
75  hMuonTimeExtraCSCTimeAtIpOutIn[i] = ibooker.book1D("hMuonTimeExtraCSCTimeAtIpOutIn", "MuonTimeExtra CSC TimeAtIpOutIn", 100, -1., 75.);
76  hMuonTimeExtraCSCTimeAtIpOutInErr[i] = ibooker.book1D("hMuonTimeExtraCSCTimeAtIpOutInErr", "MuonTimeExtra CSC TimeAtIpOutInErr", 100, 0., 8.);
77  hMuonTimeExtraDTNDOF[i] = ibooker.book1D("hMuonTimeExtraDTNDOF", "MuonTimeExtra DT NDOF", 52, -1.5, 50.5);
78  hMuonTimeExtraDTTimeAtIpInOut[i] = ibooker.book1D("hMuonTimeExtraDTTimeAtIpInOut", "MuonTimeExtra DT TimeAtIpInOut", 100, -20., 20.);
79  hMuonTimeExtraDTTimeAtIpInOutErr[i] = ibooker.book1D("hMuonTimeExtraDTTimeAtIpInOutErr", "MuonTimeExtra DT TimeAtIpInOutErr", 100, 0., 8.);
80  hMuonTimeExtraDTTimeAtIpOutIn[i] = ibooker.book1D("hMuonTimeExtraDTTimeAtIpOutIn", "MuonTimeExtra DT TimeAtIpOutIn", 100, -1., 75.);
81  hMuonTimeExtraDTTimeAtIpOutInErr[i] = ibooker.book1D("hMuonTimeExtraDTTimeAtIpOutInErr", "MuonTimeExtra DT TimeAtIpOutInErr", 100, 0., 8.);
82  }
83 
84  hCaloCompat[i] = ibooker.book1D("hCaloCompat", "Calo Compatibility", 101, -0.05, 1.05);
85  hSegmentCompat[i] = ibooker.book1D("hSegmentCompat", "Segment Compatibility", 101, -0.05, 1.05);
86  if (make2DPlots_)
87  hCaloSegmentCompat[i] = ibooker.book2D("hCaloSegmentCompat", "Calo Compatibility vs. Segment Compatibility", 101, -0.05, 1.05, 101, -0.05, 1.05);
88  hMuonQualityTrkRelChi2[i] = ibooker.book1D("hMuonQualityTrkRelChi2", "MuonQuality TrkRelChi2", 100, 0., 1.5);
89  hMuonQualityStaRelChi2[i] = ibooker.book1D("hMuonQualityStaRelChi2", "MuonQuality StaRelChi2", 100, 0., 3.);
90  hMuonQualityTrkKink[i] = ibooker.book1D("hMuonQualityTrkKink", "MuonQuality TrkKink", 100, 0., 150.);
91  hGlobalMuonPromptTightBool[i] = ibooker.book1D("hGlobalMuonPromptTightBool", "GlobalMuonPromptTight Boolean", 2, -0.5, 1.5);
92  hTMLastStationLooseBool[i] = ibooker.book1D("hTMLastStationLooseBool", "TMLastStationLoose Boolean", 2, -0.5, 1.5);
93  hTMLastStationTightBool[i] = ibooker.book1D("hTMLastStationTightBool", "TMLastStationTight Boolean", 2, -0.5, 1.5);
94  hTM2DCompatibilityLooseBool[i] = ibooker.book1D("hTM2DCompatibilityLooseBool", "TM2DCompatibilityLoose Boolean", 2, -0.5, 1.5);
95  hTM2DCompatibilityTightBool[i] = ibooker.book1D("hTM2DCompatibilityTightBool", "TM2DCompatibilityTight Boolean", 2, -0.5, 1.5);
96  hTMOneStationLooseBool[i] = ibooker.book1D("hTMOneStationLooseBool", "TMOneStationLoose Boolean", 2, -0.5, 1.5);
97  hTMOneStationTightBool[i] = ibooker.book1D("hTMOneStationTightBool", "TMOneStationTight Boolean", 2, -0.5, 1.5);
98  hTMLastStationOptimizedLowPtLooseBool[i] = ibooker.book1D("hTMLastStationOptimizedLowPtLooseBool", "TMLastStationOptimizedLowPtLoose Boolean", 2, -0.5, 1.5);
99  hTMLastStationOptimizedLowPtTightBool[i] = ibooker.book1D("hTMLastStationOptimizedLowPtTightBool", "TMLastStationOptimizedLowPtTight Boolean", 2, -0.5, 1.5);
100  hGMTkChiCompatibilityBool[i] = ibooker.book1D("hGMTkChiCompatibilityBool", "GMTkChiCompatibility Boolean", 2, -0.5, 1.5);
101  hGMStaChiCompatibilityBool[i] = ibooker.book1D("hGMStaChiCompatibilityBool", "GMStaChiCompatibility Boolean", 2, -0.5, 1.5);
102  hGMTkKinkTightBool[i] = ibooker.book1D("hGMTkKinkTightBool", "GMTkKinkTight Boolean", 2, -0.5, 1.5);
103  hTMLastStationAngLooseBool[i] = ibooker.book1D("hTMLastStationAngLooseBool", "TMLastStationAngLoose Boolean", 2, -0.5, 1.5);
104  hTMLastStationAngTightBool[i] = ibooker.book1D("hTMLastStationAngTightBool", "TMLastStationAngTight Boolean", 2, -0.5, 1.5);
105  hTMOneStationAngLooseBool[i] = ibooker.book1D("hTMOneStationAngLooseBool", "TMOneStationAngLoose Boolean", 2, -0.5, 1.5);
106  hTMOneStationAngTightBool[i] = ibooker.book1D("hTMOneStationAngTightBool", "TMOneStationAngTight Boolean", 2, -0.5, 1.5);
107  hTMLastStationOptimizedBarrelLowPtLooseBool[i] = ibooker.book1D("hTMLastStationOptimizedBarrelLowPtLooseBool", "TMLastStationOptimizedBarrelLowPtLoose Boolean", 2, -0.5, 1.5);
108  hTMLastStationOptimizedBarrelLowPtTightBool[i] = ibooker.book1D("hTMLastStationOptimizedBarrelLowPtTightBool", "TMLastStationOptimizedBarrelLowPtTight Boolean", 2, -0.5, 1.5);
109 
111  hCombinedCosmicCompat[i] = ibooker.book1D("hCombinedCosmicCompat", "hCombinedCosmicCompatibility float", 40, 0., 10.);
112  hTimeCosmicCompat[i] = ibooker.book1D("hTimeCosmicCompat", "hTimeCosmicCompatibility float", 6, 0., 3.);
113  hB2BCosmicCompat[i] = ibooker.book1D("hB2BCosmicCompat", "Number of back-to-back partners", 10, 0, 10);
114  hOverlapCosmicCompat[i] = ibooker.book1D("hOverlapCosmicCompat", "Overlap between muons and 1Leg", 2, 0, 2);
115  }
116 
117  // by station
118  for(int station = 0; station < 4; ++station)
119  {
120 
122  sprintf(name, "hMuonShowerSizeT%i", station+1);
123  sprintf(title, "Station %i Transverse Cluster Size", station+1);
124  hMuonShowerSizeT[i][station] = ibooker.book1D(name, title,1000,0,500);
125  sprintf(name, "hMuonShowerDeltaR%i", station+1);
126  sprintf(title, "Station %i DeltaR", station+1);
127  hMuonShowerDeltaR[i][station] = ibooker.book1D(name, title,5000,0,0.5);
128  sprintf(name, "hMuonAllHits%i", station+1);
129  sprintf(title, "Station %i Number of 1D DT or 2D CSC RecHits", station+1);
130  hMuonAllHits[i][station] = ibooker.book1D(name, title,400,0,400);
131  sprintf(name, "hMuonHitsFromSegments%i", station+1);
132  sprintf(title, "Station %i Hits used by 4D DT or 3D CSC Segments", station+1);
133  hMuonHitsFromSegments[i][station] = ibooker.book1D(name, title,400,0,400);
134  sprintf(name, "hMuonUncorrelatedHits%i", station+1);
135  sprintf(title, "Station %i Uncorrelated Hits", station+1);
136  hMuonUncorrelatedHits[i][station] = ibooker.book1D(name, title,400,0,400);
137  }
138 
139  sprintf(name, "hDT%iPullxPropErr", station+1);
140  sprintf(title, "DT Station %i Pull X w/ Propagation Error Only", station+1);
141  hDTPullxPropErr[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
142 
143  sprintf(name, "hDT%iPulldXdZPropErr", station+1);
144  sprintf(title, "DT Station %i Pull DxDz w/ Propagation Error Only", station+1);
145  hDTPulldXdZPropErr[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
146 
147  if (station < 3) {
148  sprintf(name, "hDT%iPullyPropErr", station+1);
149  sprintf(title, "DT Station %i Pull Y w/ Propagation Error Only", station+1);
150  hDTPullyPropErr[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
151 
152  sprintf(name, "hDT%iPulldYdZPropErr", station+1);
153  sprintf(title, "DT Station %i Pull DyDz w/ Propagation Error Only", station+1);
154  hDTPulldYdZPropErr[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
155  }
156 
157  sprintf(name, "hDT%iDistWithSegment", station+1);
158  sprintf(title, "DT Station %i Dist When There Is A Segment", station+1);
159  hDTDistWithSegment[i][station] = ibooker.book1D(name, title, 100, -140., 30.);
160 
161  sprintf(name, "hDT%iDistWithNoSegment", station+1);
162  sprintf(title, "DT Station %i Dist When There Is No Segment", station+1);
163  hDTDistWithNoSegment[i][station] = ibooker.book1D(name, title, 100, -140., 30.);
164 
165  sprintf(name, "hDT%iPullDistWithSegment", station+1);
166  sprintf(title, "DT Station %i Pull Dist When There Is A Segment", station+1);
167  hDTPullDistWithSegment[i][station] = ibooker.book1D(name, title, 100, -140., 30.);
168 
169  sprintf(name, "hDT%iPullDistWithNoSegment", station+1);
170  sprintf(title, "DT Station %i Pull Dist When There Is No Segment", station+1);
171  hDTPullDistWithNoSegment[i][station] = ibooker.book1D(name, title, 100, -140., 30.);
172 
173  sprintf(name, "hCSC%iPullxPropErr", station+1);
174  sprintf(title, "CSC Station %i Pull X w/ Propagation Error Only", station+1);
175  hCSCPullxPropErr[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
176 
177  sprintf(name, "hCSC%iPulldXdZPropErr", station+1);
178  sprintf(title, "CSC Station %i Pull DxDz w/ Propagation Error Only", station+1);
179  hCSCPulldXdZPropErr[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
180 
181  sprintf(name, "hCSC%iPullyPropErr", station+1);
182  sprintf(title, "CSC Station %i Pull Y w/ Propagation Error Only", station+1);
183  hCSCPullyPropErr[i][station] = ibooker.book1D(name, title, 100, -20., 20.);
184 
185  sprintf(name, "hCSC%iPulldYdZPropErr", station+1);
186  sprintf(title, "CSC Station %i Pull DyDz w/ Propagation Error Only", station+1);
187  hCSCPulldYdZPropErr[i][station] = ibooker.book1D(name, title, 100, -50., 50.);
188 
189  sprintf(name, "hCSC%iDistWithSegment", station+1);
190  sprintf(title, "CSC Station %i Dist When There Is A Segment", station+1);
191  hCSCDistWithSegment[i][station] = ibooker.book1D(name, title, 100, -70., 20.);
192 
193  sprintf(name, "hCSC%iDistWithNoSegment", station+1);
194  sprintf(title, "CSC Station %i Dist When There Is No Segment", station+1);
195  hCSCDistWithNoSegment[i][station] = ibooker.book1D(name, title, 100, -70., 20.);
196 
197  sprintf(name, "hCSC%iPullDistWithSegment", station+1);
198  sprintf(title, "CSC Station %i Pull Dist When There Is A Segment", station+1);
199  hCSCPullDistWithSegment[i][station] = ibooker.book1D(name, title, 100, -70., 20.);
200 
201  sprintf(name, "hCSC%iPullDistWithNoSegment", station+1);
202  sprintf(title, "CSC Station %i Pull Dist When There Is No Segment", station+1);
203  hCSCPullDistWithNoSegment[i][station] = ibooker.book1D(name, title, 100, -70., 20.);
204  }// station
205  }
206 
207  if (make2DPlots_) {
208  ibooker.setCurrentFolder(baseFolder_);
209  hSegmentIsAssociatedRZ = ibooker.book2D("hSegmentIsAssociatedRZ", "R-Z of Associated Segments", 2140, -1070., 1070., 850, 0., 850.);
210  hSegmentIsAssociatedXY = ibooker.book2D("hSegmentIsAssociatedXY", "X-Y of Associated Segments", 1700, -850., 850., 1700, -850., 850.);
211  hSegmentIsNotAssociatedRZ = ibooker.book2D("hSegmentIsNotAssociatedRZ", "R-Z of Not Associated Segments", 2140, -1070., 1070., 850, 0., 850.);
212  hSegmentIsNotAssociatedXY = ibooker.book2D("hSegmentIsNotAssociatedXY", "X-Y of Not Associated Segments", 1700, -850., 850., 1700, -850., 850.);
213  hSegmentIsBestDrAssociatedRZ = ibooker.book2D("hSegmentIsBestDrAssociatedRZ", "R-Z of Best in Station by #DeltaR Associated Segments", 2140, -1070., 1070., 850, 0., 850.);
214  hSegmentIsBestDrAssociatedXY = ibooker.book2D("hSegmentIsBestDrAssociatedXY", "X-Y of Best in Station by #DeltaR Associated Segments", 1700, -850., 850., 1700, -850., 850.);
215  hSegmentIsBestDrNotAssociatedRZ = ibooker.book2D("hSegmentIsBestDrNotAssociatedRZ", "R-Z of Best in Station by #DeltaR Not Associated Segments", 2140, -1070., 1070., 850, 0., 850.);
216  hSegmentIsBestDrNotAssociatedXY = ibooker.book2D("hSegmentIsBestDrNotAssociatedXY", "X-Y of Best in Station by #DeltaR Not Associated Segments", 1700, -850., 850., 1700, -850., 850.);
217  }
218 
220  ibooker.setCurrentFolder(baseFolder_+"/TrackerMuons");
221 
222  // by chamber
223  for(int station = 0; station < 4; ++station) {
224  // DT wheels: -2 -> 2
225  for(int wheel = 0; wheel < 5; ++wheel) {
226  // DT sectors: 1 -> 14
227  for(int sector = 0; sector < 14; ++sector)
228  {
229  sprintf(name, "hDTChamberDx_%i_%i_%i", station+1, wheel-2, sector+1);
230  sprintf(title, "DT Chamber Delta X: Station %i Wheel %i Sector %i", station+1, wheel-2, sector+1);
231  hDTChamberDx[station][wheel][sector] = ibooker.book1D(name, title, 100, -100., 100.);
232 
233  if (station < 3) {
234  sprintf(name, "hDTChamberDy_%i_%i_%i", station+1, wheel-2, sector+1);
235  sprintf(title, "DT Chamber Delta Y: Station %i Wheel %i Sector %i", station+1, wheel-2, sector+1);
236  hDTChamberDy[station][wheel][sector] = ibooker.book1D(name, title, 100, -150., 150.);
237  }
238 
239  sprintf(name, "hDTChamberEdgeXWithSegment_%i_%i_%i", station+1, wheel-2, sector+1);
240  sprintf(title, "DT Chamber Edge X When There Is A Segment: Station %i Wheel %i Sector %i", station+1, wheel-2, sector+1);
241  hDTChamberEdgeXWithSegment[station][wheel][sector] = ibooker.book1D(name, title, 100, -140., 30.);
242 
243  sprintf(name, "hDTChamberEdgeXWithNoSegment_%i_%i_%i", station+1, wheel-2, sector+1);
244  sprintf(title, "DT Chamber Edge X When There Is No Segment: Station %i Wheel %i Sector %i", station+1, wheel-2, sector+1);
245  hDTChamberEdgeXWithNoSegment[station][wheel][sector] = ibooker.book1D(name, title, 100, -140., 30.);
246 
247  sprintf(name, "hDTChamberEdgeYWithSegment_%i_%i_%i", station+1, wheel-2, sector+1);
248  sprintf(title, "DT Chamber Edge Y When There Is A Segment: Station %i Wheel %i Sector %i", station+1, wheel-2, sector+1);
249  hDTChamberEdgeYWithSegment[station][wheel][sector] = ibooker.book1D(name, title, 100, -140., 30.);
250 
251  sprintf(name, "hDTChamberEdgeYWithNoSegment_%i_%i_%i", station+1, wheel-2, sector+1);
252  sprintf(title, "DT Chamber Edge Y When There Is No Segment: Station %i Wheel %i Sector %i", station+1, wheel-2, sector+1);
253  hDTChamberEdgeYWithNoSegment[station][wheel][sector] = ibooker.book1D(name, title, 100, -140., 30.);
254  }// sector
255  }// wheel
256 
257  // CSC endcaps: 1 -> 2
258  for(int endcap = 0; endcap < 2; ++endcap) {
259  // CSC rings: 1 -> 4
260  for(int ring = 0; ring < 4; ++ring) {
261  // CSC chambers: 1 -> 36
262  for(int chamber = 0; chamber < 36; ++chamber)
263  {
264  sprintf(name, "hCSCChamberDx_%i_%i_%i_%i", endcap+1, station+1, ring+1, chamber+1);
265  sprintf(title, "CSC Chamber Delta X: Endcap %i Station %i Ring %i Chamber %i", endcap+1, station+1, ring+1, chamber+1);
266  hCSCChamberDx[endcap][station][ring][chamber] = ibooker.book1D(name, title, 100, -50., 50.);
267 
268  sprintf(name, "hCSCChamberDy_%i_%i_%i_%i", endcap+1, station+1, ring+1, chamber+1);
269  sprintf(title, "CSC Chamber Delta Y: Endcap %i Station %i Ring %i Chamber %i", endcap+1, station+1, ring+1, chamber+1);
270  hCSCChamberDy[endcap][station][ring][chamber] = ibooker.book1D(name, title, 100, -50., 50.);
271 
272  sprintf(name, "hCSCChamberEdgeXWithSegment_%i_%i_%i_%i", endcap+1, station+1, ring+1, chamber+1);
273  sprintf(title, "CSC Chamber Edge X When There Is A Segment: Endcap %i Station %i Ring %i Chamber %i", endcap+1, station+1, ring+1, chamber+1);
274  hCSCChamberEdgeXWithSegment[endcap][station][ring][chamber] = ibooker.book1D(name, title, 100, -70., 20.);
275 
276  sprintf(name, "hCSCChamberEdgeXWithNoSegment_%i_%i_%i_%i", endcap+1, station+1, ring+1, chamber+1);
277  sprintf(title, "CSC Chamber Edge X When There Is No Segment: Endcap %i Station %i Ring %i Chamber %i", endcap+1, station+1, ring+1, chamber+1);
278  hCSCChamberEdgeXWithNoSegment[endcap][station][ring][chamber] = ibooker.book1D(name, title, 100, -70., 20.);
279 
280  sprintf(name, "hCSCChamberEdgeYWithSegment_%i_%i_%i_%i", endcap+1, station+1, ring+1, chamber+1);
281  sprintf(title, "CSC Chamber Edge Y When There Is A Segment: Endcap %i Station %i Ring %i Chamber %i", endcap+1, station+1, ring+1, chamber+1);
282  hCSCChamberEdgeYWithSegment[endcap][station][ring][chamber] = ibooker.book1D(name, title, 100, -70., 20.);
283 
284  sprintf(name, "hCSCChamberEdgeYWithNoSegment_%i_%i_%i_%i", endcap+1, station+1, ring+1, chamber+1);
285  sprintf(title, "CSC Chamber Edge Y When There Is No Segment: Endcap %i Station %i Ring %i Chamber %i", endcap+1, station+1, ring+1, chamber+1);
286  hCSCChamberEdgeYWithNoSegment[endcap][station][ring][chamber] = ibooker.book1D(name, title, 100, -70., 20.);
287  }// chamber
288  }// ring
289  }// endcap
290  }// station
291  }
292 }
293 
294 void
296 {
297  using namespace edm;
298  using namespace reco;
299 
308 
310 
311  unsigned int muonIdx = 0;
312  for(MuonCollection::const_iterator muon = muonCollectionH_->begin();
313  muon != muonCollectionH_->end(); ++muon)
314  {
315  // trackerMuon == 0; globalMuon == 1; trackerMuon && !globalMuon == 2; globalMuon && !trackerMuon == 3
316  for (unsigned int i = 0; i < 4; i++) {
317  if (i == 0 && (! useTrackerMuons_ || ! muon->isTrackerMuon())) continue;
318  if (i == 1 && (! useGlobalMuons_ || ! muon->isGlobalMuon())) continue;
319  if (i == 2 && (! useTrackerMuonsNotGlobalMuons_ || (! (muon->isTrackerMuon() && ! muon->isGlobalMuon())))) continue;
320  if (i == 3 && (! useGlobalMuonsNotTrackerMuons_ || (! (muon->isGlobalMuon() && ! muon->isTrackerMuon())))) continue;
321 
322  if (makeEnergyPlots_ && muon->isEnergyValid()) {
323  // EM
324  if (fabs(muon->eta()) > 1.479)
325  hEnergyEMEndcap[i]->Fill(muon->calEnergy().em);
326  else
327  hEnergyEMBarrel[i]->Fill(muon->calEnergy().em);
328  // HAD
329  if (fabs(muon->eta()) > 1.4)
330  hEnergyHAEndcap[i]->Fill(muon->calEnergy().had);
331  else
332  hEnergyHABarrel[i]->Fill(muon->calEnergy().had);
333  // HO
334  if (fabs(muon->eta()) < 1.26)
335  hEnergyHO[i]->Fill(muon->calEnergy().ho);
336  }
337 
338  if (makeTimePlots_) {
339  if (muon->isTimeValid()) {
340  hMuonTimeNDOF[i]->Fill(muon->time().nDof);
341  hMuonTimeTimeAtIpInOut[i]->Fill(muon->time().timeAtIpInOut);
342  hMuonTimeTimeAtIpInOutErr[i]->Fill(muon->time().timeAtIpInOutErr);
343  hMuonTimeTimeAtIpOutIn[i]->Fill(muon->time().timeAtIpOutIn);
344  hMuonTimeTimeAtIpOutInErr[i]->Fill(muon->time().timeAtIpOutInErr);
345  }
346 
347  MuonRef muonRef(muonCollectionH_, muonIdx);
348  MuonTimeExtra combinedMuonTimeExtra = (*combinedMuonTimeExtraValueMapH_)[muonRef];
349  MuonTimeExtra cscMuonTimeExtra = (*cscMuonTimeExtraValueMapH_)[muonRef];
350  MuonTimeExtra dtMuonTimeExtra = (*dtMuonTimeExtraValueMapH_)[muonRef];
351 
352  hMuonTimeExtraCombinedNDOF[i]->Fill(combinedMuonTimeExtra.nDof());
353  hMuonTimeExtraCombinedTimeAtIpInOut[i]->Fill(combinedMuonTimeExtra.timeAtIpInOut());
355  hMuonTimeExtraCombinedTimeAtIpOutIn[i]->Fill(combinedMuonTimeExtra.timeAtIpOutIn());
357  hMuonTimeExtraCSCNDOF[i]->Fill(cscMuonTimeExtra.nDof());
358  hMuonTimeExtraCSCTimeAtIpInOut[i]->Fill(cscMuonTimeExtra.timeAtIpInOut());
360  hMuonTimeExtraCSCTimeAtIpOutIn[i]->Fill(cscMuonTimeExtra.timeAtIpOutIn());
362  hMuonTimeExtraDTNDOF[i]->Fill(dtMuonTimeExtra.nDof());
363  hMuonTimeExtraDTTimeAtIpInOut[i]->Fill(dtMuonTimeExtra.timeAtIpInOut());
365  hMuonTimeExtraDTTimeAtIpOutIn[i]->Fill(dtMuonTimeExtra.timeAtIpOutIn());
367  }
368 
369  if (muon->isCaloCompatibilityValid())
370  hCaloCompat[i]->Fill(muon->caloCompatibility());
372  if (make2DPlots_ && muon->isCaloCompatibilityValid())
373  hCaloSegmentCompat[i]->Fill(muon->caloCompatibility(), muon::segmentCompatibility(*muon));
374  if (muon->isQualityValid()) {
375  hMuonQualityTrkRelChi2[i]->Fill(muon->combinedQuality().trkRelChi2);
376  hMuonQualityStaRelChi2[i]->Fill(muon->combinedQuality().staRelChi2);
377  hMuonQualityTrkKink[i]->Fill(muon->combinedQuality().trkKink);
378  }
397 
399  MuonRef muonRef(muonCollectionH_, muonIdx);
400  MuonCosmicCompatibility muonCosmicCompatibility = (*muonCosmicCompatibilityValueMapH_)[muonRef];
401  hCombinedCosmicCompat[i]->Fill(muonCosmicCompatibility.cosmicCompatibility);
402  hTimeCosmicCompat[i]->Fill(muonCosmicCompatibility.timeCompatibility);
403  hB2BCosmicCompat[i]->Fill(muonCosmicCompatibility.backToBackCompatibility);
404  hOverlapCosmicCompat[i]->Fill(muonCosmicCompatibility.overlapCompatibility);
405  }
406 
407  // by station
408  for(int station = 0; station < 4; ++station)
409  {
410 
412  MuonRef muonRef(muonCollectionH_, muonIdx);
413  MuonShower muonShowerInformation = (*muonShowerInformationValueMapH_)[muonRef];
414 
415  hMuonShowerSizeT[i][station]->Fill((muonShowerInformation.stationShowerSizeT).at(station));
416  hMuonShowerDeltaR[i][station]->Fill((muonShowerInformation.stationShowerDeltaR.at(station)));
417  hMuonAllHits[i][station]->Fill((muonShowerInformation.nStationHits.at(station)));
418  hMuonHitsFromSegments[i][station]->Fill((muonShowerInformation.nStationCorrelatedHits.at(station)));
419  hMuonUncorrelatedHits[i][station]->Fill((muonShowerInformation.nStationHits.at(station)) - muonShowerInformation.nStationCorrelatedHits.at(station));
420  }
421 
422 
423  Fill(hDTPullxPropErr[i][station], muon->pullX(station+1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration, false));
424  Fill(hDTPulldXdZPropErr[i][station], muon->pullDxDz(station+1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration, false));
425 
426  if (station < 3) {
427  Fill(hDTPullyPropErr[i][station], muon->pullY(station+1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration, false));
428  Fill(hDTPulldYdZPropErr[i][station], muon->pullDyDz(station+1, MuonSubdetId::DT, Muon::SegmentAndTrackArbitration, false));
429  }
430 
431  float distance = muon->trackDist(station+1, MuonSubdetId::DT);
432  float error = muon->trackDistErr(station+1, MuonSubdetId::DT);
433  if (error == 0) error = 0.000001;
434 
435  if (muon->numberOfSegments(station+1, MuonSubdetId::DT, Muon::NoArbitration) > 0) {
436  Fill(hDTDistWithSegment[i][station], distance);
437  Fill(hDTPullDistWithSegment[i][station], distance/error);
438  } else {
439  Fill(hDTDistWithNoSegment[i][station], distance);
440  Fill(hDTPullDistWithNoSegment[i][station], distance/error);
441  }
442 
443  Fill(hCSCPullxPropErr[i][station], muon->pullX(station+1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration, false));
444  Fill(hCSCPulldXdZPropErr[i][station], muon->pullDxDz(station+1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration, false));
445  Fill(hCSCPullyPropErr[i][station], muon->pullY(station+1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration, false));
446  Fill(hCSCPulldYdZPropErr[i][station], muon->pullDyDz(station+1, MuonSubdetId::CSC, Muon::SegmentAndTrackArbitration, false));
447 
448  distance = muon->trackDist(station+1, MuonSubdetId::CSC);
449  error = muon->trackDistErr(station+1, MuonSubdetId::CSC);
450  if (error == 0) error = 0.000001;
451 
452  if (muon->numberOfSegments(station+1, MuonSubdetId::CSC, Muon::NoArbitration) > 0) {
453  Fill(hCSCDistWithSegment[i][station], distance);
454  Fill(hCSCPullDistWithSegment[i][station], distance/error);
455  } else {
456  Fill(hCSCDistWithNoSegment[i][station], distance);
457  Fill(hCSCPullDistWithNoSegment[i][station], distance/error);
458  }
459  }// station
460  }
461 
462  if (! useTrackerMuons_ || ! muon->isTrackerMuon()) continue;
463  if (makeAllChamberPlots_) {
464  // by chamber
465  for(std::vector<MuonChamberMatch>::const_iterator chamberMatch = muon->matches().begin();
466  chamberMatch != muon->matches().end(); ++chamberMatch)
467  {
468  int station = chamberMatch->station();
469 
470  if (chamberMatch->detector() == MuonSubdetId::DT) {
471  DTChamberId dtId(chamberMatch->id.rawId());
472  int wheel = dtId.wheel();
473  int sector = dtId.sector();
474 
475  if (chamberMatch->segmentMatches.empty()) {
476  Fill(hDTChamberEdgeXWithNoSegment[station-1][wheel+2][sector-1], chamberMatch->edgeX);
477  Fill(hDTChamberEdgeYWithNoSegment[station-1][wheel+2][sector-1], chamberMatch->edgeY);
478  } else {
479  Fill(hDTChamberEdgeXWithSegment[station-1][wheel+2][sector-1], chamberMatch->edgeX);
480  Fill(hDTChamberEdgeYWithSegment[station-1][wheel+2][sector-1], chamberMatch->edgeY);
481 
482  for(std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
483  segmentMatch != chamberMatch->segmentMatches.end(); ++segmentMatch)
484  {
485  if (segmentMatch->isMask(MuonSegmentMatch::BestInChamberByDR)) {
486  Fill(hDTChamberDx[station-1][wheel+2][sector-1], chamberMatch->x-segmentMatch->x);
487  if (station < 4) Fill(hDTChamberDy[station-1][wheel+2][sector-1], chamberMatch->y-segmentMatch->y);
488  break;
489  }
490  }// segmentMatch
491  }
492 
493  continue;
494  }
495 
496  if (chamberMatch->detector() == MuonSubdetId::CSC) {
497  CSCDetId cscId(chamberMatch->id.rawId());
498  int endcap = cscId.endcap();
499  int ring = cscId.ring();
500  int chamber = cscId.chamber();
501 
502  if (chamberMatch->segmentMatches.empty()) {
503  Fill(hCSCChamberEdgeXWithNoSegment[endcap-1][station-1][ring-1][chamber-1], chamberMatch->edgeX);
504  Fill(hCSCChamberEdgeYWithNoSegment[endcap-1][station-1][ring-1][chamber-1], chamberMatch->edgeY);
505  } else {
506  Fill(hCSCChamberEdgeXWithSegment[endcap-1][station-1][ring-1][chamber-1], chamberMatch->edgeX);
507  Fill(hCSCChamberEdgeYWithSegment[endcap-1][station-1][ring-1][chamber-1], chamberMatch->edgeY);
508 
509  for(std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
510  segmentMatch != chamberMatch->segmentMatches.end(); ++segmentMatch)
511  {
512  if (segmentMatch->isMask(MuonSegmentMatch::BestInChamberByDR)) {
513  Fill(hCSCChamberDx[endcap-1][station-1][ring-1][chamber-1], chamberMatch->x-segmentMatch->x);
514  Fill(hCSCChamberDy[endcap-1][station-1][ring-1][chamber-1], chamberMatch->y-segmentMatch->y);
515  break;
516  }
517  }// segmentMatch
518  }
519  }
520  }// chamberMatch
521  }
522  ++muonIdx;
523  }// muon
524 
525  if (! make2DPlots_) return;
526 
528  segment != dtSegmentCollectionH_->end(); ++segment)
529  {
530  LocalPoint segmentLocalPosition = segment->localPosition();
531  LocalVector segmentLocalDirection = segment->localDirection();
532  LocalError segmentLocalPositionError = segment->localPositionError();
533  LocalError segmentLocalDirectionError = segment->localDirectionError();
534  const GeomDet* segmentGeomDet = geometry_->idToDet(segment->geographicalId());
535  GlobalPoint segmentGlobalPosition = segmentGeomDet->toGlobal(segment->localPosition());
536  bool segmentFound = false;
537  bool segmentBestDrFound = false;
538 
539  for(MuonCollection::const_iterator muon = muonCollectionH_->begin();
540  muon != muonCollectionH_->end(); ++muon)
541  {
542  if (! muon->isMatchesValid())
543  continue;
544 
545  for(std::vector<MuonChamberMatch>::const_iterator chamberMatch = muon->matches().begin();
546  chamberMatch != muon->matches().end(); ++chamberMatch) {
547  for(std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
548  segmentMatch != chamberMatch->segmentMatches.end(); ++segmentMatch)
549  {
550  if (fabs(segmentMatch->x - segmentLocalPosition.x() ) < 1E-6 &&
551  fabs(segmentMatch->y - segmentLocalPosition.y() ) < 1E-6 &&
552  fabs(segmentMatch->dXdZ - segmentLocalDirection.x()/segmentLocalDirection.z()) < 1E-6 &&
553  fabs(segmentMatch->dYdZ - segmentLocalDirection.y()/segmentLocalDirection.z()) < 1E-6 &&
554  fabs(segmentMatch->xErr - sqrt(segmentLocalPositionError.xx()) ) < 1E-6 &&
555  fabs(segmentMatch->yErr - sqrt(segmentLocalPositionError.yy()) ) < 1E-6 &&
556  fabs(segmentMatch->dXdZErr - sqrt(segmentLocalDirectionError.xx()) ) < 1E-6 &&
557  fabs(segmentMatch->dYdZErr - sqrt(segmentLocalDirectionError.yy()) ) < 1E-6)
558  {
559  segmentFound = true;
560  if (segmentMatch->isMask(reco::MuonSegmentMatch::BestInStationByDR)) segmentBestDrFound = true;
561  break;
562  }
563  }// segmentMatch
564  if (segmentFound) break;
565  }// chamberMatch
566  if (segmentFound) break;
567  }// muon
568 
569  if (segmentFound) {
570  hSegmentIsAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
571  hSegmentIsAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
572 
573  if (segmentBestDrFound) {
574  hSegmentIsBestDrAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
575  hSegmentIsBestDrAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
576  }
577  } else {
578  hSegmentIsNotAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
579  hSegmentIsNotAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
580  hSegmentIsBestDrNotAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
581  hSegmentIsBestDrNotAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
582  }
583  }// dt segment
584 
586  segment != cscSegmentCollectionH_->end(); ++segment)
587  {
588  LocalPoint segmentLocalPosition = segment->localPosition();
589  LocalVector segmentLocalDirection = segment->localDirection();
590  LocalError segmentLocalPositionError = segment->localPositionError();
591  LocalError segmentLocalDirectionError = segment->localDirectionError();
592  const GeomDet* segmentGeomDet = geometry_->idToDet(segment->geographicalId());
593  GlobalPoint segmentGlobalPosition = segmentGeomDet->toGlobal(segment->localPosition());
594  bool segmentFound = false;
595  bool segmentBestDrFound = false;
596 
597  for(MuonCollection::const_iterator muon = muonCollectionH_->begin();
598  muon != muonCollectionH_->end(); ++muon)
599  {
600  if (! muon->isMatchesValid())
601  continue;
602 
603  for(std::vector<MuonChamberMatch>::const_iterator chamberMatch = muon->matches().begin();
604  chamberMatch != muon->matches().end(); ++chamberMatch) {
605  for(std::vector<MuonSegmentMatch>::const_iterator segmentMatch = chamberMatch->segmentMatches.begin();
606  segmentMatch != chamberMatch->segmentMatches.end(); ++segmentMatch)
607  {
608  if (fabs(segmentMatch->x - segmentLocalPosition.x() ) < 1E-6 &&
609  fabs(segmentMatch->y - segmentLocalPosition.y() ) < 1E-6 &&
610  fabs(segmentMatch->dXdZ - segmentLocalDirection.x()/segmentLocalDirection.z()) < 1E-6 &&
611  fabs(segmentMatch->dYdZ - segmentLocalDirection.y()/segmentLocalDirection.z()) < 1E-6 &&
612  fabs(segmentMatch->xErr - sqrt(segmentLocalPositionError.xx()) ) < 1E-6 &&
613  fabs(segmentMatch->yErr - sqrt(segmentLocalPositionError.yy()) ) < 1E-6 &&
614  fabs(segmentMatch->dXdZErr - sqrt(segmentLocalDirectionError.xx()) ) < 1E-6 &&
615  fabs(segmentMatch->dYdZErr - sqrt(segmentLocalDirectionError.yy()) ) < 1E-6)
616  {
617  segmentFound = true;
618  if (segmentMatch->isMask(reco::MuonSegmentMatch::BestInStationByDR)) segmentBestDrFound = true;
619  break;
620  }
621  }// segmentMatch
622  if (segmentFound) break;
623  }// chamberMatch
624  if (segmentFound) break;
625  }// muon
626 
627  if (segmentFound) {
628  hSegmentIsAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
629  hSegmentIsAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
630 
631  if (segmentBestDrFound) {
632  hSegmentIsBestDrAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
633  hSegmentIsBestDrAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
634  }
635  } else {
636  hSegmentIsNotAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
637  hSegmentIsNotAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
638  hSegmentIsBestDrNotAssociatedRZ->Fill(segmentGlobalPosition.z(), segmentGlobalPosition.perp());
639  hSegmentIsBestDrNotAssociatedXY->Fill(segmentGlobalPosition.x(), segmentGlobalPosition.y());
640  }
641  }// csc segment
642 }
643 
644 void MuonIdVal::Fill(MonitorElement* me, float f) {
645  if (fabs(f) > 900000) return;
646  //if (fabs(f) < 1E-8) return;
647  me->Fill(f);
648 }
649 
650 //define this as a plug-in
T getParameter(std::string const &) const
MonitorElement * hDTChamberEdgeXWithSegment[4][5][14]
Definition: MuonIdVal.h:203
~MuonIdVal() override
Definition: MuonIdVal.cc:36
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * hMuonAllHits[4][4]
Definition: MuonIdVal.h:177
float xx() const
Definition: LocalError.h:24
edm::EDGetTokenT< CSCSegmentCollection > inputCSCSegmentCollectionToken_
Definition: MuonIdVal.h:81
MonitorElement * hDTDistWithNoSegment[4][4]
Definition: MuonIdVal.h:186
MonitorElement * hMuonTimeExtraDTTimeAtIpInOut[4]
Definition: MuonIdVal.h:135
MonitorElement * hDTDistWithSegment[4][4]
Definition: MuonIdVal.h:185
bool makeShowerInformationPlots_
Definition: MuonIdVal.h:96
MonitorElement * hCSCChamberEdgeXWithNoSegment[2][4][4][36]
Definition: MuonIdVal.h:210
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
T perp() const
Definition: PV3DBase.h:72
MonitorElement * hMuonTimeTimeAtIpOutIn[4]
Definition: MuonIdVal.h:122
edm::Handle< reco::MuonTimeExtraMap > cscMuonTimeExtraValueMapH_
Definition: MuonIdVal.h:104
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
MonitorElement * hSegmentIsAssociatedXY
Definition: MuonIdVal.h:216
edm::EDGetTokenT< reco::MuonCollection > inputMuonCollectionToken_
Definition: MuonIdVal.h:79
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: MuonIdVal.cc:295
bool makeTimePlots_
Definition: MuonIdVal.h:92
MonitorElement * hTMLastStationOptimizedLowPtLooseBool[4]
Definition: MuonIdVal.h:154
MonitorElement * hTMLastStationLooseBool[4]
Definition: MuonIdVal.h:148
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
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:39
MonitorElement * hDTPullDistWithNoSegment[4][4]
Definition: MuonIdVal.h:188
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:212
edm::EDGetTokenT< edm::ValueMap< reco::MuonCosmicCompatibility > > inputMuonCosmicCompatibilityValueMapToken_
Definition: MuonIdVal.h:85
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:91
virtual void Fill(MonitorElement *, float)
Definition: MuonIdVal.cc:644
T y() const
Definition: PV3DBase.h:63
edm::Handle< DTRecSegment4DCollection > dtSegmentCollectionH_
Definition: MuonIdVal.h:101
MonitorElement * hCSCChamberDy[2][4][4][36]
Definition: MuonIdVal.h:208
edm::InputTag inputMuonTimeExtraValueMap_
Definition: MuonIdVal.h:76
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:83
MonitorElement * hMuonTimeExtraCSCTimeAtIpOutIn[4]
Definition: MuonIdVal.h:132
float timeAtIpOutInErr() const
Definition: MuonTimeExtra.h:49
MonitorElement * hCSCPulldXdZPropErr[4][4]
Definition: MuonIdVal.h:190
MonitorElement * hEnergyHABarrel[4]
Definition: MuonIdVal.h:113
MonitorElement * hCSCPulldYdZPropErr[4][4]
Definition: MuonIdVal.h:192
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:133
MonitorElement * hTMLastStationAngLooseBool[4]
Definition: MuonIdVal.h:159
MonitorElement * hMuonTimeExtraDTTimeAtIpOutInErr[4]
Definition: MuonIdVal.h:138
int nDof() const
number of measurements used in timing calculation
Definition: MuonTimeExtra.h:22
MonitorElement * hMuonTimeNDOF[4]
Definition: MuonIdVal.h:119
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
MonitorElement * hMuonTimeTimeAtIpOutInErr[4]
Definition: MuonIdVal.h:123
void Fill(long long x)
MonitorElement * hGMStaChiCompatibilityBool[4]
Definition: MuonIdVal.h:157
std::string baseFolder_
Definition: MuonIdVal.h:97
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 ...
edm::ESHandle< GlobalTrackingGeometry > geometry_
Definition: MuonIdVal.h:108
MonitorElement * hSegmentIsBestDrNotAssociatedXY
Definition: MuonIdVal.h:222
MonitorElement * hTMLastStationTightBool[4]
Definition: MuonIdVal.h:149
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:230
edm::EDGetTokenT< reco::MuonTimeExtraMap > inputMuonTimeExtraValueMapCSCToken_
Definition: MuonIdVal.h:84
edm::Handle< CSCSegmentCollection > cscSegmentCollectionH_
Definition: MuonIdVal.h:102
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:164
MonitorElement * hDTPulldXdZPropErr[4][4]
Definition: MuonIdVal.h:182
T sqrt(T t)
Definition: SSEVec.h:18
MonitorElement * hCombinedCosmicCompat[4]
Definition: MuonIdVal.h:167
edm::EDGetTokenT< DTRecSegment4DCollection > inputDTRecSegment4DCollectionToken_
Definition: MuonIdVal.h:80
edm::Handle< reco::MuonCollection > muonCollectionH_
Definition: MuonIdVal.h:100
edm::Handle< reco::MuonTimeExtraMap > combinedMuonTimeExtraValueMapH_
Definition: MuonIdVal.h:103
T z() const
Definition: PV3DBase.h:64
MonitorElement * hOverlapCosmicCompat[4]
Definition: MuonIdVal.h:170
MonitorElement * hCSCDistWithNoSegment[4][4]
Definition: MuonIdVal.h:194
MonitorElement * hSegmentIsBestDrAssociatedXY
Definition: MuonIdVal.h:220
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
float timeAtIpInOutErr() const
Definition: MuonTimeExtra.h:44
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]
edm::Handle< edm::ValueMap< reco::MuonShower > > muonShowerInformationValueMapH_
Definition: MuonIdVal.h:107
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: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:106
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:70
MonitorElement * hDTPullDistWithSegment[4][4]
Definition: MuonIdVal.h:187
edm::EDGetTokenT< reco::MuonTimeExtraMap > inputMuonTimeExtraValueMapCombToken_
Definition: MuonIdVal.h:82
MonitorElement * hCSCPullDistWithSegment[4][4]
Definition: MuonIdVal.h:195
bool makeCosmicCompatibilityPlots_
Definition: MuonIdVal.h:95
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
edm::InputTag inputDTRecSegment4DCollection_
Definition: MuonIdVal.h:74
MonitorElement * hMuonHitsFromSegments[4][4]
Definition: MuonIdVal.h:178
MonitorElement * hCSCDistWithSegment[4][4]
Definition: MuonIdVal.h:193
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:153
MonitorElement * hTM2DCompatibilityTightBool[4]
Definition: MuonIdVal.h:151
edm::Handle< reco::MuonTimeExtraMap > dtMuonTimeExtraValueMapH_
Definition: MuonIdVal.h:105
MonitorElement * hMuonTimeExtraDTTimeAtIpOutIn[4]
Definition: MuonIdVal.h:137
std::string const & label() const
Definition: InputTag.h:36
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
T get() const
Definition: EventSetup.h:63
const GeomDet * idToDet(DetId) const override
MonitorElement * hTMOneStationAngLooseBool[4]
Definition: MuonIdVal.h:161
edm::InputTag inputCSCSegmentCollection_
Definition: MuonIdVal.h:75
MonitorElement * hDTPullyPropErr[4][3]
Definition: MuonIdVal.h:183
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: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: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:155
MonitorElement * hCaloCompat[4]
Definition: MuonIdVal.h:141
bool useTrackerMuonsNotGlobalMuons_
Definition: MuonIdVal.h:89
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:13
T x() const
Definition: PV3DBase.h:62
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
Definition: Run.h:44
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:78
std::vector< float > stationShowerDeltaR
the radius of the cone containing the all the hits around the track
Definition: MuonShower.h:16