CMS 3D CMS Logo

Functions
MuonIdProducer.cc File Reference
#include "RecoMuon/MuonIdentification/plugins/MuonIdProducer.h"
#include "DataFormats/Math/interface/deltaPhi.h"
#include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
#include "DataFormats/MuonDetId/interface/DTChamberId.h"
#include "DataFormats/MuonDetId/interface/CSCDetId.h"
#include "DataFormats/MuonDetId/interface/RPCDetId.h"
#include "DataFormats/MuonDetId/interface/GEMDetId.h"
#include "DataFormats/MuonDetId/interface/ME0DetId.h"
#include "DataFormats/MuonReco/interface/MuonCocktails.h"
#include "DataFormats/MuonReco/interface/MuonTime.h"
#include "DataFormats/MuonReco/interface/MuonTimeExtra.h"
#include "DataFormats/MuonReco/interface/MuonTimeExtraMap.h"
#include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
#include "DataFormats/RecoCandidate/interface/IsoDepositFwd.h"
#include "PhysicsTools/IsolationAlgos/interface/IsoDepositExtractorFactory.h"
#include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
#include "RecoMuon/MuonIdentification/interface/MuonMesh.h"
#include "RecoMuon/MuonIdentification/interface/MuonKinkFinder.h"

Go to the source code of this file.

Functions

bool validateGlobalMuonPair (const reco::MuonTrackLinks &goodMuon, const reco::MuonTrackLinks &badMuon)
 

Function Documentation

◆ validateGlobalMuonPair()

bool validateGlobalMuonPair ( const reco::MuonTrackLinks goodMuon,
const reco::MuonTrackLinks badMuon 
)

Definition at line 421 of file MuonIdProducer.cc.

421  {
422  const int nHitsGood = goodMuon.globalTrack()->hitPattern().numberOfValidMuonHits();
423  const int nHitsBad = badMuon.globalTrack()->hitPattern().numberOfValidMuonHits();
424  if (std::min(nHitsGood, nHitsBad) > 10) {
425  const double chi2Good = goodMuon.globalTrack()->normalizedChi2();
426  const double chi2Bad = badMuon.globalTrack()->normalizedChi2();
427  return (chi2Good <= chi2Bad);
428  }
429 
430  return (nHitsGood >= nHitsBad);
431 }

References reco::MuonTrackLinks::globalTrack(), and min().

Referenced by MuonIdProducer::produce().

min
T min(T a, T b)
Definition: MathUtil.h:58