16 const std::string&
name,
const std::vector<std::string>& isoTypes,
17 std::unique_ptr<TF1> isoFunction,
18 std::vector<std::unique_ptr<TGraph>>&& cutGraphs,
19 std::unique_ptr<TH1F> binning,
const std::string& isoDecSuffix,
30 std::vector<double> isoVars(
num_types(), 0);
32 for (
unsigned int iacc = 0; iacc <
num_types(); ++iacc) {
35 if (!
acc.isAvailable(
x)) {
41 isoVars[iacc] = acc_noCloseBy(
x);
44 <<
":" << __LINE__ <<
"Accessor "
46 <<
" is not available. Expected when using primary "
47 "AODs, post-p3793 derivations (only for *FixedRad "
48 "or FixedCutPflow* for electrons), "
49 <<
" pre-p3517 derivations (only for FC*), or "
50 "pre-p3830 derivations (for other electron WPs)");
52 throw std::runtime_error(
53 "IsolationConditionCombined: IsolationSelectionTool property "
54 "'IsoDecSuffix' is set to " +
56 ". Must run on derivation made with IsolationCloseByCorrection "
57 "to create the isolation variables with this suffix, or remove "
59 isoVars[iacc] = FLT_MAX;
62 isoVars[iacc] =
acc(
x);
69 const float isoValue = f->EvalPar(isoVars.data());
71 ATH_MSG_DEBUG(
"PLIV Isolation values of electron %.3f " << isoValue);
74 return isoValue <= cutValue;
75 return isoValue > cutValue;
80 std::vector<double> isoVars;
81 for (
unsigned int itype = 0; itype <
num_types(); ++itype)
82 isoVars.push_back(
x.isolationValues[
type(itype)]);
84 const float isoValue = f->EvalPar(isoVars.data());
86 ATH_MSG_DEBUG(
"PLIV Isolation values of electron %.3f " << isoValue);
89 return isoValue <= cutValue;
90 return isoValue > cutValue;
94 const float eta)
const {
101 "Stored binning in file does not comply with binning of graphs for "
103 << this->
name() <<
"! Please contact the IFF group");
107 Form(
" Electron cut value %.3f for pt %.3f as calculated from graph %s",
Scalar eta() const
pseudorapidity method
#define ATH_MSG_WARNING(x)
Define macros for attributes used to control the static checker.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE
Messaging initialized (initMessaging)
float getCutValue(const float pt, const float eta) const
std::unique_ptr< TF1 > m_isoFunction
bool accept(const xAOD::IParticle &x) const override
std::unique_ptr< TH1F > m_binning
std::vector< std::unique_ptr< TGraph > > m_cutGraphs
IsolationConditionGraph(const std::string &name, const std::vector< std::string > &isoType, std::unique_ptr< TF1 > isoFunction, std::vector< std::unique_ptr< TGraph > > &&cutGraphs, std::unique_ptr< TH1F > binning, const std::string &isoDecSuffix="", bool invertCut=false)
IsolationCondition(const std::string &name, xAOD::Iso::IsolationType isoType, const std::string &isoDecSuffix="")
std::string m_isoDecSuffix
const FloatAccessor & accessor_noCloseBy(unsigned int n=0) const
const std::string & name() const
unsigned int num_types() const
xAOD::Iso::IsolationType type(unsigned int n=0) const
const FloatAccessor & accessor(unsigned int n=0) const
static AuxTypeRegistry & instance()
Return the singleton registry instance.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Class providing the definition of the 4-vector interface.
Select isolated Photons, Electrons and Muons.
SG::AuxElement::ConstAccessor< float > FloatAccessor
setRcore setEtHad setFside pt
static const SG::AuxElement::Accessor< ElementLink< IParticleContainer > > acc("originalObjectLink")
Object used for setting/getting the dynamic decoration in question.