CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Attributes
RPCRecHitValid Class Reference

#include <RPCRecHitValid.h>

Inheritance diagram for RPCRecHitValid:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &eventSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 RPCRecHitValid (const edm::ParameterSet &pset)
 
 ~RPCRecHitValid () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Private Types

typedef MonitorElementMEP
 
typedef RPCRecHitCollection RecHits
 
typedef SimHitTPAssociationProducer::SimHitTPAssociationList SimHitAssoc
 
typedef edm::PSimHitContainer SimHits
 
typedef TrackingParticleCollection SimParticles
 

Private Attributes

std::map< int, int > detIdToIndexMapBarrel_
 
std::map< int, int > detIdToIndexMapEndcap_
 
RPCValidHistograms h_
 
MEP h_eventCount
 
MEP h_matchOccupancyBarrel_detId
 
MEP h_matchOccupancyEndcap_detId
 
MEP h_noiseOccupancyBarrel_detId
 
MEP h_noiseOccupancyEndcap_detId
 
MEP h_nRPCHitPerRecoMuon
 
MEP h_nRPCHitPerRecoMuonBarrel
 
MEP h_nRPCHitPerRecoMuonEndcap
 
MEP h_nRPCHitPerRecoMuonOverlap
 
MEP h_nRPCHitPerSimMuon
 
MEP h_nRPCHitPerSimMuonBarrel
 
MEP h_nRPCHitPerSimMuonEndcap
 
MEP h_nRPCHitPerSimMuonOverlap
 
MEP h_recoMuonBarrel_eta
 
MEP h_recoMuonBarrel_phi
 
MEP h_recoMuonBarrel_pt
 
MEP h_recoMuonEndcap_eta
 
MEP h_recoMuonEndcap_phi
 
MEP h_recoMuonEndcap_pt
 
MEP h_recoMuonNoRPC_eta
 
MEP h_recoMuonNoRPC_phi
 
MEP h_recoMuonNoRPC_pt
 
MEP h_recoMuonOverlap_eta
 
MEP h_recoMuonOverlap_phi
 
MEP h_recoMuonOverlap_pt
 
MEP h_recPunchOccupancyBarrel_station
 
MEP h_recPunchOccupancyBarrel_wheel
 
MEP h_recPunchOccupancyBarrel_wheel_station
 
MEP h_recPunchOccupancyEndcap_disk
 
MEP h_recPunchOccupancyEndcap_disk_ring
 
MEP h_refOccupancyBarrel_detId
 
MEP h_refOccupancyEndcap_detId
 
MEP h_refPunchOccupancyBarrel_station
 
MEP h_refPunchOccupancyBarrel_wheel
 
MEP h_refPunchOccupancyBarrel_wheel_station
 
MEP h_refPunchOccupancyEndcap_disk
 
MEP h_refPunchOccupancyEndcap_disk_ring
 
MEP h_rollAreaBarrel_detId
 
MEP h_rollAreaEndcap_detId
 
MEP h_simMuonBarrel_eta
 
MEP h_simMuonBarrel_phi
 
MEP h_simMuonBarrel_pt
 
MEP h_simMuonEndcap_eta
 
MEP h_simMuonEndcap_phi
 
MEP h_simMuonEndcap_pt
 
MEP h_simMuonNoRPC_eta
 
MEP h_simMuonNoRPC_phi
 
MEP h_simMuonNoRPC_pt
 
MEP h_simMuonOverlap_eta
 
MEP h_simMuonOverlap_phi
 
MEP h_simMuonOverlap_pt
 
MEP h_simParticleType
 
MEP h_simParticleTypeBarrel
 
MEP h_simParticleTypeEndcap
 
edm::EDGetTokenT< reco::MuonCollectionmuonToken_
 
edm::EDGetTokenT< RecHitsrecHitToken_
 
edm::EDGetTokenT< SimHitAssocsimHitAssocToken_
 
edm::EDGetTokenT< SimHitssimHitToken_
 
edm::EDGetTokenT< SimParticlessimParticleToken_
 
std::string subDir_
 

Detailed Description

Definition at line 24 of file RPCRecHitValid.h.

Member Typedef Documentation

Definition at line 45 of file RPCRecHitValid.h.

Definition at line 34 of file RPCRecHitValid.h.

Definition at line 36 of file RPCRecHitValid.h.

Definition at line 33 of file RPCRecHitValid.h.

Definition at line 35 of file RPCRecHitValid.h.

Constructor & Destructor Documentation

RPCRecHitValid::RPCRecHitValid ( const edm::ParameterSet pset)

Definition at line 26 of file RPCRecHitValid.cc.

References edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

26  {
27  simHitToken_ = consumes<SimHits>(pset.getParameter<edm::InputTag>("simHit"));
28  recHitToken_ = consumes<RecHits>(pset.getParameter<edm::InputTag>("recHit"));
29  simParticleToken_ = consumes<SimParticles>(pset.getParameter<edm::InputTag>("simTrack"));
30  simHitAssocToken_ = consumes<SimHitAssoc>(pset.getParameter<edm::InputTag>("simHitAssoc"));
31  muonToken_ = consumes<reco::MuonCollection>(pset.getParameter<edm::InputTag>("muon"));
32 
33  subDir_ = pset.getParameter<std::string>("subDir");
34 }
T getParameter(std::string const &) const
edm::EDGetTokenT< RecHits > recHitToken_
edm::EDGetTokenT< SimHitAssoc > simHitAssocToken_
edm::EDGetTokenT< SimParticles > simParticleToken_
std::string subDir_
edm::EDGetTokenT< reco::MuonCollection > muonToken_
edm::EDGetTokenT< SimHits > simHitToken_
RPCRecHitValid::~RPCRecHitValid ( )
inlineoverride

Definition at line 27 of file RPCRecHitValid.h.

References analyze(), and bookHistograms().

27 {};

Member Function Documentation

void RPCRecHitValid::analyze ( const edm::Event event,
const edm::EventSetup eventSetup 
)
override

Definition at line 354 of file RPCRecHitValid.cc.

References funct::abs(), DEFINE_FWK_MODULE, DetId::det(), fftjetvertexadder_cfi::errX, edm::EventSetup::get(), edm::Event::getByToken(), mps_fire::i, RPCRoll::id(), RPCRoll::isIRPC(), match(), electrons_cff::matched, DetId::Muon, metsig::muon, gen::n, or, DetId::rawId(), rpcPointValidation_cfi::recHit, RPCDetId::region(), relativeConstraints::ring, RPCDetId::ring(), RPCGeometry::roll(), MuonSubdetId::RPC, rpcPointValidation_cfi::simHit, SimHitTPAssociationProducer::simHitTPAssociationListGreater(), mathSSE::sqrt(), relativeConstraints::station, RPCDetId::station(), DetId::subdetId(), and protons_cff::time.

Referenced by ~RPCRecHitValid().

