本文整理汇总了C++中Jet::eta方法的典型用法代码示例。如果您正苦于以下问题:C++ Jet::eta方法的具体用法?C++ Jet::eta怎么用?C++ Jet::eta使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Jet
的用法示例。
在下文中一共展示了Jet::eta方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getUDSGScaleFactor
double BTagWeight::getUDSGScaleFactor(const Jet& jet) const {
double pt = getSmearedJetPtScale(jet, 0)*jet.pt();
double eta = jet.eta();
double SF_udsg_mean(0), SF_udsg_min(0), SF_udsg_max(0);
if (pt < 20) {
return 0;
} else if (pt > 800) {
SF_udsg_mean = getMeanUDSGScaleFactor(800., eta);
SF_udsg_min = getMinUDSGScaleFactor(800, eta);
SF_udsg_max = getMaxUDSGScaleFactor(800, eta);
//use twice the uncertainty
SF_udsg_min -= (SF_udsg_mean - SF_udsg_min);
SF_udsg_max += (SF_udsg_max - SF_udsg_mean);
} else {
SF_udsg_mean = getMeanUDSGScaleFactor(pt, eta);
SF_udsg_min = getMinUDSGScaleFactor(pt, eta);
SF_udsg_max = getMaxUDSGScaleFactor(pt, eta);
}
if (LightJetSystematic_ == -1)
return SF_udsg_min;
else if (LightJetSystematic_ == 1)
return SF_udsg_max;
return SF_udsg_mean;
}
示例2: getUDSGScaleFactor
double BTagWeight::getUDSGScaleFactor(const Jet& jet, std::string MCSampleTag) const {
double pt = getSmearedJetPtScale(jet, 0)*jet.pt();
double eta = jet.eta();
double SF_udsg_mean(0), SF_udsg_min(0), SF_udsg_max(0);
if (MCSampleTag == "Summer12") { // 2012
if (pt < 20) {
return 0;
} else if (pt > 850 && eta >= 1.6 && eta <= 2.4) {
SF_udsg_mean = getMeanUDSGScaleFactor(850., eta, MCSampleTag);
SF_udsg_min = getMinUDSGScaleFactor(850, eta, MCSampleTag);
SF_udsg_max = getMaxUDSGScaleFactor(850, eta, MCSampleTag);
//use twice the uncertainty
SF_udsg_min -= (SF_udsg_mean - SF_udsg_min);
SF_udsg_max += (SF_udsg_max - SF_udsg_mean);
} else if (pt > 1000) {
SF_udsg_mean = getMeanUDSGScaleFactor(1000., eta, MCSampleTag);
SF_udsg_min = getMinUDSGScaleFactor(1000, eta, MCSampleTag);
SF_udsg_max = getMaxUDSGScaleFactor(1000, eta, MCSampleTag);
//use twice the uncertainty
SF_udsg_min -= (SF_udsg_mean - SF_udsg_min);
SF_udsg_max += (SF_udsg_max - SF_udsg_mean);
} else {
SF_udsg_mean = getMeanUDSGScaleFactor(pt, eta, MCSampleTag);
SF_udsg_min = getMinUDSGScaleFactor(pt, eta, MCSampleTag);
SF_udsg_max = getMaxUDSGScaleFactor(pt, eta, MCSampleTag);
}
} else if (MCSampleTag == "Summer11Leg") { // 2011
if (pt < 20) {
return 0;
} else if (pt > 670 && eta >= 0. && eta <= 2.4) {
// Use integrated over all eta
SF_udsg_mean = getMeanUDSGScaleFactor(pt, eta, MCSampleTag);
SF_udsg_min = getMinUDSGScaleFactor(pt, eta, MCSampleTag);
SF_udsg_max = getMaxUDSGScaleFactor(pt, eta, MCSampleTag);
//use twice the uncertainty
SF_udsg_min -= (SF_udsg_mean - SF_udsg_min);
SF_udsg_max += (SF_udsg_max - SF_udsg_mean);
} else {
SF_udsg_mean = getMeanUDSGScaleFactor(pt, eta, MCSampleTag);
SF_udsg_min = getMinUDSGScaleFactor(pt, eta, MCSampleTag);
SF_udsg_max = getMaxUDSGScaleFactor(pt, eta, MCSampleTag);
}
}
if (LightJetSystematic_ == -1) {
return SF_udsg_min;
} else if (LightJetSystematic_ == 1) {
return SF_udsg_max;
}
return SF_udsg_mean;
}
示例3: getBScaleFactor
double BTagWeight::getBScaleFactor(const Jet& jet, std::string MCSampleTag, double uncertaintyFactor) const {
double SFb(0);
double sf_error(0);
//these numbers are for CSVM only
double pt = getSmearedJetPtScale(jet, 0)*jet.pt();
double eta = jet.eta();
if (MCSampleTag == "Summer12") { // 2012 btag scale factors
// From https://twiki.cern.ch/twiki/pub/CMS/BtagPOG/SFb-pt_WITHttbar_payload_EPS13.txt,
// which is linked from https://twiki.cern.ch/twiki/bin/viewauth/CMS/BtagPOG#2012_Data_and_MC_EPS13_prescript
const boost::array<double, 16> SFb_error = { { 0.0415707,
0.0204209,
0.0223227,
0.0206655,
0.0199325,
0.0174121,
0.0202332,
0.0182446,
0.0159777,
0.0218531,
0.0204688,
0.0265191,
0.0313175,
0.0415417,
0.0740446,
0.0596716 } };
//2012 pt bins low edges
const boost::array<double, 16> ptbins = { { 20, 30, 40, 50, 60, 70, 80, 100, 120, 160, 210, 260, 320, 400, 500, 600 } };
if (pt < 20) {
SFb = (0.938887 + (0.00017124 * 20)) + (-2.76366e-07 * (20 * 20));
//use twice the uncertainty
sf_error = 2 * SFb_error[0];
} else if (pt > 800) {
SFb = (0.938887 + (0.00017124 * 800)) + (-2.76366e-07 * (800 * 800));
//use twice the uncertainty
sf_error = 2 * SFb_error[SFb_error.size() - 1];
} else {
SFb = (0.938887 + (0.00017124 * pt)) + (-2.76366e-07 * (pt * pt));
unsigned int ptbin(0);
for (unsigned int bin = 0; bin < ptbins.size() + 1; ++bin) {
double upperCut = bin + 1 < ptbins.size() ? ptbins.at(bin + 1) : 800.;
double lowerCut = ptbins.at(bin);
if (pt > lowerCut && pt <= upperCut) {
ptbin = bin;
break;
}
}
sf_error = SFb_error.at(ptbin);
//use twice the uncertainty if outside the 0 to 2.4 eta range
if (2.4 < eta && eta <= 2.6) {
sf_error = 2 * SFb_error.at(ptbin);
}
}
} else if (MCSampleTag == "Summer11Leg") { // 2011 btag scale factors
// https://twiki.cern.ch/twiki/pub/CMS/BtagPOG/SFb-mujet_payload.txt
const boost::array<double, 14> SFb_error = { { 0.0295675,
0.0295095,
0.0210867,
0.0219349,
0.0227033,
0.0204062,
0.0185857,
0.0256242,
0.0383341,
0.0409675,
0.0420284,
0.0541299,
0.0578761,
0.0655432 } };
//2011 pt bins low edges
const boost::array<double, 14> ptbins = { { 30, 40, 50, 60, 70, 80, 100, 120, 160, 210, 260, 320, 400, 500 } };
if (pt < 30) {
SFb = 0.6981 * ((1. + (0.414063 * pt)) / (1. + (0.300155 * 30)));
//absolute uncertainty of +/-0.12
sf_error = 0.12;
} else if (pt > 670) {
SFb = 0.6981 * ((1. + (0.414063 * 670)) / (1. + (0.300155 * 670)));
//use twice the uncertainty
sf_error = 2 * SFb_error[SFb_error.size() - 1];
} else {
SFb = 0.6981 * ((1. + (0.414063 * pt)) / (1. + (0.300155 * pt)));
unsigned int ptbin(0);
for (unsigned int bin = 0; bin < ptbins.size() + 1; ++bin) {
double upperCut = bin + 1 < ptbins.size() ? ptbins.at(bin + 1) : 670.;
double lowerCut = ptbins.at(bin);
if (pt > lowerCut && pt <= upperCut) {
ptbin = bin;
break;
//.........这里部分代码省略.........