Definition at line 51 of file MuonMvaEstimator.cc.
References reco::PFCandidate::bestTrack(), pat::Muon::BS2D, reco::LeafCandidate::charge(), pat::PFIsolation::chargedHadronIso(), reco::JetCorrector::correction(), pat::Muon::dB(), deltaR(), runTauDisplay::dr, dRmax_, PVValHelper::dz, pat::Muon::edB(), reco::LeafCandidate::eta(), eta_, Exception, reco::TrackBase::highPurity, initialized_, metsig::jet, jetBTagCSV_, jetNDauCharged_, jetPtRatio_, jetPtRel_, cmsBatch::log, log_abs_dxyBS_, log_abs_dzPV_, pat::Lepton< LeptonType >::miniPFIsolation(), miniRelIsoCharged_, miniRelIsoNeutral_, pat::Muon::muonBestTrack(), mva_, pat::PFIsolation::neutralHadronIso(), reco::LeafCandidate::p4(), reco::Vertex::position(), reco::LeafCandidate::pt(), pt_, ptRel(), pat::Muon::PV3D, pat::Muon::segmentCompatibility(), segmentCompatibility_, sip_, and tmvaReader_.
Referenced by pat::PATMuonProducer::produce().
58 throw cms::Exception(
"FatalError") <<
"MuonMVA is not initialized";
69 sip_ = edB3D>0?fabs(dB3D/edB3D):0.0;
75 double jecL1L2L3Res = 1.;
83 for (
const auto& tagI: bTags){
86 if(dr > minDr)
continue;
92 if (correctorL1 && correctorL1L2L3Res){
93 jecL1L2L3Res = correctorL1L2L3Res->
correction(*(tagI.first));
94 jecL1 = correctorL1->
correction(*(tagI.first));
100 for (
auto jet: tagI.first->getJetConstituentsQuick()){
102 if (pfcand==
nullptr)
throw cms::Exception(
"ConfigurationError") <<
"Cannot get jet constituents";
103 if (pfcand->
charge()==0)
continue;
105 if (!bestTrackPtr)
continue;
107 if (bestTrackPtr->pt()<1.)
continue;
108 if (bestTrackPtr->hitPattern().numberOfValidHits()<8)
continue;
109 if (bestTrackPtr->hitPattern().numberOfValidPixelHits()<2)
continue;
110 if (bestTrackPtr->normalizedChi2()>=5)
continue;
112 if (std::fabs(bestTrackPtr->dxy(vertex.
position())) > 0.2)
continue;
113 if (std::fabs(bestTrackPtr->dz(vertex.
position())) > 17)
continue;
118 if ((jetP4-muP4).Rho()<0.0001){
123 jetP4 *= jecL1L2L3Res;
int charge() const final
electric charge
double correction(const LorentzVector &fJet) const
get correction using Jet information only
const Point & position() const
position
float segmentCompatibility_
double deltaR(double eta1, double eta2, double phi1, double phi2)
float ptRel(const reco::Candidate::LorentzVector &muP4, const reco::Candidate::LorentzVector &jetP4, bool subtractMuon=true)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Particle reconstructed by the particle flow algorithm.
const reco::Track * bestTrack() const override