354  {
355  h_eventCount->Fill(1);
356 
357  // Get the RPC Geometry
359  eventSetup.get<MuonGeometryRecord>().get(rpcGeom);
360 
361  // Retrieve SimHits from the event
363  if (!event.getByToken(simHitToken_, simHitHandle)) {
364  edm::LogInfo("RPCRecHitValid") << "Cannot find simHit collection\n";
365  return;
366  }
367 
368  // Retrieve RecHits from the event
370  if (!event.getByToken(recHitToken_, recHitHandle)) {
371  edm::LogInfo("RPCRecHitValid") << "Cannot find recHit collection\n";
372  return;
373  }
374 
375  // Get SimParticles
376  edm::Handle<TrackingParticleCollection> simParticleHandle;
377  if (!event.getByToken(simParticleToken_, simParticleHandle)) {
378  edm::LogInfo("RPCRecHitValid") << "Cannot find TrackingParticle collection\n";
379  return;
380  }
381 
382  // Get SimParticle to SimHit association map
384  if (!event.getByToken(simHitAssocToken_, simHitsTPAssoc)) {
385  edm::LogInfo("RPCRecHitValid") << "Cannot find TrackingParticle to SimHit association map\n";
386  return;
387  }
388 
389  // Get RecoMuons
391  if (!event.getByToken(muonToken_, muonHandle)) {
392  edm::LogInfo("RPCRecHitValid") << "Cannot find muon collection\n";
393  return;
394  }
395 
396  typedef edm::PSimHitContainer::const_iterator SimHitIter;
397  typedef RPCRecHitCollection::const_iterator RecHitIter;
398  typedef std::vector<TrackPSimHitRef> SimHitRefs;
399 
400  // TrackingParticles with (and without) RPC simHits
401  SimHitRefs muonSimHits, pthrSimHits;
402 
403  for (int i = 0, n = simParticleHandle->size(); i < n; ++i) {
404  TrackingParticleRef simParticle(simParticleHandle, i);
405  if (simParticle->pt() < 1.0 or simParticle->p() < 2.5)
406  continue; // globalMuon acceptance
407 
408  // Collect SimHits from this Tracking Particle
409  SimHitRefs simHitsFromParticle;
410  auto range = std::equal_range(simHitsTPAssoc->begin(),
411  simHitsTPAssoc->end(),
412  std::make_pair(simParticle, TrackPSimHitRef()),
414  for (auto simParticleToHit = range.first; simParticleToHit != range.second; ++simParticleToHit) {
415  auto simHit = simParticleToHit->second;
416  const DetId detId(simHit->detUnitId());
417  if (detId.det() != DetId::Muon or detId.subdetId() != MuonSubdetId::RPC)
418  continue;
419 
420  simHitsFromParticle.push_back(simParticleToHit->second);
421  }
422  const int nRPCHit = simHitsFromParticle.size();
423  const bool hasRPCHit = nRPCHit > 0;
424 
425  if (abs(simParticle->pdgId()) == 13) {
426  muonSimHits.insert(muonSimHits.end(), simHitsFromParticle.begin(), simHitsFromParticle.end());
427 
428  // Count number of Barrel hits and Endcap hits
429  int nRPCHitBarrel = 0;
430  int nRPCHitEndcap = 0;
431  for (auto simHit : simHitsFromParticle) {
432  const RPCDetId rpcDetId = static_cast<const RPCDetId>(simHit->detUnitId());
433  const RPCRoll *roll = dynamic_cast<const RPCRoll *>(rpcGeom->roll(rpcDetId));
434  if (!roll)
435  continue;
436 
437  if (rpcDetId.region() == 0)
438  ++nRPCHitBarrel;
439  else
440  ++nRPCHitEndcap;
441  }
442 
443  // Fill TrackingParticle related histograms
444  h_nRPCHitPerSimMuon->Fill(nRPCHit);
445  if (nRPCHitBarrel and nRPCHitEndcap) {
447  h_simMuonOverlap_pt->Fill(simParticle->pt());
448  h_simMuonOverlap_eta->Fill(simParticle->eta());
449  h_simMuonOverlap_phi->Fill(simParticle->phi());
450  } else if (nRPCHitBarrel) {
452  h_simMuonBarrel_pt->Fill(simParticle->pt());
453  h_simMuonBarrel_eta->Fill(simParticle->eta());
454  h_simMuonBarrel_phi->Fill(simParticle->phi());
455  } else if (nRPCHitEndcap) {
457  h_simMuonEndcap_pt->Fill(simParticle->pt());
458  h_simMuonEndcap_eta->Fill(simParticle->eta());
459  h_simMuonEndcap_phi->Fill(simParticle->phi());
460  } else {
461  h_simMuonNoRPC_pt->Fill(simParticle->pt());
462  h_simMuonNoRPC_eta->Fill(simParticle->eta());
463  h_simMuonNoRPC_phi->Fill(simParticle->phi());
464  }
465  } else {
466  pthrSimHits.insert(pthrSimHits.end(), simHitsFromParticle.begin(), simHitsFromParticle.end());
467  }
468 
469  if (hasRPCHit) {
470  switch (simParticle->pdgId()) {
471  case 13:
473  break;
474  case -13:
476  break;
477  case 11:
479  break;
480  case -11:
482  break;
483  case 211:
485  break;
486  case -211:
488  break;
489  case 321:
491  break;
492  case -321:
494  break;
495  case 2212:
497  break;
498  case -2212:
500  break;
501  default:
502  h_simParticleType->Fill(10);
503  break;
504  }
505  }
506  }
507 
508  // Loop over muon simHits, fill histograms which does not need associations
509  int nRefHitBarrel = 0, nRefHitEndcap = 0;
510  for (auto simHit : muonSimHits) {
511  const RPCDetId detId = static_cast<const RPCDetId>(simHit->detUnitId());
512  const RPCRoll *roll = dynamic_cast<const RPCRoll *>(rpcGeom->roll(detId));
513 
514  const int region = roll->id().region();
515  const int ring = roll->id().ring();
516  // const int sector = roll->id().sector();
517  const int station = roll->id().station();
518  // const int layer = roll->id().layer();
519  // const int subSector = roll->id().subsector();
520 
521  if (region == 0) {
522  ++nRefHitBarrel;
526 
528  } else {
529  ++nRefHitEndcap;
530  h_.refHitOccupancyEndcap_disk->Fill(region * station);
531  h_.refHitOccupancyEndcap_disk_ring->Fill(region * station, ring);
532 
534  }
535  }
536 
537  // Loop over punch-through simHits, fill histograms which does not need
538  // associations
539  for (auto simHit : pthrSimHits) {
540  const RPCDetId detId = static_cast<const RPCDetId>(simHit->detUnitId());
541  const RPCRoll *roll = dynamic_cast<const RPCRoll *>(rpcGeom->roll(detId()));
542 
543  const int region = roll->id().region();
544  const int ring = roll->id().ring();
545  // const int sector = roll->id().sector();
546  const int station = roll->id().station();
547  // const int layer = roll->id().layer();
548  // const int subSector = roll->id().subsector();
549 
550  if (region == 0) {
551  ++nRefHitBarrel;
555 
557  } else {
558  ++nRefHitEndcap;
559  h_refPunchOccupancyEndcap_disk->Fill(region * station);
560  h_refPunchOccupancyEndcap_disk_ring->Fill(region * station, ring);
561 
563  }
564  }
565  h_.nRefHitBarrel->Fill(nRefHitBarrel);
566  h_.nRefHitEndcap->Fill(nRefHitEndcap);
567 
568  // Loop over recHits, fill histograms which does not need associations
569  int sumClusterSizeBarrel = 0, sumClusterSizeEndcap = 0;
570  int nRecHitBarrel = 0, nRecHitEndcap = 0;
571  for (RecHitIter recHitIter = recHitHandle->begin(); recHitIter != recHitHandle->end(); ++recHitIter) {
572  const RPCDetId detId = static_cast<const RPCDetId>(recHitIter->rpcId());
573  const RPCRoll *roll = dynamic_cast<const RPCRoll *>(rpcGeom->roll(detId()));
574  if (!roll)
575  continue;
576 
577  const int region = roll->id().region();
578  const int ring = roll->id().ring();
579  // const int sector = roll->id().sector();
580  const int station = roll->id().station();
581  // const int layer = roll->id().layer();
582  // const int subSector = roll->id().subsector();
583 
584  const double time = recHitIter->timeError() >= 0 ? recHitIter->time() : recHitIter->BunchX() * 25;
585 
586  h_.clusterSize->Fill(recHitIter->clusterSize());
587 
588  if (region == 0) {
589  ++nRecHitBarrel;
590  sumClusterSizeBarrel += recHitIter->clusterSize();
591  h_.clusterSizeBarrel->Fill(recHitIter->clusterSize());
595 
596  h_.timeBarrel->Fill(time);
597  } else {
598  ++nRecHitEndcap;
599  sumClusterSizeEndcap += recHitIter->clusterSize();
600  h_.clusterSizeEndcap->Fill(recHitIter->clusterSize());
601  h_.recHitOccupancyEndcap_disk->Fill(region * station);
602  h_.recHitOccupancyEndcap_disk_ring->Fill(region * station, ring);
603 
604  h_.timeEndcap->Fill(time);
605  }
606 
607  if (roll->isIRPC()) {
608  h_.timeIRPC->Fill(time);
609  } else {
610  h_.timeCRPC->Fill(time);
611  }
612  }
613  const double nRecHit = nRecHitBarrel + nRecHitEndcap;
614  h_.nRecHitBarrel->Fill(nRecHitBarrel);
615  h_.nRecHitEndcap->Fill(nRecHitEndcap);
616  if (nRecHit > 0) {
617  const int sumClusterSize = sumClusterSizeBarrel + sumClusterSizeEndcap;
618  h_.avgClusterSize->Fill(double(sumClusterSize) / nRecHit);
619 
620  if (nRecHitBarrel > 0) {
621  h_.avgClusterSizeBarrel->Fill(double(sumClusterSizeBarrel) / nRecHitBarrel);
622  }
623  if (nRecHitEndcap > 0) {
624  h_.avgClusterSizeEndcap->Fill(double(sumClusterSizeEndcap) / nRecHitEndcap);
625  }
626  }
627 
628  // Start matching SimHits to RecHits
629  typedef std::map<TrackPSimHitRef, RecHitIter> SimToRecHitMap;
630  SimToRecHitMap simToRecHitMap;
631 
632  for (auto simHit : muonSimHits) {
633  const RPCDetId simDetId = static_cast<const RPCDetId>(simHit->detUnitId());
634  // const RPCRoll* simRoll = dynamic_cast<const
635  // RPCRoll*>(rpcGeom->roll(simDetId));
636 
637  const double simX = simHit->localPosition().x();
638 
639  for (RecHitIter recHitIter = recHitHandle->begin(); recHitIter != recHitHandle->end(); ++recHitIter) {
640  const RPCDetId recDetId = static_cast<const RPCDetId>(recHitIter->rpcId());
641  const RPCRoll *recRoll = dynamic_cast<const RPCRoll *>(rpcGeom->roll(recDetId));
642  if (!recRoll)
643  continue;
644 
645  if (simDetId != recDetId)
646  continue;
647 
648  const double recX = recHitIter->localPosition().x();
649  const double newDx = fabs(recX - simX);
650 
651  // Associate SimHit to RecHit
652  SimToRecHitMap::const_iterator prevSimToReco = simToRecHitMap.find(simHit);
653  if (prevSimToReco == simToRecHitMap.end()) {
654  simToRecHitMap.insert(std::make_pair(simHit, recHitIter));
655  } else {
656  const double oldDx = fabs(prevSimToReco->second->localPosition().x() - simX);
657 
658  if (newDx < oldDx) {
659  simToRecHitMap[simHit] = recHitIter;
660  }
661  }
662  }
663  }
664 
665  // Now we have simHit-recHit mapping
666  // So we can fill up relavant histograms
667  int nMatchHitBarrel = 0, nMatchHitEndcap = 0;
668  for (auto match : simToRecHitMap) {
669  TrackPSimHitRef simHit = match.first;
670  RecHitIter recHitIter = match.second;
671 
672  const RPCDetId detId = static_cast<const RPCDetId>(simHit->detUnitId());
673  const RPCRoll *roll = dynamic_cast<const RPCRoll *>(rpcGeom->roll(detId));
674 
675  const int region = roll->id().region();
676  const int ring = roll->id().ring();
677  // const int sector = roll->id().sector();
678  const int station = roll->id().station();
679  // const int layer = roll->id().layer();
680  // const int subsector = roll->id().subsector();
681 
682  const double simX = simHit->localPosition().x();
683  const double recX = recHitIter->localPosition().x();
684  const double errX = sqrt(recHitIter->localPositionError().xx());
685  const double dX = recX - simX;
686  const double pull = errX == 0 ? -999 : dX / errX;
687 
688  // const GlobalPoint simPos = roll->toGlobal(simHitIter->localPosition());
689  // const GlobalPoint recPos = roll->toGlobal(recHitIter->localPosition());
690 
691  if (region == 0) {
692  ++nMatchHitBarrel;
693  h_.resBarrel->Fill(dX);
694  h_.pullBarrel->Fill(pull);
698 
699  h_.res_wheel_res->Fill(ring, dX);
700  h_.res_station_res->Fill(station, dX);
701  h_.pull_wheel_pull->Fill(ring, pull);
702  h_.pull_station_pull->Fill(station, pull);
703 
705  } else {
706  ++nMatchHitEndcap;
707  h_.resEndcap->Fill(dX);
708  h_.pullEndcap->Fill(pull);
709  h_.matchOccupancyEndcap_disk->Fill(region * station);
710  h_.matchOccupancyEndcap_disk_ring->Fill(region * station, ring);
711 
712  h_.res_disk_res->Fill(region * station, dX);
713  h_.res_ring_res->Fill(ring, dX);
714  h_.pull_disk_pull->Fill(region * station, pull);
715  h_.pull_ring_pull->Fill(ring, pull);
716 
718  }
719  }
720  h_.nMatchHitBarrel->Fill(nMatchHitBarrel);
721  h_.nMatchHitEndcap->Fill(nMatchHitEndcap);
722 
723  // Reco Muon hits
724  for (reco::MuonCollection::const_iterator muon = muonHandle->begin(); muon != muonHandle->end(); ++muon) {
725  if (!muon->isGlobalMuon())
726  continue;
727 
728  int nRPCHitBarrel = 0;
729  int nRPCHitEndcap = 0;
730 
731  const reco::TrackRef glbTrack = muon->globalTrack();
732  for (trackingRecHit_iterator recHit = glbTrack->recHitsBegin(); recHit != glbTrack->recHitsEnd(); ++recHit) {
733  if (!(*recHit)->isValid())
734  continue;
735  const DetId detId = (*recHit)->geographicalId();
736  if (detId.det() != DetId::Muon or detId.subdetId() != MuonSubdetId::RPC)
737  continue;
738  const RPCDetId rpcDetId = static_cast<const RPCDetId>(detId);
739 
740  if (rpcDetId.region() == 0)
741  ++nRPCHitBarrel;
742  else
743  ++nRPCHitEndcap;
744  }
745 
746  const int nRPCHit = nRPCHitBarrel + nRPCHitEndcap;
747  h_nRPCHitPerRecoMuon->Fill(nRPCHit);
748  if (nRPCHitBarrel and nRPCHitEndcap) {
753  } else if (nRPCHitBarrel) {
755  h_recoMuonBarrel_pt->Fill(muon->pt());
756  h_recoMuonBarrel_eta->Fill(muon->eta());
757  h_recoMuonBarrel_phi->Fill(muon->phi());
758  } else if (nRPCHitEndcap) {
760  h_recoMuonEndcap_pt->Fill(muon->pt());
761  h_recoMuonEndcap_eta->Fill(muon->eta());
762  h_recoMuonEndcap_phi->Fill(muon->phi());
763  } else {
764  h_recoMuonNoRPC_pt->Fill(muon->pt());
765  h_recoMuonNoRPC_eta->Fill(muon->eta());
766  h_recoMuonNoRPC_phi->Fill(muon->phi());
767  }
768  }
769 
770  // Find Non-muon hits
771  for (RecHitIter recHitIter = recHitHandle->begin(); recHitIter != recHitHandle->end(); ++recHitIter) {
772  const RPCDetId detId = static_cast<const RPCDetId>(recHitIter->rpcId());
773  const RPCRoll *roll = dynamic_cast<const RPCRoll *>(rpcGeom->roll(detId));
774 
775  const int region = roll->id().region();
776  const int ring = roll->id().ring();
777  // const int sector = roll->id().sector();
778  const int station = roll->id().station();
779  // const int layer = roll->id().layer();
780  // const int subsector = roll->id().subsector();
781 
782  bool matched = false;
783  for (auto match : simToRecHitMap) {
784  if (recHitIter == match.second) {
785  matched = true;
786  break;
787  }
788  }
789 
790  if (!matched) {
791  int nPunchMatched = 0;
792  // Check if this recHit came from non-muon simHit
793  for (auto simHit : pthrSimHits) {
794  const int absSimHitPType = abs(simHit->particleType());
795  if (absSimHitPType == 13)
796  continue;
797 
798  const RPCDetId simDetId = static_cast<const RPCDetId>(simHit->detUnitId());
799  if (simDetId == detId)
800  ++nPunchMatched;
801  }
802 
803  if (nPunchMatched > 0) {
804  if (region == 0) {
808  } else {
809  h_recPunchOccupancyEndcap_disk->Fill(region * station);
810  h_recPunchOccupancyEndcap_disk_ring->Fill(region * station, ring);
811  }
812  }
813  }
814  }
815 
816  // Find noise recHits : RecHits without SimHit match
817  for (RecHitIter recHitIter = recHitHandle->begin(); recHitIter != recHitHandle->end(); ++recHitIter) {
818  const RPCDetId recDetId = static_cast<const RPCDetId>(recHitIter->rpcId());
819  const RPCRoll *roll = dynamic_cast<const RPCRoll *>(rpcGeom->roll(recDetId));
820 
821  const int region = roll->id().region();
822  // const int ring = roll->id().ring(); // UNUSED VARIABLE
823  // const int sector = roll->id().sector();
824  // const int station = roll->id().station(); // UNUSED VARIABLE
825  // const int layer = roll->id().layer();
826  // const int subsector = roll->id().subsector();
827 
828  const double recX = recHitIter->localPosition().x();
829  const double recErrX = sqrt(recHitIter->localPositionError().xx());
830 
831  bool matched = false;
832  for (SimHitIter simHitIter = simHitHandle->begin(); simHitIter != simHitHandle->end(); ++simHitIter) {
833  const RPCDetId simDetId = static_cast<const RPCDetId>(simHitIter->detUnitId());
834  const RPCRoll *simRoll = dynamic_cast<const RPCRoll *>(rpcGeom->roll(simDetId));
835  if (!simRoll)
836  continue;
837 
838  if (simDetId != recDetId)
839  continue;
840 
841  const double simX = simHitIter->localPosition().x();
842  const double dX = fabs(recX - simX);
843 
844  if (dX / recErrX < 5) {
845  matched = true;
846  break;
847  }
848  }
849 
850  if (!matched) {
851  if (region == 0) {
853  } else {
855  }
856  }
857  }
858 
859  h_eventCount->Fill(2);
860 }
edm::EDGetTokenT< RecHits > recHitToken_
std::map< int, int > detIdToIndexMapEndcap_
edm::EDGetTokenT< SimHitAssoc > simHitAssocToken_
static bool simHitTPAssociationListGreater(SimHitTPPair i, SimHitTPPair j)
edm::EDGetTokenT< SimParticles > simParticleToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
MEP h_nRPCHitPerRecoMuonBarrel
std::map< int, int > detIdToIndexMapBarrel_
MEP h_nRPCHitPerSimMuonBarrel
MEP h_nRPCHitPerSimMuonOverlap
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
MEP h_recPunchOccupancyEndcap_disk_ring
MEP h_refPunchOccupancyBarrel_wheel
MEP h_refPunchOccupancyEndcap_disk
MEP h_matchOccupancyBarrel_detId
MEP h_recPunchOccupancyEndcap_disk
void Fill(long long x)
bool isIRPC() const
Definition: RPCRoll.h:38
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
RPCDetId id() const
Definition: RPCRoll.cc:24
MEP h_matchOccupancyEndcap_detId
MEP h_noiseOccupancyBarrel_detId
int ring() const
Definition: RPCDetId.h:72
T sqrt(T t)
Definition: SSEVec.h:18
MEP h_nRPCHitPerSimMuonEndcap
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
MEP h_nRPCHitPerRecoMuonEndcap
RPCValidHistograms h_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MEP h_recPunchOccupancyBarrel_wheel_station
MEP h_refPunchOccupancyBarrel_wheel_station
MEP h_refPunchOccupancyEndcap_disk_ring
MEP h_refPunchOccupancyBarrel_station
MEP h_nRPCHitPerRecoMuonOverlap
Definition: DetId.h:18
MEP h_refOccupancyBarrel_detId
static constexpr int RPC
Definition: MuonSubdetId.h:14
MEP h_recPunchOccupancyBarrel_wheel
edm::EDGetTokenT< reco::MuonCollection > muonToken_
T get() const
Definition: EventSetup.h:71
MEP h_refOccupancyEndcap_detId
edm::Ref< edm::PSimHitContainer > TrackPSimHitRef
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
edm::EDGetTokenT< SimHits > simHitToken_
MEP h_noiseOccupancyEndcap_detId
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
Definition: RPCGeometry.cc:75
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
int station() const
Definition: RPCDetId.h:96
MEP h_recPunchOccupancyBarrel_station
void RPCRecHitValid::bookHistograms ( DQMStore::IBooker booker,
edm::Run const &  run,
edm::EventSetup const &  eventSetup 
)
override

Definition at line 36 of file RPCRecHitValid.cc.

References custom_jme_cff::area, DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookProfile(), RPCGeometry::dets(), edm::EventSetup::get(), MonitorElement::getTH1(), MonitorElement::getTH2F(), h, mps_fire::i, StripTopology::nstrips(), Pi, StripTopology::pitch(), RPCGeometry::roll(), RPCChamber::rolls(), DQMStore::IBooker::setCurrentFolder(), RPCRoll::specificTopology(), and StripTopology::stripLength().

Referenced by ~RPCRecHitValid().

36  {
37  // Book MonitorElements
38  h_.bookHistograms(booker, subDir_);
39 
40  // SimHit plots, not compatible to RPCPoint-RPCRecHit comparison
41  booker.setCurrentFolder(subDir_ + "/HitProperty");
42  h_simParticleType = booker.book1D("SimHitPType", "SimHit particle type", 11, 0, 11);
43  h_simParticleType->getTH1()->SetMinimum(0);
44  if (TH1 *h = h_simParticleType->getTH1()) {
45  h->GetXaxis()->SetBinLabel(1, "#mu^{-}");
46  h->GetXaxis()->SetBinLabel(2, "#mu^{+}");
47  h->GetXaxis()->SetBinLabel(3, "e^{-}");
48  h->GetXaxis()->SetBinLabel(4, "e^{+}");
49  h->GetXaxis()->SetBinLabel(5, "#pi^{+}");
50  h->GetXaxis()->SetBinLabel(6, "#pi^{-}");
51  h->GetXaxis()->SetBinLabel(7, "K^{+}");
52  h->GetXaxis()->SetBinLabel(8, "K^{-}");
53  h->GetXaxis()->SetBinLabel(9, "p^{+}");
54  h->GetXaxis()->SetBinLabel(10, "p^{-}");
55  h->GetXaxis()->SetBinLabel(11, "Other");
56  }
57 
58  booker.setCurrentFolder(subDir_ + "/Track");
59 
60  h_nRPCHitPerSimMuon = booker.book1D("NRPCHitPerSimMuon", "Number of RPC SimHit per SimMuon", 11, -0.5, 10.5);
62  booker.book1D("NRPCHitPerSimMuonBarrel", "Number of RPC SimHit per SimMuon", 11, -0.5, 10.5);
64  booker.book1D("NRPCHitPerSimMuonOverlap", "Number of RPC SimHit per SimMuon", 11, -0.5, 10.5);
66  booker.book1D("NRPCHitPerSimMuonEndcap", "Number of RPC SimHit per SimMuon", 11, -0.5, 10.5);
67 
68  h_nRPCHitPerRecoMuon = booker.book1D("NRPCHitPerRecoMuon", "Number of RPC RecHit per RecoMuon", 11, -0.5, 10.5);
70  booker.book1D("NRPCHitPerRecoMuonBarrel", "Number of RPC RecHit per RecoMuon", 11, -0.5, 10.5);
72  booker.book1D("NRPCHitPerRecoMuonOverlap", "Number of RPC RecHit per RecoMuon", 11, -0.5, 10.5);
74  booker.book1D("NRPCHitPerRecoMuonEndcap", "Number of RPC RecHit per RecoMuon", 11, -0.5, 10.5);
75 
76  h_nRPCHitPerSimMuon->getTH1()->SetMinimum(0);
77  h_nRPCHitPerSimMuonBarrel->getTH1()->SetMinimum(0);
78  h_nRPCHitPerSimMuonOverlap->getTH1()->SetMinimum(0);
79  h_nRPCHitPerSimMuonEndcap->getTH1()->SetMinimum(0);
80 
81  h_nRPCHitPerRecoMuon->getTH1()->SetMinimum(0);
82  h_nRPCHitPerRecoMuonBarrel->getTH1()->SetMinimum(0);
83  h_nRPCHitPerRecoMuonOverlap->getTH1()->SetMinimum(0);
84  h_nRPCHitPerRecoMuonEndcap->getTH1()->SetMinimum(0);
85 
86  float ptBins[] = {0, 1, 2, 5, 10, 20, 30, 50, 100, 200, 300, 500};
87  const int nPtBins = sizeof(ptBins) / sizeof(float) - 1;
89  booker.book1D("SimMuonBarrel_pt", "SimMuon RPCHit in Barrel p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
91  booker.book1D("SimMuonOverlap_pt", "SimMuon RPCHit in Overlap p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
93  booker.book1D("SimMuonEndcap_pt", "SimMuon RPCHit in Endcap p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
95  booker.book1D("SimMuonNoRPC_pt", "SimMuon without RPCHit p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
96  h_simMuonBarrel_eta = booker.book1D("SimMuonBarrel_eta", "SimMuon RPCHit in Barrel #eta;#eta", 50, -2.5, 2.5);
97  h_simMuonOverlap_eta = booker.book1D("SimMuonOverlap_eta", "SimMuon RPCHit in Overlap #eta;#eta", 50, -2.5, 2.5);
98  h_simMuonEndcap_eta = booker.book1D("SimMuonEndcap_eta", "SimMuon RPCHit in Endcap #eta;#eta", 50, -2.5, 2.5);
99  h_simMuonNoRPC_eta = booker.book1D("SimMuonNoRPC_eta", "SimMuon without RPCHit #eta;#eta", 50, -2.5, 2.5);
101  booker.book1D("SimMuonBarrel_phi", "SimMuon RPCHit in Barrel #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
103  booker.book1D("SimMuonOverlap_phi", "SimMuon RPCHit in Overlap #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
105  booker.book1D("SimMuonEndcap_phi", "SimMuon RPCHit in Endcap #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
107  booker.book1D("SimMuonNoRPC_phi", "SimMuon without RPCHit #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
108 
110  booker.book1D("RecoMuonBarrel_pt", "RecoMuon RPCHit in Barrel p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
112  booker.book1D("RecoMuonOverlap_pt", "RecoMuon RPCHit in Overlap p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
114  booker.book1D("RecoMuonEndcap_pt", "RecoMuon RPCHit in Endcap p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
116  booker.book1D("RecoMuonNoRPC_pt", "RecoMuon without RPCHit p_{T};p_{T} [GeV/c^{2}]", nPtBins, ptBins);
117  h_recoMuonBarrel_eta = booker.book1D("RecoMuonBarrel_eta", "RecoMuon RPCHit in Barrel #eta;#eta", 50, -2.5, 2.5);
118  h_recoMuonOverlap_eta = booker.book1D("RecoMuonOverlap_eta", "RecoMuon RPCHit in Overlap #eta;#eta", 50, -2.5, 2.5);
119  h_recoMuonEndcap_eta = booker.book1D("RecoMuonEndcap_eta", "RecoMuon RPCHit in Endcap #eta;#eta", 50, -2.5, 2.5);
120  h_recoMuonNoRPC_eta = booker.book1D("RecoMuonNoRPC_eta", "RecoMuon without RPCHit #eta;#eta", 50, -2.5, 2.5);
122  booker.book1D("RecoMuonBarrel_phi", "RecoMuon RPCHit in Barrel #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
124  booker.book1D("RecoMuonOverlap_phi", "RecoMuon RPCHit in Overlap #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
126  booker.book1D("RecoMuonEndcap_phi", "RecoMuon RPCHit in Endcap #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
128  booker.book1D("RecoMuonNoRPC_phi", "RecoMuon without RPCHit #phi;#phi", 36, -TMath::Pi(), TMath::Pi());
129 
130  h_simMuonBarrel_pt->getTH1()->SetMinimum(0);
131  h_simMuonOverlap_pt->getTH1()->SetMinimum(0);
132  h_simMuonEndcap_pt->getTH1()->SetMinimum(0);
133  h_simMuonNoRPC_pt->getTH1()->SetMinimum(0);
134  h_simMuonBarrel_eta->getTH1()->SetMinimum(0);
135  h_simMuonOverlap_eta->getTH1()->SetMinimum(0);
136  h_simMuonEndcap_eta->getTH1()->SetMinimum(0);
137  h_simMuonNoRPC_eta->getTH1()->SetMinimum(0);
138  h_simMuonBarrel_phi->getTH1()->SetMinimum(0);
139  h_simMuonOverlap_phi->getTH1()->SetMinimum(0);
140  h_simMuonEndcap_phi->getTH1()->SetMinimum(0);
141  h_simMuonNoRPC_phi->getTH1()->SetMinimum(0);
142 
143  h_recoMuonBarrel_pt->getTH1()->SetMinimum(0);
144  h_recoMuonOverlap_pt->getTH1()->SetMinimum(0);
145  h_recoMuonEndcap_pt->getTH1()->SetMinimum(0);
146  h_recoMuonNoRPC_pt->getTH1()->SetMinimum(0);
147  h_recoMuonBarrel_eta->getTH1()->SetMinimum(0);
148  h_recoMuonOverlap_eta->getTH1()->SetMinimum(0);
149  h_recoMuonEndcap_eta->getTH1()->SetMinimum(0);
150  h_recoMuonNoRPC_eta->getTH1()->SetMinimum(0);
151  h_recoMuonBarrel_phi->getTH1()->SetMinimum(0);
152  h_recoMuonOverlap_phi->getTH1()->SetMinimum(0);
153  h_recoMuonEndcap_phi->getTH1()->SetMinimum(0);
154  h_recoMuonNoRPC_phi->getTH1()->SetMinimum(0);
155 
156  booker.setCurrentFolder(subDir_ + "/Occupancy");
157 
158  h_eventCount = booker.book1D("EventCount", "Event count", 3, 1, 4);
159  h_eventCount->getTH1()->SetMinimum(0);
160  if (h_eventCount) {
161  TH1 *h = h_eventCount->getTH1();
162  h->GetXaxis()->SetBinLabel(1, "eventBegin");
163  h->GetXaxis()->SetBinLabel(2, "eventEnd");
164  h->GetXaxis()->SetBinLabel(3, "run");
165  }
166  h_eventCount->Fill(3);
167 
169  booker.book1D("RefPunchOccupancyBarrel_wheel", "RefPunchthrough occupancy", 5, -2.5, 2.5);
171  booker.book1D("RefPunchOccupancyEndcap_disk", "RefPunchthrough occupancy", 9, -4.5, 4.5);
173  booker.book1D("RefPunchOccupancyBarrel_station", "RefPunchthrough occupancy", 4, 0.5, 4.5);
175  booker.book1D("RecPunchOccupancyBarrel_wheel", "Punchthrough recHit occupancy", 5, -2.5, 2.5);
177  booker.book1D("RecPunchOccupancyEndcap_disk", "Punchthrough recHit occupancy", 9, -4.5, 4.5);
179  booker.book1D("RecPunchOccupancyBarrel_station", "Punchthrough recHit occupancy", 4, 0.5, 4.5);
180 
181  h_refPunchOccupancyBarrel_wheel->getTH1()->SetMinimum(0);
182  h_refPunchOccupancyEndcap_disk->getTH1()->SetMinimum(0);
183  h_refPunchOccupancyBarrel_station->getTH1()->SetMinimum(0);
184  h_recPunchOccupancyBarrel_wheel->getTH1()->SetMinimum(0);
185  h_recPunchOccupancyEndcap_disk->getTH1()->SetMinimum(0);
186  h_recPunchOccupancyBarrel_station->getTH1()->SetMinimum(0);
187 
189  booker.book2D("RefPunchOccupancyBarrel_wheel_station", "RefPunchthrough occupancy", 5, -2.5, 2.5, 4, 0.5, 4.5);
191  booker.book2D("RefPunchOccupancyEndcap_disk_ring", "RefPunchthrough occupancy", 9, -4.5, 4.5, 4, 0.5, 4.5);
193  "RecPunchOccupancyBarrel_wheel_station", "Punchthrough recHit occupancy", 5, -2.5, 2.5, 4, 0.5, 4.5);
195  booker.book2D("RecPunchOccupancyEndcap_disk_ring", "Punchthrough recHit occupancy", 9, -4.5, 4.5, 4, 0.5, 4.5);
196 
197  h_refPunchOccupancyBarrel_wheel_station->getTH2F()->SetOption("COLZ");
198  h_refPunchOccupancyEndcap_disk_ring->getTH2F()->SetOption("COLZ");
199  h_recPunchOccupancyBarrel_wheel_station->getTH2F()->SetOption("COLZ");
200  h_recPunchOccupancyEndcap_disk_ring->getTH2F()->SetOption("COLZ");
201 
203  h_refPunchOccupancyEndcap_disk_ring->getTH2F()->SetContour(10);
205  h_recPunchOccupancyEndcap_disk_ring->getTH2F()->SetContour(10);
206 
208  h_refPunchOccupancyEndcap_disk_ring->getTH2F()->SetStats(false);
210  h_recPunchOccupancyEndcap_disk_ring->getTH2F()->SetStats(false);
211 
216 
217  for (int i = 1; i <= 5; ++i) {
218  TString binLabel = Form("Wheel %d", i - 3);
219  h_refPunchOccupancyBarrel_wheel->getTH1()->GetXaxis()->SetBinLabel(i, binLabel);
220  h_refPunchOccupancyBarrel_wheel_station->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
221  h_recPunchOccupancyBarrel_wheel->getTH1()->GetXaxis()->SetBinLabel(i, binLabel);
222  h_recPunchOccupancyBarrel_wheel_station->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
223  }
224 
225  for (int i = 1; i <= 9; ++i) {
226  TString binLabel = Form("Disk %d", i - 5);
227  h_refPunchOccupancyEndcap_disk->getTH1()->GetXaxis()->SetBinLabel(i, binLabel);
228  h_refPunchOccupancyEndcap_disk_ring->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
229  h_recPunchOccupancyEndcap_disk->getTH1()->GetXaxis()->SetBinLabel(i, binLabel);
230  h_recPunchOccupancyEndcap_disk_ring->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
231  }
232 
233  for (int i = 1; i <= 4; ++i) {
234  TString binLabel = Form("Station %d", i);
235  h_refPunchOccupancyBarrel_station->getTH1()->GetXaxis()->SetBinLabel(i, binLabel);
236  h_refPunchOccupancyBarrel_wheel_station->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
237  h_recPunchOccupancyBarrel_station->getTH1()->GetXaxis()->SetBinLabel(i, binLabel);
238  h_recPunchOccupancyBarrel_wheel_station->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
239  }
240 
241  for (int i = 1; i <= 4; ++i) {
242  TString binLabel = Form("Ring %d", i);
243  h_refPunchOccupancyEndcap_disk_ring->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
244  h_recPunchOccupancyEndcap_disk_ring->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
245  }
246 
247  // Book roll-by-roll histograms
249  eventSetup.get<MuonGeometryRecord>().get(rpcGeom);
250 
251  int nRPCRollBarrel = 0, nRPCRollEndcap = 0;
252 
253  TrackingGeometry::DetContainer rpcDets = rpcGeom->dets();
254  for (auto det : rpcDets) {
255  auto rpcCh = dynamic_cast<const RPCChamber *>(det);
256  if (!rpcCh)
257  continue;
258 
259  std::vector<const RPCRoll *> rolls = rpcCh->rolls();
260  for (auto roll : rolls) {
261  if (!roll)
262  continue;
263 
264  // RPCGeomServ rpcSrv(roll->id());
265  const int rawId = roll->geographicalId().rawId();
266  // if ( !roll->specs()->isRPC() ) { cout << "\nNoRPC : " << rpcSrv.name()
267  // << ' ' << rawId << endl; continue; }
268 
269  if (roll->isBarrel()) {
270  detIdToIndexMapBarrel_[rawId] = nRPCRollBarrel;
271  // rollIdToNameMapBarrel_[rawId] = rpcSrv.name();
272  ++nRPCRollBarrel;
273  } else {
274  detIdToIndexMapEndcap_[rawId] = nRPCRollEndcap;
275  // rollIdToNameMapEndcap_[rawId] = rpcSrv.name();
276  ++nRPCRollEndcap;
277  }
278  }
279  }
280 
281  booker.setCurrentFolder(subDir_ + "/Occupancy");
282  h_matchOccupancyBarrel_detId = booker.book1D("MatchOccupancyBarrel_detId",
283  "Matched hit occupancy;roll index (can be arbitrary)",
284  nRPCRollBarrel,
285  0,
286  nRPCRollBarrel);
287  h_matchOccupancyEndcap_detId = booker.book1D("MatchOccupancyEndcap_detId",
288  "Matched hit occupancy;roll index (can be arbitrary)",
289  nRPCRollEndcap,
290  0,
291  nRPCRollEndcap);
292  h_refOccupancyBarrel_detId = booker.book1D("RefOccupancyBarrel_detId",
293  "Reference hit occupancy;roll index (can be arbitrary)",
294  nRPCRollBarrel,
295  0,
296  nRPCRollBarrel);
297  h_refOccupancyEndcap_detId = booker.book1D("RefOccupancyEndcap_detId",
298  "Reference hit occupancy;roll index (can be arbitrary)",
299  nRPCRollEndcap,
300  0,
301  nRPCRollEndcap);
303  "NoiseOccupancyBarrel_detId", "Noise occupancy;roll index (can be arbitrary)", nRPCRollBarrel, 0, nRPCRollBarrel);
305  "NoiseOccupancyEndcap_detId", "Noise occupancy;roll index (can be arbitrary)", nRPCRollEndcap, 0, nRPCRollEndcap);
306 
307  h_matchOccupancyBarrel_detId->getTH1()->SetMinimum(0);
308  h_matchOccupancyEndcap_detId->getTH1()->SetMinimum(0);
309  h_refOccupancyBarrel_detId->getTH1()->SetMinimum(0);
310  h_refOccupancyEndcap_detId->getTH1()->SetMinimum(0);
311  h_noiseOccupancyBarrel_detId->getTH1()->SetMinimum(0);
312  h_noiseOccupancyEndcap_detId->getTH1()->SetMinimum(0);
313 
315  "RollAreaBarrel_detId", "Roll area;roll index;Area", nRPCRollBarrel, 0., 1. * nRPCRollBarrel, 0., 1e5);
317  "RollAreaEndcap_detId", "Roll area;roll index;Area", nRPCRollEndcap, 0., 1. * nRPCRollEndcap, 0., 1e5);
318 
319  for (auto detIdToIndex : detIdToIndexMapBarrel_) {
320  const int rawId = detIdToIndex.first;
321  const int index = detIdToIndex.second;
322 
323  const RPCDetId rpcDetId = static_cast<const RPCDetId>(rawId);
324  const RPCRoll *roll = dynamic_cast<const RPCRoll *>(rpcGeom->roll(rpcDetId));
325 
326  // RPCGeomServ rpcSrv(roll->id());
327  // if ( !roll->specs()->isRPC() ) { cout << "\nNoRPC : " << rpcSrv.name() <<
328  // ' ' << rawId << endl; continue; }
329 
330  const StripTopology &topol = roll->specificTopology();
331  const double area = topol.stripLength() * topol.nstrips() * topol.pitch();
332 
333  h_rollAreaBarrel_detId->Fill(index, area);
334  }
335 
336  for (auto detIdToIndex : detIdToIndexMapEndcap_) {
337  const int rawId = detIdToIndex.first;
338  const int index = detIdToIndex.second;
339 
340  const RPCDetId rpcDetId = static_cast<const RPCDetId>(rawId);
341  const RPCRoll *roll = dynamic_cast<const RPCRoll *>(rpcGeom->roll(rpcDetId));
342 
343  // RPCGeomServ rpcSrv(roll->id());
344  // if ( !roll->specs()->isRPC() ) { cout << "\nNoRPC : " << rpcSrv.name() <<
345  // ' ' << rawId << endl; continue; }
346 
347  const StripTopology &topol = roll->specificTopology();
348  const double area = topol.stripLength() * topol.nstrips() * topol.pitch();
349 
350  h_rollAreaEndcap_detId->Fill(index, area);
351  }
352 }
const double Pi
virtual float stripLength() const =0
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::map< int, int > detIdToIndexMapEndcap_
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:113
MEP h_nRPCHitPerRecoMuonBarrel
std::map< int, int > detIdToIndexMapBarrel_
MEP h_nRPCHitPerSimMuonBarrel
MEP h_nRPCHitPerSimMuonOverlap
TH1 * getTH1() const
MEP h_recPunchOccupancyEndcap_disk_ring
MEP h_refPunchOccupancyBarrel_wheel
MEP h_refPunchOccupancyEndcap_disk
MEP h_matchOccupancyBarrel_detId
MEP h_recPunchOccupancyEndcap_disk
const StripTopology & specificTopology() const
Definition: RPCRoll.cc:107
void bookHistograms(DQMStore::IBooker &booker, const std::string &subDir)
void Fill(long long x)
MEP h_matchOccupancyEndcap_detId
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MEP h_rollAreaEndcap_detId
MEP h_noiseOccupancyBarrel_detId
MEP h_rollAreaBarrel_detId
MEP h_nRPCHitPerSimMuonEndcap
MEP h_nRPCHitPerRecoMuonEndcap
RPCValidHistograms h_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
const std::vector< const RPCRoll * > & rolls() const
Return the Rolls.
Definition: RPCChamber.cc:68
MEP h_recPunchOccupancyBarrel_wheel_station
MEP h_refPunchOccupancyBarrel_wheel_station
MEP h_refPunchOccupancyEndcap_disk_ring
TH2F * getTH2F() const
MEP h_refPunchOccupancyBarrel_station
MEP h_nRPCHitPerRecoMuonOverlap
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MEP h_refOccupancyBarrel_detId
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: RPCGeometry.cc:33
virtual int nstrips() const =0
std::string subDir_
MEP h_recPunchOccupancyBarrel_wheel
std::vector< const GeomDet * > DetContainer
MEP h_refOccupancyEndcap_detId
virtual float pitch() const =0
MEP h_noiseOccupancyEndcap_detId
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
Definition: RPCGeometry.cc:75
MEP h_recPunchOccupancyBarrel_station

Member Data Documentation

std::map<int, int> RPCRecHitValid::detIdToIndexMapBarrel_
private

Definition at line 74 of file RPCRecHitValid.h.

std::map<int, int> RPCRecHitValid::detIdToIndexMapEndcap_
private

Definition at line 74 of file RPCRecHitValid.h.

RPCValidHistograms RPCRecHitValid::h_
private

Definition at line 46 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_eventCount
private

Definition at line 48 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_matchOccupancyBarrel_detId
private

Definition at line 65 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_matchOccupancyEndcap_detId
private

Definition at line 66 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_noiseOccupancyBarrel_detId
private

Definition at line 69 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_noiseOccupancyEndcap_detId
private

Definition at line 70 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_nRPCHitPerRecoMuon
private

Definition at line 51 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_nRPCHitPerRecoMuonBarrel
private

Definition at line 51 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_nRPCHitPerRecoMuonEndcap
private

Definition at line 51 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_nRPCHitPerRecoMuonOverlap
private

Definition at line 51 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_nRPCHitPerSimMuon
private

Definition at line 50 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_nRPCHitPerSimMuonBarrel
private

Definition at line 50 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_nRPCHitPerSimMuonEndcap
private

Definition at line 50 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_nRPCHitPerSimMuonOverlap
private

Definition at line 50 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recoMuonBarrel_eta
private

Definition at line 56 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recoMuonBarrel_phi
private

Definition at line 57 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recoMuonBarrel_pt
private

Definition at line 55 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recoMuonEndcap_eta
private

Definition at line 56 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recoMuonEndcap_phi
private

Definition at line 57 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recoMuonEndcap_pt
private

Definition at line 55 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recoMuonNoRPC_eta
private

Definition at line 56 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recoMuonNoRPC_phi
private

Definition at line 57 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recoMuonNoRPC_pt
private

Definition at line 55 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recoMuonOverlap_eta
private

Definition at line 56 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recoMuonOverlap_phi
private

Definition at line 57 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recoMuonOverlap_pt
private

Definition at line 55 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recPunchOccupancyBarrel_station
private

Definition at line 62 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recPunchOccupancyBarrel_wheel
private

Definition at line 62 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recPunchOccupancyBarrel_wheel_station
private

Definition at line 63 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recPunchOccupancyEndcap_disk
private

Definition at line 62 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_recPunchOccupancyEndcap_disk_ring
private

Definition at line 63 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_refOccupancyBarrel_detId
private

Definition at line 67 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_refOccupancyEndcap_detId
private

Definition at line 68 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_refPunchOccupancyBarrel_station
private

Definition at line 60 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_refPunchOccupancyBarrel_wheel
private

Definition at line 60 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_refPunchOccupancyBarrel_wheel_station
private

Definition at line 61 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_refPunchOccupancyEndcap_disk
private

Definition at line 60 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_refPunchOccupancyEndcap_disk_ring
private

Definition at line 61 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_rollAreaBarrel_detId
private

Definition at line 71 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_rollAreaEndcap_detId
private

Definition at line 72 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_simMuonBarrel_eta
private

Definition at line 53 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_simMuonBarrel_phi
private

Definition at line 54 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_simMuonBarrel_pt
private

Definition at line 52 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_simMuonEndcap_eta
private

Definition at line 53 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_simMuonEndcap_phi
private

Definition at line 54 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_simMuonEndcap_pt
private

Definition at line 52 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_simMuonNoRPC_eta
private

Definition at line 53 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_simMuonNoRPC_phi
private

Definition at line 54 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_simMuonNoRPC_pt
private

Definition at line 52 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_simMuonOverlap_eta
private

Definition at line 53 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_simMuonOverlap_phi
private

Definition at line 54 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_simMuonOverlap_pt
private

Definition at line 52 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_simParticleType
private

Definition at line 58 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_simParticleTypeBarrel
private

Definition at line 58 of file RPCRecHitValid.h.

MEP RPCRecHitValid::h_simParticleTypeEndcap
private

Definition at line 58 of file RPCRecHitValid.h.

edm::EDGetTokenT<reco::MuonCollection> RPCRecHitValid::muonToken_
private

Definition at line 43 of file RPCRecHitValid.h.

edm::EDGetTokenT<RecHits> RPCRecHitValid::recHitToken_
private

Definition at line 40 of file RPCRecHitValid.h.

edm::EDGetTokenT<SimHitAssoc> RPCRecHitValid::simHitAssocToken_
private

Definition at line 42 of file RPCRecHitValid.h.

edm::EDGetTokenT<SimHits> RPCRecHitValid::simHitToken_
private

Definition at line 39 of file RPCRecHitValid.h.

edm::EDGetTokenT<SimParticles> RPCRecHitValid::simParticleToken_
private

Definition at line 41 of file RPCRecHitValid.h.

std::string RPCRecHitValid::subDir_
private

Definition at line 38 of file RPCRecHitValid.h.