10 unsigned int nsrc = src.size();
11 std::vector<bool> good(nsrc,
true);
12 for (
unsigned int i = 0;
i < nsrc; ++
i) {
15 if (!good[
i])
continue;
17 for (
unsigned int j = i+1; j < nsrc; ++j) {
22 if (nSegments2 == 0 || nSegments1 == 0)
continue;
34 for (
unsigned int i = 0;
i < nsrc; ++
i) {
44 return (& mu1 == & mu2) ||
46 (mu1.reco::Muon::innerTrack().isNonnull() ?
47 mu1.reco::Muon::innerTrack() == mu2.reco::Muon::innerTrack() :
48 mu1.reco::Muon::outerTrack() == mu2.reco::Muon::outerTrack());
55 if (mu1PF != mu2PF)
return mu1PF;
62 return (nm1 != nm2 ? nm1 > nm2 : mu1.
pt() > mu2.
pt());
virtual double pt() const final
transverse momentum
std::vector< bool > clean(const std::vector< pat::Muon > &muons) const
Return a vector of boolean marking the muons to be considered clean.
double sharedFraction_
Fraction of shared segments.
reco::TrackRef track() const
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
bool isBetterMuon(const pat::Muon &mu1, bool mu1PF, const pat::Muon &mu2, bool mu2PF) const
bool isGlobalMuon() const
StringCutObjectSelector< pat::Muon > passthrough_
Always-accept cut.
virtual int charge() const final
electric charge
bool isSameMuon(const pat::Muon &mu1, const pat::Muon &mu2) const
Methods.
TAKEN FROM http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/ElectroWeakAnalysis/Utilities/src/PdfWeig...
const edm::Ptr< reco::Candidate > & originalObjectRef() const
reference to original object. Returns a null reference if not available
bool isNull() const
Checks for null.
int sharedSegments(const reco::Muon &muon1, const reco::Muon &muon2, unsigned int segmentArbitrationMask=reco::MuonSegmentMatch::BestInChamberByDR)
StringCutObjectSelector< pat::Muon > preselection_
Preselection cut.
int numberOfMatches(ArbitrationType type=SegmentAndTrackArbitration) const
get number of chambers with matched segments
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
Analysis-level muon class.
~CMGMuonCleanerBySegmentsAlgo()