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