8 #include <GaudiKernel/SystemOfUnits.h>
24 return a->name() <
b->name();
34 return a->name() <
b->name();
40 static const std::set<Feature_t, std::less<>> featurePool{
41 std::make_unique<NodeFeature>(
"localX",
43 return bucket[
index]->localPosition().
x();
45 std::make_unique<NodeFeature>(
"localY",
47 return bucket[
index]->localPosition().
y();
48 bucket[
index]->localPosition().
y();
50 std::make_unique<NodeFeature>(
"localZ",
52 return bucket[
index]->localPosition().
z();
54 std::make_unique<NodeFeature>(
"stationIndex",
58 std::make_unique<NodeFeature>(
"stationPhi",
60 return bucket[
index]->msSector()->idHelperSvc()->stationPhi(bucket[
index]->
identify());
62 std::make_unique<NodeFeature>(
"stationEta",
64 return bucket[
index]->msSector()->idHelperSvc()->stationEta(bucket[
index]->
identify());
66 std::make_unique<NodeFeature>(
"driftR",
68 return bucket[
index]->driftRadius();
70 std::make_unique<NodeFeature>(
"relative_layer",
75 std::make_unique<NodeFeature>(
"neighbors",
84 std::make_unique<NodeFeature>(
"bucket_density",
85 [](
const Bucket_t& bucket,
size_t ) {
89 std::make_unique<NodeFeature>(
"isolation",
91 unsigned int neighbors = 0;
98 return neighbors / bucket_density;
101 std::make_unique<NodeFeature>(
"covX",
103 return bucket[
index]->covariance()[Acts::toUnderlying(CovIdx::phiCov)];
105 std::make_unique<NodeFeature>(
"covY",
107 return bucket[
index]->covariance()[Acts::toUnderlying(CovIdx::etaCov)];
110 const auto feat_itr = featurePool.find(featName);
111 if(feat_itr != featurePool.end()){
117 std::stringstream available{};
119 available<<
known->name()<<
", ";
121 log<<MSG::ERROR<<
"The feature "<<featName<<
" is unknown to the feature factory. "
122 <<
" Please check for typos w.r.t "<<available.str()<<
". Otherwise augment "
123 <<__FILE__<<
" with your desired feature "<<
endmsg;
128 static const std::set<Connector_t, std::less<>> connectorPool{
129 std::make_unique<NodeConnector>(
"fullyConnected",
130 [](
const Bucket_t& ,
size_t ,
size_t ) {
134 const auto feat_itr = connectorPool.find(connName);
135 if(feat_itr != connectorPool.end()){
141 std::stringstream available{};
143 available<<
known->name()<<
", ";
145 log<<MSG::ERROR<<
"The graph connector "<<connName<<
" is unknown to the factory. "
146 <<
" Please check for typos w.r.t "<<available.str()<<
". Otherwise augment "
147 <<__FILE__<<
" with your desired connection function. "<<
endmsg;