CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
bJetSelector Class Reference

#include <bJetSelector.h>

Public Member Functions

 bJetSelector (const edm::ParameterSet &cfg)
 
bool IsbTag (const pat::Jet &JetCand) const
 
bool IsbTag (const pat::Jet &JetCand, const std::string &operpoint) const
 
bool IsbTag (const pat::Jet &JetCand, const std::string &operpoint, const std::string &tagger) const
 

Private Attributes

std::vector< std::string > BTagdiscriminator_
 
std::string DefaultOp_
 
std::string DefaultTg_
 
std::map< std::string, std::map< std::string, double > > discCut
 
std::vector< double > discriminantCutsLoose_
 
std::vector< double > discriminantCutsMedium_
 
std::vector< double > discriminantCutsTight_
 

Detailed Description

Definition at line 19 of file bJetSelector.h.

Constructor & Destructor Documentation

◆ bJetSelector()

bJetSelector::bJetSelector ( const edm::ParameterSet cfg)

Definition at line 8 of file bJetSelector.cc.

9  : discriminantCutsLoose_(cfg.getParameter<std::vector<double> >("discCutLoose")),
10  discriminantCutsMedium_(cfg.getParameter<std::vector<double> >("discCutMedium")),
11  discriminantCutsTight_(cfg.getParameter<std::vector<double> >("discCutTight")),
12  BTagdiscriminator_(cfg.getParameter<std::vector<std::string> >("bdiscriminators")),
13  DefaultOp_(cfg.getParameter<std::string>("DefaultOp")),
14  DefaultTg_(cfg.getParameter<std::string>("DefaultBdisc"))
15 
16 {
17  for (unsigned int i = 0; i < BTagdiscriminator_.size(); i++) {
21  }
22 }

References BTagdiscriminator_, discCut, discriminantCutsLoose_, discriminantCutsMedium_, discriminantCutsTight_, and mps_fire::i.

Member Function Documentation

◆ IsbTag() [1/3]

bool bJetSelector::IsbTag ( const pat::Jet JetCand) const

Definition at line 37 of file bJetSelector.cc.

37 { return IsbTag(JetCand, DefaultOp_, DefaultTg_); }

References DefaultOp_, DefaultTg_, and IsbTag().

◆ IsbTag() [2/3]

bool bJetSelector::IsbTag ( const pat::Jet JetCand,
const std::string &  operpoint 
) const

Definition at line 34 of file bJetSelector.cc.

34  {
35  return IsbTag(JetCand, operpoint, DefaultTg_);
36 }

References DefaultTg_, and IsbTag().

◆ IsbTag() [3/3]

bool bJetSelector::IsbTag ( const pat::Jet JetCand,
const std::string &  operpoint,
const std::string &  tagger 
) const

Definition at line 24 of file bJetSelector.cc.

24  {
25  std::map<std::string, std::map<std::string, double> >::const_iterator ioperpoint = discCut.find(operpoint);
26  if (ioperpoint == discCut.end())
27  throw cms::Exception("UnknownOperatingPoint") << "Unknown or undefined operative point" << std::endl;
28  std::map<std::string, double>::const_iterator itagger = ioperpoint->second.find(tagger);
29  if (itagger == ioperpoint->second.end())
30  throw cms::Exception("UnknownTagger") << "Unknown or undefined tagger" << std::endl;
31 
32  return JetCand.bDiscriminator(tagger) > itagger->second;
33 }

References pat::Jet::bDiscriminator(), and discCut.

Referenced by PatBTagCommonHistos::Fill(), and IsbTag().

Member Data Documentation

◆ BTagdiscriminator_

std::vector<std::string> bJetSelector::BTagdiscriminator_
private

Definition at line 31 of file bJetSelector.h.

Referenced by bJetSelector().

◆ DefaultOp_

std::string bJetSelector::DefaultOp_
private

Definition at line 32 of file bJetSelector.h.

Referenced by IsbTag().

◆ DefaultTg_

std::string bJetSelector::DefaultTg_
private

Definition at line 33 of file bJetSelector.h.

Referenced by IsbTag().

◆ discCut

std::map<std::string, std::map<std::string, double> > bJetSelector::discCut
private

Definition at line 27 of file bJetSelector.h.

Referenced by bJetSelector(), and IsbTag().

◆ discriminantCutsLoose_

std::vector<double> bJetSelector::discriminantCutsLoose_
private

Definition at line 28 of file bJetSelector.h.

Referenced by bJetSelector().

◆ discriminantCutsMedium_

std::vector<double> bJetSelector::discriminantCutsMedium_
private

Definition at line 29 of file bJetSelector.h.

Referenced by bJetSelector().

◆ discriminantCutsTight_

std::vector<double> bJetSelector::discriminantCutsTight_
private

Definition at line 30 of file bJetSelector.h.

Referenced by bJetSelector().

mps_fire.i
i
Definition: mps_fire.py:428
bJetSelector::DefaultTg_
std::string DefaultTg_
Definition: bJetSelector.h:33
pat::Jet::bDiscriminator
float bDiscriminator(const std::string &theLabel) const
-— methods for accessing b-tagging info -—
bJetSelector::discriminantCutsMedium_
std::vector< double > discriminantCutsMedium_
Definition: bJetSelector.h:29
bJetSelector::BTagdiscriminator_
std::vector< std::string > BTagdiscriminator_
Definition: bJetSelector.h:31
bJetSelector::discriminantCutsLoose_
std::vector< double > discriminantCutsLoose_
Definition: bJetSelector.h:28
bJetSelector::discriminantCutsTight_
std::vector< double > discriminantCutsTight_
Definition: bJetSelector.h:30
bJetSelector::DefaultOp_
std::string DefaultOp_
Definition: bJetSelector.h:32
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
looper.cfg
cfg
Definition: looper.py:296
bJetSelector::discCut
std::map< std::string, std::map< std::string, double > > discCut
Definition: bJetSelector.h:27
cms::Exception
Definition: Exception.h:70
bJetSelector::IsbTag
bool IsbTag(const pat::Jet &JetCand, const std::string &operpoint, const std::string &tagger) const
Definition: bJetSelector.cc:24