CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Protected Attributes | Private Attributes
RecoMuonValidator Class Reference

#include <RecoMuonValidator.h>

Inheritance diagram for RecoMuonValidator:
DQMOneEDAnalyzer<> edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Classes

struct  CommonME
 
struct  HistoDimensions
 
struct  MuonME
 

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
 
virtual int countMuonHits (const reco::Track &track) const
 
virtual int countTrackerHits (const reco::Track &track) const
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &eventSetup) override
 
void dqmEndRun (edm::Run const &, edm::EventSetup const &) override
 
 RecoMuonValidator (const edm::ParameterSet &pset)
 
 ~RecoMuonValidator () override
 
- Public Member Functions inherited from DQMOneEDAnalyzer<>
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Attributes

edm::InputTag beamspotLabel_
 
edm::EDGetTokenT< reco::BeamSpotbeamspotToken_
 
CommonMEcommonME_
 
DQMStoredbe_
 
bool doAbsEta_
 
bool doAssoc_
 
HistoDimensions hDim
 
edm::InputTag muAssocLabel_
 
edm::EDGetTokenT< reco::MuonToTrackingParticleAssociatormuAssocToken_
 
edm::InputTag muonLabel_
 
MuonMEmuonME_
 
std::string muonSelection_
 
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
 
std::string outputFileName_
 
edm::InputTag primvertexLabel_
 
edm::EDGetTokenT< reco::VertexCollectionprimvertexToken_
 
edm::ParameterSet pset
 
edm::InputTag simLabel_
 
edm::EDGetTokenT< TrackingParticleCollectionsimToken_
 
std::string subDir_
 
std::string subsystemname_
 
TrackingParticleSelector tpSelector_
 
reco::MuonTrackType trackType_
 
bool usePFMuon_
 
unsigned int verbose_
 
- Protected Attributes inherited from DQMOneEDAnalyzer<>
edm::EDPutTokenT< DQMTokenrunToken_
 

Private Attributes

StringCutObjectSelector< reco::Muonselector_
 
bool wantTightMuon_
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer<>
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from DQMOneEDAnalyzer<>
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)=0
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 29 of file RecoMuonValidator.h.

Constructor & Destructor Documentation

◆ RecoMuonValidator()

RecoMuonValidator::RecoMuonValidator ( const edm::ParameterSet pset)

Definition at line 555 of file RecoMuonValidator.cc.

556  : selector_(pset.getParameter<std::string>("selection")) {
557  // pset=ps;
558  verbose_ = pset.getUntrackedParameter<unsigned int>("verbose", 0);
559 
560  outputFileName_ = pset.getUntrackedParameter<string>("outputFileName", "");
561 
562  wantTightMuon_ = pset.getParameter<bool>("wantTightMuon");
564  primvertexLabel_ = pset.getParameter<edm::InputTag>("primaryVertex");
565  beamspotToken_ = consumes<reco::BeamSpot>(beamspotLabel_);
566  primvertexToken_ = consumes<reco::VertexCollection>(primvertexLabel_);
567 
568  // Set histogram dimensions from config
569 
570  hDim.nBinP = pset.getUntrackedParameter<unsigned int>("nBinP");
571  hDim.minP = pset.getUntrackedParameter<double>("minP");
572  hDim.maxP = pset.getUntrackedParameter<double>("maxP");
573 
574  hDim.nBinPt = pset.getUntrackedParameter<unsigned int>("nBinPt");
575  hDim.minPt = pset.getUntrackedParameter<double>("minPt");
576  hDim.maxPt = pset.getUntrackedParameter<double>("maxPt");
577 
578  doAbsEta_ = pset.getUntrackedParameter<bool>("doAbsEta");
580  hDim.nBinEta = pset.getUntrackedParameter<unsigned int>("nBinEta");
581  hDim.minEta = pset.getUntrackedParameter<double>("minEta");
582  hDim.maxEta = pset.getUntrackedParameter<double>("maxEta");
583 
584  hDim.nBinDxy = pset.getUntrackedParameter<unsigned int>("nBinDxy");
585  hDim.minDxy = pset.getUntrackedParameter<double>("minDxy");
586  hDim.maxDxy = pset.getUntrackedParameter<double>("maxDxy");
587 
588  hDim.nBinDz = pset.getUntrackedParameter<unsigned int>("nBinDz");
589  hDim.minDz = pset.getUntrackedParameter<double>("minDz");
590  hDim.maxDz = pset.getUntrackedParameter<double>("maxDz");
591 
592  hDim.nBinPhi = pset.getUntrackedParameter<unsigned int>("nBinPhi");
593  hDim.minPhi = pset.getUntrackedParameter<double>("minPhi", -TMath::Pi());
594  hDim.maxPhi = pset.getUntrackedParameter<double>("maxPhi", TMath::Pi());
595 
596  hDim.nBinErr = pset.getUntrackedParameter<unsigned int>("nBinErr");
597  hDim.nBinPull = pset.getUntrackedParameter<unsigned int>("nBinPull");
598 
599  hDim.wPull = pset.getUntrackedParameter<double>("wPull");
600 
601  hDim.minErrP = pset.getUntrackedParameter<double>("minErrP");
602  hDim.maxErrP = pset.getUntrackedParameter<double>("maxErrP");
603 
604  hDim.minErrPt = pset.getUntrackedParameter<double>("minErrPt");
605  hDim.maxErrPt = pset.getUntrackedParameter<double>("maxErrPt");
606 
607  hDim.minErrQPt = pset.getUntrackedParameter<double>("minErrQPt");
608  hDim.maxErrQPt = pset.getUntrackedParameter<double>("maxErrQPt");
609 
610  hDim.minErrEta = pset.getUntrackedParameter<double>("minErrEta");
611  hDim.maxErrEta = pset.getUntrackedParameter<double>("maxErrEta");
612 
613  hDim.minErrPhi = pset.getUntrackedParameter<double>("minErrPhi");
614  hDim.maxErrPhi = pset.getUntrackedParameter<double>("maxErrPhi");
615 
616  hDim.minErrDxy = pset.getUntrackedParameter<double>("minErrDxy");
617  hDim.maxErrDxy = pset.getUntrackedParameter<double>("maxErrDxy");
618 
619  hDim.minErrDz = pset.getUntrackedParameter<double>("minErrDz");
620  hDim.maxErrDz = pset.getUntrackedParameter<double>("maxErrDz");
621 
622  hDim.nTrks = pset.getUntrackedParameter<unsigned int>("nTrks");
623  hDim.nAssoc = pset.getUntrackedParameter<unsigned int>("nAssoc");
624  hDim.nDof = pset.getUntrackedParameter<unsigned int>("nDof", 55);
625 
626  // Labels for simulation and reconstruction tracks
627  simLabel_ = pset.getParameter<InputTag>("simLabel");
628  muonLabel_ = pset.getParameter<InputTag>("muonLabel");
629  simToken_ = consumes<TrackingParticleCollection>(simLabel_);
630  muonToken_ = consumes<edm::View<reco::Muon> >(muonLabel_);
631 
632  // Labels for sim-reco association
633  doAssoc_ = pset.getUntrackedParameter<bool>("doAssoc", true);
634  muAssocLabel_ = pset.getParameter<InputTag>("muAssocLabel");
635  if (doAssoc_) {
636  muAssocToken_ = consumes<reco::MuonToTrackingParticleAssociator>(muAssocLabel_);
637  }
638 
639  // Different momentum assignment and additional histos in case of PF muons
640  usePFMuon_ = pset.getUntrackedParameter<bool>("usePFMuon");
642 
643  //type of track
645  if (trackType == "inner")
647  else if (trackType == "outer")
649  else if (trackType == "global")
651  else if (trackType == "segments")
653  else
654  throw cms::Exception("Configuration") << "Track type '" << trackType << "' not supported.\n";
655 
656  // seedPropagatorName_ = pset.getParameter<string>("SeedPropagator");
657 
658  ParameterSet tpset = pset.getParameter<ParameterSet>("tpSelector");
659  tpSelector_ = TrackingParticleSelector(tpset.getParameter<double>("ptMin"),
660  tpset.getParameter<double>("ptMax"),
661  tpset.getParameter<double>("minRapidity"),
662  tpset.getParameter<double>("maxRapidity"),
663  tpset.getParameter<double>("tip"),
664  tpset.getParameter<double>("lip"),
665  tpset.getParameter<int>("minHit"),
666  tpset.getParameter<bool>("signalOnly"),
667  tpset.getParameter<bool>("intimeOnly"),
668  tpset.getParameter<bool>("chargedOnly"),
669  tpset.getParameter<bool>("stableOnly"),
670  tpset.getParameter<std::vector<int> >("pdgId"));
671 
672  // the service parameters
673  ParameterSet serviceParameters = pset.getParameter<ParameterSet>("ServiceParameters");
674 
675  // retrieve the instance of DQMService
676  dbe_ = Service<DQMStore>().operator->();
677  subsystemname_ = pset.getUntrackedParameter<std::string>("subSystemFolder", "YourSubsystem");
678 
679  subDir_ = pset.getUntrackedParameter<string>("subDir");
680  if (subDir_.empty())
681  subDir_ = "RecoMuonV";
682  if (subDir_[subDir_.size() - 1] == '/')
683  subDir_.erase(subDir_.size() - 1);
684 }

