CMS 3D CMS Logo

Public Member Functions | Private Attributes

bJetSelector Class Reference

#include <bJetSelector.h>

List of all members.

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 ( const edm::ParameterSet cfg)

Definition at line 8 of file bJetSelector.cc.

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

                                                     :
  discriminantCutsLoose_(cfg.getParameter<std::vector<double> >("discCutLoose")),
  discriminantCutsMedium_(cfg.getParameter<std::vector<double> >("discCutMedium")),
  discriminantCutsTight_(cfg.getParameter<std::vector<double> >("discCutTight")),
  BTagdiscriminator_(cfg.getParameter<std::vector<std::string> >("bdiscriminators")), 
  DefaultOp_(cfg.getParameter<std::string>("DefaultOp")),
  DefaultTg_(cfg.getParameter<std::string>("DefaultBdisc"))

{

  for (unsigned int i=0; i<BTagdiscriminator_.size(); i++){
     discCut["Loose"][BTagdiscriminator_[i]] = discriminantCutsLoose_[i];
     discCut["Medium"][BTagdiscriminator_[i]] = discriminantCutsMedium_[i];
     discCut["Tight"][BTagdiscriminator_[i]] = discriminantCutsTight_[i];
  } 
}

Member Function Documentation

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

Definition at line 26 of file bJetSelector.cc.

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

Referenced by IsbTag().

                                                         {

        std::map<std::string,std::map<std::string,double> >::const_iterator ioperpoint = discCut.find(operpoint);
        if ( ioperpoint == discCut.end() ) throw cms::Exception("UnknownOperatingPoint") << "Unknown or undefined operative point" << std::endl;
        std::map<std::string,double>::const_iterator itagger = ioperpoint->second.find(tagger);
        if ( itagger == ioperpoint->second.end() ) throw cms::Exception("UnknownTagger") << "Unknown or undefined tagger" << std::endl;
        
        return JetCand.bDiscriminator(tagger) > itagger->second;
}
bool bJetSelector::IsbTag ( const pat::Jet JetCand) const

Definition at line 45 of file bJetSelector.cc.

References DefaultOp_, DefaultTg_, and IsbTag().

                                               { 
        return IsbTag(JetCand,DefaultOp_,DefaultTg_);
}
bool bJetSelector::IsbTag ( const pat::Jet JetCand,
const std::string &  operpoint 
) const

Definition at line 38 of file bJetSelector.cc.

References DefaultTg_, and IsbTag().

                                                                           {

        
        return IsbTag(JetCand,operpoint,DefaultTg_);
}

Member Data Documentation

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

Definition at line 35 of file bJetSelector.h.

Referenced by bJetSelector().

std::string bJetSelector::DefaultOp_ [private]

Definition at line 36 of file bJetSelector.h.

Referenced by IsbTag().

std::string bJetSelector::DefaultTg_ [private]

Definition at line 37 of file bJetSelector.h.

Referenced by IsbTag().

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

Definition at line 31 of file bJetSelector.h.

Referenced by bJetSelector(), and IsbTag().

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

Definition at line 32 of file bJetSelector.h.

Referenced by bJetSelector().

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

Definition at line 33 of file bJetSelector.h.

Referenced by bJetSelector().

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

Definition at line 34 of file bJetSelector.h.

Referenced by bJetSelector().