CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
PileupJetIdAlgo Class Reference

#include <PileupJetIdAlgo.h>

Classes

class  AlgoGBRForestsAndConstants
 

Public Types

typedef std::map< std::string, std::pair< float *, float > > variables_list_t
 
enum  version_t { USER = -1, PHILv0 = 0 }
 

Public Member Functions

int computeCutIDflag (float betaStarClassic, float dR2Mean, float nvtx, float jetPt, float jetEta)
 
int computeIDflag (float mva, float jetPt, float jetEta)
 
int computeIDflag (float mva, int ptId, int etaId)
 
PileupJetIdentifier computeIdVariables (const reco::Jet *jet, float jec, const reco::Vertex *, const reco::VertexCollection &, double rho, bool usePuppi)
 
PileupJetIdentifier computeMva ()
 
std::string dumpVariables () const
 
std::pair< int, int > getJetIdKey (float jetPt, float jetEta)
 
float getMVAval (const std::vector< std::string > &, const std::unique_ptr< const GBRForest > &)
 
const variables_list_tgetVariables () const
 const PileupJetIdentifier::variables_list_t & getVariables() const { return variables_; }; More...
 
const std::string method () const
 
 PileupJetIdAlgo (AlgoGBRForestsAndConstants const *cache)
 
void set (const PileupJetIdentifier &)
 
 ~PileupJetIdAlgo ()
 

Protected Member Functions

void initVariables ()
 
void resetVariables ()
 
void runMva ()
 

Protected Attributes

AlgoGBRForestsAndConstants const * cache_
 
PileupJetIdentifier internalId_
 
variables_list_t variables_
 

Detailed Description

Definition at line 22 of file PileupJetIdAlgo.h.

Member Typedef Documentation

◆ variables_list_t

typedef std::map<std::string, std::pair<float*, float> > PileupJetIdAlgo::variables_list_t

Definition at line 41 of file PileupJetIdAlgo.h.

Member Enumeration Documentation

◆ version_t

Enumerator
USER 
PHILv0 

Definition at line 24 of file PileupJetIdAlgo.h.

24 { USER = -1, PHILv0 = 0 };

Constructor & Destructor Documentation

◆ PileupJetIdAlgo()

PileupJetIdAlgo::PileupJetIdAlgo ( AlgoGBRForestsAndConstants const *  cache)

Definition at line 132 of file PileupJetIdAlgo.cc.

132 : cache_(cache) { initVariables(); }

References initVariables().

◆ ~PileupJetIdAlgo()

PileupJetIdAlgo::~PileupJetIdAlgo ( )

Definition at line 135 of file PileupJetIdAlgo.cc.

135 {}

Member Function Documentation

◆ computeCutIDflag()

int PileupJetIdAlgo::computeCutIDflag ( float  betaStarClassic,
float  dR2Mean,
float  nvtx,
float  jetPt,
float  jetEta 
)

Definition at line 218 of file PileupJetIdAlgo.cc.

218  {
219  std::pair<int, int> jetIdKey = getJetIdKey(jetPt, jetEta);
220  float betaStarModified = betaStarClassic / log(nvtx - 0.64);
221  int idFlag(0);
222  if (betaStarModified < cache_->betaStarCut()[PileupJetIdentifier::kTight][jetIdKey.first][jetIdKey.second] &&
223  dR2Mean < cache_->rmsCut()[PileupJetIdentifier::kTight][jetIdKey.first][jetIdKey.second])
224  idFlag += 1 << PileupJetIdentifier::kTight;
225 
226  if (betaStarModified < cache_->betaStarCut()[PileupJetIdentifier::kMedium][jetIdKey.first][jetIdKey.second] &&
227  dR2Mean < cache_->rmsCut()[PileupJetIdentifier::kMedium][jetIdKey.first][jetIdKey.second])
228  idFlag += 1 << PileupJetIdentifier::kMedium;
229 
230  if (betaStarModified < cache_->betaStarCut()[PileupJetIdentifier::kLoose][jetIdKey.first][jetIdKey.second] &&
231  dR2Mean < cache_->rmsCut()[PileupJetIdentifier::kLoose][jetIdKey.first][jetIdKey.second])
232  idFlag += 1 << PileupJetIdentifier::kLoose;
233  return idFlag;
234 }

References getJetIdKey(), reco::btau::jetEta, reco::btau::jetPt, PileupJetIdentifier::kLoose, PileupJetIdentifier::kMedium, PileupJetIdentifier::kTight, and dqm-mbProfile::log.

Referenced by runMva().

◆ computeIDflag() [1/2]

int PileupJetIdAlgo::computeIDflag ( float  mva,
float  jetPt,
float  jetEta 
)

Definition at line 236 of file PileupJetIdAlgo.cc.

236  {
237  std::pair<int, int> jetIdKey = getJetIdKey(jetPt, jetEta);
238  return computeIDflag(mva, jetIdKey.first, jetIdKey.second);
239 }

References getJetIdKey(), reco::btau::jetEta, reco::btau::jetPt, and beam_dqm_sourceclient-live_cfg::mva.

Referenced by runMva().

◆ computeIDflag() [2/2]

int PileupJetIdAlgo::computeIDflag ( float  mva,
int  ptId,
int  etaId 
)

Definition at line 242 of file PileupJetIdAlgo.cc.

242  {
243  int idFlag(0);
244  if (mva > cache_->mvacut()[PileupJetIdentifier::kTight][ptId][etaId])
245  idFlag += 1 << PileupJetIdentifier::kTight;
246  if (mva > cache_->mvacut()[PileupJetIdentifier::kMedium][ptId][etaId])
247  idFlag += 1 << PileupJetIdentifier::kMedium;
248  if (mva > cache_->mvacut()[PileupJetIdentifier::kLoose][ptId][etaId])
249  idFlag += 1 << PileupJetIdentifier::kLoose;
250  return idFlag;
251 }

References cache_, PileupJetIdentifier::kLoose, PileupJetIdentifier::kMedium, PileupJetIdentifier::kTight, beam_dqm_sourceclient-live_cfg::mva, and PileupJetIdAlgo::AlgoGBRForestsAndConstants::mvacut().

◆ computeIdVariables()

PileupJetIdentifier PileupJetIdAlgo::computeIdVariables ( const reco::Jet jet,
float  jec,
const reco::Vertex vtx,
const reco::VertexCollection allvtx,
double  rho,
bool  usePuppi 
)

Definition at line 260 of file PileupJetIdAlgo.cc.

