13#include <TLorentzVector.h>
16 const std::string &decName_ptau,
17 const std::string &decName_pu,
18 const std::string &decName_isValid) :
28 const std::unique_ptr<ITrigJetHypoInfoCollector> &collector,
29 const std::string &decName)
const
32 float momentValue = -1;
33 if (!(ip->getAttribute(decName, momentValue)))
37 auto j_addr =
static_cast<const void *
>(ip.get());
39 std::stringstream ss0;
40 ss0 <<
"UHT1TauCondition: "
41 <<
" unable to retrieve " << decName <<
'\n';
42 std::stringstream ss1;
43 ss1 <<
" jet : (" << j_addr <<
")";
44 collector->collect(ss0.str(), ss1.str());
47 throw std::runtime_error(
"Impossible to retrieve decorator \'" + decName +
"\' for jet hypo");
54 const float &pu)
const {
59 const std::unique_ptr<ITrigJetHypoInfoCollector> &collector)
const
67 if (!
jet)
throw std::runtime_error(
"Fast uht1tau has to run on xAOD::Jet");
69 if (valid == 0)
return false;
81 const void *address =
static_cast<const void *
>(
this);
83 std::stringstream ss0;
84 ss0 <<
"UHT1TauCondition: (" << address
86 <<
" pass: " << std::boolalpha << pass <<
'\n';
88 auto j_addr =
static_cast<const void *
>(ip.get());
89 std::stringstream ss1;
90 ss1 <<
" jet : (" << j_addr <<
") "
93 collector->collect(ss0.str(), ss1.str());
101 const std::unique_ptr<ITrigJetHypoInfoCollector>& c)
const {
108 std::stringstream
ss;
109 ss <<
"UHT1TauCondition (" <<
this <<
") "
110 <<
" Cleaning decs: "
std::vector< pHypoJet > HypoJetVector
std::shared_ptr< const HypoJet::IJet > pHypoJet
float getUHT1TauDecValue(const pHypoJet &ip, const std::unique_ptr< ITrigJetHypoInfoCollector > &collector, const std::string &decName) const
float evaluateUHT1Tau(const float &uht1tau_ptau, const float &uht1tau_pu) const
bool isSatisfied(const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
std::string toString() const override
UHT1TauCondition(float workingPoint, const std::string &decName_ptau, const std::string &decName_pu, const std::string &decName_isValid="")
std::string m_decName_ptau
std::string m_decName_isValid
float safeLogRatio(float num, float denom)