References beamspotLabel_, beamspotToken_, dbe_, RecoMuonValidator::HistoDimensions::doAbsEta, doAbsEta_, doAssoc_, Exception, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), reco::GlobalTk, hDim, reco::InnerTk, RecoMuonValidator::HistoDimensions::maxDxy, RecoMuonValidator::HistoDimensions::maxDz, RecoMuonValidator::HistoDimensions::maxErrDxy, RecoMuonValidator::HistoDimensions::maxErrDz, RecoMuonValidator::HistoDimensions::maxErrEta, RecoMuonValidator::HistoDimensions::maxErrP, RecoMuonValidator::HistoDimensions::maxErrPhi, RecoMuonValidator::HistoDimensions::maxErrPt, RecoMuonValidator::HistoDimensions::maxErrQPt, RecoMuonValidator::HistoDimensions::maxEta, RecoMuonValidator::HistoDimensions::maxP, RecoMuonValidator::HistoDimensions::maxPhi, RecoMuonValidator::HistoDimensions::maxPt, RecoMuonValidator::HistoDimensions::minDxy, RecoMuonValidator::HistoDimensions::minDz, RecoMuonValidator::HistoDimensions::minErrDxy, RecoMuonValidator::HistoDimensions::minErrDz, RecoMuonValidator::HistoDimensions::minErrEta, RecoMuonValidator::HistoDimensions::minErrP, RecoMuonValidator::HistoDimensions::minErrPhi, RecoMuonValidator::HistoDimensions::minErrPt, RecoMuonValidator::HistoDimensions::minErrQPt, RecoMuonValidator::HistoDimensions::minEta, RecoMuonValidator::HistoDimensions::minP, RecoMuonValidator::HistoDimensions::minPhi, RecoMuonValidator::HistoDimensions::minPt, muAssocLabel_, muAssocToken_, muonLabel_, muonToken_, RecoMuonValidator::HistoDimensions::nAssoc, RecoMuonValidator::HistoDimensions::nBinDxy, RecoMuonValidator::HistoDimensions::nBinDz, RecoMuonValidator::HistoDimensions::nBinErr, RecoMuonValidator::HistoDimensions::nBinEta, RecoMuonValidator::HistoDimensions::nBinP, RecoMuonValidator::HistoDimensions::nBinPhi, RecoMuonValidator::HistoDimensions::nBinPt, RecoMuonValidator::HistoDimensions::nBinPull, RecoMuonValidator::HistoDimensions::nDof, RecoMuonValidator::HistoDimensions::nTrks, reco::OuterTk, outputFileName_, Pi, primvertexLabel_, primvertexToken_, pset, reco::Segments, simLabel_, simToken_, AlCaHLTBitMon_QueryRunRegistry::string, subDir_, subsystemname_, tpSelector_, PbPb_ZMuSkimMuonDPG_cff::trackType, trackType_, RecoMuonValidator::HistoDimensions::usePFMuon, usePFMuon_, verbose_, wantTightMuon_, and RecoMuonValidator::HistoDimensions::wPull.

◆ ~RecoMuonValidator()

RecoMuonValidator::~RecoMuonValidator ( )
override

Definition at line 794 of file RecoMuonValidator.cc.

794 {}

Member Function Documentation

◆ analyze()

void RecoMuonValidator::analyze ( const edm::Event event,
const edm::EventSetup eventSetup 
)
overridevirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 813 of file RecoMuonValidator.cc.

