CMS 3D CMS Logo

GEMEfficiencyAnalyzer.cc
Go to the documentation of this file.
2 
14 
16  name_ = pset.getUntrackedParameter<std::string>("name");
17  folder_ = pset.getUntrackedParameter<std::string>("folder");
18 
19  rechit_token_ = consumes<GEMRecHitCollection>(pset.getParameter<edm::InputTag>("recHitTag"));
20  muon_token_ = consumes<edm::View<reco::Muon> >(pset.getParameter<edm::InputTag>("muonTag"));
21 
22  is_cosmics_ = pset.getUntrackedParameter<bool>("isCosmics");
23  use_global_muon_ = pset.getUntrackedParameter<bool>("useGlobalMuon");
24  use_skip_layer_ = pset.getParameter<bool>("useSkipLayer");
25  use_only_me11_ = pset.getParameter<bool>("useOnlyME11");
26  residual_rphi_cut_ = static_cast<float>(pset.getParameter<double>("residualRPhiCut"));
27  use_prop_r_error_cut_ = pset.getParameter<bool>("usePropRErrorCut");
28  prop_r_error_cut_ = pset.getParameter<double>("propRErrorCut");
29  use_prop_phi_error_cut_ = pset.getParameter<bool>("usePropPhiErrorCut");
30  prop_phi_error_cut_ = pset.getParameter<double>("propPhiErrorCut");
31  pt_bins_ = pset.getUntrackedParameter<std::vector<double> >("ptBins");
32  eta_nbins_ = pset.getUntrackedParameter<int>("etaNbins");
33  eta_low_ = pset.getUntrackedParameter<double>("etaLow");
34  eta_up_ = pset.getUntrackedParameter<double>("etaUp");
35 
36  const edm::ParameterSet&& muon_service_parameter = pset.getParameter<edm::ParameterSet>("ServiceParameters");
37  muon_service_ = new MuonServiceProxy(muon_service_parameter, consumesCollector());
38 
40  pt_clamp_max_ = pt_bins_.back() - eps;
42 
43  // TODO pt, eta, quality check for muons
44 }
45 
47 
49  // beam scenario
50  {
52  desc.addUntracked<std::string>("name", "GlobalMuon");
53  desc.addUntracked<std::string>("folder", "GEM/Efficiency/type0");
54  desc.add<edm::InputTag>("recHitTag", edm::InputTag("gemRecHits"));
55  desc.add<edm::InputTag>("muonTag", edm::InputTag("muons"));
56  desc.addUntracked<bool>("isCosmics", false);
57  desc.addUntracked<bool>("useGlobalMuon", true);
58  desc.add<bool>("useSkipLayer", true);
59  desc.add<bool>("useOnlyME11", false);
60  desc.add<double>("residualRPhiCut", 2.0); // TODO need to be tuned
61  desc.add<bool>("usePropRErrorCut", false);
62  desc.add<double>("propRErrorCut", 1.0);
63  desc.add<bool>("usePropPhiErrorCut", false);
64  desc.add<double>("propPhiErrorCut", 0.01);
65  desc.addUntracked<std::vector<double> >("ptBins", {20., 30., 40., 50., 60., 70., 80., 90., 100., 120.});
66  desc.addUntracked<int>("etaNbins", 9);
67  desc.addUntracked<double>("etaLow", 1.4);
68  desc.addUntracked<double>("etaUp", 2.3);
69  {
71  psd0.setAllowAnything();
72  desc.add<edm::ParameterSetDescription>("ServiceParameters", psd0);
73  }
74  descriptions.add("gemEfficiencyAnalyzerDefault", desc);
75  } // beam scenario
76 
77  // cosmic scenario
78  {
80  desc.addUntracked<std::string>("name", "GlobalMuon"); // FIXME
81  desc.addUntracked<std::string>("folder", "GEM/Efficiency/type0");
82  desc.add<edm::InputTag>("recHitTag", edm::InputTag("gemRecHits"));
83  desc.add<edm::InputTag>("muonTag", edm::InputTag("muons"));
84  desc.addUntracked<bool>("isCosmics", true);
85  desc.addUntracked<bool>("useGlobalMuon", false);
86  desc.add<bool>("useSkipLayer", true);
87  desc.add<bool>("useOnlyME11", true);
88  desc.add<double>("residualRPhiCut", 5.0); // TODO need to be tuned
89  desc.add<bool>("usePropRErrorCut", true);
90  desc.add<double>("propRErrorCut", 2.0);
91  desc.add<bool>("usePropPhiErrorCut", true);
92  desc.add<double>("propPhiErrorCut", 0.01);
93  desc.addUntracked<std::vector<double> >("ptBins", {0., 10., 20., 30., 40., 50., 60., 70., 80., 90., 100., 120.});
94  desc.addUntracked<int>("etaNbins", 9);
95  desc.addUntracked<double>("etaLow", 1.4);
96  desc.addUntracked<double>("etaUp", 2.3);
97  {
99  psd0.setAllowAnything();
100  desc.add<edm::ParameterSetDescription>("ServiceParameters", psd0);
101  }
102  descriptions.add("gemEfficiencyAnalyzerCosmicsDefault", desc);
103  } // cosmics
104 }
105 
107  edm::Run const& run,
108  edm::EventSetup const& isetup) {
110  isetup.get<MuonGeometryRecord>().get(gem);
111  if (not gem.isValid()) {
112  edm::LogError(kLogCategory_) << "GEMGeometry is invalid" << std::endl;
113  return;
114  }
115 
116  bookEfficiencyMomentum(ibooker, gem);
117  bookEfficiencyChamber(ibooker, gem);
119  bookEfficiencyDetector(ibooker, gem);
120  bookResolution(ibooker, gem);
121  bookMisc(ibooker, gem);
122 }
123 
125  const std::string name = me->getName() + "_matched";
126  TH1F* hist = dynamic_cast<TH1F*>(me->getTH1F()->Clone(name.c_str()));
127  return ibooker.book1D(name, hist);
128 }
129 
131  const std::string name = me->getName() + "_matched";
132  TH2F* hist = dynamic_cast<TH2F*>(me->getTH2F()->Clone(name.c_str()));
133  return ibooker.book2D(name, hist);
134 }
135 
137  // TODO Efficiency/Source
138  ibooker.setCurrentFolder(folder_ + "/Efficiency");
139 
140  const TString pt_x_title = "Muon p_{T} [GeV]";
141  const int pt_nbinsx = pt_bins_.size() - 1;
142 
143  const std::string eta_x_title = "Muon |#eta|";
144  const std::string phi_x_title = "Muon #phi [rad]";
145 
146  for (const GEMStation* station : gem->stations()) {
147  const int region_id = station->region();
148  const int station_id = station->station();
149 
150  const GEMDetId&& key = getReStKey(region_id, station_id);
151  const TString&& name_suffix = GEMUtils::getSuffixName(region_id, station_id);
152  const TString&& title_suffix = GEMUtils::getSuffixTitle(region_id, station_id);
153 
154  const TString&& title = name_.c_str() + title_suffix;
155 
156  TH1F* h_muon_pt = new TH1F("muon_pt" + name_suffix, title, pt_nbinsx, &pt_bins_[0]);
157  h_muon_pt->SetXTitle(pt_x_title);
158  me_muon_pt_[key] = ibooker.book1D(h_muon_pt->GetName(), h_muon_pt);
160 
161  me_muon_eta_[key] = ibooker.book1D("muon_eta" + name_suffix, title, eta_nbins_, eta_low_, eta_up_);
162  me_muon_eta_[key]->setXTitle(eta_x_title);
164 
165  me_muon_phi_[key] = ibooker.book1D("muon_phi" + name_suffix, title, 36, -M_PI, M_PI);
166  me_muon_phi_[key]->setAxisTitle(phi_x_title);
168  } // station
169 }
170 
172  // TODO Efficiency/Source
173  ibooker.setCurrentFolder(folder_ + "/Efficiency");
174 
175  for (const GEMStation* station : gem->stations()) {
176  const int region_id = station->region();
177  const int station_id = station->station();
178 
179  const std::vector<const GEMSuperChamber*>&& superchambers = station->superChambers();
180  if (not checkRefs(superchambers)) {
181  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
182  return;
183  }
184 
185  const int num_chambers = superchambers.size();
186  for (const GEMChamber* chamber : superchambers[0]->chambers()) {
187  const int layer_id = chamber->id().layer();
188 
189  const TString&& name_suffix = GEMUtils::getSuffixName(region_id, station_id, layer_id);
190  const TString&& title_suffix = GEMUtils::getSuffixTitle(region_id, station_id, layer_id);
191  const GEMDetId&& key = getReStLaKey(chamber->id());
192 
193  me_chamber_[key] =
194  ibooker.book1D("chamber" + name_suffix, name_.c_str() + title_suffix, num_chambers, 0.5, num_chambers + 0.5);
195  me_chamber_[key]->setAxisTitle("Chamber");
196  me_chamber_[key]->getTH1F()->SetNdivisions(-num_chambers, "Y");
197  for (int binx = 1; binx <= num_chambers; binx++) {
198  me_chamber_[key]->setBinLabel(binx, std::to_string(binx));
199  }
200 
202  } // layer
203  } // station
204 }
205 
208  // TODO Efficiency/Source
209  ibooker.setCurrentFolder(folder_ + "/Efficiency");
210 
211  for (const GEMStation* station : gem->stations()) {
212  const int region_id = station->region();
213  const int station_id = station->station();
214 
215  const std::vector<const GEMSuperChamber*>&& superchambers = station->superChambers();
216  if (not checkRefs(superchambers)) {
217  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
218  return;
219  }
220 
221  for (const GEMChamber* chamber : superchambers[0]->chambers()) {
222  const int layer_id = chamber->id().layer();
223  const int num_ieta = chamber->nEtaPartitions();
224 
225  const TString&& name_suffix = GEMUtils::getSuffixName(region_id, station_id, layer_id);
226  const TString&& title_suffix = GEMUtils::getSuffixTitle(region_id, station_id, layer_id);
227  const GEMDetId&& key = getReStLaKey(chamber->id());
228 
229  me_ieta_[key] = ibooker.book1D("ieta" + name_suffix, name_.c_str() + title_suffix, num_ieta, 0.5, num_ieta + 0.5);
230  me_ieta_[key]->setAxisTitle("i#eta");
231  me_ieta_[key]->getTH1F()->SetNdivisions(-num_ieta, "Y");
232  for (int binx = 1; binx <= num_ieta; binx++) {
233  me_ieta_[key]->setBinLabel(binx, std::to_string(binx));
234  }
235 
237  } // layer
238  } // station
239 }
240 
242  // TODO Efficiency/Source
243  ibooker.setCurrentFolder(folder_ + "/Efficiency");
244 
245  for (const GEMStation* station : gem->stations()) {
246  const int region_id = station->region();
247  const int station_id = station->station();
248 
249  const std::vector<const GEMSuperChamber*>&& superchambers = station->superChambers();
250  if (not checkRefs(superchambers)) {
251  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
252  return;
253  }
254 
255  const int num_ch = superchambers.size();
256 
257  for (const GEMChamber* chamber : superchambers[0]->chambers()) {
258  const int layer_id = chamber->id().layer();
259  const int num_ieta = chamber->nEtaPartitions();
260 
261  const TString&& name_suffix = GEMUtils::getSuffixName(region_id, station_id, layer_id);
262  const TString&& title_suffix = GEMUtils::getSuffixTitle(region_id, station_id, layer_id);
263  const GEMDetId&& key = getReStLaKey(chamber->id());
264 
265  me_detector_[key] = ibooker.book2D("detector" + name_suffix,
266  name_.c_str() + title_suffix,
267  num_ch,
268  0.5,
269  num_ch + 0.5,
270  num_ieta,
271  0.5,
272  num_ieta + 0.5);
274 
276  } // layer
277  } // station
278 }
279 
281  ibooker.setCurrentFolder(folder_ + "/Resolution");
282  for (const GEMStation* station : gem->stations()) {
283  const int region_id = station->region();
284  const int station_id = station->station();
285 
286  const std::vector<const GEMSuperChamber*>&& superchambers = station->superChambers();
287  if (not checkRefs(superchambers)) {
288  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
289  return;
290  }
291 
292  const std::vector<const GEMChamber*>& chambers = superchambers[0]->chambers();
293  if (not checkRefs(chambers)) {
294  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMChamber ptrs" << std::endl;
295  return;
296  }
297 
298  for (const GEMEtaPartition* eta_partition : chambers[0]->etaPartitions()) {
299  const int ieta = eta_partition->id().roll();
300 
301  const GEMDetId&& key = getReStEtKey(eta_partition->id());
302  // TODO
303  const TString&& name_suffix = TString::Format("_GE%+.2d_R%d", region_id * (station_id * 10 + 1), ieta);
304  const TString&& title =
305  name_.c_str() + TString::Format(" : GE%+.2d Roll %d", region_id * (station_id * 10 + 1), ieta);
306 
308  ibooker.book1D("residual_rphi" + name_suffix, title, 50, -residual_rphi_cut_, residual_rphi_cut_);
309  me_residual_rphi_[key]->setAxisTitle("Residual in R#phi [cm]");
310 
311  me_residual_y_[key] = ibooker.book1D("residual_y" + name_suffix, title, 60, -12.0, 12.0);
312  me_residual_y_[key]->setAxisTitle("Residual in Local Y [cm]");
313 
314  me_pull_y_[key] = ibooker.book1D("pull_y" + name_suffix, title, 60, -3.0, 3.0);
315  me_pull_y_[key]->setAxisTitle("Pull in Local Y");
316  } // ieta
317  } // station
318 }
319 
321  ibooker.setCurrentFolder(folder_ + "/Misc");
322  // FIXME the range shoule be dependent on the scenario
323  me_prop_r_err_ = ibooker.book1D("prop_r_err", ";Propagation Global R Error [cm];Entries", 20, 0.0, 20.0);
324  me_prop_phi_err_ = ibooker.book1D("prop_phi_err", "Propagation Global Phi Error [rad];Entries", 20, 0.0, M_PI);
325  me_all_abs_residual_rphi_ = ibooker.book1D("all_abs_residual_rphi", ";Residual in R#phi [cm];Entries", 20, 0.0, 20.0);
326 
327  for (const GEMStation* station : gem->stations()) {
328  const int region_id = station->region();
329  const int station_id = station->station();
330 
331  const std::vector<const GEMSuperChamber*>&& superchambers = station->superChambers();
332  if (not checkRefs(superchambers)) {
333  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
334  return;
335  }
336  // ignore layer ids
337  const int num_ch = superchambers.size();
338 
339  const GEMDetId&& key = getReStKey(region_id, station_id);
340  const TString&& name_suffix = GEMUtils::getSuffixName(region_id, station_id);
341  const TString&& title_suffix = GEMUtils::getSuffixTitle(region_id, station_id);
342  me_prop_chamber_[key] = ibooker.book1D("prop_chamber" + name_suffix, title_suffix, num_ch, 0.5, num_ch + 0.5);
343  me_prop_chamber_[key]->setAxisTitle("Destination Chamber Id", 1);
344  me_prop_chamber_[key]->setAxisTitle("Entries", 2);
345  } // station
346 }
347 
349  edm::Handle<GEMRecHitCollection> rechit_collection;
350  event.getByToken(rechit_token_, rechit_collection);
351  if (not rechit_collection.isValid()) {
352  edm::LogError(kLogCategory_) << "GEMRecHitCollection is invalid" << std::endl;
353  return;
354  }
355 
357  event.getByToken(muon_token_, muon_view);
358  if (not muon_view.isValid()) {
359  edm::LogError(kLogCategory_) << "View<Muon> is invalid" << std::endl;
360  return;
361  }
362 
365  if (not gem.isValid()) {
366  edm::LogError(kLogCategory_) << "GEMGeometry is invalid" << std::endl;
367  return;
368  }
369 
370  edm::ESHandle<GlobalTrackingGeometry> global_tracking_geometry;
371  setup.get<GlobalTrackingGeometryRecord>().get(global_tracking_geometry);
372  if (not global_tracking_geometry.isValid()) {
373  edm::LogError(kLogCategory_) << "GlobalTrackingGeometry is invalid" << std::endl;
374  return;
375  }
376 
377  edm::ESHandle<TransientTrackBuilder> transient_track_builder;
378  setup.get<TransientTrackRecord>().get("TransientTrackBuilder", transient_track_builder);
379  if (not transient_track_builder.isValid()) {
380  edm::LogError(kLogCategory_) << "TransientTrackRecord is invalid" << std::endl;
381  return;
382  }
383 
385  edm::ESHandle<Propagator>&& propagator = muon_service_->propagator("SteppingHelixPropagatorAny");
386  if (not propagator.isValid()) {
387  edm::LogError(kLogCategory_) << "Propagator is invalid" << std::endl;
388  return;
389  }
390 
391  if (rechit_collection->size() < 1) {
392  edm::LogInfo(kLogCategory_) << "empty rechit collection" << std::endl;
393  return;
394  }
395 
396  if (muon_view->empty()) {
397  edm::LogInfo(kLogCategory_) << "empty muon collection" << std::endl;
398  return;
399  }
400 
401  const std::vector<GEMLayerData>&& layer_vector = buildGEMLayers(gem);
402 
403  for (const reco::Muon& muon : *muon_view) {
404  const reco::Track* track = getTrack(muon);
405  if (track == nullptr) {
406  edm::LogError(kLogCategory_) << "failed to get a muon track" << std::endl;
407  continue;
408  }
409 
410  const reco::TransientTrack&& transient_track = transient_track_builder->build(track);
411  if (not transient_track.isValid()) {
412  edm::LogError(kLogCategory_) << "failed to build TransientTrack" << std::endl;
413  continue;
414  }
415 
416  for (const GEMLayerData& layer : layer_vector) {
417  if (use_skip_layer_ and skipLayer(track, layer)) {
418  edm::LogInfo(kLogCategory_) << "skip GEM Layer" << std::endl;
419  continue;
420  }
421 
422  const auto&& [start_state, start_id] = getStartingState(transient_track, layer, global_tracking_geometry);
423 
424  if (not start_state.isValid()) {
425  edm::LogInfo(kLogCategory_) << "failed to get a starting state" << std::endl;
426  continue;
427  }
428 
429  if (use_only_me11_ and (not isME11(start_id))) {
430  edm::LogInfo(kLogCategory_) << "skip a starting state because it is not ME11" << std::endl;
431  continue;
432  }
433 
434  // the trajectory state on the destination surface
435  const TrajectoryStateOnSurface&& dest_state = propagator->propagate(start_state, *(layer.disk));
436  if (not dest_state.isValid()) {
437  edm::LogInfo(kLogCategory_) << "failed to propagate a muon" << std::endl;
438  continue;
439  }
440 
441  const GlobalPoint&& dest_global_pos = dest_state.globalPosition();
442 
443  if (not checkBounds(dest_global_pos, (*layer.disk))) {
444  edm::LogInfo(kLogCategory_) << "failed to pass checkBounds" << std::endl;
445  continue;
446  }
447 
448  const GEMEtaPartition* eta_partition = findEtaPartition(dest_global_pos, layer.chambers);
449  if (eta_partition == nullptr) {
450  edm::LogInfo(kLogCategory_) << "failed to find an eta partition" << std::endl;
451  continue;
452  }
453 
454  const BoundPlane& surface = eta_partition->surface();
455 
456  const LocalPoint&& dest_local_pos = eta_partition->toLocal(dest_global_pos);
457  const LocalError&& dest_local_err = dest_state.localError().positionError();
458  const GlobalError& dest_global_err = ErrorFrameTransformer().transform(dest_local_err, surface);
459 
460  const double dest_global_r_err = std::sqrt(dest_global_err.rerr(dest_global_pos));
461  const double dest_global_phi_err = std::sqrt(dest_global_err.phierr(dest_global_pos));
462 
463  const GEMDetId&& gem_id = eta_partition->id();
464  const GEMDetId&& rs_key = getReStKey(gem_id);
465  const GEMDetId&& rsl_key = getReStLaKey(gem_id);
466  const GEMDetId&& rse_key = getReStEtKey(gem_id);
467 
468  const int chamber_id = gem_id.chamber();
469  const int ieta = gem_id.roll();
470 
471  // FIXME clever way to clamp values?
472  me_prop_r_err_->Fill(std::min(dest_global_r_err, 19.999));
473  me_prop_phi_err_->Fill(std::min(dest_global_phi_err, M_PI - 0.0001));
474  me_prop_chamber_[rs_key]->Fill(gem_id.chamber());
475 
476  if (use_prop_r_error_cut_ and (dest_global_r_err > prop_r_error_cut_)) {
477  edm::LogInfo(kLogCategory_) << "failed to pass a propagation global R error cut" << std::endl;
478  continue;
479  }
480 
481  if (use_prop_phi_error_cut_ and (dest_global_phi_err > prop_phi_error_cut_)) {
482  edm::LogInfo(kLogCategory_) << "failed to pass a propagation global phi error cut" << std::endl;
483  continue;
484  }
485 
486  const double muon_pt = std::min(muon.pt(), pt_clamp_max_);
487  const double muon_eta = std::clamp(std::fabs(muon.eta()), eta_low_, eta_clamp_max_);
488 
489  fillME(me_muon_pt_, rs_key, muon_pt);
490  fillME(me_muon_eta_, rs_key, muon_eta);
491  fillME(me_muon_phi_, rs_key, muon.phi());
492 
493  fillME(me_chamber_, rsl_key, chamber_id);
494  fillME(me_ieta_, rsl_key, ieta);
495  fillME(me_detector_, rsl_key, chamber_id, ieta);
496 
497  const auto&& [hit, residual_rphi] = findClosetHit(dest_global_pos, rechit_collection->get(gem_id), eta_partition);
498 
499  if (hit == nullptr) {
500  edm::LogInfo(kLogCategory_) << "failed to find a hit" << std::endl;
501  continue;
502  }
503 
504  me_all_abs_residual_rphi_->Fill(std::min(std::abs(residual_rphi), 19.999f));
505  if (std::abs(residual_rphi) > residual_rphi_cut_) {
506  edm::LogInfo(kLogCategory_) << "failed to pass the residual rphi cut" << std::endl;
507  continue;
508  }
509 
510  fillME(me_muon_pt_matched_, rs_key, muon_pt);
511  fillME(me_muon_eta_matched_, rs_key, muon_eta);
512  fillME(me_muon_phi_matched_, rs_key, muon.phi());
513 
514  fillME(me_chamber_matched_, rsl_key, gem_id.chamber());
515  fillME(me_ieta_matched_, rsl_key, gem_id.roll());
516  fillME(me_detector_matched_, rsl_key, gem_id.chamber(), ieta);
517 
518  const LocalPoint&& hit_local_pos = hit->localPosition();
519  const LocalError&& hit_local_err = hit->localPositionError();
520 
521  const float residual_y = dest_local_pos.y() - hit_local_pos.y();
522  const float pull_y = residual_y / std::sqrt(dest_local_err.yy() + hit_local_err.yy());
523 
524  fillME(me_residual_rphi_, rse_key, residual_rphi);
525  fillME(me_residual_y_, rse_key, residual_y);
526  fillME(me_pull_y_, rse_key, pull_y);
527  } // layer
528  } // Muon
529 }
530 
531 std::vector<GEMEfficiencyAnalyzer::GEMLayerData> GEMEfficiencyAnalyzer::buildGEMLayers(
533  std::vector<GEMLayerData> layer_vector;
534 
535  for (const GEMStation* station : gem->stations()) {
536  const int region_id = station->region();
537  const int station_id = station->station();
538  const bool is_ge11 = station_id == 1;
539 
540  // (layer_id, is_odd) - chambers
541  std::map<std::pair<int, bool>, std::vector<const GEMChamber*> > chambers_per_layer;
542 
543  for (const GEMSuperChamber* super_chamber : station->superChambers()) {
544  // For GE0 and GE21, 'is_odd' is always set to 'false'
545  const bool is_odd = is_ge11 ? super_chamber->id().chamber() % 2 == 1 : false;
546 
547  for (const GEMChamber* chamber : super_chamber->chambers()) {
548  const int layer_id = chamber->id().layer();
549  const std::pair<int, bool> key{layer_id, is_odd};
550 
551  if (chambers_per_layer.find(key) == chambers_per_layer.end())
552  chambers_per_layer.insert({key, std::vector<const GEMChamber*>()});
553 
554  chambers_per_layer.at(key).push_back(chamber);
555  } // GEMChamber
556  } // GEMSuperChamber
557 
558  for (auto [key, chamber_vector] : chambers_per_layer) {
559  const int layer_id = key.first;
560 
561  // chambers should have same R and Z spans.
562  auto [rmin, rmax] = chamber_vector[0]->surface().rSpan();
563  auto [zmin, zmax] = chamber_vector[0]->surface().zSpan();
564 
565  // layer position and rotation
566  const float layer_z = chamber_vector[0]->position().z();
567  Surface::PositionType position{0.f, 0.f, layer_z};
569 
570  zmin -= layer_z;
571  zmax -= layer_z;
572 
573  // the bounds from min and max R and Z in the local coordinates.
574  SimpleDiskBounds* bounds = new SimpleDiskBounds(rmin, rmax, zmin, zmax);
576 
577  layer_vector.emplace_back(layer, chamber_vector, region_id, station_id, layer_id);
578  } // layer
579  } // GEMStation
580 
581  return layer_vector;
582 }
583 
585  const reco::Track* track = nullptr;
586 
587  if (is_cosmics_) {
588  if (muon.outerTrack().isNonnull())
589  track = muon.outerTrack().get();
590 
591  } else {
592  // beams, i.e. pp or heavy ions
593  if (use_global_muon_ and muon.globalTrack().isNonnull())
594  track = muon.globalTrack().get();
595 
596  else if ((not use_global_muon_) and muon.outerTrack().isNonnull())
597  track = muon.outerTrack().get();
598  }
599 
600  return track;
601 }
602 
603 std::pair<TrajectoryStateOnSurface, DetId> GEMEfficiencyAnalyzer::getStartingState(
604  const reco::TransientTrack& transient_track,
605  const GEMLayerData& layer,
607  TrajectoryStateOnSurface starting_state;
608  DetId starting_id;
609 
610  if (use_global_muon_) {
611  std::tie(starting_state, starting_id) = findStartingState(transient_track, layer, geometry);
612 
613  } else {
614  // if outer track
615  const reco::Track& track = transient_track.track();
616  const bool is_insideout = isInsideOut(track);
617 
618  const DetId inner_id{(is_insideout ? track.outerDetId() : track.innerDetId())};
619  if (MuonHitHelper::isGEM(inner_id.rawId())) {
620  std::tie(starting_state, starting_id) = findStartingState(transient_track, layer, geometry);
621 
622  } else {
623  starting_id = inner_id;
624  if (is_insideout)
625  starting_state = transient_track.outermostMeasurementState();
626  else
627  starting_state = transient_track.innermostMeasurementState();
628  }
629  }
630 
631  return std::make_pair(starting_state, starting_id);
632 }
633 
634 std::pair<TrajectoryStateOnSurface, DetId> GEMEfficiencyAnalyzer::findStartingState(
635  const reco::TransientTrack& transient_track,
636  const GEMLayerData& layer,
638  GlobalPoint starting_point;
639  DetId starting_id;
640  float min_distance = 1e12;
641  bool found = false;
642 
643  // TODO optimize this loop because hits should be ordered..
644  for (auto rechit = transient_track.recHitsBegin(); rechit != transient_track.recHitsEnd(); rechit++) {
645  const DetId&& det_id = (*rechit)->geographicalId();
646 
647  if (MuonHitHelper::isGEM(det_id.rawId())) {
648  continue;
649  }
650 
651  const GeomDet* det = geometry->idToDet(det_id);
652  const GlobalPoint&& global_position = det->toGlobal((*rechit)->localPosition());
653  const float distance = std::abs(layer.disk->localZclamped(global_position));
654  if (distance < min_distance) {
655  found = true;
656  min_distance = distance;
657  starting_point = global_position;
658  starting_id = det_id;
659  }
660  }
661 
662  TrajectoryStateOnSurface starting_state;
663  if (found) {
664  starting_state = transient_track.stateOnSurface(starting_point);
665  }
666  return std::make_pair(starting_state, starting_id);
667 }
668 
670  if (not MuonHitHelper::isCSC(det_id))
671  return false;
672  const CSCDetId csc_id{det_id};
673  return (csc_id.station() == 1) and ((csc_id.ring() == 1) or (csc_id.ring() == 4));
674 }
675 
677  const bool is_same_region = track->eta() * layer.region > 0;
678 
679  bool skip = false;
680  if (is_cosmics_) {
681  float p2_in = track->innerMomentum().mag2();
682  float p2_out = track->outerMomentum().mag2();
683  if (isInsideOut(*track))
684  std::swap(p2_in, p2_out);
685  const bool is_outgoing = p2_in > p2_out;
686 
687  skip = (is_outgoing xor is_same_region);
688 
689  } else {
690  // beam scenario
691  skip = not is_same_region;
692  }
693 
694  return skip;
695 }
696 
697 bool GEMEfficiencyAnalyzer::checkBounds(const GlobalPoint& global_point, const Plane& plane) {
698  const LocalPoint&& local_point = plane.toLocal(global_point);
699  const LocalPoint local_point_2d(local_point.x(), local_point.y(), 0.0f);
700  return plane.bounds().inside(local_point_2d);
701 }
702 
704  const std::vector<const GEMChamber*>& chamber_vector) {
705  const GEMEtaPartition* bound = nullptr;
706  for (const GEMChamber* chamber : chamber_vector) {
707  if (not checkBounds(global_point, chamber->surface()))
708  continue;
709 
710  for (const GEMEtaPartition* eta_partition : chamber->etaPartitions()) {
711  if (checkBounds(global_point, eta_partition->surface())) {
712  bound = eta_partition;
713  break;
714  }
715  } // GEMEtaPartition
716  } // GEMChamber
717 
718  return bound;
719 }
720 
721 std::pair<const GEMRecHit*, float> GEMEfficiencyAnalyzer::findClosetHit(const GlobalPoint& dest_global_pos,
723  const GEMEtaPartition* eta_partition) {
724  const StripTopology& topology = eta_partition->specificTopology();
725  const LocalPoint&& dest_local_pos = eta_partition->toLocal(dest_global_pos);
726  const float dest_local_x = dest_local_pos.x();
727  const float dest_local_y = dest_local_pos.y();
728 
729  const GEMRecHit* closest_hit = nullptr;
730  float min_residual_rphi = 1e6;
731 
732  for (auto hit = range.first; hit != range.second; ++hit) {
733  const LocalPoint&& hit_local_pos = hit->localPosition();
734  const float hit_local_phi = topology.stripAngle(eta_partition->strip(hit_local_pos));
735 
736  const float residual_x = dest_local_x - hit_local_pos.x();
737  const float residual_y = dest_local_y - hit_local_pos.y();
738  const float residual_rphi = std::cos(hit_local_phi) * residual_x + std::sin(hit_local_phi) * residual_y;
739 
740  if (std::abs(residual_rphi) < std::abs(min_residual_rphi)) {
741  min_residual_rphi = residual_rphi;
742  closest_hit = &(*hit);
743  }
744  }
745 
746  return std::make_pair(closest_hit, min_residual_rphi);
747 }
GlobalErrorBase::phierr
T phierr(const GlobalPoint &aPoint) const
Definition: GlobalErrorBase.h:149
TkRotation< float >
GEMEfficiencyAnalyzer::me_chamber_
MEMap me_chamber_
Definition: GEMEfficiencyAnalyzer.h:103
GEMEfficiencyAnalyzer.h
GEMEfficiencyAnalyzer::skipLayer
bool skipLayer(const reco::Track *, const GEMLayerData &)
Definition: GEMEfficiencyAnalyzer.cc:676
GEMEfficiencyAnalyzer::analyze
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Definition: GEMEfficiencyAnalyzer.cc:348
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
GEMEfficiencyAnalyzer::use_prop_r_error_cut_
bool use_prop_r_error_cut_
Definition: GEMEfficiencyAnalyzer.h:81
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
GEMOfflineDQMBase::getReStLaKey
GEMDetId getReStLaKey(const GEMDetId &)
Definition: GEMOfflineDQMBase.h:85
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
GeomDet
Definition: GeomDet.h:27
GEMEfficiencyAnalyzer::me_ieta_matched_
MEMap me_ieta_matched_
Definition: GEMEfficiencyAnalyzer.h:106
GEMSuperChamber
Definition: GEMSuperChamber.h:19
LocalTrajectoryError::positionError
LocalError positionError() const
Definition: LocalTrajectoryError.h:81
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
muon
Definition: MuonCocktails.h:17
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
edm::Run
Definition: Run.h:45
GEMEfficiencyAnalyzer::me_prop_r_err_
MonitorElement * me_prop_r_err_
Definition: GEMEfficiencyAnalyzer.h:114
min
T min(T a, T b)
Definition: MathUtil.h:58
deltaPhi.h
GEMEfficiencyAnalyzer::me_all_abs_residual_rphi_
MonitorElement * me_all_abs_residual_rphi_
Definition: GEMEfficiencyAnalyzer.h:116
GEMEfficiencyAnalyzer::getTrack
const reco::Track * getTrack(const reco::Muon &)
Definition: GEMEfficiencyAnalyzer.cc:584
relativeConstraints.station
station
Definition: relativeConstraints.py:67
GEMEfficiencyAnalyzer::bookNumerator2D
MonitorElement * bookNumerator2D(DQMStore::IBooker &, MonitorElement *)
Definition: GEMEfficiencyAnalyzer.cc:130
GEMEfficiencyAnalyzer::me_muon_pt_matched_
MEMap me_muon_pt_matched_
Definition: GEMEfficiencyAnalyzer.h:98
GEMEfficiencyAnalyzer::me_prop_phi_err_
MonitorElement * me_prop_phi_err_
Definition: GEMEfficiencyAnalyzer.h:115
gpuVertexFinder::eps
WorkSpace int float eps
Definition: gpuClusterTracksDBSCAN.h:18
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
Disk::build
static DiskPointer build(Args &&... args)
Definition: BoundDisk.h:38
geometry
Definition: geometry.py:1
GEMEtaPartition
Definition: GEMEtaPartition.h:12
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
GEMOfflineDQMBase
Definition: GEMOfflineDQMBase.h:11
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
GEMEfficiencyAnalyzer::bookEfficiencyDetector
void bookEfficiencyDetector(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:241
GEMEfficiencyAnalyzer::me_residual_y_
MEMap me_residual_y_
Definition: GEMEfficiencyAnalyzer.h:111
GEMEfficiencyAnalyzer::bookMisc
void bookMisc(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:320
MuonHitHelper::isGEM
static bool isGEM(unsigned int detId)
Definition: MuonHitHelper.cc:7
GEMEfficiencyAnalyzer::prop_phi_error_cut_
double prop_phi_error_cut_
Definition: GEMEfficiencyAnalyzer.h:84
GEMEfficiencyAnalyzer::bookResolution
void bookResolution(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:280
GlobalTrackingGeometryRecord
Definition: GlobalTrackingGeometryRecord.h:17
MuonHitHelper::isCSC
static bool isCSC(unsigned int detId)
Definition: MuonHitHelper.cc:11
ReferenceCountingPointer< Disk >
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
StripTopology.h
reco::TransientTrack::recHitsBegin
trackingRecHit_iterator recHitsBegin() const
first iterator to RecHits
Definition: TransientTrack.h:126
GEMEfficiencyAnalyzer::folder_
std::string folder_
Definition: GEMEfficiencyAnalyzer.h:73
GEMEtaPartition::specificTopology
const StripTopology & specificTopology() const
Definition: GEMEtaPartition.cc:16
GEMEfficiencyAnalyzer::use_global_muon_
bool use_global_muon_
Definition: GEMEfficiencyAnalyzer.h:77
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
edm::Handle< GEMRecHitCollection >
SiStripMonitorCluster_cfi.zmin
zmin
Definition: SiStripMonitorCluster_cfi.py:200
GEMEfficiencyAnalyzer::GEMLayerData
Definition: GEMEfficiencyAnalyzer.h:33
reco::TransientTrack::stateOnSurface
TrajectoryStateOnSurface stateOnSurface(const GlobalPoint &point) const
Definition: TransientTrack.h:94
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
MuonServiceProxy_cff.MuonServiceProxy
MuonServiceProxy
Definition: MuonServiceProxy_cff.py:14
reco::Muon
Definition: Muon.h:27
geometryDiff.epsilon
int epsilon
Definition: geometryDiff.py:26
GEMUtils::getSuffixName
TString getSuffixName(Int_t region_id)
Definition: GEMValidationUtils.cc:5
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
GEMValidationUtils.h
SimpleDiskBounds
Definition: SimpleDiskBounds.h:11
DetId
Definition: DetId.h:17
optionsL1T.skip
skip
Definition: optionsL1T.py:30
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
GEMEfficiencyAnalyzer::~GEMEfficiencyAnalyzer
~GEMEfficiencyAnalyzer() override
Definition: GEMEfficiencyAnalyzer.cc:46
ErrorFrameTransformer
Definition: ErrorFrameTransformer.h:12
GEMOfflineDQMBase::setDetLabelsEta
void setDetLabelsEta(MonitorElement *, const GEMStation *)
Definition: GEMOfflineDQMBase.cc:49
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
GEMEfficiencyAnalyzer::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: GEMEfficiencyAnalyzer.cc:106
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
SiStripMonitorCluster_cfi.zmax
zmax
Definition: SiStripMonitorCluster_cfi.py:201
GEMEfficiencyAnalyzer::me_muon_phi_matched_
MEMap me_muon_phi_matched_
Definition: GEMEfficiencyAnalyzer.h:102
Bounds::inside
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
reco::TransientTrack::recHitsEnd
trackingRecHit_iterator recHitsEnd() const
last iterator to RecHits
Definition: TransientTrack.h:128
GEMEfficiencyAnalyzer::residual_rphi_cut_
float residual_rphi_cut_
Definition: GEMEfficiencyAnalyzer.h:80
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Surface::bounds
const Bounds & bounds() const
Definition: Surface.h:87
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
GEMStation
Definition: GEMStation.h:19
TransientTrackRecord
Definition: TransientTrackRecord.h:11
reco::Track
Definition: Track.h:27
edm::ESHandle< GEMGeometry >
Point3DBase< float, GlobalTag >
GEMEfficiencyAnalyzer::rechit_token_
edm::EDGetTokenT< GEMRecHitCollection > rechit_token_
Definition: GEMEfficiencyAnalyzer.h:74
GeomDet::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
GEMEfficiencyAnalyzer::checkBounds
bool checkBounds(const GlobalPoint &, const Plane &)
Definition: GEMEfficiencyAnalyzer.cc:697
GlobalTrackingGeometryRecord.h
GEMEfficiencyAnalyzer::me_pull_y_
MEMap me_pull_y_
Definition: GEMEfficiencyAnalyzer.h:112
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GEMEfficiencyAnalyzer::buildGEMLayers
std::vector< GEMLayerData > buildGEMLayers(const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:531
MuonServiceProxy::update
void update(const edm::EventSetup &setup, bool duringEvent=true)
update the services each event
Definition: MuonServiceProxy.cc:111
GlobalErrorBase::rerr
T rerr(const GlobalPoint &aPoint) const
Definition: GlobalErrorBase.h:138
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
GEMDetId::chamber
constexpr int chamber() const
Definition: GEMDetId.h:183
TransientTrackBuilder.h
GeomDet::toGlobal
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
edm::ParameterSet
Definition: ParameterSet.h:47
idealTransformation.rotation
dictionary rotation
Definition: idealTransformation.py:1
GEMEfficiencyAnalyzer::findClosetHit
std::pair< const GEMRecHit *, float > findClosetHit(const GlobalPoint &, const GEMRecHitCollection::range &, const GEMEtaPartition *)
Definition: GEMEfficiencyAnalyzer.cc:721
GEMOfflineDQMBase::getReStEtKey
GEMDetId getReStEtKey(const GEMDetId &)
Definition: GEMOfflineDQMBase.h:89
GEMEfficiencyAnalyzer::bookEfficiencyChamber
void bookEfficiencyChamber(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:171
GEMOfflineDQMBase::checkRefs
bool checkRefs(const std::vector< T * > &)
Definition: GEMOfflineDQMBase.h:70
LocalError
Definition: LocalError.h:12
gpuVertexFinder::hist
__shared__ Hist hist
Definition: gpuClusterTracksDBSCAN.h:48
GEMDetId::roll
constexpr int roll() const
Definition: GEMDetId.h:194
GEMEfficiencyAnalyzer::name_
std::string name_
Definition: GEMEfficiencyAnalyzer.h:72
GEMDetId
Definition: GEMDetId.h:18
CSCDetId
Definition: CSCDetId.h:26
GEMEfficiencyAnalyzer::pt_clamp_max_
double pt_clamp_max_
Definition: GEMEfficiencyAnalyzer.h:92
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
GEMEfficiencyAnalyzer::pt_bins_
std::vector< double > pt_bins_
Definition: GEMEfficiencyAnalyzer.h:85
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
GEMEfficiencyAnalyzer::getStartingState
std::pair< TrajectoryStateOnSurface, DetId > getStartingState(const reco::TransientTrack &, const GEMLayerData &, const edm::ESHandle< GlobalTrackingGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:603
MuonServiceProxy::propagator
edm::ESHandle< Propagator > propagator(std::string propagatorName) const
get the propagator
Definition: MuonServiceProxy.cc:177
StripTopology::stripAngle
virtual float stripAngle(float strip) const =0
GEMEtaPartition::id
GEMDetId id() const
Definition: GEMEtaPartition.h:18
GEMEfficiencyAnalyzer::use_only_me11_
bool use_only_me11_
Definition: GEMEfficiencyAnalyzer.h:79
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
chambers
static char chambers[264][20]
Definition: ReadPGInfo.cc:243
GlobalErrorBase< double, ErrorMatrixTag >
GEMEfficiencyAnalyzer::is_cosmics_
bool is_cosmics_
Definition: GEMEfficiencyAnalyzer.h:76
edm::EventSetup
Definition: EventSetup.h:58
reco::TransientTrack::outermostMeasurementState
TrajectoryStateOnSurface outermostMeasurementState() const
Definition: TransientTrack.h:86
edm::ParameterSetDescription::setAllowAnything
void setAllowAnything()
allow any parameter label/value pairs
Definition: ParameterSetDescription.cc:37
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
GEMEfficiencyAnalyzer::eta_up_
double eta_up_
Definition: GEMEfficiencyAnalyzer.h:88
TransientTrackRecord.h
GEMEfficiencyAnalyzer::me_ieta_
MEMap me_ieta_
Definition: GEMEfficiencyAnalyzer.h:105
get
#define get
gem
Definition: AMC13Event.h:6
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
GEMEtaPartition::strip
float strip(const LocalPoint &lp) const
Definition: GEMEtaPartition.cc:37
GEMEfficiencyAnalyzer::muon_token_
edm::EDGetTokenT< edm::View< reco::Muon > > muon_token_
Definition: GEMEfficiencyAnalyzer.h:75
GEMChamber
Definition: GEMChamber.h:19
GlobalTrackingGeometry.h
GEMEfficiencyAnalyzer::isME11
bool isME11(const DetId &)
Definition: GEMEfficiencyAnalyzer.cc:669
GEMEfficiencyAnalyzer::GEMEfficiencyAnalyzer
GEMEfficiencyAnalyzer(const edm::ParameterSet &)
Definition: GEMEfficiencyAnalyzer.cc:15
GEMEfficiencyAnalyzer::me_residual_rphi_
MEMap me_residual_rphi_
Definition: GEMEfficiencyAnalyzer.h:110
GEMEfficiencyAnalyzer::use_skip_layer_
bool use_skip_layer_
Definition: GEMEfficiencyAnalyzer.h:78
GEMEfficiencyAnalyzer::me_muon_eta_
MEMap me_muon_eta_
Definition: GEMEfficiencyAnalyzer.h:99
GEMEfficiencyAnalyzer::eta_low_
double eta_low_
Definition: GEMEfficiencyAnalyzer.h:87
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
reco::TransientTrack::isValid
bool isValid() const
Make the ReferenceCountingProxy method to check validity public.
Definition: TransientTrack.h:147
edm::RangeMap::range
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:50
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
writedatasetfile.run
run
Definition: writedatasetfile.py:27
ErrorFrameTransformer.h
reco::TransientTrack
Definition: TransientTrack.h:19
reco::TransientTrack::track
const Track & track() const
Definition: TransientTrack.h:117
GEMOfflineDQMBase::getReStKey
GEMDetId getReStKey(const int, const int)
Definition: GEMOfflineDQMBase.h:78
GEMOfflineDQMBase::fillME
void fillME(MEMap &me_map, const GEMDetId &key, const float x)
Definition: GEMOfflineDQMBase.cc:86
GloballyPositioned::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Definition: GloballyPositioned.h:98
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
GEMUtils::getSuffixTitle
TString getSuffixTitle(Int_t region_id)
Definition: GEMValidationUtils.cc:34
GEMEfficiencyAnalyzer::kLogCategory_
const std::string kLogCategory_
Definition: GEMEfficiencyAnalyzer.h:120
BoundPlane
Plane
Definition: Plane.h:16
GEMEfficiencyAnalyzer::findEtaPartition
const GEMEtaPartition * findEtaPartition(const GlobalPoint &, const std::vector< const GEMChamber * > &)
Definition: GEMEfficiencyAnalyzer.cc:703
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
GEMEfficiencyAnalyzer::bookEfficiencyEtaPartition
void bookEfficiencyEtaPartition(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:206
GEMRecHit
Definition: GEMRecHit.h:14
dqm::implementation::IBooker
Definition: DQMStore.h:43
TransientTrackBuilder::build
reco::TransientTrack build(const reco::Track *p) const
Definition: TransientTrackBuilder.cc:20
mixOne_premix_on_sim_cfi.gem
gem
Definition: mixOne_premix_on_sim_cfi.py:194
GEMEfficiencyAnalyzer::me_muon_pt_
MEMap me_muon_pt_
Definition: GEMEfficiencyAnalyzer.h:97
ConsumesCollector.h
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
GEMEfficiencyAnalyzer::me_chamber_matched_
MEMap me_chamber_matched_
Definition: GEMEfficiencyAnalyzer.h:104
GEMEfficiencyAnalyzer::muon_service_
MuonServiceProxy * muon_service_
Definition: GEMEfficiencyAnalyzer.h:91
SimpleDiskBounds.h
GEMEfficiencyAnalyzer::use_prop_phi_error_cut_
bool use_prop_phi_error_cut_
Definition: GEMEfficiencyAnalyzer.h:83
GEMEfficiencyAnalyzer::me_detector_
MEMap me_detector_
Definition: GEMEfficiencyAnalyzer.h:107
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
ErrorFrameTransformer::transform
static GlobalError transform(const LocalError &le, const Surface &surf)
Definition: ErrorFrameTransformer.h:16
GEMEfficiencyAnalyzer::eta_clamp_max_
double eta_clamp_max_
Definition: GEMEfficiencyAnalyzer.h:93
GEMEfficiencyAnalyzer::eta_nbins_
int eta_nbins_
Definition: GEMEfficiencyAnalyzer.h:86
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
event
Definition: event.py:1
GEMEfficiencyAnalyzer::findStartingState
std::pair< TrajectoryStateOnSurface, DetId > findStartingState(const reco::TransientTrack &, const GEMLayerData &, const edm::ESHandle< GlobalTrackingGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:634
GEMEfficiencyAnalyzer::isInsideOut
bool isInsideOut(const reco::Track &)
Definition: GEMEfficiencyAnalyzer.h:123
MuonHitHelper.h
edm::Event
Definition: Event.h:73
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7733
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition: TrajectoryStateOnSurface.h:77
crabWrapper.key
key
Definition: crabWrapper.py:19
StripTopology
Definition: StripTopology.h:11
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
LocalError::yy
float yy() const
Definition: LocalError.h:24
edm::InputTag
Definition: InputTag.h:15
GEMEfficiencyAnalyzer::bookEfficiencyMomentum
void bookEfficiencyMomentum(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:136
GEMEfficiencyAnalyzer::me_detector_matched_
MEMap me_detector_matched_
Definition: GEMEfficiencyAnalyzer.h:108
GEMEfficiencyAnalyzer::bookNumerator1D
MonitorElement * bookNumerator1D(DQMStore::IBooker &, MonitorElement *)
Definition: GEMEfficiencyAnalyzer.cc:124
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
hit
Definition: SiStripHitEffFromCalibTree.cc:88
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
GEMEfficiencyAnalyzer::me_muon_phi_
MEMap me_muon_phi_
Definition: GEMEfficiencyAnalyzer.h:101
GEMEfficiencyAnalyzer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: GEMEfficiencyAnalyzer.cc:48
reco::TransientTrack::innermostMeasurementState
TrajectoryStateOnSurface innermostMeasurementState() const
Definition: TransientTrack.h:88
GEMEfficiencyAnalyzer::me_prop_chamber_
MEMap me_prop_chamber_
Definition: GEMEfficiencyAnalyzer.h:117
GEMEfficiencyAnalyzer::me_muon_eta_matched_
MEMap me_muon_eta_matched_
Definition: GEMEfficiencyAnalyzer.h:100
GEMEfficiencyAnalyzer::prop_r_error_cut_
double prop_r_error_cut_
Definition: GEMEfficiencyAnalyzer.h:82