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());
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
virtual double pt() const
transverse momentum
StringCutObjectSelector< pat::Muon > passthrough_
Always-accept cut.
bool isSameMuon(const pat::Muon &mu1, const pat::Muon &mu2) const
Methods.
virtual int charge() const
electric charge
double deltaR2(const T1 &t1, const T2 &t2)
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
Analysis-level muon class.
~CMGMuonCleanerBySegmentsAlgo()