53 if ( thePFTauRef->hasMuonReference() ) {
55 MuonRef muonref = thePFTauRef->leadPFChargedHadrCand()->muonRef();
60 double calo= muonref->caloCompatibility();
61 double border = calo *
a + seg *
b +
c;
62 if ( border > 0 ) decision =
false;
66 unsigned int muType = 0;
67 if ( muonref->isGlobalMuon() ) muType = 1;
68 else if ( muonref->isCaloMuon() ) muType = 2;
69 else if ( muonref->isTrackerMuon() ) muType = 3;
70 double muonEnergyFraction = thePFTauRef->pfTauTagInfoRef()->pfjetRef()->chargedMuEnergyFraction();
71 bool eta_veto =
false;
72 bool phi_veto =
false;
73 if ( fabs(muonref->eta()) > 2.3 || (fabs(muonref->eta()) > 1.4 && fabs(muonref->eta()) < 1.6)) eta_veto =
true;
74 if ( muonref->phi() < 0.1 && muonref->phi() > -0.1) phi_veto =
true;
75 if ( muType != 1 || muonref ->numberOfMatches() > 0 || eta_veto || phi_veto || muonEnergyFraction > 0.9 ) decision =
false;
83 <<
" Invalid Discriminator option = " <<
discriminatorOption_ <<
" --> please check cfi file !!\n";
89 if ( thePFTauRef->leadPFChargedHadrCand().isNonnull() ) {
90 double muonCaloEn = thePFTauRef->leadPFChargedHadrCand()->hcalEnergy() + thePFTauRef->leadPFChargedHadrCand()->ecalEnergy();
91 if ( thePFTauRef->decayMode() == 0 && muonCaloEn < (
hop_*thePFTauRef->leadPFChargedHadrCand()->p()) ) decision =
false;
95 return (decision ? 1. : 0.);
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
std::string discriminatorOption_