CMS 3D CMS Logo

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 GEMDetId &, const edm::ESHandle< GEMGeometry > &)
 
int getDetOccXBin (const int, const int, const int)
 
GEMDetId getKey (const GEMDetId &)
 
int getMaxVFAT (const int)
 
int getNumEtaPartitions (const GEMStation *)
 
GEMDetId getReStEtKey (const GEMDetId &)
 
GEMDetId getReStKey (const GEMDetId &)
 
GEMDetId getReStKey (const int, const int)
 
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< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (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, DetIdfindStartingState (const reco::TransientTrack &, const GEMLayerData &, const edm::ESHandle< GlobalTrackingGeometry > &)
 
std::pair< TrajectoryStateOnSurface, DetIdgetStartingState (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 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, MuonGeometryRecordgemToken1_
 
const edm::ESGetToken< GEMGeometry, MuonGeometryRecordgemToken2_
 
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecordglobalGeomToken_
 
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_
 
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< GEMRecHitCollectionrechit_token_
 
float residual_rphi_cut_
 
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecordtrasientTrackToken_
 
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::GEMEfficiencyAnalyzer ( const edm::ParameterSet pset)
explicit

Definition at line 13 of file GEMEfficiencyAnalyzer.cc.

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 
40  const edm::ParameterSet&& muon_service_parameter = pset.getParameter<edm::ParameterSet>("ServiceParameters");
41  muon_service_ = new MuonServiceProxy(muon_service_parameter, consumesCollector());
42 
44  pt_clamp_max_ = pt_bins_.back() - eps;
46 
47  // TODO pt, eta, quality check for muons
48 }

References gpuVertexFinder::eps, geometryDiff::epsilon, eta_clamp_max_, eta_low_, eta_nbins_, eta_up_, folder_, is_cosmics_, muon_service_, muon_token_, MuonServiceProxy_cff::MuonServiceProxy, name_, prop_phi_error_cut_, prop_r_error_cut_, muonDTDigis_cfi::pset, 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_.

◆ ~GEMEfficiencyAnalyzer()

GEMEfficiencyAnalyzer::~GEMEfficiencyAnalyzer ( )
override

Definition at line 50 of file GEMEfficiencyAnalyzer.cc.

50 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 353 of file GEMEfficiencyAnalyzer.cc.

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

References funct::abs(), TransientTrackBuilder::build(), buildGEMLayers(), GEMDetId::chamber(), checkBounds(), eta_clamp_max_, eta_low_, f, dqm::impl::MonitorElement::Fill(), GEMOfflineDQMBase::fillME(), findClosetHit(), findEtaPartition(), mixOne_premix_on_sim_cfi::gem, gemToken2_, GEMOfflineDQMBase::getReStEtKey(), GEMOfflineDQMBase::getReStKey(), GEMOfflineDQMBase::getReStLaKey(), getStartingState(), getTrack(), globalGeomToken_, TrajectoryStateOnSurface::globalPosition(), GEMEtaPartition::id(), LEDCalibrationChannels::ieta, 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_, min(), muon_service_, muon_token_, GlobalErrorBase< T, ErrorWeightType >::phierr(), LocalTrajectoryError::positionError(), prop_phi_error_cut_, prop_r_error_cut_, TrackCandidateProducer_cfi::propagator, MuonServiceProxy::propagator(), pt_clamp_max_, rechit_token_, GlobalErrorBase< T, ErrorWeightType >::rerr(), residual_rphi_cut_, singleTopDQM_cfi::setup, 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().

◆ bookEfficiencyChamber()

void GEMEfficiencyAnalyzer::bookEfficiencyChamber ( DQMStore::IBooker ibooker,
const edm::ESHandle< GEMGeometry > &  gem 
)
private

Definition at line 176 of file GEMEfficiencyAnalyzer.cc.

176  {
177  // TODO Efficiency/Source
178  ibooker.setCurrentFolder(folder_ + "/Efficiency");
179 
180  for (const GEMStation* station : gem->stations()) {
181  const int region_id = station->region();
182  const int station_id = station->station();
183 
184  const std::vector<const GEMSuperChamber*>&& superchambers = station->superChambers();
185  if (not checkRefs(superchambers)) {
186  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
187  return;
188  }
189 
190  const int num_chambers = superchambers.size();
191  for (const GEMChamber* chamber : superchambers[0]->chambers()) {
192  const int layer_id = chamber->id().layer();
193 
194  const TString&& name_suffix = GEMUtils::getSuffixName(region_id, station_id, layer_id);
195  const TString&& title_suffix = GEMUtils::getSuffixTitle(region_id, station_id, layer_id);
196  const GEMDetId&& key = getReStLaKey(chamber->id());
197 
198  me_chamber_[key] =
199  ibooker.book1D("chamber" + name_suffix, name_.c_str() + title_suffix, num_chambers, 0.5, num_chambers + 0.5);
200  me_chamber_[key]->setAxisTitle("Chamber");
201  me_chamber_[key]->getTH1F()->SetNdivisions(-num_chambers, "Y");
202  for (int binx = 1; binx <= num_chambers; binx++) {
203  me_chamber_[key]->setBinLabel(binx, std::to_string(binx));
204  }
205 
207  } // layer
208  } // station
209 }

References dqm::implementation::IBooker::book1D(), bookNumerator1D(), relativeConstraints::chamber, chambers, GEMOfflineDQMBase::checkRefs(), folder_, GEMOfflineDQMBase::getReStLaKey(), GEMUtils::getSuffixName(), GEMUtils::getSuffixTitle(), crabWrapper::key, kLogCategory_, me_chamber_, me_chamber_matched_, name_, dqm::implementation::NavigatorBase::setCurrentFolder(), and relativeConstraints::station.

Referenced by bookHistograms().

◆ bookEfficiencyDetector()

void GEMEfficiencyAnalyzer::bookEfficiencyDetector ( DQMStore::IBooker ibooker,
const edm::ESHandle< GEMGeometry > &  gem 
)
private

Definition at line 246 of file GEMEfficiencyAnalyzer.cc.

246  {
247  // TODO Efficiency/Source
248  ibooker.setCurrentFolder(folder_ + "/Efficiency");
249 
250  for (const GEMStation* station : gem->stations()) {
251  const int region_id = station->region();
252  const int station_id = station->station();
253 
254  const std::vector<const GEMSuperChamber*>&& superchambers = station->superChambers();
255  if (not checkRefs(superchambers)) {
256  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
257  return;
258  }
259 
260  const int num_ch = superchambers.size();
261 
262  for (const GEMChamber* chamber : superchambers[0]->chambers()) {
263  const int layer_id = chamber->id().layer();
264  const int num_ieta = chamber->nEtaPartitions();
265 
266  const TString&& name_suffix = GEMUtils::getSuffixName(region_id, station_id, layer_id);
267  const TString&& title_suffix = GEMUtils::getSuffixTitle(region_id, station_id, layer_id);
268  const GEMDetId&& key = getReStLaKey(chamber->id());
269 
270  me_detector_[key] = ibooker.book2D("detector" + name_suffix,
271  name_.c_str() + title_suffix,
272  num_ch,
273  0.5,
274  num_ch + 0.5,
275  num_ieta,
276  0.5,
277  num_ieta + 0.5);
279 
281  } // layer
282  } // station
283 }

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

Referenced by bookHistograms().

◆ bookEfficiencyEtaPartition()

void GEMEfficiencyAnalyzer::bookEfficiencyEtaPartition ( DQMStore::IBooker ibooker,
const edm::ESHandle< GEMGeometry > &  gem 
)
private

Definition at line 211 of file GEMEfficiencyAnalyzer.cc.

212  {
213  // TODO Efficiency/Source
214  ibooker.setCurrentFolder(folder_ + "/Efficiency");
215 
216  for (const GEMStation* station : gem->stations()) {
217  const int region_id = station->region();
218  const int station_id = station->station();
219 
220  const std::vector<const GEMSuperChamber*>&& superchambers = station->superChambers();
221  if (not checkRefs(superchambers)) {
222  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
223  return;
224  }
225 
226  for (const GEMChamber* chamber : superchambers[0]->chambers()) {
227  const int layer_id = chamber->id().layer();
228  const int num_ieta = chamber->nEtaPartitions();
229 
230  const TString&& name_suffix = GEMUtils::getSuffixName(region_id, station_id, layer_id);
231  const TString&& title_suffix = GEMUtils::getSuffixTitle(region_id, station_id, layer_id);
232  const GEMDetId&& key = getReStLaKey(chamber->id());
233 
234  me_ieta_[key] = ibooker.book1D("ieta" + name_suffix, name_.c_str() + title_suffix, num_ieta, 0.5, num_ieta + 0.5);
235  me_ieta_[key]->setAxisTitle("i#eta");
236  me_ieta_[key]->getTH1F()->SetNdivisions(-num_ieta, "Y");
237  for (int binx = 1; binx <= num_ieta; binx++) {
238  me_ieta_[key]->setBinLabel(binx, std::to_string(binx));
239  }
240 
242  } // layer
243  } // station
244 }

References dqm::implementation::IBooker::book1D(), bookNumerator1D(), relativeConstraints::chamber, chambers, GEMOfflineDQMBase::checkRefs(), folder_, GEMOfflineDQMBase::getReStLaKey(), GEMUtils::getSuffixName(), GEMUtils::getSuffixTitle(), crabWrapper::key, kLogCategory_, me_ieta_, me_ieta_matched_, name_, dqm::implementation::NavigatorBase::setCurrentFolder(), and relativeConstraints::station.

Referenced by bookHistograms().

◆ bookEfficiencyMomentum()

void GEMEfficiencyAnalyzer::bookEfficiencyMomentum ( DQMStore::IBooker ibooker,
const edm::ESHandle< GEMGeometry > &  gem 
)
private

Definition at line 141 of file GEMEfficiencyAnalyzer.cc.

141  {
142  // TODO Efficiency/Source
143  ibooker.setCurrentFolder(folder_ + "/Efficiency");
144 
145  const TString pt_x_title = "Muon p_{T} [GeV]";
146  const int pt_nbinsx = pt_bins_.size() - 1;
147 
148  const std::string eta_x_title = "Muon |#eta|";
149  const std::string phi_x_title = "Muon #phi [rad]";
150 
151  for (const GEMStation* station : gem->stations()) {
152  const int region_id = station->region();
153  const int station_id = station->station();
154 
155  const GEMDetId&& key = getReStKey(region_id, station_id);
156  const TString&& name_suffix = GEMUtils::getSuffixName(region_id, station_id);
157  const TString&& title_suffix = GEMUtils::getSuffixTitle(region_id, station_id);
158 
159  const TString&& title = name_.c_str() + title_suffix;
160 
161  TH1F* h_muon_pt = new TH1F("muon_pt" + name_suffix, title, pt_nbinsx, &pt_bins_[0]);
162  h_muon_pt->SetXTitle(pt_x_title);
163  me_muon_pt_[key] = ibooker.book1D(h_muon_pt->GetName(), h_muon_pt);
165 
166  me_muon_eta_[key] = ibooker.book1D("muon_eta" + name_suffix, title, eta_nbins_, eta_low_, eta_up_);
167  me_muon_eta_[key]->setXTitle(eta_x_title);
169 
170  me_muon_phi_[key] = ibooker.book1D("muon_phi" + name_suffix, title, 36, -M_PI, M_PI);
171  me_muon_phi_[key]->setAxisTitle(phi_x_title);
173  } // station
174 }

References dqm::implementation::IBooker::book1D(), bookNumerator1D(), eta_low_, eta_nbins_, eta_up_, folder_, GEMOfflineDQMBase::getReStKey(), GEMUtils::getSuffixName(), GEMUtils::getSuffixTitle(), crabWrapper::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(), relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, and runGCPTkAlMap::title.

Referenced by bookHistograms().

◆ bookHistograms()

void GEMEfficiencyAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  run,
edm::EventSetup const &  isetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 110 of file GEMEfficiencyAnalyzer.cc.

112  {
114  gem = isetup.getHandle(gemToken1_);
115 
116  if (not gem.isValid()) {
117  edm::LogError(kLogCategory_) << "GEMGeometry is invalid" << std::endl;
118  return;
119  }
120 
121  bookEfficiencyMomentum(ibooker, gem);
122  bookEfficiencyChamber(ibooker, gem);
124  bookEfficiencyDetector(ibooker, gem);
125  bookResolution(ibooker, gem);
126  bookMisc(ibooker, gem);
127 }

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

◆ bookMisc()

void GEMEfficiencyAnalyzer::bookMisc ( DQMStore::IBooker ibooker,
const edm::ESHandle< GEMGeometry > &  gem 
)
private

Definition at line 325 of file GEMEfficiencyAnalyzer.cc.

325  {
326  ibooker.setCurrentFolder(folder_ + "/Misc");
327  // FIXME the range shoule be dependent on the scenario
328  me_prop_r_err_ = ibooker.book1D("prop_r_err", ";Propagation Global R Error [cm];Entries", 20, 0.0, 20.0);
329  me_prop_phi_err_ = ibooker.book1D("prop_phi_err", "Propagation Global Phi Error [rad];Entries", 20, 0.0, M_PI);
330  me_all_abs_residual_rphi_ = ibooker.book1D("all_abs_residual_rphi", ";Residual in R#phi [cm];Entries", 20, 0.0, 20.0);
331 
332  for (const GEMStation* station : gem->stations()) {
333  const int region_id = station->region();
334  const int station_id = station->station();
335 
336  const std::vector<const GEMSuperChamber*>&& superchambers = station->superChambers();
337  if (not checkRefs(superchambers)) {
338  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
339  return;
340  }
341  // ignore layer ids
342  const int num_ch = superchambers.size();
343 
344  const GEMDetId&& key = getReStKey(region_id, station_id);
345  const TString&& name_suffix = GEMUtils::getSuffixName(region_id, station_id);
346  const TString&& title_suffix = GEMUtils::getSuffixTitle(region_id, station_id);
347  me_prop_chamber_[key] = ibooker.book1D("prop_chamber" + name_suffix, title_suffix, num_ch, 0.5, num_ch + 0.5);
348  me_prop_chamber_[key]->setAxisTitle("Destination Chamber Id", 1);
349  me_prop_chamber_[key]->setAxisTitle("Entries", 2);
350  } // station
351 }

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

Referenced by bookHistograms().

◆ bookNumerator1D()

dqm::impl::MonitorElement * GEMEfficiencyAnalyzer::bookNumerator1D ( DQMStore::IBooker ,
MonitorElement  
)
private

Definition at line 129 of file GEMEfficiencyAnalyzer.cc.

129  {
130  const std::string name = me->getName() + "_matched";
131  TH1F* hist = dynamic_cast<TH1F*>(me->getTH1F()->Clone(name.c_str()));
132  return ibooker.book1D(name, hist);
133 }

References dqm::implementation::IBooker::book1D(), gpuVertexFinder::hist, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by bookEfficiencyChamber(), bookEfficiencyEtaPartition(), and bookEfficiencyMomentum().

◆ bookNumerator2D()

dqm::impl::MonitorElement * GEMEfficiencyAnalyzer::bookNumerator2D ( DQMStore::IBooker ,
MonitorElement  
)
private

Definition at line 135 of file GEMEfficiencyAnalyzer.cc.

135  {
136  const std::string name = me->getName() + "_matched";
137  TH2F* hist = dynamic_cast<TH2F*>(me->getTH2F()->Clone(name.c_str()));
138  return ibooker.book2D(name, hist);
139 }

References dqm::implementation::IBooker::book2D(), gpuVertexFinder::hist, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by bookEfficiencyDetector().

◆ bookResolution()

void GEMEfficiencyAnalyzer::bookResolution ( DQMStore::IBooker ibooker,
const edm::ESHandle< GEMGeometry > &  gem 
)
private

Definition at line 285 of file GEMEfficiencyAnalyzer.cc.

285  {
286  ibooker.setCurrentFolder(folder_ + "/Resolution");
287  for (const GEMStation* station : gem->stations()) {
288  const int region_id = station->region();
289  const int station_id = station->station();
290 
291  const std::vector<const GEMSuperChamber*>&& superchambers = station->superChambers();
292  if (not checkRefs(superchambers)) {
293  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
294  return;
295  }
296 
297  const std::vector<const GEMChamber*>& chambers = superchambers[0]->chambers();
298  if (not checkRefs(chambers)) {
299  edm::LogError(kLogCategory_) << "failed to get a valid vector of GEMChamber ptrs" << std::endl;
300  return;
301  }
302 
303  for (const GEMEtaPartition* eta_partition : chambers[0]->etaPartitions()) {
304  const int ieta = eta_partition->id().roll();
305 
306  const GEMDetId&& key = getReStEtKey(eta_partition->id());
307  // TODO
308  const TString&& name_suffix = TString::Format("_GE%+.2d_R%d", region_id * (station_id * 10 + 1), ieta);
309  const TString&& title =
310  name_.c_str() + TString::Format(" : GE%+.2d Roll %d", region_id * (station_id * 10 + 1), ieta);
311 
313  ibooker.book1D("residual_rphi" + name_suffix, title, 50, -residual_rphi_cut_, residual_rphi_cut_);
314  me_residual_rphi_[key]->setAxisTitle("Residual in R#phi [cm]");
315 
316  me_residual_y_[key] = ibooker.book1D("residual_y" + name_suffix, title, 60, -12.0, 12.0);
317  me_residual_y_[key]->setAxisTitle("Residual in Local Y [cm]");
318 
319  me_pull_y_[key] = ibooker.book1D("pull_y" + name_suffix, title, 60, -3.0, 3.0);
320  me_pull_y_[key]->setAxisTitle("Pull in Local Y");
321  } // ieta
322  } // station
323 }

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

Referenced by bookHistograms().

◆ buildGEMLayers()

std::vector< GEMEfficiencyAnalyzer::GEMLayerData > GEMEfficiencyAnalyzer::buildGEMLayers ( const edm::ESHandle< GEMGeometry > &  gem)
private

Definition at line 540 of file GEMEfficiencyAnalyzer.cc.

541  {
542  std::vector<GEMLayerData> layer_vector;
543 
544  for (const GEMStation* station : gem->stations()) {
545  const int region_id = station->region();
546  const int station_id = station->station();
547  const bool is_ge11 = station_id == 1;
548 
549  // (layer_id, is_odd) - chambers
550  std::map<std::pair<int, bool>, std::vector<const GEMChamber*> > chambers_per_layer;
551 
552  for (const GEMSuperChamber* super_chamber : station->superChambers()) {
553  // For GE0 and GE21, 'is_odd' is always set to 'false'
554  const bool is_odd = is_ge11 ? super_chamber->id().chamber() % 2 == 1 : false;
555 
556  for (const GEMChamber* chamber : super_chamber->chambers()) {
557  const int layer_id = chamber->id().layer();
558  const std::pair<int, bool> key{layer_id, is_odd};
559 
560  if (chambers_per_layer.find(key) == chambers_per_layer.end())
561  chambers_per_layer.insert({key, std::vector<const GEMChamber*>()});
562 
563  chambers_per_layer.at(key).push_back(chamber);
564  } // GEMChamber
565  } // GEMSuperChamber
566 
567  for (auto [key, chamber_vector] : chambers_per_layer) {
568  const int layer_id = key.first;
569 
570  // chambers should have same R and Z spans.
571  auto [rmin, rmax] = chamber_vector[0]->surface().rSpan();
572  auto [zmin, zmax] = chamber_vector[0]->surface().zSpan();
573 
574  // layer position and rotation
575  const float layer_z = chamber_vector[0]->position().z();
576  Surface::PositionType position{0.f, 0.f, layer_z};
578 
579  zmin -= layer_z;
580  zmax -= layer_z;
581 
582  // the bounds from min and max R and Z in the local coordinates.
583  SimpleDiskBounds* bounds = new SimpleDiskBounds(rmin, rmax, zmin, zmax);
585 
586  layer_vector.emplace_back(layer, chamber_vector, region_id, station_id, layer_id);
587  } // layer
588  } // GEMStation
589 
590  return layer_vector;
591 }

References Disk::build(), relativeConstraints::chamber, crabWrapper::key, phase1PixelTopology::layer, position, idealTransformation::rotation, relativeConstraints::station, SiStripMonitorCluster_cfi::zmax, and SiStripMonitorCluster_cfi::zmin.

Referenced by analyze().

◆ checkBounds()

bool GEMEfficiencyAnalyzer::checkBounds ( const GlobalPoint global_point,
const Plane plane 
)
private

Definition at line 706 of file GEMEfficiencyAnalyzer.cc.

706  {
707  const LocalPoint&& local_point = plane.toLocal(global_point);
708  const LocalPoint local_point_2d(local_point.x(), local_point.y(), 0.0f);
709  return plane.bounds().inside(local_point_2d);
710 }

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

Referenced by analyze(), and findEtaPartition().

◆ fillDescriptions()

void GEMEfficiencyAnalyzer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 52 of file GEMEfficiencyAnalyzer.cc.

52  {
53  // beam scenario
54  {
56  desc.addUntracked<std::string>("name", "GlobalMuon");
57  desc.addUntracked<std::string>("folder", "GEM/Efficiency/type0");
58  desc.add<edm::InputTag>("recHitTag", edm::InputTag("gemRecHits"));
59  desc.add<edm::InputTag>("muonTag", edm::InputTag("muons"));
60  desc.addUntracked<bool>("isCosmics", false);
61  desc.addUntracked<bool>("useGlobalMuon", true);
62  desc.add<bool>("useSkipLayer", true);
63  desc.add<bool>("useOnlyME11", false);
64  desc.add<double>("residualRPhiCut", 2.0); // TODO need to be tuned
65  desc.add<bool>("usePropRErrorCut", false);
66  desc.add<double>("propRErrorCut", 1.0);
67  desc.add<bool>("usePropPhiErrorCut", false);
68  desc.add<double>("propPhiErrorCut", 0.01);
69  desc.addUntracked<std::vector<double> >("ptBins", {20., 30., 40., 50., 60., 70., 80., 90., 100., 120.});
70  desc.addUntracked<int>("etaNbins", 9);
71  desc.addUntracked<double>("etaLow", 1.4);
72  desc.addUntracked<double>("etaUp", 2.3);
73  {
75  psd0.setAllowAnything();
76  desc.add<edm::ParameterSetDescription>("ServiceParameters", psd0);
77  }
78  descriptions.add("gemEfficiencyAnalyzerDefault", desc);
79  } // beam scenario
80 
81  // cosmic scenario
82  {
84  desc.addUntracked<std::string>("name", "GlobalMuon"); // FIXME
85  desc.addUntracked<std::string>("folder", "GEM/Efficiency/type0");
86  desc.add<edm::InputTag>("recHitTag", edm::InputTag("gemRecHits"));
87  desc.add<edm::InputTag>("muonTag", edm::InputTag("muons"));
88  desc.addUntracked<bool>("isCosmics", true);
89  desc.addUntracked<bool>("useGlobalMuon", false);
90  desc.add<bool>("useSkipLayer", true);
91  desc.add<bool>("useOnlyME11", true);
92  desc.add<double>("residualRPhiCut", 5.0); // TODO need to be tuned
93  desc.add<bool>("usePropRErrorCut", true);
94  desc.add<double>("propRErrorCut", 1.0);
95  desc.add<bool>("usePropPhiErrorCut", true);
96  desc.add<double>("propPhiErrorCut", 0.001);
97  desc.addUntracked<std::vector<double> >("ptBins", {0., 10., 20., 30., 40., 50., 60., 70., 80., 90., 100., 120.});
98  desc.addUntracked<int>("etaNbins", 9);
99  desc.addUntracked<double>("etaLow", 1.4);
100  desc.addUntracked<double>("etaUp", 2.3);
101  {
103  psd0.setAllowAnything();
104  desc.add<edm::ParameterSetDescription>("ServiceParameters", psd0);
105  }
106  descriptions.add("gemEfficiencyAnalyzerCosmicsDefault", desc);
107  } // cosmics
108 }

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

◆ findClosetHit()

std::pair< const GEMRecHit *, float > GEMEfficiencyAnalyzer::findClosetHit ( const GlobalPoint dest_global_pos,
const GEMRecHitCollection::range range,
const GEMEtaPartition eta_partition 
)
private

Definition at line 730 of file GEMEfficiencyAnalyzer.cc.

732  {
733  const StripTopology& topology = eta_partition->specificTopology();
734  const LocalPoint&& dest_local_pos = eta_partition->toLocal(dest_global_pos);
735  const float dest_local_x = dest_local_pos.x();
736  const float dest_local_y = dest_local_pos.y();
737 
738  const GEMRecHit* closest_hit = nullptr;
739  float min_residual_rphi = 1e6;
740 
741  for (auto hit = range.first; hit != range.second; ++hit) {
742  const LocalPoint&& hit_local_pos = hit->localPosition();
743  const float hit_local_phi = topology.stripAngle(eta_partition->strip(hit_local_pos));
744 
745  const float residual_x = dest_local_x - hit_local_pos.x();
746  const float residual_y = dest_local_y - hit_local_pos.y();
747  const float residual_rphi = std::cos(hit_local_phi) * residual_x + std::sin(hit_local_phi) * residual_y;
748 
749  if (std::abs(residual_rphi) < std::abs(min_residual_rphi)) {
750  min_residual_rphi = residual_rphi;
751  closest_hit = &(*hit);
752  }
753  }
754 
755  return std::make_pair(closest_hit, min_residual_rphi);
756 }

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

Referenced by analyze().

◆ findEtaPartition()

const GEMEtaPartition * GEMEfficiencyAnalyzer::findEtaPartition ( const GlobalPoint global_point,
const std::vector< const GEMChamber * > &  chamber_vector 
)
private

Definition at line 712 of file GEMEfficiencyAnalyzer.cc.

713  {
714  const GEMEtaPartition* bound = nullptr;
715  for (const GEMChamber* chamber : chamber_vector) {
716  if (not checkBounds(global_point, chamber->surface()))
717  continue;
718 
719  for (const GEMEtaPartition* eta_partition : chamber->etaPartitions()) {
720  if (checkBounds(global_point, eta_partition->surface())) {
721  bound = eta_partition;
722  break;
723  }
724  } // GEMEtaPartition
725  } // GEMChamber
726 
727  return bound;
728 }

References relativeConstraints::chamber, and checkBounds().

Referenced by analyze().

◆ findStartingState()

std::pair< TrajectoryStateOnSurface, DetId > GEMEfficiencyAnalyzer::findStartingState ( const reco::TransientTrack transient_track,
const GEMLayerData layer,
const edm::ESHandle< GlobalTrackingGeometry > &  geometry 
)
private

Definition at line 643 of file GEMEfficiencyAnalyzer.cc.

646  {
647  GlobalPoint starting_point;
648  DetId starting_id;
649  float min_distance = 1e12;
650  bool found = false;
651 
652  // TODO optimize this loop because hits should be ordered..
653  for (auto rechit = transient_track.recHitsBegin(); rechit != transient_track.recHitsEnd(); rechit++) {
654  const DetId&& det_id = (*rechit)->geographicalId();
655 
656  if (MuonHitHelper::isGEM(det_id.rawId())) {
657  continue;
658  }
659 
660  const GeomDet* det = geometry->idToDet(det_id);
661  const GlobalPoint&& global_position = det->toGlobal((*rechit)->localPosition());
662  const float distance = std::abs(layer.disk->localZclamped(global_position));
663  if (distance < min_distance) {
664  found = true;
665  min_distance = distance;
666  starting_point = global_position;
667  starting_id = det_id;
668  }
669  }
670 
671  TrajectoryStateOnSurface starting_state;
672  if (found) {
673  starting_state = transient_track.stateOnSurface(starting_point);
674  }
675  return std::make_pair(starting_state, starting_id);
676 }

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

Referenced by getStartingState().

◆ getStartingState()

std::pair< TrajectoryStateOnSurface, DetId > GEMEfficiencyAnalyzer::getStartingState ( const reco::TransientTrack transient_track,
const GEMLayerData layer,
const edm::ESHandle< GlobalTrackingGeometry > &  geometry 
)
private

Definition at line 612 of file GEMEfficiencyAnalyzer.cc.

615  {
616  TrajectoryStateOnSurface starting_state;
617  DetId starting_id;
618 
619  if (use_global_muon_) {
620  std::tie(starting_state, starting_id) = findStartingState(transient_track, layer, geometry);
621 
622  } else {
623  // if outer track
624  const reco::Track& track = transient_track.track();
625  const bool is_insideout = isInsideOut(track);
626 
627  const DetId inner_id{(is_insideout ? track.outerDetId() : track.innerDetId())};
628  if (MuonHitHelper::isGEM(inner_id.rawId())) {
629  std::tie(starting_state, starting_id) = findStartingState(transient_track, layer, geometry);
630 
631  } else {
632  starting_id = inner_id;
633  if (is_insideout)
634  starting_state = transient_track.outermostMeasurementState();
635  else
636  starting_state = transient_track.innermostMeasurementState();
637  }
638  }
639 
640  return std::make_pair(starting_state, starting_id);
641 }

References findStartingState(), reco::TransientTrack::innermostMeasurementState(), MuonHitHelper::isGEM(), isInsideOut(), phase1PixelTopology::layer, reco::TransientTrack::outermostMeasurementState(), reco::TransientTrack::track(), HLT_FULL_cff::track, and use_global_muon_.

Referenced by analyze().

◆ getTrack()

const reco::Track * GEMEfficiencyAnalyzer::getTrack ( const reco::Muon muon)
private

Definition at line 593 of file GEMEfficiencyAnalyzer.cc.

593  {
594  const reco::Track* track = nullptr;
595 
596  if (is_cosmics_) {
597  if (muon.outerTrack().isNonnull())
598  track = muon.outerTrack().get();
599 
600  } else {
601  // beams, i.e. pp or heavy ions
602  if (use_global_muon_ and muon.globalTrack().isNonnull())
603  track = muon.globalTrack().get();
604 
605  else if ((not use_global_muon_) and muon.outerTrack().isNonnull())
606  track = muon.outerTrack().get();
607  }
608 
609  return track;
610 }

References is_cosmics_, HLT_FULL_cff::track, and use_global_muon_.

Referenced by analyze().

◆ isInsideOut()

bool GEMEfficiencyAnalyzer::isInsideOut ( const reco::Track track)
inlineprivate

Definition at line 134 of file GEMEfficiencyAnalyzer.h.

134  {
135  return track.innerPosition().mag2() > track.outerPosition().mag2();
136 }

References HLT_FULL_cff::track.

Referenced by getStartingState(), and skipLayer().

◆ isME11()

bool GEMEfficiencyAnalyzer::isME11 ( const DetId det_id)
private

Definition at line 678 of file GEMEfficiencyAnalyzer.cc.

678  {
679  if (not MuonHitHelper::isCSC(det_id))
680  return false;
681  const CSCDetId csc_id{det_id};
682  return (csc_id.station() == 1) or ((csc_id.ring() == 1) or (csc_id.ring() == 4));
683 }

References MuonHitHelper::isCSC(), and or.

Referenced by analyze().

◆ skipLayer()

bool GEMEfficiencyAnalyzer::skipLayer ( const reco::Track track,
const GEMLayerData layer 
)
private

Definition at line 685 of file GEMEfficiencyAnalyzer.cc.

685  {
686  const bool is_same_region = track->eta() * layer.region > 0;
687 
688  bool skip = false;
689  if (is_cosmics_) {
690  float p2_in = track->innerMomentum().mag2();
691  float p2_out = track->outerMomentum().mag2();
692  if (isInsideOut(*track))
693  std::swap(p2_in, p2_out);
694  const bool is_outgoing = p2_in > p2_out;
695 
696  skip = (is_outgoing xor is_same_region);
697 
698  } else {
699  // beam scenario
700  skip = not is_same_region;
701  }
702 
703  return skip;
704 }

References is_cosmics_, isInsideOut(), phase1PixelTopology::layer, optionsL1T::skip, std::swap(), and HLT_FULL_cff::track.

Referenced by analyze().

Member Data Documentation

◆ eta_clamp_max_

double GEMEfficiencyAnalyzer::eta_clamp_max_
private

Definition at line 104 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

◆ eta_low_

double GEMEfficiencyAnalyzer::eta_low_
private

Definition at line 98 of file GEMEfficiencyAnalyzer.h.

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

◆ eta_nbins_

int GEMEfficiencyAnalyzer::eta_nbins_
private

Definition at line 97 of file GEMEfficiencyAnalyzer.h.

Referenced by bookEfficiencyMomentum(), and GEMEfficiencyAnalyzer().

◆ eta_up_

double GEMEfficiencyAnalyzer::eta_up_
private

Definition at line 99 of file GEMEfficiencyAnalyzer.h.

Referenced by bookEfficiencyMomentum(), and GEMEfficiencyAnalyzer().

◆ folder_

std::string GEMEfficiencyAnalyzer::folder_
private

◆ gemToken1_

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

Definition at line 47 of file GEMEfficiencyAnalyzer.h.

Referenced by bookHistograms().

◆ gemToken2_

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

Definition at line 48 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze().

◆ globalGeomToken_

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

Definition at line 49 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze().

◆ is_cosmics_

bool GEMEfficiencyAnalyzer::is_cosmics_
private

Definition at line 87 of file GEMEfficiencyAnalyzer.h.

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

◆ kLogCategory_

const std::string GEMEfficiencyAnalyzer::kLogCategory_ = "GEMEfficiencyAnalyzer"
private

◆ me_all_abs_residual_rphi_

MonitorElement* GEMEfficiencyAnalyzer::me_all_abs_residual_rphi_
private

Definition at line 127 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookMisc().

◆ me_chamber_

MEMap GEMEfficiencyAnalyzer::me_chamber_
private

Definition at line 114 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyChamber().

◆ me_chamber_matched_

MEMap GEMEfficiencyAnalyzer::me_chamber_matched_
private

Definition at line 115 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyChamber().

◆ me_detector_

MEMap GEMEfficiencyAnalyzer::me_detector_
private

Definition at line 118 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyDetector().

◆ me_detector_matched_

MEMap GEMEfficiencyAnalyzer::me_detector_matched_
private

Definition at line 119 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyDetector().

◆ me_ieta_

MEMap GEMEfficiencyAnalyzer::me_ieta_
private

Definition at line 116 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyEtaPartition().

◆ me_ieta_matched_

MEMap GEMEfficiencyAnalyzer::me_ieta_matched_
private

Definition at line 117 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyEtaPartition().

◆ me_muon_eta_

MEMap GEMEfficiencyAnalyzer::me_muon_eta_
private

Definition at line 110 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyMomentum().

◆ me_muon_eta_matched_

MEMap GEMEfficiencyAnalyzer::me_muon_eta_matched_
private

Definition at line 111 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyMomentum().

◆ me_muon_phi_

MEMap GEMEfficiencyAnalyzer::me_muon_phi_
private

Definition at line 112 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyMomentum().

◆ me_muon_phi_matched_

MEMap GEMEfficiencyAnalyzer::me_muon_phi_matched_
private

Definition at line 113 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyMomentum().

◆ me_muon_pt_

MEMap GEMEfficiencyAnalyzer::me_muon_pt_
private

Definition at line 108 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyMomentum().

◆ me_muon_pt_matched_

MEMap GEMEfficiencyAnalyzer::me_muon_pt_matched_
private

Definition at line 109 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookEfficiencyMomentum().

◆ me_prop_chamber_

MEMap GEMEfficiencyAnalyzer::me_prop_chamber_
private

Definition at line 128 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookMisc().

◆ me_prop_phi_err_

MonitorElement* GEMEfficiencyAnalyzer::me_prop_phi_err_
private

Definition at line 126 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookMisc().

◆ me_prop_r_err_

MonitorElement* GEMEfficiencyAnalyzer::me_prop_r_err_
private

Definition at line 125 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookMisc().

◆ me_pull_y_

MEMap GEMEfficiencyAnalyzer::me_pull_y_
private

Definition at line 123 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookResolution().

◆ me_residual_rphi_

MEMap GEMEfficiencyAnalyzer::me_residual_rphi_
private

Definition at line 121 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookResolution().

◆ me_residual_y_

MEMap GEMEfficiencyAnalyzer::me_residual_y_
private

Definition at line 122 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and bookResolution().

◆ muon_service_

MuonServiceProxy* GEMEfficiencyAnalyzer::muon_service_
private

Definition at line 102 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

◆ muon_token_

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

Definition at line 86 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

◆ name_

std::string GEMEfficiencyAnalyzer::name_
private

◆ prop_phi_error_cut_

double GEMEfficiencyAnalyzer::prop_phi_error_cut_
private

Definition at line 95 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

◆ prop_r_error_cut_

double GEMEfficiencyAnalyzer::prop_r_error_cut_
private

Definition at line 93 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

◆ pt_bins_

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

Definition at line 96 of file GEMEfficiencyAnalyzer.h.

Referenced by bookEfficiencyMomentum(), and GEMEfficiencyAnalyzer().

◆ pt_clamp_max_

double GEMEfficiencyAnalyzer::pt_clamp_max_
private

Definition at line 103 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

◆ rechit_token_

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

Definition at line 85 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

◆ residual_rphi_cut_

float GEMEfficiencyAnalyzer::residual_rphi_cut_
private

Definition at line 91 of file GEMEfficiencyAnalyzer.h.

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

◆ trasientTrackToken_

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

Definition at line 50 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze().

◆ use_global_muon_

bool GEMEfficiencyAnalyzer::use_global_muon_
private

Definition at line 88 of file GEMEfficiencyAnalyzer.h.

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

◆ use_only_me11_

bool GEMEfficiencyAnalyzer::use_only_me11_
private

Definition at line 90 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

◆ use_prop_phi_error_cut_

bool GEMEfficiencyAnalyzer::use_prop_phi_error_cut_
private

Definition at line 94 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

◆ use_prop_r_error_cut_

bool GEMEfficiencyAnalyzer::use_prop_r_error_cut_
private

Definition at line 92 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

◆ use_skip_layer_

bool GEMEfficiencyAnalyzer::use_skip_layer_
private

Definition at line 89 of file GEMEfficiencyAnalyzer.h.

Referenced by analyze(), and GEMEfficiencyAnalyzer().

GlobalErrorBase::phierr
T phierr(const GlobalPoint &aPoint) const
Definition: GlobalErrorBase.h:149
TkRotation< float >
GEMEfficiencyAnalyzer::me_chamber_
MEMap me_chamber_
Definition: GEMEfficiencyAnalyzer.h:114
GEMEfficiencyAnalyzer::skipLayer
bool skipLayer(const reco::Track *, const GEMLayerData &)
Definition: GEMEfficiencyAnalyzer.cc:685
GEMEfficiencyAnalyzer::use_prop_r_error_cut_
bool use_prop_r_error_cut_
Definition: GEMEfficiencyAnalyzer.h:92
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
GEMOfflineDQMBase::getReStLaKey
GEMDetId getReStLaKey(const GEMDetId &)
Definition: GEMOfflineDQMBase.h:85
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
edm::ESInputTag
Definition: ESInputTag.h:87
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
GeomDet
Definition: GeomDet.h:27
GEMEfficiencyAnalyzer::me_ieta_matched_
MEMap me_ieta_matched_
Definition: GEMEfficiencyAnalyzer.h:117
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
GEMEfficiencyAnalyzer::me_prop_r_err_
MonitorElement * me_prop_r_err_
Definition: GEMEfficiencyAnalyzer.h:125
min
T min(T a, T b)
Definition: MathUtil.h:58
GEMEfficiencyAnalyzer::me_all_abs_residual_rphi_
MonitorElement * me_all_abs_residual_rphi_
Definition: GEMEfficiencyAnalyzer.h:127
GEMEfficiencyAnalyzer::getTrack
const reco::Track * getTrack(const reco::Muon &)
Definition: GEMEfficiencyAnalyzer.cc:593
relativeConstraints.station
station
Definition: relativeConstraints.py:67
GEMEfficiencyAnalyzer::bookNumerator2D
MonitorElement * bookNumerator2D(DQMStore::IBooker &, MonitorElement *)
Definition: GEMEfficiencyAnalyzer.cc:135
GEMEfficiencyAnalyzer::me_muon_pt_matched_
MEMap me_muon_pt_matched_
Definition: GEMEfficiencyAnalyzer.h:109
GEMEfficiencyAnalyzer::me_prop_phi_err_
MonitorElement * me_prop_phi_err_
Definition: GEMEfficiencyAnalyzer.h:126
gpuVertexFinder::eps
WorkSpace int float eps
Definition: gpuClusterTracksDBSCAN.h:18
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
Disk::build
static DiskPointer build(Args &&... args)
Definition: BoundDisk.h:38
geometry
Definition: geometry.py:1
GEMEtaPartition
Definition: GEMEtaPartition.h:12
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
GEMEfficiencyAnalyzer::bookEfficiencyDetector
void bookEfficiencyDetector(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:246
GEMEfficiencyAnalyzer::me_residual_y_
MEMap me_residual_y_
Definition: GEMEfficiencyAnalyzer.h:122
GEMEfficiencyAnalyzer::bookMisc
void bookMisc(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:325
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:95
GEMEfficiencyAnalyzer::bookResolution
void bookResolution(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:285
MuonHitHelper::isCSC
static bool isCSC(unsigned int detId)
Definition: MuonHitHelper.cc:11
GEMOfflineDQMBase::GEMOfflineDQMBase
GEMOfflineDQMBase(const edm::ParameterSet &)
Definition: GEMOfflineDQMBase.cc:4
ReferenceCountingPointer< Disk >
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
reco::TransientTrack::recHitsBegin
trackingRecHit_iterator recHitsBegin() const
first iterator to RecHits
Definition: TransientTrack.h:124
GEMEfficiencyAnalyzer::folder_
std::string folder_
Definition: GEMEfficiencyAnalyzer.h:84
GEMEtaPartition::specificTopology
const StripTopology & specificTopology() const
Definition: GEMEtaPartition.cc:16
GEMEfficiencyAnalyzer::use_global_muon_
bool use_global_muon_
Definition: GEMEfficiencyAnalyzer.h:88
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
edm::Handle< GEMRecHitCollection >
SiStripMonitorCluster_cfi.zmin
zmin
Definition: SiStripMonitorCluster_cfi.py:200
reco::TransientTrack::stateOnSurface
TrajectoryStateOnSurface stateOnSurface(const GlobalPoint &point) const
Definition: TransientTrack.h:92
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
MuonServiceProxy_cff.MuonServiceProxy
MuonServiceProxy
Definition: MuonServiceProxy_cff.py:14
reco::Muon
Definition: Muon.h:27
geometryDiff.epsilon
int epsilon
Definition: geometryDiff.py:26
GEMUtils::getSuffixName
TString getSuffixName(Int_t region_id)
Definition: GEMValidationUtils.cc:5
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
SimpleDiskBounds
Definition: SimpleDiskBounds.h:11
DetId
Definition: DetId.h:17
GEMEfficiencyAnalyzer::trasientTrackToken_
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > trasientTrackToken_
Definition: GEMEfficiencyAnalyzer.h:50
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
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
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
SiStripMonitorCluster_cfi.zmax
zmax
Definition: SiStripMonitorCluster_cfi.py:201
GEMEfficiencyAnalyzer::me_muon_phi_matched_
MEMap me_muon_phi_matched_
Definition: GEMEfficiencyAnalyzer.h:113
Bounds::inside
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
reco::TransientTrack::recHitsEnd
trackingRecHit_iterator recHitsEnd() const
last iterator to RecHits
Definition: TransientTrack.h:126
GEMEfficiencyAnalyzer::residual_rphi_cut_
float residual_rphi_cut_
Definition: GEMEfficiencyAnalyzer.h:91
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
reco::Track
Definition: Track.h:27
edm::ESHandle< GEMGeometry >
GEMEfficiencyAnalyzer::gemToken1_
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemToken1_
Definition: GEMEfficiencyAnalyzer.h:47
Point3DBase< float, GlobalTag >
GEMEfficiencyAnalyzer::rechit_token_
edm::EDGetTokenT< GEMRecHitCollection > rechit_token_
Definition: GEMEfficiencyAnalyzer.h:85
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:706
GEMEfficiencyAnalyzer::me_pull_y_
MEMap me_pull_y_
Definition: GEMEfficiencyAnalyzer.h:123
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
GEMEfficiencyAnalyzer::buildGEMLayers
std::vector< GEMLayerData > buildGEMLayers(const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:540
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
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:730
GEMOfflineDQMBase::getReStEtKey
GEMDetId getReStEtKey(const GEMDetId &)
Definition: GEMOfflineDQMBase.h:89
GEMEfficiencyAnalyzer::bookEfficiencyChamber
void bookEfficiencyChamber(DQMStore::IBooker &, const edm::ESHandle< GEMGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:176
GEMOfflineDQMBase::checkRefs
bool checkRefs(const std::vector< T * > &)
Definition: GEMOfflineDQMBase.h:70
LocalError
Definition: LocalError.h:12
gpuVertexFinder::hist
__shared__ Hist hist
Definition: gpuClusterTracksDBSCAN.h:48
GEMEfficiencyAnalyzer::name_
std::string name_
Definition: GEMEfficiencyAnalyzer.h:83
GEMDetId
Definition: GEMDetId.h:18
CSCDetId
Definition: CSCDetId.h:26
GEMEfficiencyAnalyzer::pt_clamp_max_
double pt_clamp_max_
Definition: GEMEfficiencyAnalyzer.h:103
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
GEMEfficiencyAnalyzer::pt_bins_
std::vector< double > pt_bins_
Definition: GEMEfficiencyAnalyzer.h:96
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:612
MuonServiceProxy::propagator
edm::ESHandle< Propagator > propagator(std::string propagatorName) const
get the propagator
Definition: MuonServiceProxy.cc:177
StripTopology::stripAngle
virtual float stripAngle(float strip) const =0
GEMEtaPartition::id
GEMDetId id() const
Definition: GEMEtaPartition.h:18
GEMEfficiencyAnalyzer::use_only_me11_
bool use_only_me11_
Definition: GEMEfficiencyAnalyzer.h:90
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
chambers
static char chambers[264][20]
Definition: ReadPGInfo.cc:243
GEMEfficiencyAnalyzer::globalGeomToken_
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > globalGeomToken_
Definition: GEMEfficiencyAnalyzer.h:49
GlobalErrorBase< double, ErrorMatrixTag >
GEMEfficiencyAnalyzer::is_cosmics_
bool is_cosmics_
Definition: GEMEfficiencyAnalyzer.h:87
reco::TransientTrack::outermostMeasurementState
TrajectoryStateOnSurface outermostMeasurementState() const
Definition: TransientTrack.h:84
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:99
GEMEfficiencyAnalyzer::me_ieta_
MEMap me_ieta_
Definition: GEMEfficiencyAnalyzer.h:116
gem
Definition: AMC13Event.h:6
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
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:86
GEMChamber
Definition: GEMChamber.h:19
GEMEfficiencyAnalyzer::isME11
bool isME11(const DetId &)
Definition: GEMEfficiencyAnalyzer.cc:678
GEMEfficiencyAnalyzer::me_residual_rphi_
MEMap me_residual_rphi_
Definition: GEMEfficiencyAnalyzer.h:121
GEMEfficiencyAnalyzer::use_skip_layer_
bool use_skip_layer_
Definition: GEMEfficiencyAnalyzer.h:89
GEMEfficiencyAnalyzer::me_muon_eta_
MEMap me_muon_eta_
Definition: GEMEfficiencyAnalyzer.h:110
GEMEfficiencyAnalyzer::eta_low_
double eta_low_
Definition: GEMEfficiencyAnalyzer.h:98
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:145
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
reco::TransientTrack
Definition: TransientTrack.h:19
reco::TransientTrack::track
const Track & track() const
Definition: TransientTrack.h:115
GEMOfflineDQMBase::getReStKey
GEMDetId getReStKey(const int, const int)
Definition: GEMOfflineDQMBase.h:78
GEMOfflineDQMBase::fillME
void fillME(MEMap &me_map, const GEMDetId &key, const float x)
Definition: GEMOfflineDQMBase.cc:86
GloballyPositioned::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Definition: GloballyPositioned.h:98
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
GEMUtils::getSuffixTitle
TString getSuffixTitle(Int_t region_id)
Definition: GEMValidationUtils.cc:34
GEMEfficiencyAnalyzer::kLogCategory_
const std::string kLogCategory_
Definition: GEMEfficiencyAnalyzer.h:131
BoundPlane
GEMEfficiencyAnalyzer::findEtaPartition
const GEMEtaPartition * findEtaPartition(const GlobalPoint &, const std::vector< const GEMChamber * > &)
Definition: GEMEfficiencyAnalyzer.cc:712
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:211
GEMRecHit
Definition: GEMRecHit.h:14
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:108
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
GEMEfficiencyAnalyzer::me_chamber_matched_
MEMap me_chamber_matched_
Definition: GEMEfficiencyAnalyzer.h:115
GEMEfficiencyAnalyzer::muon_service_
MuonServiceProxy * muon_service_
Definition: GEMEfficiencyAnalyzer.h:102
GEMEfficiencyAnalyzer::use_prop_phi_error_cut_
bool use_prop_phi_error_cut_
Definition: GEMEfficiencyAnalyzer.h:94
GEMEfficiencyAnalyzer::gemToken2_
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemToken2_
Definition: GEMEfficiencyAnalyzer.h:48
GEMEfficiencyAnalyzer::me_detector_
MEMap me_detector_
Definition: GEMEfficiencyAnalyzer.h:118
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:104
GEMEfficiencyAnalyzer::eta_nbins_
int eta_nbins_
Definition: GEMEfficiencyAnalyzer.h:97
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
GEMEfficiencyAnalyzer::findStartingState
std::pair< TrajectoryStateOnSurface, DetId > findStartingState(const reco::TransientTrack &, const GEMLayerData &, const edm::ESHandle< GlobalTrackingGeometry > &)
Definition: GEMEfficiencyAnalyzer.cc:643
GEMEfficiencyAnalyzer::isInsideOut
bool isInsideOut(const reco::Track &)
Definition: GEMEfficiencyAnalyzer.h:134
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7746
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition: TrajectoryStateOnSurface.h:77
crabWrapper.key
key
Definition: crabWrapper.py:19
StripTopology
Definition: StripTopology.h:11
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:141
GEMEfficiencyAnalyzer::me_detector_matched_
MEMap me_detector_matched_
Definition: GEMEfficiencyAnalyzer.h:119
GEMEfficiencyAnalyzer::bookNumerator1D
MonitorElement * bookNumerator1D(DQMStore::IBooker &, MonitorElement *)
Definition: GEMEfficiencyAnalyzer.cc:129
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:112
reco::TransientTrack::innermostMeasurementState
TrajectoryStateOnSurface innermostMeasurementState() const
Definition: TransientTrack.h:86
GEMEfficiencyAnalyzer::me_prop_chamber_
MEMap me_prop_chamber_
Definition: GEMEfficiencyAnalyzer.h:128
GEMEfficiencyAnalyzer::me_muon_eta_matched_
MEMap me_muon_eta_matched_
Definition: GEMEfficiencyAnalyzer.h:111
GEMEfficiencyAnalyzer::prop_r_error_cut_
double prop_r_error_cut_
Definition: GEMEfficiencyAnalyzer.h:93