ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonPhaseII
MuonLearning
MuonInferenceInterfaces
MuonInferenceInterfaces
NodeFeature.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef MUONINFERENCEINTERACES_GRAPHFEATURE_H
5
#define MUONINFERENCEINTERACES_GRAPHFEATURE_H
6
7
8
#include <functional>
9
#include <string>
10
11
#include "
MuonInferenceInterfaces/LayerBucket.h
"
12
13
namespace
MuonML
{
16
class
NodeFeature
{
17
public
:
19
using
Bucket_t
=
LayerSpBucket
;
20
24
using
Func_t
= std::function<double(
const
Bucket_t
&,
size_t
)>;
25
29
NodeFeature
(
const
std::string& featName,
30
const
Func_t
& extractFunc):
31
m_name
{featName},
m_func
{extractFunc}{}
32
33
NodeFeature
(
NodeFeature
&& other) =
default
;
34
36
const
std::string&
name
()
const
{
37
return
m_name
;
38
}
39
42
double
eval
(
const
Bucket_t
& bucket,
size_t
spIndex)
const
{
43
return
m_func
(bucket, spIndex);
44
}
45
private
:
46
std::string
m_name
{};
47
Func_t
m_func
{[](
const
Bucket_t
& , size_t) {
return
0.; }};
48
};
49
}
50
#endif
LayerBucket.h
MuonML::LayerSpBucket
The LayerSpBucket is a space pointbucket where the points are internally sorted by their layer number...
Definition
LayerBucket.h:14
MuonML::NodeFeature::m_name
std::string m_name
Definition
NodeFeature.h:46
MuonML::NodeFeature::NodeFeature
NodeFeature(NodeFeature &&other)=default
Standard move assignment & move constructor.
MuonML::NodeFeature::Bucket_t
LayerSpBucket Bucket_t
Abreviation of the Space point bucket type.
Definition
NodeFeature.h:19
MuonML::NodeFeature::name
const std::string & name() const
Returns the feature name.
Definition
NodeFeature.h:36
MuonML::NodeFeature::eval
double eval(const Bucket_t &bucket, size_t spIndex) const
Extract the feature from a space point inside the bucket.
Definition
NodeFeature.h:42
MuonML::NodeFeature::m_func
Func_t m_func
Definition
NodeFeature.h:47
MuonML::NodeFeature::Func_t
std::function< double(const Bucket_t &, size_t)> Func_t
Lambda function type to extract the feature from a bucket.
Definition
NodeFeature.h:24
MuonML::NodeFeature::NodeFeature
NodeFeature(const std::string &featName, const Func_t &extractFunc)
Standard constructor to build a feature.
Definition
NodeFeature.h:29
MuonML
Definition
BucketGraphUtils.h:19
Generated on
for ATLAS Offline Software by
1.17.0