Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Private Attributes | List of all members
MuonML::NodeFeature Class Reference

The NodeFeature is the gluing instance to extract the information from the space point inside a MuonBucket and then to parse it to the ML inference framework. More...

#include <NodeFeature.h>

Collaboration diagram for MuonML::NodeFeature:

Public Types

using Bucket_t = LayerSpBucket
 Abreviation of the Space point bucket type. More...
 
using Func_t = std::function< double(const Bucket_t &, size_t)>
 Lambda function type to extract the feature from a bucket. More...
 

Public Member Functions

 NodeFeature (const std::string &featName, const Func_t &extractFunc)
 Standard constructor to build a feature. More...
 
 NodeFeature (NodeFeature &&other)=default
 Standard move assignment & move constructor. More...
 
const std::string & name () const
 Returns the feature name. More...
 
double eval (const Bucket_t &bucket, size_t spIndex) const
 Extract the feature from a space point inside the bucket. More...
 

Private Attributes

std::string m_name {}
 
Func_t m_func {[](const Bucket_t& , size_t) { return 0.; }}
 

Detailed Description

The NodeFeature is the gluing instance to extract the information from the space point inside a MuonBucket and then to parse it to the ML inference framework.

Definition at line 16 of file NodeFeature.h.

Member Typedef Documentation

◆ Bucket_t

Abreviation of the Space point bucket type.

Definition at line 19 of file NodeFeature.h.

◆ Func_t

using MuonML::NodeFeature::Func_t = std::function<double(const Bucket_t&, size_t)>

Lambda function type to extract the feature from a bucket.

  • : Bucket_t of interest
  • : size_t Index of the space point to extract the bucket from

Definition at line 24 of file NodeFeature.h.

Constructor & Destructor Documentation

◆ NodeFeature() [1/2]

MuonML::NodeFeature::NodeFeature ( const std::string &  featName,
const Func_t extractFunc 
)
inline

Standard constructor to build a feature.

Parameters
featNameName of the feature used to distinguish whether two feature lists are the same

Definition at line 29 of file NodeFeature.h.

30  :
31  m_name{featName}, m_func{extractFunc}{}

◆ NodeFeature() [2/2]

MuonML::NodeFeature::NodeFeature ( NodeFeature &&  other)
default

Standard move assignment & move constructor.

Member Function Documentation

◆ eval()

double MuonML::NodeFeature::eval ( const Bucket_t bucket,
size_t  spIndex 
) const
inline

Extract the feature from a space point inside the bucket.

Parameters
bucketReference to the space point bucket of interest
spIndexIndex of the space point to extract the feature from

Definition at line 42 of file NodeFeature.h.

42  {
43  return m_func(bucket, spIndex);
44  }

◆ name()

const std::string& MuonML::NodeFeature::name ( ) const
inline

Returns the feature name.

Definition at line 36 of file NodeFeature.h.

36  {
37  return m_name;
38  }

Member Data Documentation

◆ m_func

Func_t MuonML::NodeFeature::m_func {[](const Bucket_t& , size_t) { return 0.; }}
private

Definition at line 47 of file NodeFeature.h.

◆ m_name

std::string MuonML::NodeFeature::m_name {}
private

Definition at line 46 of file NodeFeature.h.


The documentation for this class was generated from the following file:
MuonML::NodeFeature::m_func
Func_t m_func
Definition: NodeFeature.h:47
MuonML::NodeFeature::m_name
std::string m_name
Definition: NodeFeature.h:46