CMS 3D CMS Logo

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