813  {
814  // Look for the Primary Vertex (and use the BeamSpot instead, if you can't find it):
815  reco::Vertex::Point posVtx;
816  reco::Vertex::Error errVtx;
818  event.getByToken(primvertexToken_, recVtxs);
819  unsigned int theIndexOfThePrimaryVertex = 999.;
820  for (unsigned int ind = 0; ind < recVtxs->size(); ++ind) {
821  if ((*recVtxs)[ind].isValid() && !((*recVtxs)[ind].isFake())) {
822  theIndexOfThePrimaryVertex = ind;
823  break;
824  }
825  }
826  if (theIndexOfThePrimaryVertex < 100) {
827  posVtx = ((*recVtxs)[theIndexOfThePrimaryVertex]).position();
828  errVtx = ((*recVtxs)[theIndexOfThePrimaryVertex]).error();
829  } else {
830  LogInfo("RecoMuonValidator") << "reco::PrimaryVertex not found, use BeamSpot position instead\n";
831  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
832  event.getByToken(beamspotToken_, recoBeamSpotHandle);
833  reco::BeamSpot bs = *recoBeamSpotHandle;
834  posVtx = bs.position();
835  errVtx(0, 0) = bs.BeamWidthX();
836  errVtx(1, 1) = bs.BeamWidthY();
837  errVtx(2, 2) = bs.sigmaZ();
838  }
839  const reco::Vertex thePrimaryVertex(posVtx, errVtx);
840 
841  // Get TrackingParticles
843  event.getByToken(simToken_, simHandle);
844  const TrackingParticleCollection simColl = *(simHandle.product());
845 
846  // Get Muons
847  Handle<edm::View<Muon> > muonHandle;
848  event.getByToken(muonToken_, muonHandle);
849  View<Muon> muonColl = *(muonHandle.product());
850 
851  reco::MuonToTrackingParticleAssociator const* assoByHits = nullptr;
852  if (doAssoc_) {
854  event.getByToken(muAssocToken_, associatorBase);
855  assoByHits = associatorBase.product();
856  }
857 
858  const TrackingParticleCollection::size_type nSim = simColl.size();
859 
861  for (size_t i = 0; i < muonHandle->size(); ++i) {
862  Muons.push_back(muonHandle->refAt(i));
863  }
864 
866  for (size_t i = 0; i < nSim; ++i) {
867  allTPs.push_back(TrackingParticleRef(simHandle, i));
868  }
869 
870  muonME_->hNSim_->Fill(nSim);
871  muonME_->hNMuon_->Fill(muonColl.size());
872 
873  reco::MuonToSimCollection muonToSimColl;
874  reco::SimToMuonCollection simToMuonColl;
875 
876  if (doAssoc_) {
877  assoByHits->associateMuons(muonToSimColl, simToMuonColl, Muons, trackType_, allTPs);
878  } else {
879  /*
880  // SimToMuon associations
881  Handle<reco::RecoToSimCollection> simToTrkMuHandle;
882  event.getByLabel(trkMuAssocLabel_, simToTrkMuHandle);
883  trkSimRecColl = *(simToTrkMuHandle.product());
884 
885  Handle<reco::RecoToSimCollection> simToStaMuHandle;
886  event.getByLabel(staMuAssocLabel_, simToStaMuHandle);
887  staSimRecColl = *(simToStaMuHandle.product());
888 
889  Handle<reco::RecoToSimCollection> simToGlbMuHandle;
890  event.getByLabel(glbMuAssocLabel_, simToGlbMuHandle);
891  glbSimRecColl = *(simToGlbMuHandle.product());
892 
893  // MuonToSim associations
894  Handle<reco::SimToRecoCollection> trkMuToSimHandle;
895  event.getByLabel(trkMuAssocLabel_, trkMuToSimHandle);
896  trkRecSimColl = *(trkMuToSimHandle.product());
897 
898  Handle<reco::SimToRecoCollection> staMuToSimHandle;
899  event.getByLabel(staMuAssocLabel_, staMuToSimHandle);
900  staRecSimColl = *(staMuToSimHandle.product());
901 
902  Handle<reco::SimToRecoCollection> glbMuToSimHandle;
903  event.getByLabel(glbMuAssocLabel_, glbMuToSimHandle);
904  glbRecSimColl = *(glbMuToSimHandle.product());
905 */
906  }
907 
908  int glbNTrackerHits = 0;
909  int trkNTrackerHits = 0;
910  int glbNMuonHits = 0;
911  int staNMuonHits = 0;
912  int NTrackerHits = 0;
913  int NMuonHits = 0;
914 
915  // Analyzer reco::Muon
916  for (View<Muon>::const_iterator iMuon = muonColl.begin(); iMuon != muonColl.end(); ++iMuon) {
917  double muonP, muonPt, muonEta, muonPhi;
918  if (usePFMuon_) {
919  muonP = iMuon->pfP4().P();
920  muonPt = iMuon->pfP4().Pt();
921  muonEta = iMuon->pfP4().Eta();
922  muonPhi = iMuon->pfP4().Phi();
923  } else {
924  muonP = iMuon->p();
925  muonPt = iMuon->pt();
926  muonEta = iMuon->eta();
927  muonPhi = iMuon->phi();
928  }
929 
930  //histograms for fractions
931  commonME_->hMuonAllP_->Fill(muonP);
935 
936  if (!selector_(*iMuon))
937  continue;
938  if (wantTightMuon_) {
939  if (!muon::isTightMuon(*iMuon, thePrimaryVertex))
940  continue;
941  }
942 
943  TrackRef Track = iMuon->track();
944 
945  if (Track.isNonnull()) {
950 
951  //ip histograms
954  }
955 
956  if (iMuon->isGlobalMuon()) {
957  Track = iMuon->combinedMuon();
958  glbNTrackerHits = countTrackerHits(*Track);
959  glbNMuonHits = countMuonHits(*Track);
960  } else if (iMuon->isTrackerMuon()) {
961  Track = iMuon->track();
962  trkNTrackerHits = countTrackerHits(*Track);
963  } else {
964  Track = iMuon->standAloneMuon();
965  }
966 
967  NTrackerHits = countTrackerHits(*Track);
968  muonME_->hNTrackerHits_->Fill(NTrackerHits);
969  muonME_->hNTrackerHits_vs_Pt_->Fill(Track->pt(), NTrackerHits);
970  muonME_->hNTrackerHits_vs_Eta_->Fill(Track->eta(), NTrackerHits);
971 
972  NMuonHits = countMuonHits(*Track);
973  muonME_->hNMuonHits_->Fill(NMuonHits);
974  muonME_->hNMuonHits_vs_Pt_->Fill(Track->pt(), NMuonHits);
975  muonME_->hNMuonHits_vs_Eta_->Fill(Track->eta(), NMuonHits);
976 
977  //list of histos for each type
978 
979  // muonME_->hNTrks_->Fill();
981  muonME_->hNTrksPt_->Fill(Track->pt());
982 
983  commonME_->hMuonP_->Fill(muonP);
987 
988  if (iMuon->isGlobalMuon()) {
989  double gtHitPat = iMuon->globalTrack()->hitPattern().numberOfAllHits(HitPattern::TRACK_HITS) -
990  iMuon->globalTrack()->hitPattern().numberOfValidHits();
991 
992  double itHitPat = iMuon->innerTrack()->hitPattern().numberOfAllHits(HitPattern::TRACK_HITS) -
993  iMuon->innerTrack()->hitPattern().numberOfValidHits();
994 
995  double otHitPat = iMuon->outerTrack()->hitPattern().numberOfAllHits(HitPattern::TRACK_HITS) -
996  iMuon->outerTrack()->hitPattern().numberOfValidHits();
997 
1001  commonME_->hNDeltaInvalidHitsHitPattern_->Fill(gtHitPat - itHitPat - otHitPat);
1002 
1003  //must be global and standalone
1004  if (iMuon->isStandAloneMuon()) {
1005  commonME_->hStaToGlbDiffNMuonHitsEta_->Fill(Track->eta(), staNMuonHits - glbNMuonHits);
1006  commonME_->hStaToGlbDiffNMuonHitsPt_->Fill(Track->pt(), staNMuonHits - glbNMuonHits);
1007  commonME_->hStaToGlbDiffNMuonHits_->Fill(staNMuonHits - glbNMuonHits);
1008  }
1009 
1010  //must be global and tracker
1011  if (iMuon->isTrackerMuon()) {
1012  commonME_->hTrkToGlbDiffNTrackerHitsEta_->Fill(Track->eta(), trkNTrackerHits - glbNTrackerHits);
1013  commonME_->hTrkToGlbDiffNTrackerHitsPt_->Fill(Track->pt(), trkNTrackerHits - glbNTrackerHits);
1014  commonME_->hTrkToGlbDiffNTrackerHits_->Fill(trkNTrackerHits - glbNTrackerHits);
1015  }
1016  }
1017 
1018  } //end of reco muon loop
1019 
1020  // Associate by hits
1021  for (TrackingParticleCollection::size_type i = 0; i < nSim; i++) {
1022  TrackingParticleRef simRef(simHandle, i);
1023  const TrackingParticle* simTP = simRef.get();
1024  if (!tpSelector_(*simTP))
1025  continue;
1026 
1027  //denominators for efficiency plots
1028  const double simP = simRef->p();
1029  const double simPt = simRef->pt();
1030  const double simEta = doAbsEta_ ? fabs(simRef->eta()) : simRef->eta();
1031  const double simPhi = simRef->phi();
1032 
1033  GlobalPoint simVtx(simRef->vertex().x(), simRef->vertex().y(), simRef->vertex().z());
1034  GlobalVector simMom(simRef->momentum().x(), simRef->momentum().y(), simRef->momentum().z());
1035  const double simDxy = -simVtx.x() * sin(simPhi) + simVtx.y() * cos(simPhi);
1036  const double simDz = simVtx.z() - (simVtx.x() * simMom.x() + simVtx.y() * simMom.y()) * simMom.z() / simMom.perp2();
1037 
1038  const unsigned int nSimHits = simRef->numberOfHits();
1039 
1040  muonME_->hSimP_->Fill(simP);
1041  muonME_->hSimPt_->Fill(simPt);
1042  muonME_->hSimEta_->Fill(simEta);
1043  muonME_->hSimPhi_->Fill(simPhi);
1044  muonME_->hSimDxy_->Fill(simDxy);
1045  muonME_->hSimDz_->Fill(simDz);
1046  muonME_->hNSimHits_->Fill(nSimHits);
1047 
1048  // Get sim-reco association for a simRef
1049  vector<pair<RefToBase<Muon>, double> > MuRefV;
1050  if (simToMuonColl.find(simRef) != simToMuonColl.end()) {
1051  MuRefV = simToMuonColl[simRef];
1052 
1053  if (!MuRefV.empty()) {
1054  muonME_->hNSimToReco_->Fill(MuRefV.size());
1055  const Muon* Mu = MuRefV.begin()->first.get();
1056  if (!selector_(*Mu))
1057  continue;
1058  if (wantTightMuon_) {
1059  if (!muon::isTightMuon(*Mu, thePrimaryVertex))
1060  continue;
1061  }
1062 
1063  muonME_->fill(&*simTP, Mu);
1064  }
1065  }
1066  }
1067 }

