544 {
545
547
548
549 const std::vector<double> &ptbins =
m_ptbins;
550
551 double P_ineff = 1;
552 const std::string etaStr{"eta"};
553 const std::string effStr{"efficiency"};
554 for (
size_t i = 0;
i < missed_truthBhs.size(); ++
i) {
555
556 double pt = missed_truthBhs[
i]->pt();
557 double eta = std::abs(missed_truthBhs[i]->
eta());
558 std::string pt_bin_of_truthBh = "";
561 throw std::runtime_error(
"EfficiencyMethodBhadronPtEtaBasedClass::getPIneff: B-hadron pT above the last pT bin edge, but no '" +
m_overflowPtBinKey +
"' entry in the calibration JSON file");
562 }
564 }
565 else {
566
567 for (
size_t j = 0;
j < ptbins.size() - 1; ++
j) {
568 if (
pt >= ptbins[j] &&
pt < ptbins[j+1]) {
569
570 pt_bin_of_truthBh = "pt_bin_" + std::to_string((int)ptbins[j]) + "_" + std::to_string((int)ptbins[j+1]);
571 }
572 }
573 }
574 if (pt_bin_of_truthBh == ""){
575
576 continue;
577 }
578
581
583
584
585 for (
size_t k = 0;
k < eta_bins.size() - 1; ++
k) {
586 double eta_low = eta_bins[
k];
587 double eta_up = eta_bins[
k+1];
588 if (
eta >= eta_low &&
eta < eta_up) {
589
591 }
592 }
594
595 continue;
596 }
597
598 P_ineff = P_ineff*(1-SF_eff*(*efficiency))/(1-(*
efficiency));
599 }
600 return P_ineff;
601 }
Scalar eta() const
pseudorapidity method
TEfficiency * efficiency(std::string_view effName, std::string_view tDir="", std::string_view stream="")
Simplify the retrieval of registered TEfficiency.
static std::vector< const xAOD::TruthParticle * > construct_not_matched_vectors(const std::vector< const xAOD::TruthParticle * > &truthBhs, const std::vector< bool > &matched_vector)
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
list efficiencies
translate the station name indices into the string staiton name
setRcore setEtHad setFside pt