ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
FTagScaleFactorTools
src
QuantileFactory.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef CP_QUANTILEFACTORY_H
5
#define CP_QUANTILEFACTORY_H
6
7
#include "
AthContainers/AuxElement.h
"
8
#include <string>
9
#include <nlohmann/json.hpp>
10
16
class
QuantileFactory
{
17
18
public
:
19
using
QuantileFunc
= std::pair<size_t, std::function<int(
const
SG::AuxElement
&)>>;
21
static
QuantileFunc
quantileFactory
(
const
nlohmann::json& cfg);
22
26
static
std::vector<float>
parseEdges
(
const
nlohmann::json& cfg);
27
28
private
:
30
static
QuantileFunc
makeEnumerate
(
const
nlohmann::json& cfg);
31
34
static
QuantileFunc
makeCategory
(
const
nlohmann::json& cfg);
35
38
static
QuantileFunc
makeNodes
(
const
nlohmann::json& cfg);
39
42
static
QuantileFunc
makeDense
(
const
nlohmann::json& cfg);
43
44
};
45
46
#endif
// CP_QUANTILEFACTORY_H
AuxElement.h
Base class for elements of a container that can have aux data.
QuantileFactory
Builds binning and quantisation functions from a JSON configuration.
Definition
QuantileFactory.h:16
QuantileFactory::QuantileFunc
std::pair< size_t, std::function< int(const SG::AuxElement &)> > QuantileFunc
Definition
QuantileFactory.h:19
QuantileFactory::makeEnumerate
static QuantileFunc makeEnumerate(const nlohmann::json &cfg)
Maps discrete values to category indices.
Definition
QuantileFactory.cxx:66
QuantileFactory::makeNodes
static QuantileFunc makeNodes(const nlohmann::json &cfg)
Builds a tree-based lookup structure for node-based binning, primarily used for pseudo-continuous 2D ...
Definition
QuantileFactory.cxx:94
QuantileFactory::makeDense
static QuantileFunc makeDense(const nlohmann::json &cfg)
Combines multiple binning dimensions into a single flattened global index used for scale factor looku...
Definition
QuantileFactory.cxx:141
QuantileFactory::quantileFactory
static QuantileFunc quantileFactory(const nlohmann::json &cfg)
Dispatch to the appropriate binning scheme based on the JSON config.
Definition
QuantileFactory.cxx:174
QuantileFactory::parseEdges
static std::vector< float > parseEdges(const nlohmann::json &cfg)
Parse an ordered list of bin edges from the JSON config.
Definition
QuantileFactory.cxx:9
QuantileFactory::makeCategory
static QuantileFunc makeCategory(const nlohmann::json &cfg)
Converts a continuous variable into a bin index using an ordered list of bin edges.
Definition
QuantileFactory.cxx:43
SG::AuxElement
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.
Generated on
for ATLAS Offline Software by
1.17.0