References reco::MuonToTrackingParticleAssociator::associateMuons(), beamspotToken_, edm::View< T >::begin(), cms::cuda::bs, commonME_, funct::cos(), countMuonHits(), countTrackerHits(), doAbsEta_, doAssoc_, reco::TrackBase::dxy(), reco::TrackBase::dz(), edm::View< T >::end(), relativeConstraints::error, reco::TrackBase::eta(), dqm::impl::MonitorElement::Fill(), RecoMuonValidator::MuonME::fill(), edm::Ref< C, T, F >::get(), RecoMuonValidator::CommonME::hMuonAllEta_, RecoMuonValidator::CommonME::hMuonAllP_, RecoMuonValidator::CommonME::hMuonAllPhi_, RecoMuonValidator::CommonME::hMuonAllPt_, RecoMuonValidator::CommonME::hMuonEta_, RecoMuonValidator::CommonME::hMuonP_, RecoMuonValidator::CommonME::hMuonPhi_, RecoMuonValidator::CommonME::hMuonPt_, RecoMuonValidator::CommonME::hMuonTrackDxy_, RecoMuonValidator::CommonME::hMuonTrackDz_, RecoMuonValidator::CommonME::hMuonTrackEta_, RecoMuonValidator::CommonME::hMuonTrackP_, RecoMuonValidator::CommonME::hMuonTrackPhi_, RecoMuonValidator::CommonME::hMuonTrackPt_, RecoMuonValidator::CommonME::hNDeltaInvalidHitsHitPattern_, RecoMuonValidator::CommonME::hNInvalidHitsGTHitPattern_, RecoMuonValidator::CommonME::hNInvalidHitsITHitPattern_, RecoMuonValidator::CommonME::hNInvalidHitsOTHitPattern_, RecoMuonValidator::MuonME::hNMuon_, RecoMuonValidator::MuonME::hNMuonHits_, RecoMuonValidator::MuonME::hNMuonHits_vs_Eta_, RecoMuonValidator::MuonME::hNMuonHits_vs_Pt_, RecoMuonValidator::MuonME::hNSim_, RecoMuonValidator::MuonME::hNSimHits_, RecoMuonValidator::MuonME::hNSimToReco_, RecoMuonValidator::MuonME::hNTrackerHits_, RecoMuonValidator::MuonME::hNTrackerHits_vs_Eta_, RecoMuonValidator::MuonME::hNTrackerHits_vs_Pt_, RecoMuonValidator::MuonME::hNTrksEta_, RecoMuonValidator::MuonME::hNTrksPt_, RecoMuonValidator::MuonME::hSimDxy_, RecoMuonValidator::MuonME::hSimDz_, RecoMuonValidator::MuonME::hSimEta_, RecoMuonValidator::MuonME::hSimP_, RecoMuonValidator::MuonME::hSimPhi_, RecoMuonValidator::MuonME::hSimPt_, RecoMuonValidator::CommonME::hStaToGlbDiffNMuonHits_, RecoMuonValidator::CommonME::hStaToGlbDiffNMuonHitsEta_, RecoMuonValidator::CommonME::hStaToGlbDiffNMuonHitsPt_, RecoMuonValidator::CommonME::hTrkToGlbDiffNTrackerHits_, RecoMuonValidator::CommonME::hTrkToGlbDiffNTrackerHitsEta_, RecoMuonValidator::CommonME::hTrkToGlbDiffNTrackerHitsPt_, mps_fire::i, muon::isTightMuon(), Mu, muAssocToken_, HLTObjectMonitor_cfi::muonEta, muonME_, HLTObjectMonitor_cfi::muonPhi, HLTObjectMonitor_cfi::muonPt, HLTTauDQMOffline_cfi::Muons, muonToken_, reco::TrackBase::p(), reco::TrackBase::phi(), position, primvertexToken_, edm::Handle< T >::product(), reco::TrackBase::pt(), edm::RefVector< C, T, F >::push_back(), selector_, simToken_, funct::sin(), edm::View< T >::size(), reco::TrackBase::standAloneMuon, tpSelector_, trackType_, usePFMuon_, wantTightMuon_, and PV3DBase< T, PVType, FrameType >::x().

◆ bookHistograms()

void RecoMuonValidator::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
override

Definition at line 686 of file RecoMuonValidator.cc.

