CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
MuonIdProducer.cc File Reference
#include <memory>
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DataFormats/Common/interface/Handle.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/MuonReco/interface/Muon.h"
#include "DataFormats/MuonReco/interface/CaloMuon.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 "TrackingTools/TrackAssociator/interface/TrackDetectorAssociator.h"
#include "Utilities/Timing/interface/TimerStack.h"
#include <boost/regex.hpp>
#include "RecoMuon/MuonIdentification/plugins/MuonIdProducer.h"
#include "RecoMuon/MuonIdentification/interface/MuonIdTruthInfo.h"
#include "RecoMuon/MuonIdentification/interface/MuonArbitrationMethods.h"
#include "RecoMuon/MuonIdentification/interface/MuonMesh.h"
#include "PhysicsTools/IsolationAlgos/interface/IsoDepositExtractorFactory.h"
#include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
#include <algorithm>
#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/RPCRecHit/interface/RPCRecHit.h"
#include "DataFormats/RPCRecHit/interface/RPCRecHitCollection.h"
#include "DataFormats/MuonReco/interface/MuonRPCHitMatch.h"
#include "DataFormats/Common/interface/ValueMap.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

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

Definition at line 425 of file MuonIdProducer.cc.

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

Referenced by MuonIdProducer::produce().

427 {
428  if ( std::min(goodMuon.globalTrack()->hitPattern().numberOfValidMuonHits(),
429  badMuon.globalTrack()->hitPattern().numberOfValidMuonHits()) > 10 ){
430  if ( goodMuon.globalTrack()->normalizedChi2() >
431  badMuon.globalTrack()->normalizedChi2() )
432  return false;
433  else
434  return true;
435  }
436  if ( goodMuon.globalTrack()->hitPattern().numberOfValidMuonHits() <
437  badMuon.globalTrack()->hitPattern().numberOfValidMuonHits() ) return false;
438  return true;
439 }
#define min(a, b)
Definition: mlp_lapack.h:161