CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
GEMEfficiencyAnalyzer Class Reference

#include <GEMEfficiencyAnalyzer.h>

Inheritance diagram for GEMEfficiencyAnalyzer:
GEMOfflineDQMBase DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Classes

struct  GEMLayerData
 

Public Member Functions

 GEMEfficiencyAnalyzer (const edm::ParameterSet &)
 
 ~GEMEfficiencyAnalyzer () override
 
- Public Member Functions inherited from GEMOfflineDQMBase
template<typename T >
bool checkRefs (const std::vector< T * > &)
 
void fillME (MEMap &me_map, const GEMDetId &key, const float x)
 
void fillME (MEMap &me_map, const GEMDetId &key, const float x, const float y)
 
 GEMOfflineDQMBase (const edm::ParameterSet &)
 
int getDetOccXBin (const int, const int, const int)
 
int getDetOccXBin (const GEMDetId &, const edm::ESHandle< GEMGeometry > &)
 
GEMDetId getKey (const GEMDetId &)
 
int getMaxVFAT (const int)
 
int getNumEtaPartitions (const GEMStation *)
 
GEMDetId getReStEtKey (const GEMDetId &)
 
GEMDetId getReStKey (const int, const int)
 
GEMDetId getReStKey (const GEMDetId &)
 
GEMDetId getReStLaChKey (const GEMDetId &)
 
GEMDetId getReStLaKey (const GEMDetId &)
 
int getVFATNumber (const int, const int, const int)
 
int getVFATNumberByStrip (const int, const int, const int)
 
void setDetLabelsEta (MonitorElement *, const GEMStation *)
 
void setDetLabelsVFAT (MonitorElement *, const GEMStation *)
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (edm::ParameterSet const &)
 

Protected Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &eventSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

