CMS 3D CMS Logo

GEMEfficiencyAnalyzer.cc
Go to the documentation of this file.
2 
13 
15  name_ = pset.getUntrackedParameter<std::string>("name");
16  folder_ = pset.getUntrackedParameter<std::string>("folder");
17 
18  rechit_token_ = consumes<GEMRecHitCollection>(pset.getParameter<edm::InputTag>("recHitTag"));
19  muon_token_ = consumes<edm::View<reco::Muon> >(pset.getParameter<edm::InputTag>("muonTag"));
20 
21  is_cosmics_ = pset.getUntrackedParameter<bool>("isCosmics");
22  use_global_muon_ = pset.getUntrackedParameter<bool>("useGlobalMuon");
23  use_skip_layer_ = pset.getParameter<bool>("useSkipLayer");
24  use_only_me11_ = pset.getParameter<bool>("useOnlyME11");
25  residual_rphi_cut_ = static_cast<float>(pset.getParameter<double>("residualRPhiCut"));
26  use_prop_r_error_cut_ = pset.getParameter<bool>("usePropRErrorCut");
27  prop_r_error_cut_ = pset.getParameter<double>("propRErrorCut");
28  use_prop_phi_error_cut_ = pset.getParameter<bool>("usePropPhiErrorCut");
29  prop_phi_error_cut_ = pset.getParameter<double>("propPhiErrorCut");
30 
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 
39  const double eps = std::numeric_limits<double>::epsilon();
40  pt_clamp_max_ = pt_bins_.back() - eps;
41  eta_clamp_max_ = eta_up_ - eps;
42 }
43 
45 
47  // beam scenario
48  {
50  desc.addUntracked<std::string>("name", "GlobalMuon");
51  desc.addUntracked<std::string>("folder", "GEM/Efficiency/type0");
52  desc.add<edm::InputTag>("recHitTag", edm::InputTag("gemRecHits"));
53  desc.add<edm::InputTag>("muonTag", edm::InputTag("muons"));
54  desc.addUntracked<bool>("isCosmics", false);
55  desc.addUntracked<bool>("useGlobalMuon", true);
56  desc.add<bool>("useSkipLayer", false);
57  desc.add<bool>("useOnlyME11", false);
58  desc.add<double>("residualRPhiCut", 2.0); // TODO need to be tuned
59  desc.add<bool>("usePropRErrorCut", false);
60  desc.add<double>("propRErrorCut", 1.0);
61  desc.add<bool>("usePropPhiErrorCut", false);
62  desc.add<double>("propPhiErrorCut", 0.01);
63  desc.addUntracked<std::vector<double> >("ptBins", {20., 30., 40., 50., 60., 70., 80., 90., 100., 120.});
64  desc.addUntracked<int>("etaNbins", 9);
65  desc.addUntracked<double>("etaLow", 1.4);
66  desc.addUntracked<double>("etaUp", 2.3);
67  {
69  psd0.setAllowAnything();
70  desc.add<edm::ParameterSetDescription>("ServiceParameters", psd0);
71  }
72  descriptions.add("gemEfficiencyAnalyzerDefault", desc);
73  } // beam scenario
74 
75  // cosmic scenario
76  {
78  desc.addUntracked<std::string>("name", "GlobalMuon"); // FIXME
79  desc.addUntracked<std::string>("folder", "GEM/Efficiency/type0");
80  desc.add<edm::InputTag>("recHitTag", edm::InputTag("gemRecHits"));
81  desc.add<edm::InputTag>("muonTag", edm::InputTag("muons"));
82  desc.addUntracked<bool>("isCosmics", true);
83  desc.addUntracked<bool>("useGlobalMuon", false);
84  desc.add<bool>("useSkipLayer", false);
85  desc.add<bool>("useOnlyME11", true);
86  desc.add<double>("residualRPhiCut", 5.0); // TODO need to be tuned
87  desc.add<bool>("usePropRErrorCut", true);
88  desc.add<double>("propRErrorCut", 1.0);
89  desc.add<bool>("usePropPhiErrorCut", true);
90  desc.add<double>("propPhiErrorCut", 0.001);
91  desc.addUntracked<std::vector<double> >(
92  "ptBins", {0., 10., 20., 30., 40., 50., 60., 70., 80., 90., 100., 120., 140., 160., 180., 200., 220.});
93  desc.addUntracked<int>("etaNbins", 9);
94  desc.addUntracked<double>("etaLow", 1.4);
95  desc.addUntracked<double>("etaUp", 2.3);
96  {
98  psd0.setAllowAnything();
99  desc.add<edm::ParameterSetDescription>("ServiceParameters", psd0);
100  }
101  descriptions.add("gemEfficiencyAnalyzerCosmicsDefault", desc);
102  } // cosmics
103 }
104 
106  edm::Run const& run,
107  edm::EventSetup const& isetup) {
109  isetup.get<MuonGeometryRecord>().get(gem);
110  if (not gem.isValid()) {
111  edm::LogError(kLogCategory_) << "GEMGeometry is invalid" << std::endl;
112  return;
113  }
114 
115  bookEfficiencyMomentum(ibooker, gem);
116  bookEfficiencyChamber(ibooker, gem);
118  bookResolution(ibooker, gem);
119  bookMisc(ibooker, gem);
120 }
121 
123  const std::string name = me->getName() + "_matched";
124  TH1F* hist = dynamic_cast<TH1F*>(me->getTH1F()->Clone(name.c_str()));
125  return ibooker.book1D(name, hist);
126 }
127 
129  const std::string name = me->getName() + "_matched";
130  TH2F* hist = dynamic_cast<TH2F*>(me->getTH2F()->Clone(name.c_str()));
131  return ibooker.book2D(name, hist);
132 }
133 
135  // TODO Efficiency/Source
136  ibooker.setCurrentFolder(folder_ + "/Efficiency");
137 
138  const TString pt_x_title = "Muon p_{T} [GeV]";
139  const int pt_nbinsx = pt_bins_.size() - 1;
140 
141  const std::string eta_x_title = "Muon |#eta|";
142  const std::string phi_x_title = "Muon #phi [rad]";
143 
144  for (const GEMStation* station : gem->stations()) {
145  const int region_id = station->region();
146  const int station_id = station->station();
147 
148  const GEMDetId&& key = getReStKey(region_id, station_id);
149  const TString&& name_suffix = getSuffixName(region_id, station_id);
150  const TString&& title_suffix = getSuffixTitle(region_id, station_id);
151 
152  const TString&& title = name_.c_str() + title_suffix;
153 
154  TH1F* h_muon_pt = new TH1F("muon_pt" + name_suffix, title, pt_nbinsx, &pt_bins_[0]);
155  h_muon_pt->SetXTitle(pt_x_title);
156  me_muon_pt_[key] = ibooker.book1D(h_muon_pt->GetName(), h_muon_pt);
158 
159  me_muon_eta_[key] = ibooker.book1D("muon_eta" + name_suffix, title, eta_nbins_, eta_low_, eta_up_);
160  me_muon_eta_[key]->setXTitle(eta_x_title);
162 
163  me_muon_phi_[key] = ibooker.book1D("muon_phi" + name_suffix, title, 108, -M_PI, M_PI);
164  me_muon_phi_[key]->setAxisTitle(phi_x_title);
166  } // station
167 }
168 
170  // TODO Efficiency/Source
171  ibooker.setCurrentFolder(folder_ + "/Efficiency");
172 
173  for (const GEMStation* station : gem->stations()) {
174  const int region_id = station->region();
175  const int station_id = station->station();
176 
177  const std::vector<const GEMSuperChamber*>&& superchambers = station->superChambers();
178  if (not checkRefs(superchambers)) {
179  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
180  return;
181  }
182 
183  const int num_chambers = superchambers.size();
184  for (const GEMChamber* chamber : superchambers[0]->chambers()) {
185  const int layer_id = chamber->id().layer();
186 
187  const TString&& name_suffix = getSuffixName(region_id, station_id, layer_id);
188  const TString&& title_suffix = getSuffixTitle(region_id, station_id, layer_id);
189  const GEMDetId&& key = getReStLaKey(chamber->id());
190 
191  me_chamber_[key] =
192  ibooker.book1D("chamber" + name_suffix, name_.c_str() + title_suffix, num_chambers, 0.5, num_chambers + 0.5);
193  me_chamber_[key]->setAxisTitle("Chamber");
194  me_chamber_[key]->getTH1F()->SetNdivisions(-num_chambers, "Y");
195  for (int binx = 1; binx <= num_chambers; binx++) {
196  me_chamber_[key]->setBinLabel(binx, std::to_string(binx));
197  }
198 
200  } // layer
201  } // station
202 }
203 
206  // TODO Efficiency/Source
207  ibooker.setCurrentFolder(folder_ + "/Efficiency");
208 
209  for (const GEMStation* station : gem->stations()) {
210  const int region_id = station->region();
211  const int station_id = station->station();
212 
213  const GEMDetId&& key = getReStKey(region_id, station_id);
214  const TString&& name_suffix = getSuffixName(region_id, station_id);
215  const TString&& title_suffix = getSuffixTitle(region_id, station_id);
216 
217  const std::vector<const GEMSuperChamber*>&& superchambers = station->superChambers();
218  if (not checkRefs(superchambers)) {
219  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
220  return;
221  }
222 
223  const int num_ch = superchambers.size() * superchambers.front()->nChambers();
224  const int num_etas = getNumEtaPartitions(station);
225 
226  me_detector_[key] = ibooker.book2D("detector" + name_suffix,
227  name_.c_str() + title_suffix,
228  num_ch,
229  0.5,
230  num_ch + 0.5,
231  num_etas,
232  0.5,
233  num_etas + 0.5);
236  } // station
237 }
238 
240  ibooker.setCurrentFolder(folder_ + "/Resolution");
241  for (const GEMStation* station : gem->stations()) {
242  const int region_id = station->region();
243  const int station_id = station->station();
244 
245  const std::vector<const GEMSuperChamber*>&& superchambers = station->superChambers();
246  if (not checkRefs(superchambers)) {
247  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
248  return;
249  }
250 
251  const std::vector<const GEMChamber*>& chambers = superchambers[0]->chambers();
252  if (not checkRefs(chambers)) {
253  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMChamber ptrs" << std::endl;
254  return;
255  }
256 
257  for (const GEMEtaPartition* eta_partition : chambers[0]->etaPartitions()) {
258  const int ieta = eta_partition->id().roll();
259 
260  const GEMDetId&& key = getReStEtKey(eta_partition->id());
261  // TODO
262  const TString&& name_suffix = TString::Format("_GE%+.2d_R%d", region_id * (station_id * 10 + 1), ieta);
263  const TString&& title =
264  name_.c_str() + TString::Format(" : GE%+.2d Roll %d", region_id * (station_id * 10 + 1), ieta);
265 
267  ibooker.book1D("residual_rphi" + name_suffix, title, 50, -residual_rphi_cut_, residual_rphi_cut_);
268  me_residual_rphi_[key]->setAxisTitle("Residual in R#phi [cm]");
269 
270  me_residual_y_[key] = ibooker.book1D("residual_y" + name_suffix, title, 60, -12.0, 12.0);
271  me_residual_y_[key]->setAxisTitle("Residual in Local Y [cm]");
272 
273  me_pull_y_[key] = ibooker.book1D("pull_y" + name_suffix, title, 60, -3.0, 3.0);
274  me_pull_y_[key]->setAxisTitle("Pull in Local Y");
275  } // ieta
276  } // station
277 }
278 
280  ibooker.setCurrentFolder(folder_ + "/Misc");
281  me_prop_r_err_ = ibooker.book1D("prop_r_err", ";Propagation Global R Error [cm];Entries", 20, 0.0, 20.0);
282  me_prop_phi_err_ = ibooker.book1D("prop_phi_err", ";Propagation Global Phi Error [rad];Entries", 20, 0.0, M_PI);
283  me_all_abs_residual_rphi_ = ibooker.book1D("all_abs_residual_rphi", ";Residual in R#phi [cm];Entries", 20, 0.0, 20.0);
284 
285  for (const GEMStation* station : gem->stations()) {
286  const int region_id = station->region();
287  const int station_id = station->station();
288 
289  const std::vector<const GEMSuperChamber*>&& superchambers = station->superChambers();
290  if (not checkRefs(superchambers)) {
291  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
292  return;
293  }
294  // ignore layer ids
295  const int num_ch = superchambers.size();
296 
297  const GEMDetId&& key = getReStKey(region_id, station_id);
298  const TString&& name_suffix = getSuffixName(region_id, station_id);
299  const TString&& title_suffix = getSuffixTitle(region_id, station_id);
300  me_prop_chamber_[key] = ibooker.book1D("prop_chamber" + name_suffix, title_suffix, num_ch, 0.5, num_ch + 0.5);
301  me_prop_chamber_[key]->setAxisTitle("Destination Chamber Id", 1);
302  me_prop_chamber_[key]->setAxisTitle("Entries", 2);
303  } // station
304 }
305 
307  edm::Handle<GEMRecHitCollection> rechit_collection;
308  event.getByToken(rechit_token_, rechit_collection);
309  if (not rechit_collection.isValid()) {
310  edm::LogError(kLogCategory_) << "GEMRecHitCollection is invalid" << std::endl;
311  return;
312  }
313 
315  event.getByToken(muon_token_, muon_view);
316  if (not muon_view.isValid()) {
317  edm::LogError(kLogCategory_) << "View<Muon> is invalid" << std::endl;
318  return;
319  }
320 
323  if (not gem.isValid()) {
324  edm::LogError(kLogCategory_) << "GEMGeometry is invalid" << std::endl;
325  return;
326  }
327 
328  edm::ESHandle<GlobalTrackingGeometry> global_tracking_geometry;
329  setup.get<GlobalTrackingGeometryRecord>().get(global_tracking_geometry);
330  if (not global_tracking_geometry.isValid()) {
331  edm::LogError(kLogCategory_) << "GlobalTrackingGeometry is invalid" << std::endl;
332  return;
333  }
334 
335  edm::ESHandle<TransientTrackBuilder> transient_track_builder;
336  setup.get<TransientTrackRecord>().get("TransientTrackBuilder", transient_track_builder);
337  if (not transient_track_builder.isValid()) {
338  edm::LogError(kLogCategory_) << "TransientTrackRecord is invalid" << std::endl;
339  return;
340  }
341 
343  edm::ESHandle<Propagator>&& propagator = muon_service_->propagator("SteppingHelixPropagatorAny");
344  if (not propagator.isValid()) {
345  edm::LogError(kLogCategory_) << "Propagator is invalid" << std::endl;
346  return;
347  }
348 
349  if (rechit_collection->size() < 1) {
350  edm::LogInfo(kLogCategory_) << "empty rechit collection" << std::endl;
351  return;
352  }
353 
354  if (muon_view->empty()) {
355  edm::LogInfo(kLogCategory_) << "empty muon collection" << std::endl;
356  return;
357  }
358 
359  const std::vector<GEMLayerData>&& layer_vector = buildGEMLayers(gem);
360 
361  for (const reco::Muon& muon : *muon_view) {
362  const reco::Track* track = getTrack(muon);
363  if (track == nullptr) {
364  edm::LogError(kLogCategory_) << "failed to get a muon track" << std::endl;
365  continue;
366  }
367 
368  const reco::TransientTrack&& transient_track = transient_track_builder->build(track);
369  if (not transient_track.isValid()) {
370  edm::LogError(kLogCategory_) << "failed to build TransientTrack" << std::endl;
371  continue;
372  }
373 
374  for (const GEMLayerData& layer : layer_vector) {
375  if (use_skip_layer_ and skipLayer(track, layer)) {
376  edm::LogInfo(kLogCategory_) << "skip GEM Layer" << std::endl;
377  continue;
378  }
379 
380  const auto&& [start_state, start_id] = getStartingState(transient_track, layer, global_tracking_geometry);
381 
382  if (not start_state.isValid()) {
383  edm::LogInfo(kLogCategory_) << "failed to get a starting state" << std::endl;
384  continue;
385  }
386 
387  if (use_only_me11_ and (not isME11(start_id))) {
388  edm::LogInfo(kLogCategory_) << "skip a starting state because it is not ME11" << std::endl;
389  continue;
390  }
391 
392  // the trajectory state on the destination surface
393  const TrajectoryStateOnSurface&& dest_state = propagator->propagate(start_state, *(layer.surface));
394  if (not dest_state.isValid()) {
395  edm::LogInfo(kLogCategory_) << "failed to propagate a muon" << std::endl;
396  continue;
397  }
398 
399  const GlobalPoint&& dest_global_pos = dest_state.globalPosition();
400 
401  if (not checkBounds(dest_global_pos, (*layer.surface))) {
402  edm::LogInfo(kLogCategory_) << "failed to pass checkBounds" << std::endl;
403  continue;
404  }
405 
406  const GEMEtaPartition* eta_partition = findEtaPartition(dest_global_pos, layer.chambers);
407  if (eta_partition == nullptr) {
408  edm::LogInfo(kLogCategory_) << "failed to find an eta partition" << std::endl;
409  continue;
410  }
411 
412  const BoundPlane& surface = eta_partition->surface();
413 
414  const LocalPoint&& dest_local_pos = eta_partition->toLocal(dest_global_pos);
415  const LocalError&& dest_local_err = dest_state.localError().positionError();
416  const GlobalError& dest_global_err = ErrorFrameTransformer().transform(dest_local_err, surface);
417 
418  const double dest_global_r_err = std::sqrt(dest_global_err.rerr(dest_global_pos));
419  const double dest_global_phi_err = std::sqrt(dest_global_err.phierr(dest_global_pos));
420 
421  const GEMDetId&& gem_id = eta_partition->id();
422  const GEMDetId&& rs_key = getReStKey(gem_id);
423  const GEMDetId&& rsl_key = getReStLaKey(gem_id);
424  const GEMDetId&& rse_key = getReStEtKey(gem_id);
425 
426  const int chamber_bin = getDetOccXBin(gem_id, gem);
427  const int ieta = gem_id.roll();
428 
429  // FIXME clever way to clamp values?
430  me_prop_r_err_->Fill(std::min(dest_global_r_err, 19.999));
431  me_prop_phi_err_->Fill(std::min(dest_global_r_err, M_PI - 0.0001));
432  me_prop_chamber_[rs_key]->Fill(gem_id.chamber());
433 
434  if (use_prop_r_error_cut_ and (dest_global_r_err > prop_r_error_cut_)) {
435  edm::LogInfo(kLogCategory_) << "failed to pass a propagation global R error cut" << std::endl;
436  continue;
437  }
438 
439  if (use_prop_phi_error_cut_ and (dest_global_phi_err > prop_phi_error_cut_)) {
440  edm::LogInfo(kLogCategory_) << "failed to pass a propagation global phi error cut" << std::endl;
441  continue;
442  }
443 
444  const double muon_pt = std::min(muon.pt(), pt_clamp_max_);
445  const double muon_eta = std::clamp(std::fabs(muon.eta()), eta_low_, eta_clamp_max_);
446 
447  fillME(me_detector_, rs_key, chamber_bin, ieta);
448  fillME(me_muon_pt_, rs_key, muon_pt);
449  fillME(me_muon_eta_, rs_key, muon_eta);
450  fillME(me_muon_phi_, rs_key, muon.phi());
451  fillME(me_chamber_, rsl_key, gem_id.chamber());
452 
453  const auto&& [hit, residual_rphi] = findClosetHit(dest_global_pos, rechit_collection->get(gem_id), eta_partition);
454 
455  if (hit == nullptr) {
456  edm::LogInfo(kLogCategory_) << "failed to find a hit" << std::endl;
457  continue;
458  }
459 
460  me_all_abs_residual_rphi_->Fill(std::min(std::abs(residual_rphi), 19.999f));
461 
462  if (std::abs(residual_rphi) > residual_rphi_cut_) {
463  edm::LogInfo(kLogCategory_) << "failed to pass the residual rphi cut" << std::endl;
464  continue;
465  }
466 
468  fillME(me_muon_pt_matched_, rs_key, muon_pt);
469  fillME(me_muon_eta_matched_, rs_key, muon_eta);
470  fillME(me_muon_phi_matched_, rs_key, muon.phi());
471  fillME(me_chamber_matched_, rsl_key, gem_id.chamber());
472 
473  const LocalPoint&& hit_local_pos = hit->localPosition();
474  const LocalError&& hit_local_err = hit->localPositionError();
475 
476  const float residual_y = dest_local_pos.y() - hit_local_pos.y();
477  const float pull_y = residual_y / std::sqrt(dest_local_err.yy() + hit_local_err.yy());
478 
479  fillME(me_residual_rphi_, rse_key, residual_rphi);
480  fillME(me_residual_y_, rse_key, residual_y);
481  fillME(me_pull_y_, rse_key, pull_y);
482  } // layer
483  } // Muon
484 }
485 
486 std::vector<GEMEfficiencyAnalyzer::GEMLayerData> GEMEfficiencyAnalyzer::buildGEMLayers(
488  std::vector<GEMLayerData> layer_vector;
489 
490  for (const GEMStation* station : gem->stations()) {
491  const int region_id = station->region();
492  const int station_id = station->station();
493 
494  // layer_id - chambers
495  std::map<int, std::vector<const GEMChamber*> > chambers_per_layer; // chambers per layer
496  for (const GEMSuperChamber* super_chamber : station->superChambers()) {
497  for (const GEMChamber* chamber : super_chamber->chambers()) {
498  const int layer_id = chamber->id().layer();
499 
500  if (chambers_per_layer.find(layer_id) == chambers_per_layer.end())
501  chambers_per_layer.insert({layer_id, std::vector<const GEMChamber*>()});
502 
503  chambers_per_layer[layer_id].push_back(chamber);
504  } // GEMChamber
505  } // GEMSuperChamber
506 
507  for (auto [layer_id, chamber_vector] : chambers_per_layer) {
508  auto [rmin, rmax] = chamber_vector[0]->surface().rSpan();
509  auto [zmin, zmax] = chamber_vector[0]->surface().zSpan();
510  for (const GEMChamber* chamber : chamber_vector) {
511  // the span of a bound surface in the global coordinates
512  const auto [chamber_rmin, chamber_rmax] = chamber->surface().rSpan();
513  const auto [chamber_zmin, chamber_zmax] = chamber->surface().zSpan();
514 
515  rmin = std::min(rmin, chamber_rmin);
516  rmax = std::max(rmax, chamber_rmax);
517 
518  zmin = std::min(zmin, chamber_zmin);
519  zmax = std::max(zmax, chamber_zmax);
520  }
521 
522  // layer position and rotation
523  const float layer_z = chamber_vector[0]->position().z();
524  Surface::PositionType position(0.f, 0.f, layer_z);
526 
527  zmin -= layer_z;
528  zmax -= layer_z;
529 
530  // the bounds from min and max R and Z in the local coordinates.
531  SimpleDiskBounds* bounds = new SimpleDiskBounds(rmin, rmax, zmin, zmax);
532  const Disk::DiskPointer&& layer = Disk::build(position, rotation, bounds);
533 
534  layer_vector.emplace_back(layer, chamber_vector, region_id, station_id, layer_id);
535 
536  } // layer
537  } // GEMStation
538 
539  return layer_vector;
540 }
541 
543  const reco::Track* track = nullptr;
544 
545  if (is_cosmics_) {
546  if (muon.outerTrack().isNonnull())
547  track = muon.outerTrack().get();
548 
549  } else {
550  // beams, i.e. pp or heavy ions
551  if (use_global_muon_ and muon.globalTrack().isNonnull())
552  track = muon.globalTrack().get();
553 
554  else if ((not use_global_muon_) and muon.outerTrack().isNonnull())
555  track = muon.outerTrack().get();
556  }
557 
558  return track;
559 }
560 
561 std::pair<TrajectoryStateOnSurface, DetId> GEMEfficiencyAnalyzer::getStartingState(
562  const reco::TransientTrack& transient_track,
563  const GEMLayerData& layer,
565  TrajectoryStateOnSurface starting_state;
566  DetId starting_id;
567 
568  if (use_global_muon_) {
569  std::tie(starting_state, starting_id) = findStartingState(transient_track, layer, geometry);
570 
571  } else {
572  // if outer track
573  const reco::Track& track = transient_track.track();
574  const bool is_insideout = isInsideOut(track);
575 
576  const DetId inner_id{(is_insideout ? track.outerDetId() : track.innerDetId())};
577  if (MuonHitHelper::isGEM(inner_id.rawId())) {
578  std::tie(starting_state, starting_id) = findStartingState(transient_track, layer, geometry);
579 
580  } else {
581  starting_id = inner_id;
582  if (is_insideout)
583  starting_state = transient_track.outermostMeasurementState();
584  else
585  starting_state = transient_track.innermostMeasurementState();
586  }
587  }
588 
589  return std::make_pair(starting_state, starting_id);
590 }
591 
592 std::pair<TrajectoryStateOnSurface, DetId> GEMEfficiencyAnalyzer::findStartingState(
593  const reco::TransientTrack& transient_track,
594  const GEMLayerData& layer,
596  GlobalPoint starting_point;
597  DetId starting_id;
598  float min_distance = 1e12;
599  bool found = false;
600 
601  // TODO optimize this loop because hits should be ordered..
602  for (auto rechit = transient_track.recHitsBegin(); rechit != transient_track.recHitsEnd(); rechit++) {
603  const DetId&& det_id = (*rechit)->geographicalId();
604 
605  if (MuonHitHelper::isGEM(det_id.rawId())) {
606  continue;
607  }
608 
609  const GeomDet* det = geometry->idToDet(det_id);
610  const GlobalPoint&& global_position = det->toGlobal((*rechit)->localPosition());
611  const float distance = std::abs(layer.surface->localZclamped(global_position));
612  if (distance < min_distance) {
613  found = true;
614  min_distance = distance;
615  starting_point = global_position;
616  starting_id = det_id;
617  }
618  }
619 
620  TrajectoryStateOnSurface starting_state;
621  if (found) {
622  starting_state = transient_track.stateOnSurface(starting_point);
623  }
624  return std::make_pair(starting_state, starting_id);
625 }
626 
628  if (not MuonHitHelper::isCSC(det_id))
629  return false;
630  const CSCDetId csc_id{det_id};
631  return (csc_id.station() == 1) or ((csc_id.ring() == 1) or (csc_id.ring() == 4));
632 }
633 
635  const bool is_same_region = track->eta() * layer.region > 0;
636 
637  bool skip = false;
638  if (is_cosmics_) {
639  float p2_in = track->innerMomentum().mag2();
640  float p2_out = track->outerMomentum().mag2();
641  if (isInsideOut(*track))
642  std::swap(p2_in, p2_out);
643  const bool is_outgoing = p2_in > p2_out;
644 
645  skip = (is_outgoing xor is_same_region);
646 
647  } else {
648  // beam scenario
649  skip = not is_same_region;
650  }
651 
652  return skip;
653 }
654 
655 bool GEMEfficiencyAnalyzer::checkBounds(const GlobalPoint& global_point, const Plane& plane) {
656  const LocalPoint&& local_point = plane.toLocal(global_point);
657  const LocalPoint local_point_2d(local_point.x(), local_point.y(), 0.0f);
658  return plane.bounds().inside(local_point_2d);
659 }
660 
662  const std::vector<const GEMChamber*>& chamber_vector) {
663  const GEMEtaPartition* bound = nullptr;
664  for (const GEMChamber* chamber : chamber_vector) {
665  if (not checkBounds(global_point, chamber->surface()))
666  continue;
667 
668  for (const GEMEtaPartition* eta_partition : chamber->etaPartitions()) {
669  if (checkBounds(global_point, eta_partition->surface())) {
670  bound = eta_partition;
671  break;
672  }
673  } // GEMEtaPartition
674  } // GEMChamber
675 
676  return bound;
677 }
678 
679 std::pair<const GEMRecHit*, float> GEMEfficiencyAnalyzer::findClosetHit(const GlobalPoint& dest_global_pos,
681  const GEMEtaPartition* eta_partition) {
682  const StripTopology& topology = eta_partition->specificTopology();
683  const LocalPoint&& dest_local_pos = eta_partition->toLocal(dest_global_pos);
684  const float dest_local_x = dest_local_pos.x();
685  const float dest_local_y = dest_local_pos.y();
686 
687  const GEMRecHit* closest_hit = nullptr;
688  float min_residual_rphi = 1e6;
689 
690  for (auto hit = range.first; hit != range.second; ++hit) {
691  const LocalPoint&& hit_local_pos = hit->localPosition();
692  const float hit_local_phi = topology.stripAngle(eta_partition->strip(hit_local_pos));
693 
694  const float residual_x = dest_local_x - hit_local_pos.x();
695  const float residual_y = dest_local_y - hit_local_pos.y();
696  const float residual_rphi = std::cos(hit_local_phi) * residual_x + std::sin(hit_local_phi) * residual_y;
697 
698  if (std::abs(residual_rphi) < std::abs(min_residual_rphi)) {
699  min_residual_rphi = residual_rphi;
700  closest_hit = &(*hit);
701  }
702  }
703 
704  return std::make_pair(closest_hit, min_residual_rphi);
705 }
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:634
GEMEfficiencyAnalyzer::analyze
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Definition: GEMEfficiencyAnalyzer.cc:306
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:95
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
GeomDet
Definition: GeomDet.h:27
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:112
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:114
GEMEfficiencyAnalyzer::getTrack
const reco::Track * getTrack(const reco::Muon &)
Definition: GEMEfficiencyAnalyzer.cc:542
relativeConstraints.station
station
Definition: relativeConstraints.py:67
GEMEfficiencyAnalyzer::bookNumerator2D
MonitorElement * bookNumerator2D(DQMStore::IBooker &, MonitorElement *)
Definition: GEMEfficiencyAnalyzer.cc:128
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:113
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
GEMOfflineDQMBase::getSuffixName
TString getSuffixName(Int_t)
Definition: GEMOfflineDQMBase.h:111
GEMEtaPartition
Definition: GEMEtaPartition.h:12
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
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::me_residual_y_
MEMap me_residual_y_
Definition: GEMEfficiencyAnalyzer.h:109
GEMEfficiencyAnalyzer::bookMisc
void bookMisc(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:279
GEMOfflineDQMBase::getSuffixTitle
TString getSuffixTitle(Int_t)
Definition: GEMOfflineDQMBase.h:125
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:239
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
GEMEfficiencyAnalyzer::GEMLayerData::surface
Disk::DiskPointer surface
Definition: GEMEfficiencyAnalyzer.h:37
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
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:44
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:80
GEMEfficiencyAnalyzer::GEMLayerData::region
int region
Definition: GEMEfficiencyAnalyzer.h:39
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:105
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
compare.hist
hist
Definition: compare.py:376
GEMOfflineDQMBase::getNumEtaPartitions
int getNumEtaPartitions(const GEMStation *)
Definition: GEMOfflineDQMBase.cc:76
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.
ecaldqm::topology
const CaloTopology * topology(nullptr)
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:655
GlobalTrackingGeometryRecord.h
GEMEfficiencyAnalyzer::me_pull_y_
MEMap me_pull_y_
Definition: GEMEfficiencyAnalyzer.h:110
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GEMEfficiencyAnalyzer::buildGEMLayers
std::vector< GEMLayerData > buildGEMLayers(const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:486
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:180
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:679
GEMOfflineDQMBase::getReStEtKey
GEMDetId getReStEtKey(const GEMDetId &)
Definition: GEMOfflineDQMBase.h:99
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
GEMEfficiencyAnalyzer::bookEfficiencyChamber
void bookEfficiencyChamber(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:169
GEMOfflineDQMBase::checkRefs
bool checkRefs(const std::vector< T * > &)
Definition: GEMOfflineDQMBase.h:80
LocalError
Definition: LocalError.h:12
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:561
MuonServiceProxy::propagator
edm::ESHandle< Propagator > propagator(std::string propagatorName) const
get the propagator
Definition: MuonServiceProxy.cc:177
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:57
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
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:627
GEMEfficiencyAnalyzer::GEMEfficiencyAnalyzer
GEMEfficiencyAnalyzer(const edm::ParameterSet &)
Definition: GEMEfficiencyAnalyzer.cc:14
GEMEfficiencyAnalyzer::me_residual_rphi_
MEMap me_residual_rphi_
Definition: GEMEfficiencyAnalyzer.h:108
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:88
GEMOfflineDQMBase::fillME
void fillME(MEMap &me_map, const GEMDetId &key, const float x)
Definition: GEMOfflineDQMBase.cc:92
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
GEMEfficiencyAnalyzer::kLogCategory_
const std::string kLogCategory_
Definition: GEMEfficiencyAnalyzer.h:118
BoundPlane
Plane
Definition: Plane.h:16
GEMEfficiencyAnalyzer::findEtaPartition
const GEMEtaPartition * findEtaPartition(const GlobalPoint &, const std::vector< const GEMChamber * > &)
Definition: GEMEfficiencyAnalyzer.cc:661
chamber_bin
int chamber_bin(int station, int ring, int chamber)
Definition: L1TStage2EMTF.cc:468
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:204
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:105
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:592
GEMEfficiencyAnalyzer::isInsideOut
bool isInsideOut(const reco::Track &)
Definition: GEMEfficiencyAnalyzer.h:121
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:134
GEMEfficiencyAnalyzer::me_detector_matched_
MEMap me_detector_matched_
Definition: GEMEfficiencyAnalyzer.h:106
GEMEfficiencyAnalyzer::bookNumerator1D
MonitorElement * bookNumerator1D(DQMStore::IBooker &, MonitorElement *)
Definition: GEMEfficiencyAnalyzer.cc:122
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:46
reco::TransientTrack::innermostMeasurementState
TrajectoryStateOnSurface innermostMeasurementState() const
Definition: TransientTrack.h:88
GEMEfficiencyAnalyzer::me_prop_chamber_
MEMap me_prop_chamber_
Definition: GEMEfficiencyAnalyzer.h:115
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
GEMOfflineDQMBase::getDetOccXBin
int getDetOccXBin(const int, const int, const int)
Definition: GEMOfflineDQMBase.h:75