16 const std::string&
name,
const std::vector<std::string>& isoTypes,
17 std::unique_ptr<TF1> isoFunction,
20 std::unique_ptr<TH1F> binning,
const std::string& isoDecSuffix,
31 std::vector<double> isoVars(
num_types(), 0);
33 for (
unsigned int iacc = 0; iacc <
num_types(); ++iacc) {
36 if (!
acc.isAvailable(
x)) {
42 isoVars[iacc] = acc_noCloseBy(
x);
45 <<
":" << __LINE__ <<
"Accessor "
47 <<
" is not available. Expected when using primary "
48 "AODs, post-p3793 derivations (only for *FixedRad "
49 "or FixedCutPflow* for electrons), "
50 <<
" pre-p3517 derivations (only for FC*), or "
51 "pre-p3830 derivations (for other electron WPs)");
53 throw std::runtime_error(
54 "IsolationConditionCombined: IsolationSelectionTool property "
55 "'IsoDecSuffix' is set to " +
57 ". Must run on derivation made with IsolationCloseByCorrection "
58 "to create the isolation variables with this suffix, or remove "
60 isoVars[iacc] = FLT_MAX;
63 isoVars[iacc] =
acc(
x);
70 const float isoValue = f->EvalPar(isoVars.data());
72 ATH_MSG_DEBUG(
"PLIV Isolation values of electron %.3f " << isoValue);
75 return isoValue <= cutValue;
76 return isoValue > cutValue;
81 std::vector<double> isoVars;
82 for (
unsigned int itype = 0; itype <
num_types(); ++itype)
83 isoVars.push_back(
x.isolationValues[
type(itype)]);
85 const float isoValue = f->EvalPar(isoVars.data());
87 ATH_MSG_DEBUG(
"PLIV Isolation values of electron %.3f " << isoValue);
90 return isoValue <= cutValue;
91 return isoValue > cutValue;
95 const float eta)
const {
102 "Stored binning in file does not comply with binning of graphs for "
104 << this->
name() <<
"! Please contact the IFF group");
108 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::vector< TGraph * > m_cutGraphs
std::unique_ptr< TH1F > m_binning
IsolationConditionGraph(const std::string &name, const std::vector< std::string > &isoType, std::unique_ptr< TF1 > isoFunction, std::vector< 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.