20 m_useCondDB(cfg.getParameter<
bool>(
"useCondDB")),
21 m_gbrForestLabel(cfg.existsAs<
std::
string>(
"gbrForestLabel") ? cfg.getParameter<
std::
string>(
"gbrForestLabel") :
""),
22 m_weightFile(cfg.existsAs<
edm::FileInPath>(
"weightFile") ? cfg.getParameter<
edm::FileInPath>(
"weightFile") :
edm::FileInPath()),
23 m_useGBRForest(cfg.existsAs<
bool>(
"useGBRForest") ? cfg.getParameter<
bool>(
"useGBRForest") :
false),
24 m_useAdaBoost(cfg.existsAs<
bool>(
"useAdaBoost") ? cfg.getParameter<
bool>(
"useAdaBoost") :
false)
33 std::vector<std::string>
variables({
"TagInfo1.sip3d",
"TagInfo1.sip2d",
"TagInfo1.ptRel",
"TagInfo1.deltaR",
"TagInfo1.ratio"});
56 std::uniform_real_distribution<float> dist(0.
f,1.
f);
59 for (
unsigned int i=0;
i<info.
leptons();
i++) {
66 float rndm = dist(random);
67 if(rndm<0.5) flip=
true;
73 std::map<std::string,float>
inputs;
74 inputs[
"TagInfo1.sip3d"] = sip3dsig;
75 inputs[
"TagInfo1.sip2d"] = sip2dsig;
76 inputs[
"TagInfo1.ptRel"] = properties.
ptRel;
77 inputs[
"TagInfo1.deltaR"] = properties.
deltaR;
78 inputs[
"TagInfo1.ratio"] = properties.
ratio;
83 if(tag>bestTag) bestTag =
tag;
const bool m_useGBRForest
const T & get(unsigned int index=0) const
const std::string m_gbrForestLabel
const SoftLeptonProperties & properties(size_t i) const
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
void initialize(const JetTagComputerRecord &) override
btag::LeptonSelector m_selector
const DepRecordT getRecord() const
void uses(unsigned int id, const std::string &label)
MuonTagger(const edm::ParameterSet &)
float discriminator(const TagInfoHelper &tagInfo) const override
const edm::FileInPath m_weightFile
std::unique_ptr< TMVAEvaluator > mvaID
std::string fullPath() const
unsigned int leptons(void) const