ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
JetPileupTag::NNJvtCutMap Struct Reference

The NNJvt cut maps. More...

#include <NNJvtBinning.h>

Collaboration diagram for JetPileupTag::NNJvtCutMap:

Public Member Functions

std::string toJSON () const
 
float operator() (float pt, float eta) const
 Get the correct cut value for the provided pt/eta. More...
 
float operator() (const xAOD::IParticle &particle) const
 Get the correct cut value for the provided particle. More...
 
float operator() (std::size_t ptBin, std::size_t etaBin) const
 Get the correct cut value for the provided pt/eta bins. More...
 

Static Public Member Functions

static NNJvtCutMap fromJSON (std::istream &is)
 

Public Attributes

NNJvtBinning edges
 
std::vector< std::vector< float > > cutMap
 

Detailed Description

The NNJvt cut maps.

Definition at line 50 of file NNJvtBinning.h.

Member Function Documentation

◆ fromJSON()

NNJvtCutMap JetPileupTag::NNJvtCutMap::fromJSON ( std::istream &  is)
static

Definition at line 90 of file NNJvtBinning.cxx.

90  {
92  is >> j;
93  return j.get<NNJvtCutMap>();
94  }

◆ operator()() [1/3]

float JetPileupTag::NNJvtCutMap::operator() ( const xAOD::IParticle particle) const

Get the correct cut value for the provided particle.

Returns -1 if out of bounds

Parameters
particleThe particle to test
Returns
The cut value

Definition at line 107 of file NNJvtBinning.cxx.

107  {
108  std::size_t ptBin, etaBin;
109  if (!edges(particle, ptBin, etaBin))
110  return -1;
111  return this->operator()(ptBin, etaBin);
112  }

◆ operator()() [2/3]

float JetPileupTag::NNJvtCutMap::operator() ( float  pt,
float  eta 
) const

Get the correct cut value for the provided pt/eta.

Returns -1 if out of bounds

Parameters
ptThe pt of the object
etaThe eta of the object
Returns
The cut value

Definition at line 100 of file NNJvtBinning.cxx.

100  {
101  std::size_t ptBin, etaBin;
102  if (!edges(pt, eta, ptBin, etaBin))
103  return -1;
104  return this->operator()(ptBin, etaBin);
105  }

◆ operator()() [3/3]

float JetPileupTag::NNJvtCutMap::operator() ( std::size_t  ptBin,
std::size_t  etaBin 
) const

Get the correct cut value for the provided pt/eta bins.

Both indices must be in bounds

Parameters
ptBinThept bin of the object
etaBinThe eta bin of the object
Returns
The cut value

Definition at line 114 of file NNJvtBinning.cxx.

114  {
115  return cutMap.at(ptBin).at(etaBin);
116  }

◆ toJSON()

std::string JetPileupTag::NNJvtCutMap::toJSON ( ) const

Definition at line 96 of file NNJvtBinning.cxx.

96  {
97  return nlohmann::json(*this).dump();
98  }

Member Data Documentation

◆ cutMap

std::vector<std::vector<float> > JetPileupTag::NNJvtCutMap::cutMap

Definition at line 52 of file NNJvtBinning.h.

◆ edges

NNJvtBinning JetPileupTag::NNJvtCutMap::edges

Definition at line 51 of file NNJvtBinning.h.


The documentation for this struct was generated from the following files:
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
json
nlohmann::json json
Definition: HistogramDef.cxx:9
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
test_pyathena.pt
pt
Definition: test_pyathena.py:11
xAOD::etaBin
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap etaBin
Definition: L2StandAloneMuon_v1.cxx:148
JetPileupTag::NNJvtCutMap::edges
NNJvtBinning edges
Definition: NNJvtBinning.h:51
JetPileupTag::NNJvtCutMap::operator()
float operator()(float pt, float eta) const
Get the correct cut value for the provided pt/eta.
Definition: NNJvtBinning.cxx:100
JetPileupTag::NNJvtCutMap::cutMap
std::vector< std::vector< float > > cutMap
Definition: NNJvtBinning.h:52