688  {
689  // book histograms
690  ibooker.cd();
691 
692  ibooker.setCurrentFolder(subDir_);
693 
694  commonME_ = new CommonME;
695  muonME_ = new MuonME;
696 
697  //commonME
698  const int nHits = 100;
699 
700  // - diffs
701  commonME_->hTrkToGlbDiffNTrackerHits_ = ibooker.book1D("TrkGlbDiffNTrackerHits",
702  "Difference of number of tracker hits (tkMuon - globalMuon)",
703  2 * nHits + 1,
704  -nHits - 0.5,
705  nHits + 0.5);
706  commonME_->hStaToGlbDiffNMuonHits_ = ibooker.book1D("StaGlbDiffNMuonHits",
707  "Difference of number of muon hits (staMuon - globalMuon)",
708  2 * nHits + 1,
709  -nHits - 0.5,
710  nHits + 0.5);
711 
713  ibooker.book2D("TrkGlbDiffNTrackerHitsEta",
714  "Difference of number of tracker hits (tkMuon - globalMuon)",
715  hDim.nBinEta,
716  hDim.minEta,
717  hDim.maxEta,
718  2 * nHits + 1,
719  -nHits - 0.5,
720  nHits + 0.5);
721  commonME_->hStaToGlbDiffNMuonHitsEta_ = ibooker.book2D("StaGlbDiffNMuonHitsEta",
722  "Difference of number of muon hits (staMuon - globalMuon)",
723  hDim.nBinEta,
724  hDim.minEta,
725  hDim.maxEta,
726  2 * nHits + 1,
727  -nHits - 0.5,
728  nHits + 0.5);
729 
730  commonME_->hTrkToGlbDiffNTrackerHitsPt_ = ibooker.book2D("TrkGlbDiffNTrackerHitsPt",
731  "Difference of number of tracker hits (tkMuon - globalMuon)",
732  hDim.nBinPt,
733  hDim.minPt,
734  hDim.maxPt,
735  2 * nHits + 1,
736  -nHits - 0.5,
737  nHits + 0.5);
738  commonME_->hStaToGlbDiffNMuonHitsPt_ = ibooker.book2D("StaGlbDiffNMuonHitsPt",
739  "Difference of number of muon hits (staMuon - globalMuon)",
740  hDim.nBinPt,
741  hDim.minPt,
742  hDim.maxPt,
743  2 * nHits + 1,
744  -nHits - 0.5,
745  nHits + 0.5);
746 
747  // -global muon hit pattern
748  commonME_->hNInvalidHitsGTHitPattern_ = ibooker.book1D(
749  "NInvalidHitsGTHitPattern", "Number of invalid hits on a global track", nHits + 1, -0.5, nHits + 0.5);
750  commonME_->hNInvalidHitsITHitPattern_ = ibooker.book1D(
751  "NInvalidHitsITHitPattern", "Number of invalid hits on an inner track", nHits + 1, -0.5, nHits + 0.5);
752  commonME_->hNInvalidHitsOTHitPattern_ = ibooker.book1D(
753  "NInvalidHitsOTHitPattern", "Number of invalid hits on an outer track", nHits + 1, -0.5, nHits + 0.5);
755  ibooker.book1D("hNDeltaInvalidHitsHitPattern",
756  "The discrepancy for Number of invalid hits on an global track and inner and outer tracks",
757  2 * nHits + 1,
758  -nHits - 0.5,
759  nHits + 0.5);
760 
761  //muon based kinematics
762  commonME_->hMuonP_ = ibooker.book1D("PMuon", "p of muon", hDim.nBinP, hDim.minP, hDim.maxP);
763  commonME_->hMuonPt_ = ibooker.book1D("PtMuon", "p_{T} of muon", hDim.nBinPt, hDim.minPt, hDim.maxPt);
764  commonME_->hMuonEta_ = ibooker.book1D("EtaMuon", "#eta of muon", hDim.nBinEta, hDim.minEta, hDim.maxEta);
765  commonME_->hMuonPhi_ = ibooker.book1D("PhiMuon", "#phi of muon", hDim.nBinPhi, hDim.minPhi, hDim.maxPhi);
766  //track based kinematics
767  commonME_->hMuonTrackP_ = ibooker.book1D("PMuonTrack", "p of reco muon track", hDim.nBinP, hDim.minP, hDim.maxP);
769  ibooker.book1D("PtMuonTrack", "p_{T} of reco muon track", hDim.nBinPt, hDim.minPt, hDim.maxPt);
771  ibooker.book1D("EtaMuonTrack", "#eta of reco muon track", hDim.nBinEta, hDim.minEta, hDim.maxEta);
773  ibooker.book1D("PhiMuonTrack", "#phi of reco muon track", hDim.nBinPhi, hDim.minPhi, hDim.maxPhi);
775  ibooker.book1D("DxyMuonTrack", "Dxy of reco muon track", hDim.nBinDxy, hDim.minDxy, hDim.maxDxy);
777  ibooker.book1D("DzMuonTrack", "Dz of reco muon track", hDim.nBinDz, hDim.minDz, hDim.maxDz);
778 
779  //histograms for fractions
780  commonME_->hMuonAllP_ = ibooker.book1D("PMuonAll", "p of muons of all types", hDim.nBinP, hDim.minP, hDim.maxP);
782  ibooker.book1D("PtMuonAll", "p_{T} of muon of all types", hDim.nBinPt, hDim.minPt, hDim.maxPt);
784  ibooker.book1D("EtaMuonAll", "#eta of muon of all types", hDim.nBinEta, hDim.minEta, hDim.maxEta);
786  ibooker.book1D("PhiMuonAll", "#phi of muon of all types", hDim.nBinPhi, hDim.minPhi, hDim.maxPhi);
787 
788  muonME_->bookHistos(ibooker, subDir_, hDim);
789 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), RecoMuonValidator::MuonME::bookHistos(), dqm::implementation::NavigatorBase::cd(), commonME_, hDim, RecoMuonValidator::CommonME::hMuonAllEta_, RecoMuonValidator::CommonME::hMuonAllP_, RecoMuonValidator::CommonME::hMuonAllPhi_, RecoMuonValidator::CommonME::hMuonAllPt_, RecoMuonValidator::CommonME::hMuonEta_, RecoMuonValidator::CommonME::hMuonP_, RecoMuonValidator::CommonME::hMuonPhi_, RecoMuonValidator::CommonME::hMuonPt_, RecoMuonValidator::CommonME::hMuonTrackDxy_, RecoMuonValidator::CommonME::hMuonTrackDz_, RecoMuonValidator::CommonME::hMuonTrackEta_, RecoMuonValidator::CommonME::hMuonTrackP_, RecoMuonValidator::CommonME::hMuonTrackPhi_, RecoMuonValidator::CommonME::hMuonTrackPt_, RecoMuonValidator::CommonME::hNDeltaInvalidHitsHitPattern_, RecoMuonValidator::CommonME::hNInvalidHitsGTHitPattern_, RecoMuonValidator::CommonME::hNInvalidHitsITHitPattern_, RecoMuonValidator::CommonME::hNInvalidHitsOTHitPattern_, RecoMuonValidator::CommonME::hStaToGlbDiffNMuonHits_, RecoMuonValidator::CommonME::hStaToGlbDiffNMuonHitsEta_, RecoMuonValidator::CommonME::hStaToGlbDiffNMuonHitsPt_, RecoMuonValidator::CommonME::hTrkToGlbDiffNTrackerHits_, RecoMuonValidator::CommonME::hTrkToGlbDiffNTrackerHitsEta_, RecoMuonValidator::CommonME::hTrkToGlbDiffNTrackerHitsPt_, RecoMuonValidator::HistoDimensions::maxDxy, RecoMuonValidator::HistoDimensions::maxDz, RecoMuonValidator::HistoDimensions::maxEta, RecoMuonValidator::HistoDimensions::maxP, RecoMuonValidator::HistoDimensions::maxPhi, RecoMuonValidator::HistoDimensions::maxPt, RecoMuonValidator::HistoDimensions::minDxy, RecoMuonValidator::HistoDimensions::minDz, RecoMuonValidator::HistoDimensions::minEta, RecoMuonValidator::HistoDimensions::minP, RecoMuonValidator::HistoDimensions::minPhi, RecoMuonValidator::HistoDimensions::minPt, muonME_, RecoMuonValidator::HistoDimensions::nBinDxy, RecoMuonValidator::HistoDimensions::nBinDz, RecoMuonValidator::HistoDimensions::nBinEta, RecoMuonValidator::HistoDimensions::nBinP, RecoMuonValidator::HistoDimensions::nBinPhi, RecoMuonValidator::HistoDimensions::nBinPt, dqm::implementation::NavigatorBase::setCurrentFolder(), and subDir_.

◆ countMuonHits()

int RecoMuonValidator::countMuonHits ( const reco::Track track) const
virtual

Definition at line 1069 of file RecoMuonValidator.cc.

1069  {
1071 
1072  int count = 0;
1073 
1074  for (trackingRecHit_iterator hit = track.recHitsBegin(); hit != track.recHitsEnd(); ++hit) {
1075  if ((*hit)->isValid()) {
1076  DetId recoid = (*hit)->geographicalId();
1077  if (recoid.det() == DetId::Muon)
1078  count++;
1079  }
1080  }
1081  return count;
1082 }

References KineDebug3::count(), DetId::det(), DetId::Muon, mps_fire::result, and HLT_2018_cff::track.

Referenced by analyze().

◆ countTrackerHits()

int RecoMuonValidator::countTrackerHits ( const reco::Track track) const
virtual

Definition at line 1084 of file RecoMuonValidator.cc.

1084  {
1086 
1087  int count = 0;
1088 
1089  for (trackingRecHit_iterator hit = track.recHitsBegin(); hit != track.recHitsEnd(); ++hit) {
1090  if ((*hit)->isValid()) {
1091  DetId recoid = (*hit)->geographicalId();
1092  if (recoid.det() == DetId::Tracker)
1093  count++;
1094  }
1095  }
1096  return count;
1097 }

References KineDebug3::count(), DetId::det(), mps_fire::result, HLT_2018_cff::track, and DetId::Tracker.

Referenced by analyze().

◆ dqmBeginRun()

void RecoMuonValidator::dqmBeginRun ( const edm::Run ,
const edm::EventSetup eventSetup 
)
overridevirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 800 of file RecoMuonValidator.cc.

800 {}

◆ dqmEndRun()

void RecoMuonValidator::dqmEndRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 805 of file RecoMuonValidator.cc.

805  {
806  if (dbe_ && !outputFileName_.empty())
808 }

References dbe_, outputFileName_, and dqm::implementation::DQMStore::save().

Member Data Documentation

◆ beamspotLabel_

edm::InputTag RecoMuonValidator::beamspotLabel_
protected

Definition at line 53 of file RecoMuonValidator.h.

Referenced by RecoMuonValidator().

◆ beamspotToken_

edm::EDGetTokenT<reco::BeamSpot> RecoMuonValidator::beamspotToken_
protected

Definition at line 55 of file RecoMuonValidator.h.

Referenced by analyze(), and RecoMuonValidator().

◆ commonME_

CommonME* RecoMuonValidator::commonME_
protected

Definition at line 77 of file RecoMuonValidator.h.

Referenced by analyze(), and bookHistograms().

◆ dbe_

DQMStore* RecoMuonValidator::dbe_
protected

Definition at line 63 of file RecoMuonValidator.h.

Referenced by dqmEndRun(), and RecoMuonValidator().

◆ doAbsEta_

bool RecoMuonValidator::doAbsEta_
protected

Definition at line 65 of file RecoMuonValidator.h.

Referenced by analyze(), and RecoMuonValidator().

◆ doAssoc_

bool RecoMuonValidator::doAssoc_
protected

Definition at line 66 of file RecoMuonValidator.h.

Referenced by analyze(), and RecoMuonValidator().

◆ hDim

HistoDimensions RecoMuonValidator::hDim
protected

Definition at line 123 of file RecoMuonValidator.h.

Referenced by bookHistograms(), and RecoMuonValidator().

