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