|
DAS
3.0
Das Analysis System
|
|
| BTagCalibrationReaderImpl (BTagEntry::OperatingPoint op, const std::string &sysType, const std::vector< std::string > &otherSysTypes={}) |
|
void | load (const BTagCalibration &c, BTagEntry::JetFlavor jf, std::string measurementType) |
|
double | eval (BTagEntry::JetFlavor jf, float eta, float pt, float discr) const |
|
double | eval_auto_bounds (const std::string &sys, BTagEntry::JetFlavor jf, float eta, float pt, float discr) const |
|
std::pair< float, float > | min_max_pt (BTagEntry::JetFlavor jf, float eta, float discr) const |
|
std::pair< float, float > | min_max_eta (BTagEntry::JetFlavor jf, float discr) const |
|
◆ BTagCalibrationReaderImpl()
427 for (
const std::string & ost : otherSysTypes) {
429 std::cerr <<
"ERROR in BTagCalibration: "
430 <<
"Every otherSysType should only be given once. Duplicate: "
432 throw std::exception();
◆ eval()
494 const auto &entries =
tmpData_.at(jf);
495 for (
unsigned i=0; i<entries.size(); ++i) {
496 const auto &e = entries.at(i);
498 e.etaMin <=
eta &&
eta <= e.etaMax
499 && e.ptMin <
pt &&
pt <= e.ptMax
502 if (e.discrMin <= discr && discr < e.discrMax) {
503 return e.func.Eval(discr);
506 return e.func.Eval(
pt);
◆ eval_auto_bounds()
double eval_auto_bounds |
( |
const std::string & |
sys, |
|
|
BTagEntry::JetFlavor |
jf, |
|
|
float |
eta, |
|
|
float |
pt, |
|
|
float |
discr |
|
) |
| const |
|
private |
522 bool eta_is_out_of_bounds =
false;
524 if (sf_bounds_eta.first < 0) sf_bounds_eta.first = -sf_bounds_eta.second;
525 if (eta <= sf_bounds_eta.first || eta > sf_bounds_eta.second ) {
526 eta_is_out_of_bounds =
true;
529 if (eta_is_out_of_bounds) {
535 float pt_for_eval =
pt;
536 bool is_out_of_bounds =
false;
538 if (
pt <= sf_bounds.first) {
539 pt_for_eval = sf_bounds.first + .0001;
540 is_out_of_bounds =
true;
541 }
else if (
pt > sf_bounds.second) {
542 pt_for_eval = sf_bounds.second - .0001;
543 is_out_of_bounds =
true;
547 double sf =
eval(jf,
eta, pt_for_eval, discr);
554 std::cerr <<
"ERROR in BTagCalibration: "
555 <<
"sysType not available (maybe not loaded?): "
557 throw std::exception();
560 if (!is_out_of_bounds) {
565 sf_err =
sf + 2*(sf_err -
sf);
◆ load()
446 std::cerr <<
"ERROR in BTagCalibration: "
447 <<
"Data for this jet-flavor is already loaded: "
449 throw std::exception();
455 for (
const auto &be : entries) {
456 if (be.params.jetFlavor != jf) {
461 te.etaMin = be.params.etaMin;
462 te.etaMax = be.params.etaMax;
463 te.ptMin = be.params.ptMin;
464 te.ptMax = be.params.ptMax;
465 te.discrMin = be.params.discrMin;
466 te.discrMax = be.params.discrMax;
469 te.func = TF1(
"", be.formula.c_str(),
470 be.params.discrMin, be.params.discrMax);
472 te.func = TF1(
"", be.formula.c_str(),
473 be.params.ptMin, be.params.ptMax);
476 tmpData_[be.params.jetFlavor].push_back(te);
480 p.second->load(c, jf, measurementType);
◆ min_max_eta()
609 const auto &entries =
tmpData_.at(jf);
610 float min_eta = 0., max_eta = 0.;
611 for (
const auto & e: entries) {
614 if (e.discrMin <= discr && discr < e.discrMax) {
615 min_eta = min_eta < e.etaMin ? min_eta : e.etaMin;
616 max_eta = max_eta > e.etaMax ? max_eta : e.etaMax;
619 min_eta = min_eta < e.etaMin ? min_eta : e.etaMin;
620 max_eta = max_eta > e.etaMax ? max_eta : e.etaMax;
625 return std::make_pair(min_eta, max_eta);
◆ min_max_pt()
576 const auto &entries =
tmpData_.at(jf);
577 float min_pt = -1., max_pt = -1.;
578 for (
const auto & e: entries) {
580 e.etaMin <=
eta &&
eta <=e.etaMax
589 if (e.discrMin <= discr && discr < e.discrMax) {
590 min_pt = min_pt < e.ptMin ? min_pt : e.ptMin;
591 max_pt = max_pt > e.ptMax ? max_pt : e.ptMax;
594 min_pt = min_pt < e.ptMin ? min_pt : e.ptMin;
595 max_pt = max_pt > e.ptMax ? max_pt : e.ptMax;
600 return std::make_pair(min_pt, max_pt);
◆ BTagCalibrationReader
◆ op_
◆ otherSysTypeReaders_
◆ sysType_
◆ tmpData_
The documentation for this class was generated from the following file:
- /builds/cms-analysis/general/DasAnalysisSystem/Core/Installer/Core/BTagging/src/BTagCalibration.cc
dictionary params
Definition: Ntupliser_cfg.py:20
cerr
Definition: Ntupliser_cfg.py:93
pt
Definition: jmarExample.py:19
const std::vector< BTagEntry > & getEntries(const BTagEntry::Parameters &par) const
Definition: BTagCalibration.cc:301
std::map< std::string, std::shared_ptr< BTagCalibrationReaderImpl > > otherSysTypeReaders_
Definition: BTagCalibration.cc:416
p
Definition: Ntupliser_cfg.py:358
Definition: BTagCalibration.h:37
double eval(BTagEntry::JetFlavor jf, float eta, float pt, float discr) const
Definition: BTagCalibration.cc:484
std::map< BTagEntry::JetFlavor, std::vector< TmpEntry > > tmpData_
Definition: BTagCalibration.cc:415
std::string sysType_
Definition: BTagCalibration.cc:414
@ OP_RESHAPING
Definition: BTagCalibration.h:30
std::pair< float, float > min_max_pt(BTagEntry::JetFlavor jf, float eta, float discr) const
Definition: BTagCalibration.cc:569
BTagCalibrationReaderImpl(BTagEntry::OperatingPoint op, const std::string &sysType, const std::vector< std::string > &otherSysTypes={})
Definition: BTagCalibration.cc:420
std::pair< float, float > min_max_eta(BTagEntry::JetFlavor jf, float discr) const
Definition: BTagCalibration.cc:603
sf
Definition: jercExample.py:112
BTagEntry::OperatingPoint op_
Definition: BTagCalibration.cc:413
eta
DeepAK8/ParticleNet tagging.
Definition: jmarExample.py:19