◆ muAssocLabel_

edm::InputTag RecoMuonValidator::muAssocLabel_
protected

Definition at line 50 of file RecoMuonValidator.h.

Referenced by RecoMuonValidator().

◆ muAssocToken_

edm::EDGetTokenT<reco::MuonToTrackingParticleAssociator> RecoMuonValidator::muAssocToken_
protected

Definition at line 51 of file RecoMuonValidator.h.

Referenced by analyze(), and RecoMuonValidator().

◆ muonLabel_

edm::InputTag RecoMuonValidator::muonLabel_
protected

Definition at line 45 of file RecoMuonValidator.h.

Referenced by RecoMuonValidator().

◆ muonME_

MuonME* RecoMuonValidator::muonME_
protected

Definition at line 74 of file RecoMuonValidator.h.

Referenced by analyze(), and bookHistograms().

◆ muonSelection_

std::string RecoMuonValidator::muonSelection_
protected

Definition at line 46 of file RecoMuonValidator.h.

◆ muonToken_

edm::EDGetTokenT<edm::View<reco::Muon> > RecoMuonValidator::muonToken_
protected

Definition at line 48 of file RecoMuonValidator.h.

Referenced by analyze(), and RecoMuonValidator().

◆ outputFileName_

std::string RecoMuonValidator::outputFileName_
protected

Definition at line 58 of file RecoMuonValidator.h.

Referenced by dqmEndRun(), and RecoMuonValidator().

◆ primvertexLabel_

edm::InputTag RecoMuonValidator::primvertexLabel_
protected

Definition at line 54 of file RecoMuonValidator.h.

Referenced by RecoMuonValidator().

◆ primvertexToken_

edm::EDGetTokenT<reco::VertexCollection> RecoMuonValidator::primvertexToken_
protected

Definition at line 56 of file RecoMuonValidator.h.

Referenced by analyze(), and RecoMuonValidator().

◆ pset

edm::ParameterSet RecoMuonValidator::pset
protected

Definition at line 61 of file RecoMuonValidator.h.

Referenced by RecoMuonValidator().

◆ selector_

StringCutObjectSelector<reco::Muon> RecoMuonValidator::selector_
private

Definition at line 126 of file RecoMuonValidator.h.

Referenced by analyze().

◆ simLabel_

edm::InputTag RecoMuonValidator::simLabel_
protected

Definition at line 44 of file RecoMuonValidator.h.

Referenced by RecoMuonValidator().

◆ simToken_

edm::EDGetTokenT<TrackingParticleCollection> RecoMuonValidator::simToken_
protected

Definition at line 47 of file RecoMuonValidator.h.

Referenced by analyze(), and RecoMuonValidator().

◆ subDir_

std::string RecoMuonValidator::subDir_
protected

Definition at line 59 of file RecoMuonValidator.h.

Referenced by bookHistograms(), and RecoMuonValidator().

◆ subsystemname_

std::string RecoMuonValidator::subsystemname_
protected

Definition at line 60 of file RecoMuonValidator.h.

Referenced by RecoMuonValidator().

◆ tpSelector_

TrackingParticleSelector RecoMuonValidator::tpSelector_
protected

Definition at line 69 of file RecoMuonValidator.h.

Referenced by analyze(), and RecoMuonValidator().

◆ trackType_

reco::MuonTrackType RecoMuonValidator::trackType_
protected

Definition at line 72 of file RecoMuonValidator.h.

Referenced by analyze(), and RecoMuonValidator().

◆ usePFMuon_

bool RecoMuonValidator::usePFMuon_
protected

Definition at line 67 of file RecoMuonValidator.h.

Referenced by analyze(), and RecoMuonValidator().

◆ verbose_

unsigned int RecoMuonValidator::verbose_
protected

Definition at line 42 of file RecoMuonValidator.h.

Referenced by RecoMuonValidator().

◆ wantTightMuon_

bool RecoMuonValidator::wantTightMuon_
private

Definition at line 127 of file RecoMuonValidator.h.

Referenced by analyze(), and RecoMuonValidator().