265  {
266  // initialize all variables to 0
267  resetVariables();
268 
269  // loop over constituents, accumulate sums and find leading candidates
270  const pat::Jet* patjet = dynamic_cast<const pat::Jet*>(jet);
271  const reco::PFJet* pfjet = dynamic_cast<const reco::PFJet*>(jet);
272  assert(patjet != nullptr || pfjet != nullptr);
273  if (patjet != nullptr && jec == 0.) { // if this is a pat jet and no jec has been passed take the jec from the object
274  jec = patjet->pt() / patjet->correctedJet(0).pt();
275  }
276  if (jec <= 0.) {
277  jec = 1.;
278  }
279 
280  const reco::Candidate *lLead = nullptr, *lSecond = nullptr, *lLeadNeut = nullptr, *lLeadEm = nullptr,
281  *lLeadCh = nullptr, *lTrail = nullptr;
282  std::vector<float> frac, fracCh, fracEm, fracNeut;
283  float cones[] = {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7};
284  size_t ncones = sizeof(cones) / sizeof(float);
285  float* coneFracs[] = {&internalId_.frac01_,
292  float* coneEmFracs[] = {&internalId_.emFrac01_,
299  float* coneNeutFracs[] = {&internalId_.neutFrac01_,
306  float* coneChFracs[] = {&internalId_.chFrac01_,
313  TMatrixDSym covMatrix(2);
314  covMatrix = 0.;
315  float jetPt = jet->pt() / jec; // use uncorrected pt for shape variables
316  float sumPt = 0., sumPt2 = 0., sumTkPt = 0., sumPtCh = 0, sumPtNe = 0;
317  float multNeut = 0.0;
318  setPtEtaPhi(
319  *jet, internalId_.jetPt_, internalId_.jetEta_, internalId_.jetPhi_); // use corrected pt for jet kinematics
320  internalId_.jetM_ = jet->mass();
321  internalId_.nvtx_ = allvtx.size();
322  internalId_.rho_ = rho;
323 
324  float dRmin(1000);
325 
326  for (unsigned i = 0; i < jet->numberOfSourceCandidatePtrs(); ++i) {
327  reco::CandidatePtr pfJetConstituent = jet->sourceCandidatePtr(i);
328 
329  const reco::Candidate* icand = pfJetConstituent.get();
330  const pat::PackedCandidate* lPack = dynamic_cast<const pat::PackedCandidate*>(icand);
331  const reco::PFCandidate* lPF = dynamic_cast<const reco::PFCandidate*>(icand);
332  bool isPacked = true;
333  if (lPack == nullptr) {
334  isPacked = false;
335  }
336  float candPuppiWeight = 1.0;
337  if (usePuppi && isPacked)
338  candPuppiWeight = lPack->puppiWeight();
339  float candPt = (icand->pt()) * candPuppiWeight;
340  float candPtFrac = candPt / jetPt;
341  float candDr = reco::deltaR(*icand, *jet);
342  float candDeta = icand->eta() - jet->eta();
343  float candDphi = reco::deltaPhi(*icand, *jet);
344  float candPtDr = candPt * candDr;
345  size_t icone = std::lower_bound(&cones[0], &cones[ncones], candDr) - &cones[0];
346 
347  if (candDr < dRmin)
348  dRmin = candDr;
349 
350  // // all particles
351  if (lLead == nullptr || candPt > lLead->pt()) {
352  lSecond = lLead;
353  lLead = icand;
354  } else if ((lSecond == nullptr || candPt > lSecond->pt()) && (candPt < lLead->pt())) {
355  lSecond = icand;
356  }
357 
358  // // average shapes
359  internalId_.dRMean_ += candPtDr;
360  internalId_.dR2Mean_ += candPtDr * candPtDr;
361  covMatrix(0, 0) += candPt * candPt * candDeta * candDeta;
362  covMatrix(0, 1) += candPt * candPt * candDeta * candDphi;
363  covMatrix(1, 1) += candPt * candPt * candDphi * candDphi;
364  internalId_.ptD_ += candPt * candPt;
365  sumPt += candPt;
366  sumPt2 += candPt * candPt;
367 
368  // single most energetic candiates and jet shape profiles
369  frac.push_back(candPtFrac);
370 
371  if (icone < ncones) {
372  *coneFracs[icone] += candPt;
373  }
374 
375  // neutrals
376  if (abs(icand->pdgId()) == 130) {
377  if (lLeadNeut == nullptr || candPt > lLeadNeut->pt()) {
378  lLeadNeut = icand;
379  }
380  internalId_.dRMeanNeut_ += candPtDr;
381  fracNeut.push_back(candPtFrac);
382  if (icone < ncones) {
383  *coneNeutFracs[icone] += candPt;
384  }
385  internalId_.ptDNe_ += candPt * candPt;
386  sumPtNe += candPt;
387  multNeut += candPuppiWeight;
388  }
389  // EM candidated
390  if (icand->pdgId() == 22) {
391  if (lLeadEm == nullptr || candPt > lLeadEm->pt()) {
392  lLeadEm = icand;
393  }
394  internalId_.dRMeanEm_ += candPtDr;
395  fracEm.push_back(candPtFrac);
396  if (icone < ncones) {
397  *coneEmFracs[icone] += candPt;
398  }
399  internalId_.ptDNe_ += candPt * candPt;
400  sumPtNe += candPt;
401  multNeut += candPuppiWeight;
402  }
403  if ((abs(icand->pdgId()) == 1) || (abs(icand->pdgId()) == 2))
404  multNeut += candPuppiWeight;
405 
406  // Charged particles
407  if (icand->charge() != 0) {
408  if (lLeadCh == nullptr || candPt > lLeadCh->pt()) {
409  lLeadCh = icand;
410 
411  const reco::Track* pfTrk = icand->bestTrack();
412  if (lPF && std::abs(icand->pdgId()) == 13 && pfTrk == nullptr) {
413  reco::MuonRef lmuRef = lPF->muonRef();
414  if (lmuRef.isNonnull()) {
415  const reco::Muon& lmu = *lmuRef.get();
416  pfTrk = lmu.bestTrack();
417  edm::LogWarning("BadMuon")
418  << "Found a PFCandidate muon without a trackRef: falling back to Muon::bestTrack ";
419  }
420  }
421  if (pfTrk == nullptr) { //protection against empty pointers for the miniAOD case
422  //To handle the electron case
423  if (isPacked) {
424  internalId_.d0_ = std::abs(lPack->dxy(vtx->position()));
425  internalId_.dZ_ = std::abs(lPack->dz(vtx->position()));
426  } else if (lPF != nullptr) {
427  pfTrk = (lPF->trackRef().get() == nullptr) ? lPF->gsfTrackRef().get() : lPF->trackRef().get();
428  internalId_.d0_ = std::abs(pfTrk->dxy(vtx->position()));
429  internalId_.dZ_ = std::abs(pfTrk->dz(vtx->position()));
430  }
431  } else {
432  internalId_.d0_ = std::abs(pfTrk->dxy(vtx->position()));
433  internalId_.dZ_ = std::abs(pfTrk->dz(vtx->position()));
434  }
435  }
436  internalId_.dRMeanCh_ += candPtDr;
437  internalId_.ptDCh_ += candPt * candPt;
438  fracCh.push_back(candPtFrac);
439  if (icone < ncones) {
440  *coneChFracs[icone] += candPt;
441  }
442  sumPtCh += candPt;
443  }
444  // // beta and betastar
445  if (icand->charge() != 0) {
446  if (!isPacked) {
447  if (lPF->trackRef().isNonnull()) {
448  float tkpt = candPt;
449  sumTkPt += tkpt;
450  // 'classic' beta definition based on track-vertex association
451  bool inVtx0 = vtx->trackWeight(lPF->trackRef()) > 0;
452 
453  bool inAnyOther = false;
454  // alternative beta definition based on track-vertex distance of closest approach
455  double dZ0 = std::abs(lPF->trackRef()->dz(vtx->position()));
456  double dZ = dZ0;
457  for (reco::VertexCollection::const_iterator vi = allvtx.begin(); vi != allvtx.end(); ++vi) {
458  const reco::Vertex& iv = *vi;
459  if (iv.isFake() || iv.ndof() < 4) {
460  continue;
461  }
462  // the primary vertex may have been copied by the user: check identity by position
463  bool isVtx0 = (iv.position() - vtx->position()).r() < 0.02;
464  // 'classic' beta definition: check if the track is associated with
465  // any vertex other than the primary one
466  if (!isVtx0 && !inAnyOther) {
467  inAnyOther = vtx->trackWeight(lPF->trackRef()) <= 0;
468  }
469  // alternative beta: find closest vertex to the track
470  dZ = std::min(dZ, std::abs(lPF->trackRef()->dz(iv.position())));
471  }
472  // classic beta/betaStar
473  if (inVtx0 && !inAnyOther) {
474  internalId_.betaClassic_ += tkpt;
475  } else if (!inVtx0 && inAnyOther) {
477  }
478  // alternative beta/betaStar
479  if (dZ0 < 0.2) {
480  internalId_.beta_ += tkpt;
481  } else if (dZ < 0.2) {
482  internalId_.betaStar_ += tkpt;
483  }
484  }
485  } else {
486  float tkpt = candPt;
487  sumTkPt += tkpt;
488  bool inVtx0 = false;
489  bool inVtxOther = false;
490  double dZ0 = 9999.;
491  double dZ_tmp = 9999.;
492  for (unsigned vtx_i = 0; vtx_i < allvtx.size(); vtx_i++) {
493  auto iv = allvtx[vtx_i];
494 
495  if (iv.isFake())
496  continue;
497 
498  // Match to vertex in case of copy as above
499  bool isVtx0 = (iv.position() - vtx->position()).r() < 0.02;
500 
501  if (isVtx0) {
502  if (lPack->fromPV(vtx_i) == pat::PackedCandidate::PVUsedInFit)
503  inVtx0 = true;
504  if (lPack->fromPV(vtx_i) == 0)
505  inVtxOther = true;
506  dZ0 = lPack->dz(iv.position());
507  }
508 
509  if (fabs(lPack->dz(iv.position())) < fabs(dZ_tmp)) {
510  dZ_tmp = lPack->dz(iv.position());
511  }
512  }
513  if (inVtx0) {
514  internalId_.betaClassic_ += tkpt;
515  } else if (inVtxOther) {
517  }
518  if (fabs(dZ0) < 0.2) {
519  internalId_.beta_ += tkpt;
520  } else if (fabs(dZ_tmp) < 0.2) {
521  internalId_.betaStar_ += tkpt;
522  }
523  }
524  }
525 
526  // trailing candidate
527  if (lTrail == nullptr || candPt < lTrail->pt()) {
528  lTrail = icand;
529  }
530  }
531 
532  // // Finalize all variables
533  assert(!(lLead == nullptr));
534 
535  if (lSecond == nullptr) {
536  lSecond = lTrail;
537  }
538  if (lLeadNeut == nullptr) {
539  lLeadNeut = lTrail;
540  }
541  if (lLeadEm == nullptr) {
542  lLeadEm = lTrail;
543  }
544  if (lLeadCh == nullptr) {
545  lLeadCh = lTrail;
546  }
547 
548  if (patjet != nullptr) { // to enable running on MiniAOD slimmedJets
551  internalId_.chgEMfrac_ = patjet->chargedEmEnergy() / jet->energy();
552  internalId_.neuEMfrac_ = patjet->neutralEmEnergy() / jet->energy();
553  internalId_.chgHadrfrac_ = patjet->chargedHadronEnergy() / jet->energy();
554  internalId_.neuHadrfrac_ = patjet->neutralHadronEnergy() / jet->energy();
555  if (usePuppi)
556  internalId_.nNeutrals_ = multNeut;
557  } else {
560  internalId_.chgEMfrac_ = pfjet->chargedEmEnergy() / jet->energy();
561  internalId_.neuEMfrac_ = pfjet->neutralEmEnergy() / jet->energy();
562  internalId_.chgHadrfrac_ = pfjet->chargedHadronEnergy() / jet->energy();
563  internalId_.neuHadrfrac_ = pfjet->neutralHadronEnergy() / jet->energy();
564  }
565  internalId_.nParticles_ = jet->nConstituents();
566 
568  float sumW2(0.0);
569  float sum_deta(0.0), sum_dphi(0.0);
570  float ave_deta(0.0), ave_dphi(0.0);
571  for (size_t j = 0; j < jet->numberOfDaughters(); j++) {
572  const auto& part = jet->daughterPtr(j);
573  if (!(part.isAvailable() && part.isNonnull())) {
574  continue;
575  }
576 
577  float partPuppiWeight = 1.0;
578  if (usePuppi) {
579  const pat::PackedCandidate* partpack = dynamic_cast<const pat::PackedCandidate*>(part.get());
580  if (partpack != nullptr)
581  partPuppiWeight = partpack->puppiWeight();
582  }
583 
584  float weight = (part->pt()) * partPuppiWeight;
585  float weight2 = weight * weight;
586  sumW2 += weight2;
587  float deta = part->eta() - jet->eta();
588  float dphi = reco::deltaPhi(*part, *jet);
589  sum_deta += deta * weight2;
590  sum_dphi += dphi * weight2;
591  if (sumW2 > 0) {
592  ave_deta = sum_deta / sumW2;
593  ave_dphi = sum_dphi / sumW2;
594  }
595  }
596 
597  float ddetaR_sum(0.0), ddphiR_sum(0.0), pull_tmp(0.0);
598  for (size_t i = 0; i < jet->numberOfDaughters(); i++) {
599  const auto& part = jet->daughterPtr(i);
600  if (!(part.isAvailable() && part.isNonnull())) {
601  continue;
602  }
603 
604  float partPuppiWeight = 1.0;
605  if (usePuppi) {
606  const pat::PackedCandidate* partpack = dynamic_cast<const pat::PackedCandidate*>(part.get());
607  if (partpack != nullptr)
608  partPuppiWeight = partpack->puppiWeight();
609  }
610 
611  float weight = partPuppiWeight * (part->pt()) * partPuppiWeight * (part->pt());
612  float deta = part->eta() - jet->eta();
613  float dphi = reco::deltaPhi(*part, *jet);
614  float ddeta, ddphi, ddR;
615  ddeta = deta - ave_deta;
616  ddphi = dphi - ave_dphi;
617  ddR = sqrt(ddeta * ddeta + ddphi * ddphi);
618  ddetaR_sum += ddR * ddeta * weight;
619  ddphiR_sum += ddR * ddphi * weight;
620  }
621  if (sumW2 > 0) {
622  float ddetaR_ave = ddetaR_sum / sumW2;
623  float ddphiR_ave = ddphiR_sum / sumW2;
624  pull_tmp = sqrt(ddetaR_ave * ddetaR_ave + ddphiR_ave * ddphiR_ave);
625  }
626  internalId_.pull_ = pull_tmp;
628 
634 
635  std::sort(frac.begin(), frac.end(), std::greater<float>());
636  std::sort(fracCh.begin(), fracCh.end(), std::greater<float>());
637  std::sort(fracEm.begin(), fracEm.end(), std::greater<float>());
638  std::sort(fracNeut.begin(), fracNeut.end(), std::greater<float>());
640  assign(
642  assign(
644  assign(fracNeut,
649 
650  covMatrix(0, 0) /= sumPt2;
651  covMatrix(0, 1) /= sumPt2;
652  covMatrix(1, 1) /= sumPt2;
653  covMatrix(1, 0) = covMatrix(0, 1);
654  internalId_.etaW_ = sqrt(covMatrix(0, 0));
655  internalId_.phiW_ = sqrt(covMatrix(1, 1));
657  TVectorD eigVals(2);
658  eigVals = TMatrixDSymEigen(covMatrix).GetEigenValues();
659  internalId_.majW_ = sqrt(std::abs(eigVals(0)));
660  internalId_.minW_ = sqrt(std::abs(eigVals(1)));
663  }
664 
666  if (lSecond == nullptr) {
667  internalId_.dRLead2nd_ = reco::deltaR(*jet, *lSecond);
668  }
673  internalId_.dR2Mean_ /= sumPt2;
674 
675  for (size_t ic = 0; ic < ncones; ++ic) {
676  *coneFracs[ic] /= jetPt;
677  *coneEmFracs[ic] /= jetPt;
678  *coneNeutFracs[ic] /= jetPt;
679  *coneChFracs[ic] /= jetPt;
680  }
681  //http://jets.physics.harvard.edu/qvg/
682  double ptMean = sumPt / internalId_.nParticles_;
683  double ptRMS = 0;
684  for (unsigned int i0 = 0; i0 < frac.size(); i0++) {
685  ptRMS += (frac[i0] - ptMean) * (frac[i0] - ptMean);
686  }
687  ptRMS /= internalId_.nParticles_;
688  ptRMS = sqrt(ptRMS);
689 
690  internalId_.ptMean_ = ptMean;
691  internalId_.ptRMS_ = ptRMS / jetPt;
697  internalId_.sumChPt_ = sumPtCh;
698  internalId_.sumNePt_ = sumPtNe;
699 
700  internalId_.jetR_ = lLead->pt() / sumPt;
701  internalId_.jetRchg_ = lLeadCh->pt() / sumPt;
702  internalId_.dRMatch_ = dRmin;
703 
704  if (sumTkPt != 0.) {
705  internalId_.beta_ /= sumTkPt;
706  internalId_.betaStar_ /= sumTkPt;
707  internalId_.betaClassic_ /= sumTkPt;
708  internalId_.betaStarClassic_ /= sumTkPt;
709  } else {
712  }
713 
714  if (cache_->runMvas()) {
715  runMva();
716  }
717 
719 }

References funct::abs(), cms::cuda::assert(), assign(), reco::Muon::bestTrack(), reco::Candidate::bestTrack(), StoredPileupJetIdentifier::beta_, StoredPileupJetIdentifier::betaClassic_, StoredPileupJetIdentifier::betaStar_, StoredPileupJetIdentifier::betaStarClassic_, cache_, reco::Candidate::charge(), reco::PFJet::chargedEmEnergy(), pat::Jet::chargedEmEnergy(), reco::PFJet::chargedHadronEnergy(), pat::Jet::chargedHadronEnergy(), reco::PFJet::chargedMultiplicity(), pat::Jet::chargedMultiplicity(), PileupJetIdentifier::chFrac01_, PileupJetIdentifier::chFrac02_, PileupJetIdentifier::chFrac03_, PileupJetIdentifier::chFrac04_, PileupJetIdentifier::chFrac05_, PileupJetIdentifier::chFrac06_, PileupJetIdentifier::chFrac07_, PileupJetIdentifier::chgEMfrac_, PileupJetIdentifier::chgHadrfrac_, pat::Jet::correctedJet(), PileupJetIdentifier::d0_, reco::deltaPhi(), reco::deltaR(), StoredPileupJetIdentifier::dR2Mean_, PileupJetIdentifier::dRLead2nd_, PileupJetIdentifier::dRLeadCent_, StoredPileupJetIdentifier::dRMatch_, StoredPileupJetIdentifier::dRMean_, PileupJetIdentifier::dRMeanCh_, PileupJetIdentifier::dRMeanEm_, PileupJetIdentifier::dRMeanNeut_, reco::TrackBase::dxy(), pat::PackedCandidate::dxy(), reco::TrackBase::dz(), pat::PackedCandidate::dz(), StoredPileupJetIdentifier::dZ_, PileupJetIdentifier::emFrac01_, PileupJetIdentifier::emFrac02_, PileupJetIdentifier::emFrac03_, PileupJetIdentifier::emFrac04_, PileupJetIdentifier::emFrac05_, PileupJetIdentifier::emFrac06_, PileupJetIdentifier::emFrac07_, reco::Candidate::eta(), PileupJetIdentifier::etaW_, PileupJetIdentifier::fourthChFrac_, PileupJetIdentifier::fourthEmFrac_, PileupJetIdentifier::fourthFrac_, PileupJetIdentifier::fourthNeutFrac_, DivergingColor::frac, StoredPileupJetIdentifier::frac01_, StoredPileupJetIdentifier::frac02_, StoredPileupJetIdentifier::frac03_, StoredPileupJetIdentifier::frac04_, StoredPileupJetIdentifier::frac05_, StoredPileupJetIdentifier::frac06_, StoredPileupJetIdentifier::frac07_, pat::PackedCandidate::fromPV(), edm::Ptr< T >::get(), edm::Ref< C, T, F >::get(), reco::PFCandidate::gsfTrackRef(), mps_fire::i, internalId_, reco::Vertex::isFake(), edm::Ref< C, T, F >::isNonnull(), dqmiolumiharvest::j, jetMETDQMOfflineSource_cff::jec, metsig::jet, StoredPileupJetIdentifier::jetEta_, PileupJetIdentifier::jetM_, PileupJetIdentifier::jetPhi_, reco::btau::jetPt, StoredPileupJetIdentifier::jetPt_, StoredPileupJetIdentifier::jetR_, StoredPileupJetIdentifier::jetRchg_, PileupJetIdentifier::jetW_, PileupJetIdentifier::leadChEta_, PileupJetIdentifier::leadChFrac_, PileupJetIdentifier::leadChPhi_, PileupJetIdentifier::leadChPt_, PileupJetIdentifier::leadEmEta_, PileupJetIdentifier::leadEmFrac_, PileupJetIdentifier::leadEmPhi_, PileupJetIdentifier::leadEmPt_, PileupJetIdentifier::leadEta_, PileupJetIdentifier::leadFrac_, PileupJetIdentifier::leadNeutEta_, PileupJetIdentifier::leadNeutFrac_, PileupJetIdentifier::leadNeutPhi_, PileupJetIdentifier::leadNeutPt_, PileupJetIdentifier::leadPhi_, PileupJetIdentifier::leadPt_, pfDeepBoostedJetPreprocessParams_cfi::lower_bound, StoredPileupJetIdentifier::majW_, min(), StoredPileupJetIdentifier::minW_, reco::PFCandidate::muonRef(), StoredPileupJetIdentifier::nCharged_, reco::Vertex::ndof(), PileupJetIdentifier::neuEMfrac_, PileupJetIdentifier::neuHadrfrac_, PileupJetIdentifier::neutFrac01_, PileupJetIdentifier::neutFrac02_, PileupJetIdentifier::neutFrac03_, PileupJetIdentifier::neutFrac04_, PileupJetIdentifier::neutFrac05_, PileupJetIdentifier::neutFrac06_, PileupJetIdentifier::neutFrac07_, reco::PFJet::neutralEmEnergy(), pat::Jet::neutralEmEnergy(), reco::PFJet::neutralHadronEnergy(), pat::Jet::neutralHadronEnergy(), reco::PFJet::neutralMultiplicity(), pat::Jet::neutralMultiplicity(), StoredPileupJetIdentifier::nNeutrals_, StoredPileupJetIdentifier::nParticles_, StoredPileupJetIdentifier::nvtx_, reco::Candidate::pdgId(), PileupJetIdentifier::phiW_, reco::Vertex::position(), DiDispStaMuonMonitor_cfi::pt, reco::Candidate::pt(), reco::LeafCandidate::pt(), PileupJetIdentifier::pt2A_, StoredPileupJetIdentifier::ptD_, PileupJetIdentifier::ptDCh_, PileupJetIdentifier::ptDNe_, PileupJetIdentifier::ptMean_, PileupJetIdentifier::ptRMS_, StoredPileupJetIdentifier::pull_, pat::PackedCandidate::puppiWeight(), pat::PackedCandidate::PVUsedInFit, alignCSCRings::r, resetVariables(), rho, StoredPileupJetIdentifier::rho_, runMva(), PileupJetIdAlgo::AlgoGBRForestsAndConstants::runMvas(), PileupJetIdentifier::secondChFrac_, PileupJetIdentifier::secondEmFrac_, PileupJetIdentifier::secondEta_, PileupJetIdentifier::secondFrac_, PileupJetIdentifier::secondNeutFrac_, PileupJetIdentifier::secondPhi_, PileupJetIdentifier::secondPt_, setPtEtaPhi(), mathSSE::sqrt(), PileupJetIdentifier::sumChPt_, PileupJetIdentifier::sumNePt_, TtFullHadEvtBuilder_cfi::sumPt, PileupJetIdentifier::sumPt_, std::swap(), PileupJetIdentifier::thirdChFrac_, PileupJetIdentifier::thirdEmFrac_, PileupJetIdentifier::thirdFrac_, PileupJetIdentifier::thirdNeutFrac_, reco::PFCandidate::trackRef(), PileupJetID_cfi::usePuppi, extraflags_cff::vtx, and mps_merge::weight.

Referenced by PileupJetIdProducer::produce().

◆ computeMva()

PileupJetIdentifier PileupJetIdAlgo::computeMva ( )

Definition at line 254 of file PileupJetIdAlgo.cc.

254  {
255  runMva();
257 }

References internalId_, and runMva().

Referenced by PileupJetIdProducer::produce().

◆ dumpVariables()

std::string PileupJetIdAlgo::dumpVariables ( ) const

Definition at line 722 of file PileupJetIdAlgo.cc.

722  {
723  std::stringstream out;
724  for (variables_list_t::const_iterator it = variables_.begin(); it != variables_.end(); ++it) {
725  out << std::setw(15) << it->first << std::setw(3) << "=" << std::setw(5) << *it->second.first << " ("
726  << std::setw(5) << it->second.second << ")" << std::endl;
727  }
728  return out.str();
729 }

References MillePedeFileConverter_cfg::out, and variables_.

◆ getJetIdKey()

std::pair< int, int > PileupJetIdAlgo::getJetIdKey ( float  jetPt,
float  jetEta 
)

Definition at line 196 of file PileupJetIdAlgo.cc.

196  {
197  int ptId = 0;
198  if (jetPt >= 10 && jetPt < 20)
199  ptId = 1;
200  if (jetPt >= 20 && jetPt < 30)
201  ptId = 2;
202  if (jetPt >= 30 && jetPt < 40)
203  ptId = 3;
204  if (jetPt >= 40)
205  ptId = 4;
206 
207  int etaId = 0;
208  if (std::abs(jetEta) >= 2.5 && std::abs(jetEta) < 2.75)
209  etaId = 1;
210  if (std::abs(jetEta) >= 2.75 && std::abs(jetEta) < 3.0)
211  etaId = 2;
212  if (std::abs(jetEta) >= 3.0 && std::abs(jetEta) < 5.0)
213  etaId = 3;
214 
215  return std::pair<int, int>(ptId, etaId);
216 }

References funct::abs(), reco::btau::jetEta, and reco::btau::jetPt.

Referenced by computeCutIDflag(), and computeIDflag().

◆ getMVAval()

float PileupJetIdAlgo::getMVAval ( const std::vector< std::string > &  varList,
const std::unique_ptr< const GBRForest > &  reader 
)

Definition at line 157 of file PileupJetIdAlgo.cc.

158  {
159  std::vector<float> vars;
160  for (std::vector<std::string>::const_iterator it = varList.begin(); it != varList.end(); ++it) {
161  std::pair<float*, float> var = variables_.at(*it);
162  vars.push_back(*var.first);
163  }
164  return reader->GetClassifier(vars.data());
165 }

References DQM::reader, trigObjTnPSource_cfi::var, and variables_.

Referenced by runMva().

◆ getVariables()

const variables_list_t& PileupJetIdAlgo::getVariables ( ) const
inline

const PileupJetIdentifier::variables_list_t & getVariables() const { return variables_; };

Definition at line 49 of file PileupJetIdAlgo.h.

49 { return variables_; };

References variables_.

◆ initVariables()

void PileupJetIdAlgo::initVariables ( )
protected

Definition at line 745 of file PileupJetIdAlgo.cc.

745  {
746  internalId_.idFlag_ = 0;
747  INIT_VARIABLE(mva, "", -100.);
748  //INIT_VARIABLE(jetPt , "jspt_1", 0.);
749  //INIT_VARIABLE(jetEta , "jseta_1", large_val);
750  INIT_VARIABLE(jetPt, "", 0.);
752  INIT_VARIABLE(jetPhi, "jsphi_1", large_val);
753  INIT_VARIABLE(jetM, "jm_1", 0.);
754 
755  INIT_VARIABLE(nCharged, "", 0.);
756  INIT_VARIABLE(nNeutrals, "", 0.);
757 
758  INIT_VARIABLE(chgEMfrac, "", 0.);
759  INIT_VARIABLE(neuEMfrac, "", 0.);
760  INIT_VARIABLE(chgHadrfrac, "", 0.);
761  INIT_VARIABLE(neuHadrfrac, "", 0.);
762 
763  INIT_VARIABLE(d0, "jd0_1", -1000.);
764  INIT_VARIABLE(dZ, "jdZ_1", -1000.);
765  //INIT_VARIABLE(nParticles , "npart_1" , 0.);
766  INIT_VARIABLE(nParticles, "", 0.);
767 
768  INIT_VARIABLE(leadPt, "lpt_1", 0.);
769  INIT_VARIABLE(leadEta, "leta_1", large_val);
770  INIT_VARIABLE(leadPhi, "lphi_1", large_val);
771  INIT_VARIABLE(secondPt, "spt_1", 0.);
772  INIT_VARIABLE(secondEta, "seta_1", large_val);
773  INIT_VARIABLE(secondPhi, "sphi_1", large_val);
774  INIT_VARIABLE(leadNeutPt, "lnept_1", 0.);
775  INIT_VARIABLE(leadNeutEta, "lneeta_1", large_val);
776  INIT_VARIABLE(leadNeutPhi, "lnephi_1", large_val);
777  INIT_VARIABLE(leadEmPt, "lempt_1", 0.);
778  INIT_VARIABLE(leadEmEta, "lemeta_1", large_val);
779  INIT_VARIABLE(leadEmPhi, "lemphi_1", large_val);
780  INIT_VARIABLE(leadChPt, "lchpt_1", 0.);
781  INIT_VARIABLE(leadChEta, "lcheta_1", large_val);
782  INIT_VARIABLE(leadChPhi, "lchphi_1", large_val);
783  INIT_VARIABLE(leadFrac, "lLfr_1", 0.);
784 
785  INIT_VARIABLE(dRLeadCent, "drlc_1", 0.);
786  INIT_VARIABLE(dRLead2nd, "drls_1", 0.);
787  INIT_VARIABLE(dRMean, "drm_1", 0.);
788  INIT_VARIABLE(dRMean, "", 0.);
789  INIT_VARIABLE(pull, "", 0.);
790  INIT_VARIABLE(dRMeanNeut, "drmne_1", 0.);
791  INIT_VARIABLE(dRMeanEm, "drem_1", 0.);
792  INIT_VARIABLE(dRMeanCh, "drch_1", 0.);
793  INIT_VARIABLE(dR2Mean, "", 0.);
794 
795  INIT_VARIABLE(ptD, "", 0.);
796  INIT_VARIABLE(ptMean, "", 0.);
797  INIT_VARIABLE(ptRMS, "", 0.);
798  INIT_VARIABLE(pt2A, "", 0.);
799  INIT_VARIABLE(ptDCh, "", 0.);
800  INIT_VARIABLE(ptDNe, "", 0.);
801  INIT_VARIABLE(sumPt, "", 0.);
802  INIT_VARIABLE(sumChPt, "", 0.);
803  INIT_VARIABLE(sumNePt, "", 0.);
804 
805  INIT_VARIABLE(secondFrac, "", 0.);
806  INIT_VARIABLE(thirdFrac, "", 0.);
807  INIT_VARIABLE(fourthFrac, "", 0.);
808 
809  INIT_VARIABLE(leadChFrac, "", 0.);
810  INIT_VARIABLE(secondChFrac, "", 0.);
811  INIT_VARIABLE(thirdChFrac, "", 0.);
812  INIT_VARIABLE(fourthChFrac, "", 0.);
813 
814  INIT_VARIABLE(leadNeutFrac, "", 0.);
815  INIT_VARIABLE(secondNeutFrac, "", 0.);
816  INIT_VARIABLE(thirdNeutFrac, "", 0.);
817  INIT_VARIABLE(fourthNeutFrac, "", 0.);
818 
819  INIT_VARIABLE(leadEmFrac, "", 0.);
820  INIT_VARIABLE(secondEmFrac, "", 0.);
821  INIT_VARIABLE(thirdEmFrac, "", 0.);
822  INIT_VARIABLE(fourthEmFrac, "", 0.);
823 
824  INIT_VARIABLE(jetW, "", 1.);
825  INIT_VARIABLE(etaW, "", 1.);
826  INIT_VARIABLE(phiW, "", 1.);
827 
828  INIT_VARIABLE(majW, "", 1.);
829  INIT_VARIABLE(minW, "", 1.);
830 
831  INIT_VARIABLE(frac01, "", 0.);
832  INIT_VARIABLE(frac02, "", 0.);
833  INIT_VARIABLE(frac03, "", 0.);
834  INIT_VARIABLE(frac04, "", 0.);
835  INIT_VARIABLE(frac05, "", 0.);
836  INIT_VARIABLE(frac06, "", 0.);
837  INIT_VARIABLE(frac07, "", 0.);
838 
839  INIT_VARIABLE(chFrac01, "", 0.);
840  INIT_VARIABLE(chFrac02, "", 0.);
841  INIT_VARIABLE(chFrac03, "", 0.);
842  INIT_VARIABLE(chFrac04, "", 0.);
843  INIT_VARIABLE(chFrac05, "", 0.);
844  INIT_VARIABLE(chFrac06, "", 0.);
845  INIT_VARIABLE(chFrac07, "", 0.);
846 
847  INIT_VARIABLE(neutFrac01, "", 0.);
848  INIT_VARIABLE(neutFrac02, "", 0.);
849  INIT_VARIABLE(neutFrac03, "", 0.);
850  INIT_VARIABLE(neutFrac04, "", 0.);
851  INIT_VARIABLE(neutFrac05, "", 0.);
852  INIT_VARIABLE(neutFrac06, "", 0.);
853  INIT_VARIABLE(neutFrac07, "", 0.);
854 
855  INIT_VARIABLE(emFrac01, "", 0.);
856  INIT_VARIABLE(emFrac02, "", 0.);
857  INIT_VARIABLE(emFrac03, "", 0.);
858  INIT_VARIABLE(emFrac04, "", 0.);
859  INIT_VARIABLE(emFrac05, "", 0.);
860  INIT_VARIABLE(emFrac06, "", 0.);
861  INIT_VARIABLE(emFrac07, "", 0.);
862 
863  INIT_VARIABLE(beta, "", 0.);
864  INIT_VARIABLE(betaStar, "", 0.);
865  INIT_VARIABLE(betaClassic, "", 0.);
866  INIT_VARIABLE(betaStarClassic, "", 0.);
867 
868  INIT_VARIABLE(nvtx, "", 0.);
869  INIT_VARIABLE(rho, "", 0.);
870  INIT_VARIABLE(nTrueInt, "", 0.);
871 
872  INIT_VARIABLE(jetR, "", 0.);
873  INIT_VARIABLE(jetRchg, "", 0.);
874  INIT_VARIABLE(dRMatch, "", 0.);
875 }

References zMuMuMuonUserData::beta, BeamSpotFakeParameters_cfi::betaStar, d0, METSignificanceParams_cfi::dRMatch, PileupJetIdentifier::idFlag_, INIT_VARIABLE, internalId_, reco::btau::jetEta, reco::btau::jetPhi, reco::btau::jetPt, LHEJetFilter_cfi::jetR, large_val, beam_dqm_sourceclient-live_cfg::mva, HLT_FULL_cff::nCharged, jets_cff::ptD, rho, and TtFullHadEvtBuilder_cfi::sumPt.

Referenced by PileupJetIdAlgo().

◆ method()

const std::string PileupJetIdAlgo::method ( ) const
inline

Definition at line 37 of file PileupJetIdAlgo.h.

37 { return cache_->tmvaMethod(); }

References cache_, and PileupJetIdAlgo::AlgoGBRForestsAndConstants::tmvaMethod().

◆ resetVariables()

void PileupJetIdAlgo::resetVariables ( )
protected

Definition at line 732 of file PileupJetIdAlgo.cc.

732  {
733  internalId_.idFlag_ = 0;
734  for (variables_list_t::iterator it = variables_.begin(); it != variables_.end(); ++it) {
735  *it->second.first = it->second.second;
736  }
737 }

References PileupJetIdentifier::idFlag_, internalId_, and variables_.

Referenced by computeIdVariables().

◆ runMva()

void PileupJetIdAlgo::runMva ( )
protected

Definition at line 167 of file PileupJetIdAlgo.cc.

167  {
168  if (cache_->cutBased()) {
171  } else {
172  if (std::abs(internalId_.jetEta_) >= 5.0) {
173  internalId_.mva_ = -2.;
174  } else {
175  if (cache_->etaBinnedWeights()) {
176  if (std::abs(internalId_.jetEta_) > cache_->jEtaMax().at(cache_->nEtaBins() - 1)) {
177  internalId_.mva_ = -2.;
178  } else {
179  for (int v = 0; v < cache_->nEtaBins(); v++) {
180  if (std::abs(internalId_.jetEta_) >= cache_->jEtaMin().at(v) &&
183  break;
184  }
185  }
186  }
187  } else {
189  }
190  }
192  }
193 }

References funct::abs(), StoredPileupJetIdentifier::betaStarClassic_, cache_, computeCutIDflag(), computeIDflag(), PileupJetIdAlgo::AlgoGBRForestsAndConstants::cutBased(), StoredPileupJetIdentifier::dR2Mean_, PileupJetIdAlgo::AlgoGBRForestsAndConstants::etaBinnedWeights(), PileupJetIdAlgo::AlgoGBRForestsAndConstants::etaReader(), getMVAval(), PileupJetIdentifier::idFlag_, internalId_, PileupJetIdAlgo::AlgoGBRForestsAndConstants::jEtaMax(), PileupJetIdAlgo::AlgoGBRForestsAndConstants::jEtaMin(), StoredPileupJetIdentifier::jetEta_, StoredPileupJetIdentifier::jetPt_, PileupJetIdentifier::mva_, PileupJetIdAlgo::AlgoGBRForestsAndConstants::nEtaBins(), StoredPileupJetIdentifier::nvtx_, PileupJetIdAlgo::AlgoGBRForestsAndConstants::reader(), PileupJetIdAlgo::AlgoGBRForestsAndConstants::tmvaEtaVariables(), PileupJetIdAlgo::AlgoGBRForestsAndConstants::tmvaVariables(), and findQualityFiles::v.

Referenced by computeIdVariables(), and computeMva().

◆ set()

void PileupJetIdAlgo::set ( const PileupJetIdentifier id)

Definition at line 153 of file PileupJetIdAlgo.cc.

153 { internalId_ = id; }

References triggerObjects_cff::id, and internalId_.

Referenced by PileupJetIdProducer::produce().

Member Data Documentation

◆ cache_

AlgoGBRForestsAndConstants const* PileupJetIdAlgo::cache_
protected

Definition at line 106 of file PileupJetIdAlgo.h.

Referenced by computeIDflag(), computeIdVariables(), method(), and runMva().

◆ internalId_

PileupJetIdentifier PileupJetIdAlgo::internalId_
protected

◆ variables_

variables_list_t PileupJetIdAlgo::variables_
protected

Definition at line 105 of file PileupJetIdAlgo.h.

Referenced by dumpVariables(), getMVAval(), getVariables(), and resetVariables().

PileupJetIdentifier::chFrac03_
float chFrac03_
Definition: PileupJetIdentifier.h:165
StoredPileupJetIdentifier::dR2Mean_
float dR2Mean_
Definition: PileupJetIdentifier.h:40
reco::PFCandidate::trackRef
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:408
reco::btau::jetPt
Definition: TaggingVariable.h:32
PileupJetIdAlgo::resetVariables
void resetVariables()
Definition: PileupJetIdAlgo.cc:732
StoredPileupJetIdentifier::frac05_
float frac05_
Definition: PileupJetIdentifier.h:53
PileupJetIdentifier::jetW_
float jetW_
Definition: PileupJetIdentifier.h:156
PileupJetIdentifier::dRMeanEm_
float dRMeanEm_
Definition: PileupJetIdentifier.h:124
PileupJetIdentifier::thirdNeutFrac_
float thirdNeutFrac_
Definition: PileupJetIdentifier.h:148
PileupJetIdentifier::leadNeutPt_
float leadNeutPt_
Definition: PileupJetIdentifier.h:111
mps_fire.i
i
Definition: mps_fire.py:428
PileupJetIdentifier::secondEta_
float secondEta_
Definition: PileupJetIdentifier.h:109
PileupJetIdentifier::d0_
float d0_
Definition: PileupJetIdentifier.h:104
PileupJetIdAlgo::USER
Definition: PileupJetIdAlgo.h:24
PileupJetIdAlgo::initVariables
void initVariables()
Definition: PileupJetIdAlgo.cc:745
PileupJetIdentifier::sumChPt_
float sumChPt_
Definition: PileupJetIdentifier.h:133
PileupJetIdAlgo::AlgoGBRForestsAndConstants::runMvas
bool runMvas() const
Definition: PileupJetIdAlgo.h:64
HLT_FULL_cff.nCharged
nCharged
Definition: HLT_FULL_cff.py:33318
jets_cff.ptD
ptD
Definition: jets_cff.py:145
StoredPileupJetIdentifier::jetR_
float jetR_
Definition: PileupJetIdentifier.h:64
PileupJetIdentifier::chFrac04_
float chFrac04_
Definition: PileupJetIdentifier.h:166
PileupJetIdentifier::idFlag_
int idFlag_
Definition: PileupJetIdentifier.h:91
BeamSpotFakeParameters_cfi.betaStar
betaStar
Definition: BeamSpotFakeParameters_cfi.py:19
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
min
T min(T a, T b)
Definition: MathUtil.h:58
PileupJetIdentifier::emFrac02_
float emFrac02_
Definition: PileupJetIdentifier.h:180
reco::deltaPhi
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
PileupJetIdentifier::kTight
Definition: PileupJetIdentifier.h:87
reco::Candidate::eta
virtual double eta() const =0
momentum pseudorapidity
PileupJetIdentifier::leadPhi_
float leadPhi_
Definition: PileupJetIdentifier.h:107
zMuMuMuonUserData.beta
beta
Definition: zMuMuMuonUserData.py:10
mps_merge.weight
weight
Definition: mps_merge.py:88
PileupJetIdentifier::ptDNe_
float ptDNe_
Definition: PileupJetIdentifier.h:131
PileupJetIdentifier::pt2A_
float pt2A_
Definition: PileupJetIdentifier.h:129
PileupJetIdentifier::emFrac01_
float emFrac01_
Definition: PileupJetIdentifier.h:179
assign
void assign(const std::vector< float > &vec, float &a, float &b, float &c, float &d)
Definition: PileupJetIdAlgo.cc:138
PileupJetIdentifier::leadEmPt_
float leadEmPt_
Definition: PileupJetIdentifier.h:114
METSignificanceParams_cfi.dRMatch
dRMatch
Definition: METSignificanceParams_cfi.py:9
PileupJetIdentifier::mva_
float mva_
Definition: PileupJetIdentifier.h:94
StoredPileupJetIdentifier::rho_
float rho_
Definition: PileupJetIdentifier.h:63
PileupJetIdentifier::fourthEmFrac_
float fourthEmFrac_
Definition: PileupJetIdentifier.h:154
PileupJetIdentifier::sumPt_
float sumPt_
Definition: PileupJetIdentifier.h:132
PileupJetIdentifier::ptDCh_
float ptDCh_
Definition: PileupJetIdentifier.h:130
edm::Ref::get
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
StoredPileupJetIdentifier::dRMatch_
float dRMatch_
Definition: PileupJetIdentifier.h:66
reco::Candidate::pt
virtual double pt() const =0
transverse momentum
cms::cuda::assert
assert(be >=bs)
PileupJetIdentifier::jetM_
float jetM_
Definition: PileupJetIdentifier.h:97
PileupJetIdentifier::thirdFrac_
float thirdFrac_
Definition: PileupJetIdentifier.h:138
LHEJetFilter_cfi.jetR
jetR
Definition: LHEJetFilter_cfi.py:5
reco::Vertex::position
const Point & position() const
position
Definition: Vertex.h:114
edm::Ptr::get
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:139
PileupJetIdAlgo::AlgoGBRForestsAndConstants::jEtaMax
std::vector< double > const & jEtaMax() const
Definition: PileupJetIdAlgo.h:67
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
StoredPileupJetIdentifier::dRMean_
float dRMean_
Definition: PileupJetIdentifier.h:44
findQualityFiles.v
v
Definition: findQualityFiles.py:179
beam_dqm_sourceclient-live_cfg.mva
mva
Definition: beam_dqm_sourceclient-live_cfg.py:122
PileupJetIdentifier::chFrac07_
float chFrac07_
Definition: PileupJetIdentifier.h:169
PileupJetIdentifier::chgHadrfrac_
float chgHadrfrac_
Definition: PileupJetIdentifier.h:101
StoredPileupJetIdentifier::dZ_
float dZ_
Definition: PileupJetIdentifier.h:37
PileupJetIdentifier::fourthChFrac_
float fourthChFrac_
Definition: PileupJetIdentifier.h:144
StoredPileupJetIdentifier::minW_
float minW_
Definition: PileupJetIdentifier.h:47
PileupJetIdentifier::neuHadrfrac_
float neuHadrfrac_
Definition: PileupJetIdentifier.h:102
PileupJetIdentifier::leadChEta_
float leadChEta_
Definition: PileupJetIdentifier.h:118
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
PileupJetIdentifier::thirdEmFrac_
float thirdEmFrac_
Definition: PileupJetIdentifier.h:153
large_val
const float large_val
Definition: PileupJetIdAlgo.cc:17
PileupJetIdAlgo::AlgoGBRForestsAndConstants::tmvaVariables
std::vector< std::string > const & tmvaVariables() const
Definition: PileupJetIdAlgo.h:70
reco::Muon
Definition: Muon.h:27
edm::Ref< MuonCollection >
TtFullHadEvtBuilder_cfi.sumPt
sumPt
Definition: TtFullHadEvtBuilder_cfi.py:38
pat::PackedCandidate::PVUsedInFit
Definition: PackedCandidate.h:703
StoredPileupJetIdentifier::jetPt_
float jetPt_
Definition: PileupJetIdentifier.h:32
trigObjTnPSource_cfi.var
var
Definition: trigObjTnPSource_cfi.py:21
reco::PFJet::chargedHadronEnergy
float chargedHadronEnergy() const
chargedHadronEnergy
Definition: PFJet.h:95
PileupJetIdAlgo::getJetIdKey
std::pair< int, int > getJetIdKey(float jetPt, float jetEta)
Definition: PileupJetIdAlgo.cc:196
PileupJetIdentifier::chFrac05_
float chFrac05_
Definition: PileupJetIdentifier.h:167
pat::Jet
Analysis-level calorimeter jet class.
Definition: Jet.h:77
PileupJetIdAlgo::PHILv0
Definition: PileupJetIdAlgo.h:24
reco::PFCandidate::muonRef
reco::MuonRef muonRef() const
Definition: PFCandidate.cc:421
part
part
Definition: HCALResponse.h:20
PileupJetIdentifier::emFrac05_
float emFrac05_
Definition: PileupJetIdentifier.h:183
PileupJetIdentifier::neutFrac04_
float neutFrac04_
Definition: PileupJetIdentifier.h:174
reco::Vertex::isFake
bool isFake() const
Definition: Vertex.h:76
DivergingColor.frac
float frac
Definition: DivergingColor.py:175
PileupJetIdAlgo::cache_
AlgoGBRForestsAndConstants const * cache_
Definition: PileupJetIdAlgo.h:106
pat::Jet::chargedHadronEnergy
float chargedHadronEnergy() const
chargedHadronEnergy
Definition: Jet.h:696
PileupJetIdentifier::emFrac06_
float emFrac06_
Definition: PileupJetIdentifier.h:184
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
vars
vars
Definition: DeepTauId.cc:159
DQM.reader
reader
Definition: DQM.py:105
reco::Candidate::charge
virtual int charge() const =0
electric charge
StoredPileupJetIdentifier::jetEta_
float jetEta_
Definition: PileupJetIdentifier.h:31
PileupJetIdentifier::leadNeutPhi_
float leadNeutPhi_
Definition: PileupJetIdentifier.h:113
reco::PFJet::chargedMultiplicity
int chargedMultiplicity() const
chargedMultiplicity
Definition: PFJet.h:152
PileupJetIdentifier::emFrac03_
float emFrac03_
Definition: PileupJetIdentifier.h:181
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
PileupJetIdentifier::phiW_
float phiW_
Definition: PileupJetIdentifier.h:158
PileupJetIdentifier::fourthFrac_
float fourthFrac_
Definition: PileupJetIdentifier.h:139
pat::Jet::neutralEmEnergy
float neutralEmEnergy() const
neutralEmEnergy
Definition: Jet.h:726
pat::PackedCandidate::dz
virtual float dz(size_t ipv=0) const
dz with respect to the PV[ipv]
Definition: PackedCandidate.h:745
reco::Track
Definition: Track.h:27
PileupJetIdAlgo::computeCutIDflag
int computeCutIDflag(float betaStarClassic, float dR2Mean, float nvtx, float jetPt, float jetEta)
Definition: PileupJetIdAlgo.cc:218
reco::PFJet::chargedEmEnergy
float chargedEmEnergy() const
chargedEmEnergy
Definition: PFJet.h:139
PileupJetIdentifier::fourthNeutFrac_
float fourthNeutFrac_
Definition: PileupJetIdentifier.h:149
PileupJetIdentifier::leadChFrac_
float leadChFrac_
Definition: PileupJetIdentifier.h:141
PileupJetIdentifier::dRMeanNeut_
float dRMeanNeut_
Definition: PileupJetIdentifier.h:123
StoredPileupJetIdentifier::frac02_
float frac02_
Definition: PileupJetIdentifier.h:50
reco::TrackBase::dz
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:622
PileupJetIdAlgo::computeIDflag
int computeIDflag(float mva, float jetPt, float jetEta)
Definition: PileupJetIdAlgo.cc:236
PileupJetIdentifier::secondEmFrac_
float secondEmFrac_
Definition: PileupJetIdentifier.h:152
pat::Jet::chargedMultiplicity
int chargedMultiplicity() const
chargedMultiplicity
Definition: Jet.h:746
StoredPileupJetIdentifier::pull_
float pull_
Definition: PileupJetIdentifier.h:70
utilities.cache
def cache(function)
Definition: utilities.py:3
PileupJetIdentifier::dRLead2nd_
float dRLead2nd_
Definition: PileupJetIdentifier.h:122
pat::PackedCandidate::fromPV
const PVAssoc fromPV(size_t ipv=0) const
Definition: PackedCandidate.h:704
StoredPileupJetIdentifier::nParticles_
float nParticles_
Definition: PileupJetIdentifier.h:38
DDAxes::rho
PileupJetIdentifier::secondNeutFrac_
float secondNeutFrac_
Definition: PileupJetIdentifier.h:147
PileupJetIdentifier::neutFrac03_
float neutFrac03_
Definition: PileupJetIdentifier.h:173
pat::Jet::neutralHadronEnergy
float neutralHadronEnergy() const
neutralHadronEnergy
Definition: Jet.h:706
PileupJetIdentifier::secondChFrac_
float secondChFrac_
Definition: PileupJetIdentifier.h:142
reco::btau::jetPhi
Definition: TaggingVariable.h:36
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:15
PileupJetIdentifier::secondPt_
float secondPt_
Definition: PileupJetIdentifier.h:108
StoredPileupJetIdentifier::nvtx_
float nvtx_
Definition: PileupJetIdentifier.h:69
pat::Jet::chargedEmEnergy
float chargedEmEnergy() const
chargedEmEnergy
Definition: Jet.h:716
PileupJetIdAlgo::AlgoGBRForestsAndConstants::jEtaMin
std::vector< double > const & jEtaMin() const
Definition: PileupJetIdAlgo.h:66
reco::btau::jetEta
Definition: TaggingVariable.h:34
StoredPileupJetIdentifier::betaStar_
float betaStar_
Definition: PileupJetIdentifier.h:58
StoredPileupJetIdentifier::frac04_
float frac04_
Definition: PileupJetIdentifier.h:52
PileupJetIdentifier::etaW_
float etaW_
Definition: PileupJetIdentifier.h:157
reco::PFCandidate::gsfTrackRef
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:440
pat::PackedCandidate::puppiWeight
float puppiWeight() const
Definition: PackedCandidate.cc:380
PileupJetIdentifier::thirdChFrac_
float thirdChFrac_
Definition: PileupJetIdentifier.h:143
pat::PackedCandidate
Definition: PackedCandidate.h:22
PileupJetIdAlgo::internalId_
PileupJetIdentifier internalId_
Definition: PileupJetIdAlgo.h:104
StoredPileupJetIdentifier::nNeutrals_
float nNeutrals_
Definition: PileupJetIdentifier.h:35
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
PileupJetIdentifier::leadEta_
float leadEta_
Definition: PileupJetIdentifier.h:106
PileupJetIdAlgo::AlgoGBRForestsAndConstants::etaBinnedWeights
bool etaBinnedWeights() const
Definition: PileupJetIdAlgo.h:63
PileupJetIdAlgo::AlgoGBRForestsAndConstants::etaReader
std::vector< std::unique_ptr< const GBRForest > > const & etaReader() const
Definition: PileupJetIdAlgo.h:61
PileupJetIdentifier::neutFrac02_
float neutFrac02_
Definition: PileupJetIdentifier.h:172
pat::Jet::neutralMultiplicity
int neutralMultiplicity() const
neutralMultiplicity
Definition: Jet.h:466
PileupJetIdentifier::leadFrac_
float leadFrac_
Definition: PileupJetIdentifier.h:136
PileupJetIdAlgo::runMva
void runMva()
Definition: PileupJetIdAlgo.cc:167
PileupJetIdentifier::neuEMfrac_
float neuEMfrac_
Definition: PileupJetIdentifier.h:100
PileupJetIdentifier::neutFrac06_
float neutFrac06_
Definition: PileupJetIdentifier.h:176
PileupJetIdentifier::leadNeutFrac_
float leadNeutFrac_
Definition: PileupJetIdentifier.h:146
PileupJetIdentifier
Definition: PileupJetIdentifier.h:74
PileupJetIdentifier::leadEmFrac_
float leadEmFrac_
Definition: PileupJetIdentifier.h:151
PileupJetIdAlgo::AlgoGBRForestsAndConstants::nEtaBins
int nEtaBins() const
Definition: PileupJetIdAlgo.h:65
StoredPileupJetIdentifier::frac03_
float frac03_
Definition: PileupJetIdentifier.h:51
PileupJetIdentifier::chgEMfrac_
float chgEMfrac_
Definition: PileupJetIdentifier.h:99
PileupJetIdentifier::secondFrac_
float secondFrac_
Definition: PileupJetIdentifier.h:137
PileupJetIdAlgo::AlgoGBRForestsAndConstants::tmvaMethod
std::string const & tmvaMethod() const
Definition: PileupJetIdAlgo.h:69
PileupJetIdentifier::chFrac06_
float chFrac06_
Definition: PileupJetIdentifier.h:168
PileupJetIdentifier::dRMeanCh_
float dRMeanCh_
Definition: PileupJetIdentifier.h:125
PileupJetIdentifier::jetPhi_
float jetPhi_
Definition: PileupJetIdentifier.h:96
reco::Candidate::pdgId
virtual int pdgId() const =0
PDG identifier.
PileupJetIdAlgo::AlgoGBRForestsAndConstants::cutBased
bool cutBased() const
Definition: PileupJetIdAlgo.h:62
StoredPileupJetIdentifier::frac06_
float frac06_
Definition: PileupJetIdentifier.h:54
reco::Muon::bestTrack
const Track * bestTrack() const override
Definition: Muon.h:58
edm::Ptr< Candidate >
reco::Candidate
Definition: Candidate.h:27
alignCSCRings.r
r
Definition: alignCSCRings.py:93
PileupJetIdentifier::dRLeadCent_
float dRLeadCent_
Definition: PileupJetIdentifier.h:121
PileupJetIdentifier::leadEmEta_
float leadEmEta_
Definition: PileupJetIdentifier.h:115
PileupJetIdentifier::sumNePt_
float sumNePt_
Definition: PileupJetIdentifier.h:134
pat::PackedCandidate::dxy
virtual float dxy() const
dxy with respect to the PV ref
Definition: PackedCandidate.h:740
StoredPileupJetIdentifier::jetRchg_
float jetRchg_
Definition: PileupJetIdentifier.h:65
StoredPileupJetIdentifier::betaClassic_
float betaClassic_
Definition: PileupJetIdentifier.h:59
PileupJetIdentifier::kLoose
Definition: PileupJetIdentifier.h:87
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:18
reco::Candidate::bestTrack
virtual const Track * bestTrack() const
Definition: Candidate.h:268
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
reco::PFJet::neutralHadronEnergy
float neutralHadronEnergy() const
neutralHadronEnergy
Definition: PFJet.h:99
metsig::jet
Definition: SignAlgoResolutions.h:47
PileupJetIdentifier::chFrac01_
float chFrac01_
Definition: PileupJetIdentifier.h:163
reco::PFJet::neutralMultiplicity
int neutralMultiplicity() const
neutralMultiplicity
Definition: PFJet.h:154
PileupJetIdentifier::neutFrac01_
float neutFrac01_
Definition: PileupJetIdentifier.h:171
reco::PFJet
Jets made from PFObjects.
Definition: PFJet.h:20
PileupJetIdentifier::secondPhi_
float secondPhi_
Definition: PileupJetIdentifier.h:110
PileupJetIdentifier::emFrac04_
float emFrac04_
Definition: PileupJetIdentifier.h:182
reco::PFJet::neutralEmEnergy
float neutralEmEnergy() const
neutralEmEnergy
Definition: PFJet.h:147
PileupJetIdentifier::chFrac02_
float chFrac02_
Definition: PileupJetIdentifier.h:164
PileupJetIdAlgo::AlgoGBRForestsAndConstants::tmvaEtaVariables
std::vector< std::vector< std::string > > const & tmvaEtaVariables() const
Definition: PileupJetIdAlgo.h:71
StoredPileupJetIdentifier::beta_
float beta_
Definition: PileupJetIdentifier.h:57
pat::Jet::correctedJet
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
reco::deltaR
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
PileupJetIdentifier::ptRMS_
float ptRMS_
Definition: PileupJetIdentifier.h:128
PileupJetIdentifier::leadPt_
float leadPt_
Definition: PileupJetIdentifier.h:105
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
StoredPileupJetIdentifier::frac07_
float frac07_
Definition: PileupJetIdentifier.h:55
PileupJetIdAlgo::getMVAval
float getMVAval(const std::vector< std::string > &, const std::unique_ptr< const GBRForest > &)
Definition: PileupJetIdAlgo.cc:157
jetMETDQMOfflineSource_cff.jec
jec
Definition: jetMETDQMOfflineSource_cff.py:27
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
INIT_VARIABLE
#define INIT_VARIABLE(NAME, TMVANAME, VAL)
Definition: PileupJetIdAlgo.cc:740
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
StoredPileupJetIdentifier::betaStarClassic_
float betaStarClassic_
Definition: PileupJetIdentifier.h:60
PileupJetIdAlgo::variables_
variables_list_t variables_
Definition: PileupJetIdAlgo.h:105
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
PileupJetIdentifier::emFrac07_
float emFrac07_
Definition: PileupJetIdentifier.h:185
PileupJetIdentifier::neutFrac05_
float neutFrac05_
Definition: PileupJetIdentifier.h:175
PileupJetIdentifier::leadNeutEta_
float leadNeutEta_
Definition: PileupJetIdentifier.h:112
PileupJetIdentifier::leadChPt_
float leadChPt_
Definition: PileupJetIdentifier.h:117
PileupJetIdentifier::leadEmPhi_
float leadEmPhi_
Definition: PileupJetIdentifier.h:116
PileupJetIdentifier::kMedium
Definition: PileupJetIdentifier.h:87
StoredPileupJetIdentifier::majW_
float majW_
Definition: PileupJetIdentifier.h:46
d0
static constexpr float d0
Definition: L1EGammaCrystalsEmulatorProducer.cc:84
setPtEtaPhi
void setPtEtaPhi(const reco::Candidate &p, float &pt, float &eta, float &phi)
Definition: PileupJetIdAlgo.cc:146
reco::TrackBase::dxy
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:608
reco::Vertex::ndof
double ndof() const
Definition: Vertex.h:110
PileupJetIdentifier::neutFrac07_
float neutFrac07_
Definition: PileupJetIdentifier.h:177
PileupJetID_cfi.usePuppi
usePuppi
Definition: PileupJetID_cfi.py:33
PileupJetIdAlgo::AlgoGBRForestsAndConstants::mvacut
array_t const & mvacut() const
Definition: PileupJetIdAlgo.h:74
PileupJetIdentifier::ptMean_
float ptMean_
Definition: PileupJetIdentifier.h:127
StoredPileupJetIdentifier::frac01_
float frac01_
Definition: PileupJetIdentifier.h:49
PileupJetIdAlgo::AlgoGBRForestsAndConstants::reader
std::unique_ptr< const GBRForest > const & reader() const
Definition: PileupJetIdAlgo.h:60
weight
Definition: weight.py:1
reco::Vertex
Definition: Vertex.h:35
StoredPileupJetIdentifier::nCharged_
float nCharged_
Definition: PileupJetIdentifier.h:34
PileupJetIdentifier::leadChPhi_
float leadChPhi_
Definition: PileupJetIdentifier.h:119
StoredPileupJetIdentifier::ptD_
float ptD_
Definition: PileupJetIdentifier.h:62