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