void bookEfficiencyChamber (DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
 
void bookEfficiencyDetector (DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
 
void bookEfficiencyEtaPartition (DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
 
void bookEfficiencyMomentum (DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
 
void bookMisc (DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
 
MonitorElementbookNumerator1D (DQMStore::IBooker &, MonitorElement *)
 
MonitorElementbookNumerator2D (DQMStore::IBooker &, MonitorElement *)
 
void bookResolution (DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
 
std::vector< GEMLayerDatabuildGEMLayers (const edm::ESHandle< GEMGeometry > &)
 
bool checkBounds (const GlobalPoint &, const Plane &)
 
std::pair< const GEMRecHit
*, float > 
findClosetHit (const GlobalPoint &, const GEMRecHitCollection::range &, const GEMEtaPartition *)
 
const GEMEtaPartitionfindEtaPartition (const GlobalPoint &, const std::vector< const GEMChamber * > &)
 
std::pair
< TrajectoryStateOnSurface,
DetId
findStartingState (const reco::TransientTrack &, const GEMLayerData &, const edm::ESHandle< GlobalTrackingGeometry > &)
 
std::pair
< TrajectoryStateOnSurface,
DetId
getStartingState (const reco::TransientTrack &, const GEMLayerData &, const edm::ESHandle< GlobalTrackingGeometry > &)
 
const reco::TrackgetTrack (const reco::Muon &)
 
bool isInsideOut (const reco::Track &)
 
bool isME11 (const DetId &)
 
bool skipGEMStation (const int)
 
bool skipLayer (const reco::Track *, const GEMLayerData &)
 

Private Attributes

double eta_clamp_max_
 
double eta_low_
 
int eta_nbins_
 
double eta_up_
 
std::string folder_
 
const edm::ESGetToken
< GEMGeometry,
MuonGeometryRecord
gemToken1_
 
const edm::ESGetToken
< GEMGeometry,
MuonGeometryRecord
gemToken2_
 
const edm::ESGetToken
< GlobalTrackingGeometry,
GlobalTrackingGeometryRecord
globalGeomToken_
 
bool is_cosmics_
 
const std::string kLogCategory_ = "GEMEfficiencyAnalyzer"
 
MonitorElementme_all_abs_residual_rphi_
 
MEMap me_chamber_
 
MEMap me_chamber_matched_
 
MEMap me_detector_
 
MEMap me_detector_matched_
 
MEMap me_ieta_
 
MEMap me_ieta_matched_
 
MEMap me_muon_eta_
 
MEMap me_muon_eta_matched_
 
MEMap me_muon_phi_
 
MEMap me_muon_phi_matched_
 
MEMap me_muon_pt_
 
MEMap me_muon_pt_matched_
 
MEMap me_prop_chamber_
 
MonitorElementme_prop_phi_err_
 
MonitorElementme_prop_r_err_
 
MEMap me_pull_y_
 
MEMap me_residual_rphi_
 
MEMap me_residual_y_
 
bool monitor_ge0_
 
bool monitor_ge11_
 
bool monitor_ge21_
 
MuonServiceProxymuon_service_
 
edm::EDGetTokenT< edm::View
< reco::Muon > > 
muon_token_
 
std::string name_
 
double prop_phi_error_cut_
 
double prop_r_error_cut_
 
std::vector< double > pt_bins_
 
double pt_clamp_max_
 
edm::EDGetTokenT
< GEMRecHitCollection
rechit_token_
 
float residual_rphi_cut_
 
const edm::ESGetToken
< TransientTrackBuilder,
TransientTrackRecord
trasientTrackToken_
 
bool use_global_muon_
 
bool use_only_me11_
 
bool use_prop_phi_error_cut_
 
bool use_prop_r_error_cut_
 
bool use_skip_layer_
 

Additional Inherited Members

- Public Types inherited from GEMOfflineDQMBase
using MEMap = std::map< GEMDetId, dqm::impl::MonitorElement * >
 
- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Public Attributes inherited from GEMOfflineDQMBase
std::string log_category_
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

DQM monitoring source for GEM efficiency and resolution based on https://github.com/CPLUOS/MuonPerformance/blob/master/MuonAnalyser/plugins/SliceTestEfficiencyAnalysis.cc

Author
Seungjin Yang seung.nosp@m.jin..nosp@m.yang@.nosp@m.cern.nosp@m..ch

DQM monitoring client for GEM efficiency and resolution based on Validation/MuonGEMHits/MuonGEMBaseHarvestor

Author
Seungjin Yang seung.nosp@m.jin..nosp@m.yang@.nosp@m.cern.nosp@m..ch

Definition at line 28 of file GEMEfficiencyAnalyzer.h.

Constructor & Destructor Documentation

GEMEfficiencyAnalyzer::GEMEfficiencyAnalyzer ( const edm::ParameterSet pset)
explicit

Definition at line 13 of file GEMEfficiencyAnalyzer.cc.

References gpuVertexFinder::eps, geometryDiff::epsilon, eta_clamp_max_, eta_low_, eta_nbins_, eta_up_, folder_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), is_cosmics_, monitor_ge0_, monitor_ge11_, monitor_ge21_, muon_service_, muon_token_, MuonServiceProxy_cff::MuonServiceProxy, name_, prop_phi_error_cut_, prop_r_error_cut_, pt_bins_, pt_clamp_max_, rechit_token_, residual_rphi_cut_, AlCaHLTBitMon_QueryRunRegistry::string, use_global_muon_, use_only_me11_, use_prop_phi_error_cut_, use_prop_r_error_cut_, and use_skip_layer_.

14  : GEMOfflineDQMBase(pset),
15  gemToken1_(esConsumes<edm::Transition::BeginRun>()),
16  gemToken2_(esConsumes<GEMGeometry, MuonGeometryRecord>()),
17  globalGeomToken_(esConsumes<GlobalTrackingGeometry, GlobalTrackingGeometryRecord>()),
19  esConsumes<TransientTrackBuilder, TransientTrackRecord>(edm::ESInputTag("", "TransientTrackBuilder"))) {
20  name_ = pset.getUntrackedParameter<std::string>("name");
21  folder_ = pset.getUntrackedParameter<std::string>("folder");
22 
23  rechit_token_ = consumes<GEMRecHitCollection>(pset.getParameter<edm::InputTag>("recHitTag"));
24  muon_token_ = consumes<edm::View<reco::Muon> >(pset.getParameter<edm::InputTag>("muonTag"));
25 
26  is_cosmics_ = pset.getUntrackedParameter<bool>("isCosmics");
27  use_global_muon_ = pset.getUntrackedParameter<bool>("useGlobalMuon");
28  use_skip_layer_ = pset.getParameter<bool>("useSkipLayer");
29  use_only_me11_ = pset.getParameter<bool>("useOnlyME11");
30  residual_rphi_cut_ = static_cast<float>(pset.getParameter<double>("residualRPhiCut"));
31  use_prop_r_error_cut_ = pset.getParameter<bool>("usePropRErrorCut");
32  prop_r_error_cut_ = pset.getParameter<double>("propRErrorCut");
33  use_prop_phi_error_cut_ = pset.getParameter<bool>("usePropPhiErrorCut");
34  prop_phi_error_cut_ = pset.getParameter<double>("propPhiErrorCut");
35  pt_bins_ = pset.getUntrackedParameter<std::vector<double> >("ptBins");
36  eta_nbins_ = pset.getUntrackedParameter<int>("etaNbins");
37  eta_low_ = pset.getUntrackedParameter<double>("etaLow");
38  eta_up_ = pset.getUntrackedParameter<double>("etaUp");
39  monitor_ge11_ = pset.getUntrackedParameter<bool>("monitorGE11");
40  monitor_ge21_ = pset.getUntrackedParameter<bool>("monitorGE21");
41  monitor_ge0_ = pset.getUntrackedParameter<bool>("monitorGE0");
42 
43  const edm::ParameterSet muon_service_parameter = pset.getParameter<edm::ParameterSet>("ServiceParameters");
44  muon_service_ = new MuonServiceProxy(muon_service_parameter, consumesCollector());
45 
47  pt_clamp_max_ = pt_bins_.back() - eps;
48  eta_clamp_max_ = eta_up_ - eps;
49 
50  // TODO pt, eta, quality check for muons
51 }
T getUntrackedParameter(std::string const &, T const &) const
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > trasientTrackToken_
GEMOfflineDQMBase(const edm::ParameterSet &)
WorkSpace int float eps
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > globalGeomToken_
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemToken1_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< GEMRecHitCollection > rechit_token_
edm::EDGetTokenT< edm::View< reco::Muon > > muon_token_
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemToken2_
std::vector< double > pt_bins_
MuonServiceProxy * muon_service_
GEMEfficiencyAnalyzer::~GEMEfficiencyAnalyzer ( )
override

Definition at line 53 of file GEMEfficiencyAnalyzer.cc.

53 {}

Member Function Documentation

void GEMEfficiencyAnalyzer::analyze ( const edm::Event event,
const edm::EventSetup eventSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 355 of file GEMEfficiencyAnalyzer.cc.

References funct::abs(), buildGEMLayers(), GEMDetId::chamber(), checkBounds(), eta_clamp_max_, eta_low_, validate-o2o-wbm::f, dqm::impl::MonitorElement::Fill(), GEMOfflineDQMBase::fillME(), findClosetHit(), findEtaPartition(), gemToken2_, edm::EventSetup::getHandle(), GEMOfflineDQMBase::getReStEtKey(), GEMOfflineDQMBase::getReStKey(), GEMOfflineDQMBase::getReStLaKey(), getStartingState(), getTrack(), globalGeomToken_, TrajectoryStateOnSurface::globalPosition(), GEMEtaPartition::id(), GEMDetId::ieta(), isME11(), edm::ESHandleBase::isValid(), TrajectoryStateOnSurface::isValid(), edm::HandleBase::isValid(), reco::TransientTrack::isValid(), kLogCategory_, phase1PixelTopology::layer, TrajectoryStateOnSurface::localError(), M_PI, me_all_abs_residual_rphi_, me_chamber_, me_chamber_matched_, me_detector_, me_detector_matched_, me_ieta_, me_ieta_matched_, me_muon_eta_, me_muon_eta_matched_, me_muon_phi_, me_muon_phi_matched_, me_muon_pt_, me_muon_pt_matched_, me_prop_chamber_, me_prop_phi_err_, me_prop_r_err_, me_pull_y_, me_residual_rphi_, me_residual_y_, SiStripPI::min, HLT_FULL_cff::muon, muon_service_, muon_token_, GlobalErrorBase< T, ErrorWeightType >::phierr(), LocalTrajectoryError::positionError(), prop_phi_error_cut_, prop_r_error_cut_, MuonServiceProxy::propagator(), HLT_FULL_cff::propagator, pt_clamp_max_, rechit_token_, GlobalErrorBase< T, ErrorWeightType >::rerr(), residual_rphi_cut_, skipLayer(), mathSSE::sqrt(), GeomDet::surface(), GeomDet::toLocal(), HLT_FULL_cff::track, ErrorFrameTransformer::transform(), trasientTrackToken_, MuonServiceProxy::update(), use_only_me11_, use_prop_phi_error_cut_, use_prop_r_error_cut_, use_skip_layer_, PV3DBase< T, PVType, FrameType >::y(), and LocalError::yy().

355  {
356  edm::Handle<GEMRecHitCollection> rechit_collection;
357  event.getByToken(rechit_token_, rechit_collection);
358  if (not rechit_collection.isValid()) {
359  edm::LogError(kLogCategory_) << "GEMRecHitCollection is invalid" << std::endl;
360  return;
361  }
362 
364  event.getByToken(muon_token_, muon_view);
365  if (not muon_view.isValid()) {
366  edm::LogError(kLogCategory_) << "View<Muon> is invalid" << std::endl;
367  return;
368  }
369 
371  gem = setup.getHandle(gemToken2_);
372 
373  if (not gem.isValid()) {
374  edm::LogError(kLogCategory_) << "GEMGeometry is invalid" << std::endl;
375  return;
376  }
377 
378  edm::ESHandle<GlobalTrackingGeometry> global_tracking_geometry;
379 
380  global_tracking_geometry = setup.getHandle(globalGeomToken_);
381 
382  if (not global_tracking_geometry.isValid()) {
383  edm::LogError(kLogCategory_) << "GlobalTrackingGeometry is invalid" << std::endl;
384  return;
385  }
386 
387  edm::ESHandle<TransientTrackBuilder> transient_track_builder;
388  transient_track_builder = setup.getHandle(trasientTrackToken_);
389 
390  if (not transient_track_builder.isValid()) {
391  edm::LogError(kLogCategory_) << "TransientTrackRecord is invalid" << std::endl;
392  return;
393  }
394 
396  edm::ESHandle<Propagator> propagator = muon_service_->propagator("SteppingHelixPropagatorAny");
397  if (not propagator.isValid()) {
398  edm::LogError(kLogCategory_) << "Propagator is invalid" << std::endl;
399  return;
400  }
401 
402  if (rechit_collection->size() < 1) {
403  edm::LogInfo(kLogCategory_) << "empty rechit collection" << std::endl;
404  return;
405  }
406 
407  if (muon_view->empty()) {
408  edm::LogInfo(kLogCategory_) << "empty muon collection" << std::endl;
409  return;
410  }
411 
412  const std::vector<GEMLayerData> layer_vector = buildGEMLayers(gem);
413 
414  for (const reco::Muon& muon : *muon_view) {
415  const reco::Track* track = getTrack(muon);
416  if (track == nullptr) {
417  edm::LogError(kLogCategory_) << "failed to get a muon track" << std::endl;
418  continue;
419  }
420 
421  const reco::TransientTrack transient_track = transient_track_builder->build(track);
422  if (not transient_track.isValid()) {
423  edm::LogError(kLogCategory_) << "failed to build TransientTrack" << std::endl;
424  continue;
425  }
426 
427  for (const GEMLayerData& layer : layer_vector) {
428  if (use_skip_layer_ and skipLayer(track, layer)) {
429  edm::LogInfo(kLogCategory_) << "skip GEM Layer" << std::endl;
430  continue;
431  }
432 
433  const auto [start_state, start_id] = getStartingState(transient_track, layer, global_tracking_geometry);
434 
435  if (not start_state.isValid()) {
436  edm::LogInfo(kLogCategory_) << "failed to get a starting state" << std::endl;
437  continue;
438  }
439 
440  if (use_only_me11_ and (not isME11(start_id))) {
441  edm::LogInfo(kLogCategory_) << "skip a starting state because it is not ME11" << std::endl;
442  continue;
443  }
444 
445  // the trajectory state on the destination surface
446  const TrajectoryStateOnSurface dest_state = propagator->propagate(start_state, *(layer.disk));
447  if (not dest_state.isValid()) {
448  edm::LogInfo(kLogCategory_) << "failed to propagate a muon" << std::endl;
449  continue;
450  }
451 
452  const GlobalPoint dest_global_pos = dest_state.globalPosition();
453 
454  if (not checkBounds(dest_global_pos, (*layer.disk))) {
455  edm::LogInfo(kLogCategory_) << "failed to pass checkBounds" << std::endl;
456  continue;
457  }
458 
459  const GEMEtaPartition* eta_partition = findEtaPartition(dest_global_pos, layer.chambers);
460  if (eta_partition == nullptr) {
461  edm::LogInfo(kLogCategory_) << "failed to find an eta partition" << std::endl;
462  continue;
463  }
464 
465  const BoundPlane surface = eta_partition->surface();
466 
467  const LocalPoint dest_local_pos = eta_partition->toLocal(dest_global_pos);
468  const LocalError dest_local_err = dest_state.localError().positionError();
469  const GlobalError dest_global_err = ErrorFrameTransformer().transform(dest_local_err, surface);
470 
471  const double dest_global_r_err = std::sqrt(dest_global_err.rerr(dest_global_pos));
472  const double dest_global_phi_err = std::sqrt(dest_global_err.phierr(dest_global_pos));
473 
474  const GEMDetId gem_id = eta_partition->id();
475  const GEMDetId rs_key = getReStKey(gem_id);
476  const GEMDetId rsl_key = getReStLaKey(gem_id);
477  const GEMDetId rse_key = getReStEtKey(gem_id);
478 
479  const int chamber_id = gem_id.chamber();
480  const int ieta = gem_id.ieta();
481 
482  // FIXME clever way to clamp values?
483  me_prop_r_err_->Fill(std::min(dest_global_r_err, 19.999));
484  me_prop_phi_err_->Fill(std::min(dest_global_r_err, M_PI - 0.0001));
485  me_prop_chamber_[rs_key]->Fill(gem_id.chamber());
486 
487  if (use_prop_r_error_cut_ and (dest_global_r_err > prop_r_error_cut_)) {
488  edm::LogInfo(kLogCategory_) << "failed to pass a propagation global R error cut" << std::endl;
489  continue;
490  }
491 
492  if (use_prop_phi_error_cut_ and (dest_global_phi_err > prop_phi_error_cut_)) {
493  edm::LogInfo(kLogCategory_) << "failed to pass a propagation global phi error cut" << std::endl;
494  continue;
495  }
496 
497  const double muon_pt = std::min(muon.pt(), pt_clamp_max_);
498  const double muon_eta = std::clamp(std::fabs(muon.eta()), eta_low_, eta_clamp_max_);
499 
500  fillME(me_muon_pt_, rs_key, muon_pt);
501  fillME(me_muon_eta_, rs_key, muon_eta);
502  fillME(me_muon_phi_, rs_key, muon.phi());
503 
504  fillME(me_chamber_, rsl_key, chamber_id);
505  fillME(me_ieta_, rsl_key, ieta);
506  fillME(me_detector_, rsl_key, chamber_id, ieta);
507 
508  const auto [hit, residual_rphi] = findClosetHit(dest_global_pos, rechit_collection->get(gem_id), eta_partition);
509 
510  if (hit == nullptr) {
511  edm::LogInfo(kLogCategory_) << "failed to find a hit" << std::endl;
512  continue;
513  }
514 
515  me_all_abs_residual_rphi_->Fill(std::min(std::abs(residual_rphi), 19.999f));
516  if (std::abs(residual_rphi) > residual_rphi_cut_) {
517  edm::LogInfo(kLogCategory_) << "failed to pass the residual rphi cut" << std::endl;
518  continue;
519  }
520 
521  fillME(me_muon_pt_matched_, rs_key, muon_pt);
522  fillME(me_muon_eta_matched_, rs_key, muon_eta);
523  fillME(me_muon_phi_matched_, rs_key, muon.phi());
524 
525  fillME(me_chamber_matched_, rsl_key, gem_id.chamber());
526  fillME(me_ieta_matched_, rsl_key, gem_id.ieta());
527  fillME(me_detector_matched_, rsl_key, gem_id.chamber(), ieta);
528 
529  const LocalPoint hit_local_pos = hit->localPosition();
530  const LocalError hit_local_err = hit->localPositionError();
531 
532  const float residual_y = dest_local_pos.y() - hit_local_pos.y();
533  const float pull_y = residual_y / std::sqrt(dest_local_err.yy() + hit_local_err.yy());
534 
535  fillME(me_residual_rphi_, rse_key, residual_rphi);
536  fillME(me_residual_y_, rse_key, residual_y);
537  fillME(me_pull_y_, rse_key, pull_y);
538  } // layer
539  } // Muon
540 }
tuple propagator
static GlobalError transform(const LocalError &le, const Surface &surf)
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > trasientTrackToken_
GEMDetId getReStLaKey(const GEMDetId &)
bool skipLayer(const reco::Track *, const GEMLayerData &)
bool isValid() const
Make the ReferenceCountingProxy method to check validity public.
T y() const
Definition: PV3DBase.h:60
GlobalPoint globalPosition() const
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
std::vector< GEMLayerData > buildGEMLayers(const edm::ESHandle< GEMGeometry > &)
Log< level::Error, false > LogError
const std::string kLogCategory_
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
LocalError positionError() const
constexpr int ieta() const
Definition: GEMDetId.h:199
GEMDetId id() const
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > globalGeomToken_
constexpr std::array< uint8_t, layerIndexSize > layer
T phierr(const GlobalPoint &aPoint) const
void Fill(long long x)
bool checkBounds(const GlobalPoint &, const Plane &)
MonitorElement * me_prop_r_err_
float yy() const
Definition: LocalError.h:24
std::pair< TrajectoryStateOnSurface, DetId > getStartingState(const reco::TransientTrack &, const GEMLayerData &, const edm::ESHandle< GlobalTrackingGeometry > &)
T sqrt(T t)
Definition: SSEVec.h:19
edm::ESHandle< Propagator > propagator(std::string propagatorName) const
get the propagator
MonitorElement * me_all_abs_residual_rphi_
std::pair< const GEMRecHit *, float > findClosetHit(const GlobalPoint &, const GEMRecHitCollection::range &, const GEMEtaPartition *)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const LocalTrajectoryError & localError() const
bool isValid() const
Definition: HandleBase.h:70
GEMDetId getReStEtKey(const GEMDetId &)
#define M_PI
void fillME(MEMap &me_map, const GEMDetId &key, const float x)
Log< level::Info, false > LogInfo
const GEMEtaPartition * findEtaPartition(const GlobalPoint &, const std::vector< const GEMChamber * > &)
constexpr int chamber() const
Definition: GEMDetId.h:183
T rerr(const GlobalPoint &aPoint) const
edm::EDGetTokenT< GEMRecHitCollection > rechit_token_
edm::EDGetTokenT< edm::View< reco::Muon > > muon_token_
bool isME11(const DetId &)
MonitorElement * me_prop_phi_err_
GEMDetId getReStKey(const int, const int)
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemToken2_
void update(const edm::EventSetup &setup, bool duringEvent=true)
update the services each event
const reco::Track * getTrack(const reco::Muon &)
bool isValid() const
Definition: ESHandle.h:44
MuonServiceProxy * muon_service_
void GEMEfficiencyAnalyzer::bookEfficiencyChamber ( DQMStore::IBooker ibooker,
const edm::ESHandle< GEMGeometry > &  gem 
)
private

Definition at line 158 of file GEMEfficiencyAnalyzer.cc.

References dqm::implementation::IBooker::book1D(), bookNumerator1D(), chambers, GEMOfflineDQMBase::checkRefs(), folder_, GEMOfflineDQMBase::getReStLaKey(), GEMUtils::getSuffixName(), GEMUtils::getSuffixTitle(), submitPVResolutionJobs::key, kLogCategory_, me_chamber_, me_chamber_matched_, name_, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), skipGEMStation(), relativeConstraints::station, and cond::impl::to_string().

Referenced by bookHistograms().

158  {
159  // TODO Efficiency/Source
160  ibooker.setCurrentFolder(folder_ + "/Efficiency");
161 
162  for (const GEMStation* station : gem->stations()) {
163  const int region_id = station->region();
164  const int station_id = station->station();
165 
166  if (skipGEMStation(station_id)) {
167  continue;
168  }
169 
170  const std::vector<const GEMSuperChamber*> superchambers = station->superChambers();
171  if (not checkRefs(superchambers)) {
172  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
173  return;
174  }
175 
176  const int num_chambers = superchambers.size();
177  for (const GEMChamber* chamber : superchambers[0]->chambers()) {
178  const int layer_id = chamber->id().layer();
179 
180  const TString name_suffix = GEMUtils::getSuffixName(region_id, station_id, layer_id);
181  const TString title_suffix = GEMUtils::getSuffixTitle(region_id, station_id, layer_id);
182  const GEMDetId key = getReStLaKey(chamber->id());
183 
184  me_chamber_[key] =
185  ibooker.book1D("chamber" + name_suffix, name_.c_str() + title_suffix, num_chambers, 0.5, num_chambers + 0.5);
186  me_chamber_[key]->setAxisTitle("Chamber");
187  me_chamber_[key]->getTH1F()->SetNdivisions(-num_chambers, "Y");
188  for (int binx = 1; binx <= num_chambers; binx++) {
189  me_chamber_[key]->setBinLabel(binx, std::to_string(binx));
190  }
191 
192  me_chamber_matched_[key] = bookNumerator1D(ibooker, me_chamber_[key]);
193  } // layer
194  } // station
195 }
GEMDetId getReStLaKey(const GEMDetId &)
TString getSuffixName(Int_t region_id)
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::string to_string(const V &value)
Definition: OMSAccess.h:71
Log< level::Error, false > LogError
TString getSuffixTitle(Int_t region_id)
const std::string kLogCategory_
bool checkRefs(const std::vector< T * > &)
tuple key
prepare the HTCondor submission files and eventually submit them
MonitorElement * bookNumerator1D(DQMStore::IBooker &, MonitorElement *)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
static char chambers[264][20]
Definition: ReadPGInfo.cc:243
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void GEMEfficiencyAnalyzer::bookEfficiencyDetector ( DQMStore::IBooker ibooker,
const edm::ESHandle< GEMGeometry > &  gem 
)
private

Definition at line 236 of file GEMEfficiencyAnalyzer.cc.

References dqm::implementation::IBooker::book2D(), bookNumerator2D(), chambers, GEMOfflineDQMBase::checkRefs(), folder_, GEMOfflineDQMBase::getReStLaKey(), GEMUtils::getSuffixName(), GEMUtils::getSuffixTitle(), submitPVResolutionJobs::key, kLogCategory_, me_detector_, me_detector_matched_, name_, dqm::implementation::NavigatorBase::setCurrentFolder(), GEMOfflineDQMBase::setDetLabelsEta(), skipGEMStation(), and relativeConstraints::station.

Referenced by bookHistograms().

236  {
237  // TODO Efficiency/Source
238  ibooker.setCurrentFolder(folder_ + "/Efficiency");
239 
240  for (const GEMStation* station : gem->stations()) {
241  const int region_id = station->region();
242  const int station_id = station->station();
243 
244  if (skipGEMStation(station_id)) {
245  continue;
246  }
247 
248  const std::vector<const GEMSuperChamber*> superchambers = station->superChambers();
249  if (not checkRefs(superchambers)) {
250  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
251  return;
252  }
253 
254  const int num_ch = superchambers.size();
255 
256  for (const GEMChamber* chamber : superchambers[0]->chambers()) {
257  const int layer_id = chamber->id().layer();
258  const int num_ieta = chamber->nEtaPartitions();
259 
260  const TString name_suffix = GEMUtils::getSuffixName(region_id, station_id, layer_id);
261  const TString title_suffix = GEMUtils::getSuffixTitle(region_id, station_id, layer_id);
262  const GEMDetId key = getReStLaKey(chamber->id());
263 
264  me_detector_[key] = ibooker.book2D("detector" + name_suffix,
265  name_.c_str() + title_suffix,
266  num_ch,
267  0.5,
268  num_ch + 0.5,
269  num_ieta,
270  0.5,
271  num_ieta + 0.5);
272  setDetLabelsEta(me_detector_[key], station);
273 
274  me_detector_matched_[key] = bookNumerator2D(ibooker, me_detector_[key]);
275  } // layer
276  } // station
277 }
GEMDetId getReStLaKey(const GEMDetId &)
TString getSuffixName(Int_t region_id)
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
Log< level::Error, false > LogError
TString getSuffixTitle(Int_t region_id)
const std::string kLogCategory_
void setDetLabelsEta(MonitorElement *, const GEMStation *)
bool checkRefs(const std::vector< T * > &)
tuple key
prepare the HTCondor submission files and eventually submit them
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
MonitorElement * bookNumerator2D(DQMStore::IBooker &, MonitorElement *)
static char chambers[264][20]
Definition: ReadPGInfo.cc:243
void GEMEfficiencyAnalyzer::bookEfficiencyEtaPartition ( DQMStore::IBooker ibooker,
const edm::ESHandle< GEMGeometry > &  gem 
)
private

Definition at line 197 of file GEMEfficiencyAnalyzer.cc.

References dqm::implementation::IBooker::book1D(), bookNumerator1D(), chambers, GEMOfflineDQMBase::checkRefs(), folder_, GEMOfflineDQMBase::getReStLaKey(), GEMUtils::getSuffixName(), GEMUtils::getSuffixTitle(), submitPVResolutionJobs::key, kLogCategory_, me_ieta_, me_ieta_matched_, name_, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), skipGEMStation(), relativeConstraints::station, and cond::impl::to_string().

Referenced by bookHistograms().

198  {
199  // TODO Efficiency/Source
200  ibooker.setCurrentFolder(folder_ + "/Efficiency");
201 
202  for (const GEMStation* station : gem->stations()) {
203  const int region_id = station->region();
204  const int station_id = station->station();
205 
206  if (skipGEMStation(station_id)) {
207  continue;
208  }
209 
210  const std::vector<const GEMSuperChamber*> superchambers = station->superChambers();
211  if (not checkRefs(superchambers)) {
212  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
213  return;
214  }
215 
216  for (const GEMChamber* chamber : superchambers[0]->chambers()) {
217  const int layer_id = chamber->id().layer();
218  const int num_ieta = chamber->nEtaPartitions();
219 
220  const TString name_suffix = GEMUtils::getSuffixName(region_id, station_id, layer_id);
221  const TString title_suffix = GEMUtils::getSuffixTitle(region_id, station_id, layer_id);
222  const GEMDetId key = getReStLaKey(chamber->id());
223 
224  me_ieta_[key] = ibooker.book1D("ieta" + name_suffix, name_.c_str() + title_suffix, num_ieta, 0.5, num_ieta + 0.5);
225  me_ieta_[key]->setAxisTitle("i#eta");
226  me_ieta_[key]->getTH1F()->SetNdivisions(-num_ieta, "Y");
227  for (int binx = 1; binx <= num_ieta; binx++) {
228  me_ieta_[key]->setBinLabel(binx, std::to_string(binx));
229  }
230 
231  me_ieta_matched_[key] = bookNumerator1D(ibooker, me_ieta_[key]);
232  } // layer
233  } // station
234 }
GEMDetId getReStLaKey(const GEMDetId &)
TString getSuffixName(Int_t region_id)
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::string to_string(const V &value)
Definition: OMSAccess.h:71
Log< level::Error, false > LogError
TString getSuffixTitle(Int_t region_id)
const std::string kLogCategory_
bool checkRefs(const std::vector< T * > &)
tuple key
prepare the HTCondor submission files and eventually submit them
MonitorElement * bookNumerator1D(DQMStore::IBooker &, MonitorElement *)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
static char chambers[264][20]
Definition: ReadPGInfo.cc:243
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void GEMEfficiencyAnalyzer::bookEfficiencyMomentum ( DQMStore::IBooker ibooker,
const edm::ESHandle< GEMGeometry > &  gem 
)
private

Definition at line 119 of file GEMEfficiencyAnalyzer.cc.

References dqm::implementation::IBooker::book1D(), bookNumerator1D(), eta_low_, eta_nbins_, eta_up_, folder_, GEMOfflineDQMBase::getReStKey(), GEMUtils::getSuffixName(), GEMUtils::getSuffixTitle(), submitPVResolutionJobs::key, M_PI, me_muon_eta_, me_muon_eta_matched_, me_muon_phi_, me_muon_phi_matched_, me_muon_pt_, me_muon_pt_matched_, name_, pt_bins_, dqm::implementation::NavigatorBase::setCurrentFolder(), skipGEMStation(), relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

Referenced by bookHistograms().

119  {
120  // TODO Efficiency/Source
121  ibooker.setCurrentFolder(folder_ + "/Efficiency");
122 
123  const TString pt_x_title = "Muon p_{T} [GeV]";
124  const int pt_nbinsx = pt_bins_.size() - 1;
125 
126  const std::string eta_x_title = "Muon |#eta|";
127  const std::string phi_x_title = "Muon #phi [rad]";
128 
129  for (const GEMStation* station : gem->stations()) {
130  const int region_id = station->region();
131  const int station_id = station->station();
132 
133  if (skipGEMStation(station_id)) {
134  continue;
135  }
136 
137  const GEMDetId key = getReStKey(region_id, station_id);
138  const TString name_suffix = GEMUtils::getSuffixName(region_id, station_id);
139  const TString title_suffix = GEMUtils::getSuffixTitle(region_id, station_id);
140 
141  const TString title = name_.c_str() + title_suffix;
142 
143  TH1F* h_muon_pt = new TH1F("muon_pt" + name_suffix, title, pt_nbinsx, &pt_bins_[0]);
144  h_muon_pt->SetXTitle(pt_x_title);
145  me_muon_pt_[key] = ibooker.book1D(h_muon_pt->GetName(), h_muon_pt);
147 
148  me_muon_eta_[key] = ibooker.book1D("muon_eta" + name_suffix, title, eta_nbins_, eta_low_, eta_up_);
149  me_muon_eta_[key]->setXTitle(eta_x_title);
151 
152  me_muon_phi_[key] = ibooker.book1D("muon_phi" + name_suffix, title, 36, -M_PI, M_PI);
153  me_muon_phi_[key]->setAxisTitle(phi_x_title);
155  } // station
156 }
TString getSuffixName(Int_t region_id)
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
TString getSuffixTitle(Int_t region_id)
tuple key
prepare the HTCondor submission files and eventually submit them
#define M_PI
GEMDetId getReStKey(const int, const int)
MonitorElement * bookNumerator1D(DQMStore::IBooker &, MonitorElement *)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
std::vector< double > pt_bins_
void GEMEfficiencyAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  run,
edm::EventSetup const &  isetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 88 of file GEMEfficiencyAnalyzer.cc.

References bookEfficiencyChamber(), bookEfficiencyDetector(), bookEfficiencyEtaPartition(), bookEfficiencyMomentum(), bookMisc(), bookResolution(), gemToken1_, edm::EventSetup::getHandle(), edm::ESHandleBase::isValid(), and kLogCategory_.

90  {
92  gem = isetup.getHandle(gemToken1_);
93 
94  if (not gem.isValid()) {
95  edm::LogError(kLogCategory_) << "GEMGeometry is invalid" << std::endl;
96  return;
97  }
98 
99  bookEfficiencyMomentum(ibooker, gem);
100  bookEfficiencyChamber(ibooker, gem);
101  bookEfficiencyEtaPartition(ibooker, gem);
102  bookEfficiencyDetector(ibooker, gem);
103  bookResolution(ibooker, gem);
104  bookMisc(ibooker, gem);
105 }
Log< level::Error, false > LogError
const std::string kLogCategory_
void bookEfficiencyChamber(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
void bookEfficiencyDetector(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
void bookResolution(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
void bookEfficiencyEtaPartition(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemToken1_
void bookEfficiencyMomentum(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
void bookMisc(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
bool isValid() const
Definition: ESHandle.h:44
void GEMEfficiencyAnalyzer::bookMisc ( DQMStore::IBooker ibooker,
const edm::ESHandle< GEMGeometry > &  gem 
)
private

Definition at line 323 of file GEMEfficiencyAnalyzer.cc.

References dqm::implementation::IBooker::book1D(), GEMOfflineDQMBase::checkRefs(), folder_, GEMOfflineDQMBase::getReStKey(), GEMUtils::getSuffixName(), GEMUtils::getSuffixTitle(), submitPVResolutionJobs::key, kLogCategory_, M_PI, me_all_abs_residual_rphi_, me_prop_chamber_, me_prop_phi_err_, me_prop_r_err_, dqm::implementation::NavigatorBase::setCurrentFolder(), skipGEMStation(), and relativeConstraints::station.

Referenced by bookHistograms().

323  {
324  ibooker.setCurrentFolder(folder_ + "/Misc");
325  // FIXME the range shoule be dependent on the scenario
326  me_prop_r_err_ = ibooker.book1D("prop_r_err", ";Propagation Global R Error [cm];Entries", 20, 0.0, 20.0);
327  me_prop_phi_err_ = ibooker.book1D("prop_phi_err", "Propagation Global Phi Error [rad];Entries", 20, 0.0, M_PI);
328  me_all_abs_residual_rphi_ = ibooker.book1D("all_abs_residual_rphi", ";Residual in R#phi [cm];Entries", 20, 0.0, 20.0);
329 
330  for (const GEMStation* station : gem->stations()) {
331  const int region_id = station->region();
332  const int station_id = station->station();
333 
334  if (skipGEMStation(station_id)) {
335  continue;
336  }
337 
338  const std::vector<const GEMSuperChamber*> superchambers = station->superChambers();
339  if (not checkRefs(superchambers)) {
340  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
341  return;
342  }
343  // ignore layer ids
344  const int num_ch = superchambers.size();
345 
346  const GEMDetId key = getReStKey(region_id, station_id);
347  const TString name_suffix = GEMUtils::getSuffixName(region_id, station_id);
348  const TString title_suffix = GEMUtils::getSuffixTitle(region_id, station_id);
349  me_prop_chamber_[key] = ibooker.book1D("prop_chamber" + name_suffix, title_suffix, num_ch, 0.5, num_ch + 0.5);
350  me_prop_chamber_[key]->setAxisTitle("Destination Chamber Id", 1);
351  me_prop_chamber_[key]->setAxisTitle("Entries", 2);
352  } // station
353 }
TString getSuffixName(Int_t region_id)
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
Log< level::Error, false > LogError
TString getSuffixTitle(Int_t region_id)
const std::string kLogCategory_
bool checkRefs(const std::vector< T * > &)
MonitorElement * me_prop_r_err_
MonitorElement * me_all_abs_residual_rphi_
tuple key
prepare the HTCondor submission files and eventually submit them
#define M_PI
MonitorElement * me_prop_phi_err_
GEMDetId getReStKey(const int, const int)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
dqm::impl::MonitorElement * GEMEfficiencyAnalyzer::bookNumerator1D ( DQMStore::IBooker ,
MonitorElement  
)
private
dqm::impl::MonitorElement * GEMEfficiencyAnalyzer::bookNumerator2D ( DQMStore::IBooker ,
MonitorElement  
)
private

Definition at line 113 of file GEMEfficiencyAnalyzer.cc.

References dqm::implementation::IBooker::book2D(), dqm::impl::MonitorElement::getName(), dqm::impl::MonitorElement::getTH2F(), gpuVertexFinder::hist, mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by bookEfficiencyDetector().

113  {
114  const std::string name = me->getName() + "_matched";
115  TH2F* hist = dynamic_cast<TH2F*>(me->getTH2F()->Clone(name.c_str()));
116  return ibooker.book2D(name, hist);
117 }
__shared__ Hist hist
void GEMEfficiencyAnalyzer::bookResolution ( DQMStore::IBooker ibooker,
const edm::ESHandle< GEMGeometry > &  gem 
)
private

Definition at line 279 of file GEMEfficiencyAnalyzer.cc.

References dqm::implementation::IBooker::book1D(), chambers, GEMOfflineDQMBase::checkRefs(), folder_, GEMOfflineDQMBase::getReStEtKey(), submitPVResolutionJobs::key, kLogCategory_, me_pull_y_, me_residual_rphi_, me_residual_y_, name_, residual_rphi_cut_, dqm::implementation::NavigatorBase::setCurrentFolder(), skipGEMStation(), relativeConstraints::station, and runGCPTkAlMap::title.

Referenced by bookHistograms().

279  {
280  ibooker.setCurrentFolder(folder_ + "/Resolution");
281  for (const GEMStation* station : gem->stations()) {
282  const int region_id = station->region();
283  const int station_id = station->station();
284 
285  if (skipGEMStation(station_id)) {
286  continue;
287  }
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 
295  const std::vector<const GEMChamber*> chambers = superchambers[0]->chambers();
296  if (not checkRefs(chambers)) {
297  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMChamber ptrs" << std::endl;
298  return;
299  }
300 
301  for (const GEMEtaPartition* eta_partition : chambers[0]->etaPartitions()) {
302  const int ieta = eta_partition->id().roll();
303 
304  const GEMDetId key = getReStEtKey(eta_partition->id());
305  // TODO
306  const TString name_suffix = TString::Format("_GE%+.2d_R%d", region_id * (station_id * 10 + 1), ieta);
307  const TString title =
308  name_.c_str() + TString::Format(" : GE%+.2d Roll %d", region_id * (station_id * 10 + 1), ieta);
309 
311  ibooker.book1D("residual_rphi" + name_suffix, title, 50, -residual_rphi_cut_, residual_rphi_cut_);
312  me_residual_rphi_[key]->setAxisTitle("Residual in R#phi [cm]");
313 
314  me_residual_y_[key] = ibooker.book1D("residual_y" + name_suffix, title, 60, -12.0, 12.0);
315  me_residual_y_[key]->setAxisTitle("Residual in Local Y [cm]");
316 
317  me_pull_y_[key] = ibooker.book1D("pull_y" + name_suffix, title, 60, -3.0, 3.0);
318  me_pull_y_[key]->setAxisTitle("Pull in Local Y");
319  } // ieta
320  } // station
321 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
Log< level::Error, false > LogError
const std::string kLogCategory_
bool checkRefs(const std::vector< T * > &)
tuple key
prepare the HTCondor submission files and eventually submit them
GEMDetId getReStEtKey(const GEMDetId &)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
static char chambers[264][20]
Definition: ReadPGInfo.cc:243
std::vector< GEMEfficiencyAnalyzer::GEMLayerData > GEMEfficiencyAnalyzer::buildGEMLayers ( const edm::ESHandle< GEMGeometry > &  gem)
private

Definition at line 571 of file GEMEfficiencyAnalyzer.cc.

References Disk::build(), submitPVResolutionJobs::key, phase1PixelTopology::layer, position, idealTransformation::rotation, skipGEMStation(), and relativeConstraints::station.

Referenced by analyze().

572  {
573  std::vector<GEMLayerData> layer_vector;
574 
575  for (const GEMStation* station : gem->stations()) {
576  const int region_id = station->region();
577  const int station_id = station->station();
578  const bool is_ge11 = station_id == 1;
579 
580  if (skipGEMStation(station_id)) {
581  continue;
582  }
583 
584  // (layer_id, is_odd) - chambers
585  std::map<std::pair<int, bool>, std::vector<const GEMChamber*> > chambers_per_layer;
586 
587  for (const GEMSuperChamber* super_chamber : station->superChambers()) {
588  // For GE0 and GE21, 'is_odd' is always set to 'false'
589  const bool is_odd = is_ge11 ? super_chamber->id().chamber() % 2 == 1 : false;
590 
591  for (const GEMChamber* chamber : super_chamber->chambers()) {
592  const int layer_id = chamber->id().layer();
593  const std::pair<int, bool> key{layer_id, is_odd};
594 
595  if (chambers_per_layer.find(key) == chambers_per_layer.end())
596  chambers_per_layer.insert({key, std::vector<const GEMChamber*>()});
597 
598  chambers_per_layer.at(key).push_back(chamber);
599  } // GEMChamber
600  } // GEMSuperChamber
601 
602  for (auto [key, chamber_vector] : chambers_per_layer) {
603  const int layer_id = key.first;
604 
605  // chambers should have same R and Z spans.
606  auto [rmin, rmax] = chamber_vector[0]->surface().rSpan();
607  auto [zmin, zmax] = chamber_vector[0]->surface().zSpan();
608 
609  // layer position and rotation
610  const float layer_z = chamber_vector[0]->position().z();
611  Surface::PositionType position{0.f, 0.f, layer_z};
613 
614  zmin -= layer_z;
615  zmax -= layer_z;
616 
617  // the bounds from min and max R and Z in the local coordinates.
618  SimpleDiskBounds* bounds = new SimpleDiskBounds(rmin, rmax, zmin, zmax);
619  const Disk::DiskPointer layer = Disk::build(position, rotation, bounds);
620 
621  layer_vector.emplace_back(layer, chamber_vector, region_id, station_id, layer_id);
622  } // layer
623  } // GEMStation
624 
625  return layer_vector;
626 }
constexpr std::array< uint8_t, layerIndexSize > layer
static DiskPointer build(Args &&...args)
Definition: BoundDisk.h:38
tuple key
prepare the HTCondor submission files and eventually submit them
static int position[264][3]
Definition: ReadPGInfo.cc:289
bool GEMEfficiencyAnalyzer::checkBounds ( const GlobalPoint global_point,
const Plane plane 
)
private

Definition at line 741 of file GEMEfficiencyAnalyzer.cc.

References Surface::bounds(), Bounds::inside(), GloballyPositioned< T >::toLocal(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by analyze(), and findEtaPartition().

741  {
742  const LocalPoint local_point = plane.toLocal(global_point);
743  const LocalPoint local_point_2d(local_point.x(), local_point.y(), 0.0f);
744  return plane.bounds().inside(local_point_2d);
745 }
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
T y() const
Definition: PV3DBase.h:60
const Bounds & bounds() const
Definition: Surface.h:87
LocalPoint toLocal(const GlobalPoint &gp) const
T x() const
Definition: PV3DBase.h:59
void GEMEfficiencyAnalyzer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 55 of file GEMEfficiencyAnalyzer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, edm::ParameterSetDescription::setAllowAnything(), and AlCaHLTBitMon_QueryRunRegistry::string.

55  {
56  // beam scenario
57  {
59  desc.addUntracked<std::string>("name", "GlobalMuon");
60  desc.addUntracked<std::string>("folder", "GEM/Efficiency/type0");
61  desc.add<edm::InputTag>("recHitTag", edm::InputTag("gemRecHits"));
62  desc.add<edm::InputTag>("muonTag", edm::InputTag("muons"));
63  desc.addUntracked<bool>("isCosmics", false);
64  desc.addUntracked<bool>("useGlobalMuon", true);
65  desc.add<bool>("useSkipLayer", true);
66  desc.add<bool>("useOnlyME11", false);
67  desc.add<double>("residualRPhiCut", 2.0); // TODO need to be tuned
68  desc.add<bool>("usePropRErrorCut", false);
69  desc.add<double>("propRErrorCut", 1.0);
70  desc.add<bool>("usePropPhiErrorCut", false);
71  desc.add<double>("propPhiErrorCut", 0.01);
72  desc.addUntracked<std::vector<double> >("ptBins", {20., 30., 40., 50., 60., 70., 80., 90., 100., 120.});
73  desc.addUntracked<int>("etaNbins", 9);
74  desc.addUntracked<double>("etaLow", 1.4);
75  desc.addUntracked<double>("etaUp", 2.3);
76  desc.addUntracked<bool>("monitorGE11", true);
77  desc.addUntracked<bool>("monitorGE21", false);
78  desc.addUntracked<bool>("monitorGE0", false);
79  {
81  psd0.setAllowAnything();
82  desc.add<edm::ParameterSetDescription>("ServiceParameters", psd0);
83  }
84  descriptions.add("gemEfficiencyAnalyzerDefault", desc);
85  } // beam scenario
86 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void setAllowAnything()
allow any parameter label/value pairs
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::pair< const GEMRecHit *, float > GEMEfficiencyAnalyzer::findClosetHit ( const GlobalPoint dest_global_pos,
const GEMRecHitCollection::range range,
const GEMEtaPartition eta_partition 
)
private

Definition at line 765 of file GEMEfficiencyAnalyzer.cc.

References funct::abs(), funct::cos(), funct::sin(), GEMEtaPartition::specificTopology(), GEMEtaPartition::strip(), StripTopology::stripAngle(), GeomDet::toLocal(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by analyze().

767  {
768  const StripTopology& topology = eta_partition->specificTopology();
769  const LocalPoint dest_local_pos = eta_partition->toLocal(dest_global_pos);
770  const float dest_local_x = dest_local_pos.x();
771  const float dest_local_y = dest_local_pos.y();
772 
773  const GEMRecHit* closest_hit = nullptr;
774  float min_residual_rphi = 1e6;
775 
776  for (auto hit = range.first; hit != range.second; ++hit) {
777  const LocalPoint hit_local_pos = hit->localPosition();
778  const float hit_local_phi = topology.stripAngle(eta_partition->strip(hit_local_pos));
779 
780  const float residual_x = dest_local_x - hit_local_pos.x();
781  const float residual_y = dest_local_y - hit_local_pos.y();
782  const float residual_rphi = std::cos(hit_local_phi) * residual_x + std::sin(hit_local_phi) * residual_y;
783 
784  if (std::abs(residual_rphi) < std::abs(min_residual_rphi)) {
785  min_residual_rphi = residual_rphi;
786  closest_hit = &(*hit);
787  }
788  }
789 
790  return std::make_pair(closest_hit, min_residual_rphi);
791 }
virtual float stripAngle(float strip) const =0
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
T y() const
Definition: PV3DBase.h:60
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
const uint16_t range(const Frame &aFrame)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const StripTopology & specificTopology() const
float strip(const LocalPoint &lp) const
T x() const
Definition: PV3DBase.h:59
const GEMEtaPartition * GEMEfficiencyAnalyzer::findEtaPartition ( const GlobalPoint global_point,
const std::vector< const GEMChamber * > &  chamber_vector 
)
private

Definition at line 747 of file GEMEfficiencyAnalyzer.cc.

References checkBounds().

Referenced by analyze().

748  {
749  const GEMEtaPartition* bound = nullptr;
750  for (const GEMChamber* chamber : chamber_vector) {
751  if (not checkBounds(global_point, chamber->surface()))
752  continue;
753 
754  for (const GEMEtaPartition* eta_partition : chamber->etaPartitions()) {
755  if (checkBounds(global_point, eta_partition->surface())) {
756  bound = eta_partition;
757  break;
758  }
759  } // GEMEtaPartition
760  } // GEMChamber
761 
762  return bound;
763 }
bool checkBounds(const GlobalPoint &, const Plane &)
std::pair< TrajectoryStateOnSurface, DetId > GEMEfficiencyAnalyzer::findStartingState ( const reco::TransientTrack transient_track,
const GEMLayerData layer,
const edm::ESHandle< GlobalTrackingGeometry > &  geometry 
)
private

Definition at line 678 of file GEMEfficiencyAnalyzer.cc.

References funct::abs(), GEMEfficiencyAnalyzer::GEMLayerData::disk, HLT_FULL_cff::distance, newFWLiteAna::found, MuonHitHelper::isGEM(), DetId::rawId(), reco::TransientTrack::recHitsBegin(), reco::TransientTrack::recHitsEnd(), reco::TransientTrack::stateOnSurface(), and GeomDet::toGlobal().

Referenced by getStartingState().

681  {
682  GlobalPoint starting_point;
683  DetId starting_id;
684  float min_distance = 1e12;
685  bool found = false;
686 
687  // TODO optimize this loop because hits should be ordered..
688  for (auto rechit = transient_track.recHitsBegin(); rechit != transient_track.recHitsEnd(); rechit++) {
689  const DetId det_id = (*rechit)->geographicalId();
690 
691  if (MuonHitHelper::isGEM(det_id.rawId())) {
692  continue;
693  }
694 
695  const GeomDet* det = geometry->idToDet(det_id);
696  const GlobalPoint global_position = det->toGlobal((*rechit)->localPosition());
697  const float distance = std::abs(layer.disk->localZclamped(global_position));
698  if (distance < min_distance) {
699  found = true;
700  min_distance = distance;
701  starting_point = global_position;
702  starting_id = det_id;
703  }
704  }
705 
706  TrajectoryStateOnSurface starting_state;
707  if (found) {
708  starting_state = transient_track.stateOnSurface(starting_point);
709  }
710  return std::make_pair(starting_state, starting_id);
711 }
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
constexpr std::array< uint8_t, layerIndexSize > layer
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
trackingRecHit_iterator recHitsEnd() const
last iterator to RecHits
Definition: DetId.h:17
static bool isGEM(unsigned int detId)
Definition: MuonHitHelper.cc:7
TrajectoryStateOnSurface stateOnSurface(const GlobalPoint &point) const
trackingRecHit_iterator recHitsBegin() const
first iterator to RecHits
std::pair< TrajectoryStateOnSurface, DetId > GEMEfficiencyAnalyzer::getStartingState ( const reco::TransientTrack transient_track,
const GEMLayerData layer,
const edm::ESHandle< GlobalTrackingGeometry > &  geometry 
)
private

Definition at line 647 of file GEMEfficiencyAnalyzer.cc.

References findStartingState(), reco::Track::innerDetId(), reco::TransientTrack::innermostMeasurementState(), MuonHitHelper::isGEM(), isInsideOut(), reco::Track::outerDetId(), reco::TransientTrack::outermostMeasurementState(), reco::TransientTrack::track(), HLT_FULL_cff::track, and use_global_muon_.

Referenced by analyze().

650  {
651  TrajectoryStateOnSurface starting_state;
652  DetId starting_id;
653 
654  if (use_global_muon_) {
655  std::tie(starting_state, starting_id) = findStartingState(transient_track, layer, geometry);
656 
657  } else {
658  // if outer track
659  const reco::Track& track = transient_track.track();
660  const bool is_insideout = isInsideOut(track);
661 
662  const DetId inner_id{(is_insideout ? track.outerDetId() : track.innerDetId())};
663  if (MuonHitHelper::isGEM(inner_id.rawId())) {
664  std::tie(starting_state, starting_id) = findStartingState(transient_track, layer, geometry);
665 
666  } else {
667  starting_id = inner_id;
668  if (is_insideout)
669  starting_state = transient_track.outermostMeasurementState();
670  else
671  starting_state = transient_track.innermostMeasurementState();
672  }
673  }
674 
675  return std::make_pair(starting_state, starting_id);
676 }
bool isInsideOut(const reco::Track &)
TrajectoryStateOnSurface innermostMeasurementState() const
constexpr std::array< uint8_t, layerIndexSize > layer
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
Definition: Track.h:79
std::pair< TrajectoryStateOnSurface, DetId > findStartingState(const reco::TransientTrack &, const GEMLayerData &, const edm::ESHandle< GlobalTrackingGeometry > &)
TrajectoryStateOnSurface outermostMeasurementState() const
Definition: DetId.h:17
const Track & track() const
static bool isGEM(unsigned int detId)
Definition: MuonHitHelper.cc:7
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
Definition: Track.h:82
const reco::Track * GEMEfficiencyAnalyzer::getTrack ( const reco::Muon muon)
private

Definition at line 628 of file GEMEfficiencyAnalyzer.cc.

References edm::Ref< C, T, F >::get(), reco::Muon::globalTrack(), is_cosmics_, edm::Ref< C, T, F >::isNonnull(), reco::Muon::outerTrack(), HLT_FULL_cff::track, and use_global_muon_.

Referenced by analyze().

628  {
629  const reco::Track* track = nullptr;
630 
631  if (is_cosmics_) {
632  if (muon.outerTrack().isNonnull())
633  track = muon.outerTrack().get();
634 
635  } else {
636  // beams, i.e. pp or heavy ions
637  if (use_global_muon_ and muon.globalTrack().isNonnull())
638  track = muon.globalTrack().get();
639 
640  else if ((not use_global_muon_) and muon.outerTrack().isNonnull())
641  track = muon.outerTrack().get();
642  }
643 
644  return track;
645 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
Definition: Muon.h:48
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
Definition: Muon.h:51
bool GEMEfficiencyAnalyzer::isInsideOut ( const reco::Track track)
inlineprivate

Definition at line 138 of file GEMEfficiencyAnalyzer.h.

References reco::Track::innerPosition(), and reco::Track::outerPosition().

Referenced by getStartingState(), and skipLayer().

138  {
139  return track.innerPosition().mag2() > track.outerPosition().mag2();
140 }
const math::XYZPoint & outerPosition() const
position of the outermost hit
Definition: Track.h:62
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:56
bool GEMEfficiencyAnalyzer::isME11 ( const DetId det_id)
private

Definition at line 713 of file GEMEfficiencyAnalyzer.cc.

References MuonHitHelper::isCSC(), and or.

Referenced by analyze().

713  {
714  if (not MuonHitHelper::isCSC(det_id))
715  return false;
716  const CSCDetId csc_id{det_id};
717  return (csc_id.station() == 1) or ((csc_id.ring() == 1) or (csc_id.ring() == 4));
718 }
static bool isCSC(unsigned int detId)
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool GEMEfficiencyAnalyzer::skipGEMStation ( const int  station)
private

Definition at line 542 of file GEMEfficiencyAnalyzer.cc.

References kLogCategory_, LogDebug, monitor_ge0_, monitor_ge11_, monitor_ge21_, and createPayload::skip.

Referenced by bookEfficiencyChamber(), bookEfficiencyDetector(), bookEfficiencyEtaPartition(), bookEfficiencyMomentum(), bookMisc(), bookResolution(), and buildGEMLayers().

542  {
543  bool skip = false;
544 
545  if (station == 1) {
546  if (not monitor_ge11_) {
547  LogDebug(kLogCategory_) << "skip GE11 because monitorGE11 is " << std::boolalpha << monitor_ge11_;
548  skip = true;
549  }
550 
551  } else if (station == 2) {
552  if (not monitor_ge21_) {
553  LogDebug(kLogCategory_) << "skip GE21 because monitorGE21 is " << std::boolalpha << monitor_ge21_;
554  skip = true;
555  }
556 
557  } else if (station == 0) {
558  if (not monitor_ge0_) {
559  LogDebug(kLogCategory_) << "skip GE0 because monitorGE0 is " << std::boolalpha << monitor_ge0_;
560  skip = true;
561  }
562 
563  } else {
564  edm::LogError(kLogCategory_) << "got an unexpected GEM station " << station << ". skip this station.";
565  skip = true;
566  }
567 
568  return skip;
569 }
Log< level::Error, false > LogError
const std::string kLogCategory_
#define LogDebug(id)
bool GEMEfficiencyAnalyzer::skipLayer ( const reco::Track track,
const GEMLayerData layer 
)
private

Definition at line 720 of file GEMEfficiencyAnalyzer.cc.

References reco::TrackBase::eta(), reco::Track::innerMomentum(), is_cosmics_, isInsideOut(), reco::Track::outerMomentum(), GEMEfficiencyAnalyzer::GEMLayerData::region, createPayload::skip, and std::swap().

Referenced by analyze().

720  {
721  const bool is_same_region = track->eta() * layer.region > 0;
722 
723  bool skip = false;
724  if (is_cosmics_) {
725  float p2_in = track->innerMomentum().mag2();
726  float p2_out = track->outerMomentum().mag2();
727  if (isInsideOut(*track))
728  std::swap(p2_in, p2_out);
729  const bool is_outgoing = p2_in > p2_out;
730 
731  skip = (is_outgoing xor is_same_region);
732 
733  } else {
734  // beam scenario
735  skip = not is_same_region;
736  }
737 
738  return skip;
739 }
bool isInsideOut(const reco::Track &)
constexpr std::array< uint8_t, layerIndexSize > layer
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
const math::XYZVector & outerMomentum() const
momentum vector at the outermost hit position
Definition: Track.h:65
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
Definition: Track.h:59

Member Data Documentation

double GEMEfficiencyAnalyzer::eta_clamp_max_
private

Definition at line 108 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

double GEMEfficiencyAnalyzer::eta_low_
private

Definition at line 99 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), bookEfficiencyMomentum(), and GEMEfficiencyAnalyzer().

int GEMEfficiencyAnalyzer::eta_nbins_
private

Definition at line 98 of file GEMEfficiencyAnalyzer.h.

Referenced by bookEfficiencyMomentum(), and GEMEfficiencyAnalyzer().

double GEMEfficiencyAnalyzer::eta_up_
private

Definition at line 100 of file GEMEfficiencyAnalyzer.h.

Referenced by bookEfficiencyMomentum(), and GEMEfficiencyAnalyzer().

std::string GEMEfficiencyAnalyzer::folder_
private
const edm::ESGetToken<GEMGeometry, MuonGeometryRecord> GEMEfficiencyAnalyzer::gemToken1_
private

Definition at line 47 of file GEMEfficiencyAnalyzer.h.

Referenced by bookHistograms().

const edm::ESGetToken<GEMGeometry, MuonGeometryRecord> GEMEfficiencyAnalyzer::gemToken2_
private

Definition at line 48 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze().

const edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord> GEMEfficiencyAnalyzer::globalGeomToken_
private

Definition at line 49 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze().

bool GEMEfficiencyAnalyzer::is_cosmics_
private

Definition at line 88 of file GEMEfficiencyAnalyzer.h.

Referenced by GEMEfficiencyAnalyzer(), getTrack(), and skipLayer().

const std::string GEMEfficiencyAnalyzer::kLogCategory_ = "GEMEfficiencyAnalyzer"
private
MonitorElement* GEMEfficiencyAnalyzer::me_all_abs_residual_rphi_
private

Definition at line 131 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookMisc().

MEMap GEMEfficiencyAnalyzer::me_chamber_
private

Definition at line 118 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyChamber().

MEMap GEMEfficiencyAnalyzer::me_chamber_matched_
private

Definition at line 119 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyChamber().

MEMap GEMEfficiencyAnalyzer::me_detector_
private

Definition at line 122 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyDetector().

MEMap GEMEfficiencyAnalyzer::me_detector_matched_
private

Definition at line 123 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyDetector().

MEMap GEMEfficiencyAnalyzer::me_ieta_
private

Definition at line 120 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyEtaPartition().

MEMap GEMEfficiencyAnalyzer::me_ieta_matched_
private

Definition at line 121 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyEtaPartition().

MEMap GEMEfficiencyAnalyzer::me_muon_eta_
private

Definition at line 114 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyMomentum().

MEMap GEMEfficiencyAnalyzer::me_muon_eta_matched_
private

Definition at line 115 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyMomentum().

MEMap GEMEfficiencyAnalyzer::me_muon_phi_
private

Definition at line 116 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyMomentum().

MEMap GEMEfficiencyAnalyzer::me_muon_phi_matched_
private

Definition at line 117 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyMomentum().

MEMap GEMEfficiencyAnalyzer::me_muon_pt_
private

Definition at line 112 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyMomentum().

MEMap GEMEfficiencyAnalyzer::me_muon_pt_matched_
private

Definition at line 113 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyMomentum().

MEMap GEMEfficiencyAnalyzer::me_prop_chamber_
private

Definition at line 132 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookMisc().

MonitorElement* GEMEfficiencyAnalyzer::me_prop_phi_err_
private

Definition at line 130 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookMisc().

MonitorElement* GEMEfficiencyAnalyzer::me_prop_r_err_
private

Definition at line 129 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookMisc().

MEMap GEMEfficiencyAnalyzer::me_pull_y_
private

Definition at line 127 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookResolution().

MEMap GEMEfficiencyAnalyzer::me_residual_rphi_
private

Definition at line 125 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookResolution().

MEMap GEMEfficiencyAnalyzer::me_residual_y_
private

Definition at line 126 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookResolution().

bool GEMEfficiencyAnalyzer::monitor_ge0_
private

Definition at line 103 of file GEMEfficiencyAnalyzer.h.

Referenced by GEMEfficiencyAnalyzer(), and skipGEMStation().

bool GEMEfficiencyAnalyzer::monitor_ge11_
private

Definition at line 101 of file GEMEfficiencyAnalyzer.h.

Referenced by GEMEfficiencyAnalyzer(), and skipGEMStation().

bool GEMEfficiencyAnalyzer::monitor_ge21_
private

Definition at line 102 of file GEMEfficiencyAnalyzer.h.

Referenced by GEMEfficiencyAnalyzer(), and skipGEMStation().

MuonServiceProxy* GEMEfficiencyAnalyzer::muon_service_
private

Definition at line 106 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

edm::EDGetTokenT<edm::View<reco::Muon> > GEMEfficiencyAnalyzer::muon_token_
private

Definition at line 87 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

std::string GEMEfficiencyAnalyzer::name_
private
double GEMEfficiencyAnalyzer::prop_phi_error_cut_
private

Definition at line 96 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

double GEMEfficiencyAnalyzer::prop_r_error_cut_
private

Definition at line 94 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

std::vector<double> GEMEfficiencyAnalyzer::pt_bins_
private

Definition at line 97 of file GEMEfficiencyAnalyzer.h.

Referenced by bookEfficiencyMomentum(), and GEMEfficiencyAnalyzer().

double GEMEfficiencyAnalyzer::pt_clamp_max_
private

Definition at line 107 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

edm::EDGetTokenT<GEMRecHitCollection> GEMEfficiencyAnalyzer::rechit_token_
private

Definition at line 86 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

float GEMEfficiencyAnalyzer::residual_rphi_cut_
private

Definition at line 92 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), bookResolution(), and GEMEfficiencyAnalyzer().

const edm::ESGetToken<TransientTrackBuilder, TransientTrackRecord> GEMEfficiencyAnalyzer::trasientTrackToken_
private

Definition at line 50 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze().

bool GEMEfficiencyAnalyzer::use_global_muon_
private

Definition at line 89 of file GEMEfficiencyAnalyzer.h.

Referenced by GEMEfficiencyAnalyzer(), getStartingState(), and getTrack().

bool GEMEfficiencyAnalyzer::use_only_me11_
private

Definition at line 91 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

bool GEMEfficiencyAnalyzer::use_prop_phi_error_cut_
private

Definition at line 95 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

bool GEMEfficiencyAnalyzer::use_prop_r_error_cut_
private

Definition at line 93 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

bool GEMEfficiencyAnalyzer::use_skip_layer_
private

Definition at line 90 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().