HLTObjectMonitor_cfi.muonPt
muonPt
Definition: HLTObjectMonitor_cfi.py:82
Vector3DBase
Definition: Vector3DBase.h:8
RecoMuonValidator::MuonME::bookHistos
void bookHistos(DQMStore::IBooker &ibooker, const string &dirName, const HistoDimensions &hDim)
Definition: RecoMuonValidator.cc:82
RecoMuonValidator::HistoDimensions::maxPt
double maxPt
Definition: RecoMuonValidator.h:89
RecoMuonValidator::HistoDimensions::minErrP
double minErrP
Definition: RecoMuonValidator.h:109
RecoMuonValidator::CommonME::hNDeltaInvalidHitsHitPattern_
MEP hNDeltaInvalidHitsHitPattern_
Definition: RecoMuonValidator.cc:542
RecoMuonValidator::HistoDimensions::nBinDxy
unsigned int nBinDxy
Definition: RecoMuonValidator.h:99
RecoMuonValidator::MuonME::hNMuonHits_
MEP hNMuonHits_
Definition: RecoMuonValidator.cc:62
edm::View::begin
const_iterator begin() const
RecoMuonValidator::HistoDimensions::maxDxy
double maxDxy
Definition: RecoMuonValidator.h:100
RecoMuonValidator::MuonME::hSimDz_
MEP hSimDz_
Definition: RecoMuonValidator.cc:32
RecoMuonValidator::HistoDimensions::maxErrPt
double maxErrPt
Definition: RecoMuonValidator.h:110
mps_fire.i
i
Definition: mps_fire.py:355
RecoMuonValidator::HistoDimensions::minP
double minP
Definition: RecoMuonValidator.h:86
RecoMuonValidator::simToken_
edm::EDGetTokenT< TrackingParticleCollection > simToken_
Definition: RecoMuonValidator.h:47
edm::Handle::product
T const * product() const
Definition: Handle.h:70
RecoMuonValidator::CommonME::hNInvalidHitsGTHitPattern_
MEP hNInvalidHitsGTHitPattern_
Definition: RecoMuonValidator.cc:541
reco::MuonToTrackingParticleAssociator
Definition: MuonToTrackingParticleAssociator.h:15
HLTObjectMonitor_cfi.muonEta
muonEta
Definition: HLTObjectMonitor_cfi.py:92
RecoMuonValidator::dbe_
DQMStore * dbe_
Definition: RecoMuonValidator.h:63
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
RecoMuonValidator::MuonME::hSimDxy_
MEP hSimDxy_
Definition: RecoMuonValidator.cc:32
reco::MuonToSimCollection
std::map< edm::RefToBase< reco::Muon >, std::vector< std::pair< TrackingParticleRef, double > >, RefToBaseSort > MuonToSimCollection
Definition: MuonTrackType.h:37
reco::TrackBase::p
double p() const
momentum vector magnitude
Definition: TrackBase.h:605
RecoMuonValidator::MuonME::hNMuon_
MEP hNMuon_
Definition: RecoMuonValidator.cc:35
RecoMuonValidator::MuonME::hSimPt_
MEP hSimPt_
Definition: RecoMuonValidator.cc:32
RecoMuonValidator::HistoDimensions::minDz
double minDz
Definition: RecoMuonValidator.h:103
reco::Vertex::Error
math::Error< dimension >::type Error
covariance error matrix (3x3)
Definition: Vertex.h:44
RecoMuonValidator::HistoDimensions::maxErrDz
double maxErrDz
Definition: RecoMuonValidator.h:115
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
RecoMuonValidator::CommonME::hMuonEta_
MEP hMuonEta_
Definition: RecoMuonValidator.cc:545
RecoMuonValidator::MuonME::hNSimHits_
MEP hNSimHits_
Definition: RecoMuonValidator.cc:59
RecoMuonValidator::commonME_
CommonME * commonME_
Definition: RecoMuonValidator.h:77
edm::LogInfo
Definition: MessageLogger.h:254
RecoMuonValidator::HistoDimensions::nBinP
unsigned int nBinP
Definition: RecoMuonValidator.h:85
reco::OuterTk
Definition: MuonTrackType.h:28
RecoMuonValidator::MuonME::hNMuonHits_vs_Pt_
MEP hNMuonHits_vs_Pt_
Definition: RecoMuonValidator.cc:66
RecoMuonValidator::countMuonHits
virtual int countMuonHits(const reco::Track &track) const
Definition: RecoMuonValidator.cc:1069
RecoMuonValidator::CommonME::hNInvalidHitsOTHitPattern_
MEP hNInvalidHitsOTHitPattern_
Definition: RecoMuonValidator.cc:541
RecoMuonValidator::CommonME::hStaToGlbDiffNMuonHitsPt_
MEP hStaToGlbDiffNMuonHitsPt_
Definition: RecoMuonValidator.cc:538
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
reco::InnerTk
Definition: MuonTrackType.h:28
edm::RefVector< TrackingParticleCollection >
RecoMuonValidator::simLabel_
edm::InputTag simLabel_
Definition: RecoMuonValidator.h:44
RecoMuonValidator::HistoDimensions::minErrDxy
double minErrDxy
Definition: RecoMuonValidator.h:114
RecoMuonValidator::HistoDimensions::nBinPhi
unsigned int nBinPhi
Definition: RecoMuonValidator.h:96
RecoMuonValidator::CommonME::hMuonAllPt_
MEP hMuonAllPt_
Definition: RecoMuonValidator.cc:549
edm::Handle< reco::VertexCollection >
relativeConstraints.error
error
Definition: relativeConstraints.py:53
RecoMuonValidator::MuonME::hNTrackerHits_vs_Eta_
MEP hNTrackerHits_vs_Eta_
Definition: RecoMuonValidator.cc:65
RecoMuonValidator::HistoDimensions::minDxy
double minDxy
Definition: RecoMuonValidator.h:100
RecoMuonValidator::HistoDimensions::maxDz
double maxDz
Definition: RecoMuonValidator.h:103
RecoMuonValidator::selector_
StringCutObjectSelector< reco::Muon > selector_
Definition: RecoMuonValidator.h:126
Muon
Definition: Muon.py:1
RecoMuonValidator::HistoDimensions::minErrPhi
double minErrPhi
Definition: RecoMuonValidator.h:113
edm::Ref< TrackCollection >
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
RecoMuonValidator::trackType_
reco::MuonTrackType trackType_
Definition: RecoMuonValidator.h:72
reco::TrackBase::pt
double pt() const
track transverse momentum
Definition: TrackBase.h:608
DetId
Definition: DetId.h:17
RecoMuonValidator::HistoDimensions::minPt
double minPt
Definition: RecoMuonValidator.h:89
RecoMuonValidator::HistoDimensions::maxErrP
double maxErrP
Definition: RecoMuonValidator.h:109
RecoMuonValidator::HistoDimensions::maxErrEta
double maxErrEta
Definition: RecoMuonValidator.h:112
reco::TrackBase::standAloneMuon
Definition: TrackBase.h:108
RecoMuonValidator::CommonME::hMuonAllP_
MEP hMuonAllP_
Definition: RecoMuonValidator.cc:549
RecoMuonValidator::primvertexToken_
edm::EDGetTokenT< reco::VertexCollection > primvertexToken_
Definition: RecoMuonValidator.h:56
cms::cuda::bs
bs
Definition: HistoContainer.h:127
RecoMuonValidator::CommonME::hStaToGlbDiffNMuonHitsEta_
MEP hStaToGlbDiffNMuonHitsEta_
Definition: RecoMuonValidator.cc:537
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
RecoMuonValidator::HistoDimensions::minErrPt
double minErrPt
Definition: RecoMuonValidator.h:110
RecoMuonValidator::HistoDimensions::nBinEta
unsigned int nBinEta
Definition: RecoMuonValidator.h:93
RecoMuonValidator::HistoDimensions::maxErrQPt
double maxErrQPt
Definition: RecoMuonValidator.h:111
RecoMuonValidator::countTrackerHits
virtual int countTrackerHits(const reco::Track &track) const
Definition: RecoMuonValidator.cc:1084
RecoMuonValidator::HistoDimensions::wPull
double wPull
Definition: RecoMuonValidator.h:106
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
TrackingParticle
Monte Carlo truth information used for tracking validation.
Definition: TrackingParticle.h:29
reco::BeamSpot
Definition: BeamSpot.h:21
RecoMuonValidator::tpSelector_
TrackingParticleSelector tpSelector_
Definition: RecoMuonValidator.h:69
reco::modules::TrackingParticleSelector
SingleObjectSelector< TrackingParticleCollection, ::TrackingParticleSelector > TrackingParticleSelector
Definition: TrackingParticleSelector.cc:17
reco::Track
Definition: Track.h:27
RecoMuonValidator::MuonME::hSimPhi_
MEP hSimPhi_
Definition: RecoMuonValidator.cc:32
reco::SimToMuonCollection
std::map< TrackingParticleRef, std::vector< std::pair< edm::RefToBase< reco::Muon >, double > > > SimToMuonCollection
Definition: MuonTrackType.h:38
RecoMuonValidator::HistoDimensions::nTrks
unsigned int nTrks
Definition: RecoMuonValidator.h:117
RecoMuonValidator::subDir_
std::string subDir_
Definition: RecoMuonValidator.h:59
RecoMuonValidator::HistoDimensions::maxP
double maxP
Definition: RecoMuonValidator.h:86
RecoMuonValidator::HistoDimensions::minErrQPt
double minErrQPt
Definition: RecoMuonValidator.h:111
reco::TrackBase::dz
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:602
RecoMuonValidator::muonME_
MuonME * muonME_
Definition: RecoMuonValidator.h:74
RecoMuonValidator::hDim
HistoDimensions hDim
Definition: RecoMuonValidator.h:123
Point3DBase< float, GlobalTag >
reco::GlobalTk
Definition: MuonTrackType.h:28
RecoMuonValidator::beamspotToken_
edm::EDGetTokenT< reco::BeamSpot > beamspotToken_
Definition: RecoMuonValidator.h:55
dqm::implementation::DQMStore::save
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:760
reco::TrackBase::phi
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:620
RecoMuonValidator::doAbsEta_
bool doAbsEta_
Definition: RecoMuonValidator.h:65
RecoMuonValidator::CommonME::hMuonAllPhi_
MEP hMuonAllPhi_
Definition: RecoMuonValidator.cc:549
RecoMuonValidator::HistoDimensions::minErrEta
double minErrEta
Definition: RecoMuonValidator.h:112
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::View::size
size_type size() const
HLTTauDQMOffline_cfi.Muons
Muons
Definition: HLTTauDQMOffline_cfi.py:57
RecoMuonValidator::CommonME::hMuonP_
MEP hMuonP_
Definition: RecoMuonValidator.cc:545
RecoMuonValidator::MuonME::hSimP_
MEP hSimP_
Definition: RecoMuonValidator.cc:32
RecoMuonValidator::muAssocLabel_
edm::InputTag muAssocLabel_
Definition: RecoMuonValidator.h:50
RecoMuonValidator::HistoDimensions::nBinPull
unsigned int nBinPull
Definition: RecoMuonValidator.h:105
edm::View
Definition: CaloClusterFwd.h:14
RecoMuonValidator::HistoDimensions::nBinErr
unsigned int nBinErr
Definition: RecoMuonValidator.h:108
edm::ParameterSet
Definition: ParameterSet.h:36
DetId::Tracker
Definition: DetId.h:25
RecoMuonValidator::HistoDimensions::usePFMuon
bool usePFMuon
Definition: RecoMuonValidator.h:120
RecoMuonValidator::MuonME::hNSim_
MEP hNSim_
Definition: RecoMuonValidator.cc:35
RecoMuonValidator::CommonME::hNInvalidHitsITHitPattern_
MEP hNInvalidHitsITHitPattern_
Definition: RecoMuonValidator.cc:541
TrackingRecHit::ConstRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
Definition: TrackingRecHit.h:32
RecoMuonValidator::muonLabel_
edm::InputTag muonLabel_
Definition: RecoMuonValidator.h:45
KineDebug3::count
void count()
Definition: KinematicConstrainedVertexUpdatorT.h:21
RecoMuonValidator::outputFileName_
std::string outputFileName_
Definition: RecoMuonValidator.h:58
muon::isTightMuon
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
Definition: MuonSelectors.cc:895
RecoMuonValidator::usePFMuon_
bool usePFMuon_
Definition: RecoMuonValidator.h:67
RecoMuonValidator::HistoDimensions::maxErrDxy
double maxErrDxy
Definition: RecoMuonValidator.h:114
reco::TrackBase::eta
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:623
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
RecoMuonValidator::CommonME::hMuonTrackPt_
MEP hMuonTrackPt_
Definition: RecoMuonValidator.cc:547
HLTObjectMonitor_cfi.muonPhi
muonPhi
Definition: HLTObjectMonitor_cfi.py:102
edm::Service
Definition: Service.h:30
RecoMuonValidator::verbose_
unsigned int verbose_
Definition: RecoMuonValidator.h:42
RecoMuonValidator::CommonME::hStaToGlbDiffNMuonHits_
MEP hStaToGlbDiffNMuonHits_
Definition: RecoMuonValidator.cc:536
RecoMuonValidator::CommonME::hTrkToGlbDiffNTrackerHitsPt_
MEP hTrkToGlbDiffNTrackerHitsPt_
Definition: RecoMuonValidator.cc:538
RecoMuonValidator::doAssoc_
bool doAssoc_
Definition: RecoMuonValidator.h:66
RecoMuonValidator::CommonME::hMuonTrackPhi_
MEP hMuonTrackPhi_
Definition: RecoMuonValidator.cc:547
edm::RefVector::push_back
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:67
edm::RefToBaseVector
Definition: EDProductfwd.h:29
RecoMuonValidator::HistoDimensions::maxErrPhi
double maxErrPhi
Definition: RecoMuonValidator.h:113
RecoMuonValidator::MuonME::hNTrackerHits_
MEP hNTrackerHits_
Definition: RecoMuonValidator.cc:62
RecoMuonValidator::CommonME::hMuonPt_
MEP hMuonPt_
Definition: RecoMuonValidator.cc:545
PbPb_ZMuSkimMuonDPG_cff.trackType
trackType
Definition: PbPb_ZMuSkimMuonDPG_cff.py:36
RecoMuonValidator::HistoDimensions::nAssoc
unsigned int nAssoc
Definition: RecoMuonValidator.h:117
RecoMuonValidator::MuonME::fill
void fill(const TrackingParticle *simRef, const Muon *muonRef)
Definition: RecoMuonValidator.cc:379
RecoMuonValidator::subsystemname_
std::string subsystemname_
Definition: RecoMuonValidator.h:60
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
RecoMuonValidator::HistoDimensions::nBinPt
unsigned int nBinPt
Definition: RecoMuonValidator.h:88
Mu
Definition: L1GtObject.h:29
reco::Vertex::Point
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
RecoMuonValidator::HistoDimensions::nBinDz
unsigned int nBinDz
Definition: RecoMuonValidator.h:102
RecoMuonValidator::CommonME::hMuonTrackDxy_
MEP hMuonTrackDxy_
Definition: RecoMuonValidator.cc:547
TrackingParticle::p
double p() const
Magnitude of momentum vector. Note this is taken from the first SimTrack only.
Definition: TrackingParticle.h:112
RecoMuonValidator::muAssocToken_
edm::EDGetTokenT< reco::MuonToTrackingParticleAssociator > muAssocToken_
Definition: RecoMuonValidator.h:51
RecoMuonValidator::beamspotLabel_
edm::InputTag beamspotLabel_
Definition: RecoMuonValidator.h:53
RecoMuonValidator::CommonME::hMuonPhi_
MEP hMuonPhi_
Definition: RecoMuonValidator.cc:545
RecoMuonValidator::CommonME::hMuonTrackEta_
MEP hMuonTrackEta_
Definition: RecoMuonValidator.cc:547
RecoMuonValidator::HistoDimensions::minErrDz
double minErrDz
Definition: RecoMuonValidator.h:115
reco::MuonToTrackingParticleAssociator::associateMuons
void associateMuons(MuonToSimCollection &recoToSim, SimToMuonCollection &simToReco, const edm::RefToBaseVector< reco::Muon > &muons, MuonTrackType type, const edm::RefVector< TrackingParticleCollection > &tpColl) const
Definition: MuonToTrackingParticleAssociator.h:25
Exception
Definition: hltDiff.cc:246
RecoMuonValidator::CommonME::hTrkToGlbDiffNTrackerHitsEta_
MEP hTrkToGlbDiffNTrackerHitsEta_
Definition: RecoMuonValidator.cc:537
RecoMuonValidator::CommonME::hMuonTrackP_
MEP hMuonTrackP_
Definition: RecoMuonValidator.cc:547
TrackingParticleCollection
std::vector< TrackingParticle > TrackingParticleCollection
Definition: TrackingParticleFwd.h:8
RecoMuonValidator::MuonME::hNMuonHits_vs_Eta_
MEP hNMuonHits_vs_Eta_
Definition: RecoMuonValidator.cc:66
RecoMuonValidator::HistoDimensions::minEta
double minEta
Definition: RecoMuonValidator.h:94
RecoMuonValidator::MuonME::hSimEta_
MEP hSimEta_
Definition: RecoMuonValidator.cc:32
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
RecoMuonValidator::HistoDimensions::minPhi
double minPhi
Definition: RecoMuonValidator.h:97
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
RecoMuonValidator::CommonME::hMuonAllEta_
MEP hMuonAllEta_
Definition: RecoMuonValidator.cc:549
mps_fire.result
result
Definition: mps_fire.py:303
DetId::Muon
Definition: DetId.h:26
edm::View::end
const_iterator end() const
RecoMuonValidator::HistoDimensions::maxEta
double maxEta
Definition: RecoMuonValidator.h:94
TrackingParticleRef
edm::Ref< TrackingParticleCollection > TrackingParticleRef
Definition: TrackingParticleFwd.h:10
RecoMuonValidator::MuonME::hNSimToReco_
MEP hNSimToReco_
Definition: RecoMuonValidator.cc:60
RecoMuonValidator::primvertexLabel_
edm::InputTag primvertexLabel_
Definition: RecoMuonValidator.h:54
RecoMuonValidator::CommonME::hMuonTrackDz_
MEP hMuonTrackDz_
Definition: RecoMuonValidator.cc:547
RecoMuonValidator::HistoDimensions::nDof
unsigned int nDof
Definition: RecoMuonValidator.h:118
RecoMuonValidator::HistoDimensions::maxPhi
double maxPhi
Definition: RecoMuonValidator.h:97
RecoMuonValidator::HistoDimensions::doAbsEta
bool doAbsEta
Definition: RecoMuonValidator.h:91
RecoMuonValidator::MuonME::hNTrksPt_
MEP hNTrksPt_
Definition: RecoMuonValidator.cc:38
reco::TrackBase::dxy
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:593
reco::Segments
Definition: MuonTrackType.h:28
RecoMuonValidator::wantTightMuon_
bool wantTightMuon_
Definition: RecoMuonValidator.h:127
RecoMuonValidator::pset
edm::ParameterSet pset
Definition: RecoMuonValidator.h:61
RecoMuonValidator::CommonME::hTrkToGlbDiffNTrackerHits_
MEP hTrkToGlbDiffNTrackerHits_
Definition: RecoMuonValidator.cc:536
edm::InputTag
Definition: InputTag.h:15
reco::Vertex
Definition: Vertex.h:35
RecoMuonValidator::MuonME::hNTrksEta_
MEP hNTrksEta_
Definition: RecoMuonValidator.cc:38
hit
Definition: SiStripHitEffFromCalibTree.cc:88
RecoMuonValidator::muonToken_
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
Definition: RecoMuonValidator.h:48
RecoMuonValidator::MuonME::hNTrackerHits_vs_Pt_
MEP hNTrackerHits_vs_Pt_
Definition: RecoMuonValidator.cc:65