8 #include <GaudiKernel/SystemOfUnits.h>
24 return a->name() <
b->name();
34 return a->name() <
b->name();
39 static const std::set<Feature_t, std::less<>> featurePool{
40 std::make_unique<NodeFeature>(
"localX",
42 return bucket[
index]->positionInChamber().
x();
44 std::make_unique<NodeFeature>(
"localY",
46 return bucket[
index]->positionInChamber().
y();
47 bucket[
index]->positionInChamber().
y();
49 std::make_unique<NodeFeature>(
"localZ",
51 return bucket[
index]->positionInChamber().
z();
53 std::make_unique<NodeFeature>(
"stationIndex",
57 std::make_unique<NodeFeature>(
"stationPhi",
59 return bucket[
index]->msSector()->idHelperSvc()->stationPhi(bucket[
index]->
identify());
61 std::make_unique<NodeFeature>(
"stationEta",
63 return bucket[
index]->msSector()->idHelperSvc()->stationEta(bucket[
index]->
identify());
65 std::make_unique<NodeFeature>(
"driftR",
67 return bucket[
index]->driftRadius();
69 std::make_unique<NodeFeature>(
"relative_layer",
74 std::make_unique<NodeFeature>(
"neighbors",
83 std::make_unique<NodeFeature>(
"bucket_density",
84 [](
const Bucket_t& bucket,
size_t ) {
88 std::make_unique<NodeFeature>(
"isolation",
90 unsigned int neighbors = 0;
93 neighbors+=
index !=
other && (bucket[
index]->positionInChamber() - bucket[
other]->positionInChamber()).
perp2() < radCut2;
97 return neighbors / bucket_density;
99 std::make_unique<NodeFeature>(
"covX",
103 std::make_unique<NodeFeature>(
"covY",
107 std::make_unique<NodeFeature>(
"covXY",
112 const auto feat_itr = featurePool.find(featName);
113 if(feat_itr != featurePool.end()){
119 std::stringstream available{};
121 available<<
known->name()<<
", ";
123 log<<MSG::ERROR<<
"The feature "<<featName<<
" is unknown to the feature factory. "
124 <<
" Please check for typos w.r.t "<<available.str()<<
". Otherwise augment "
125 <<__FILE__<<
" with your desired feature "<<
endmsg;
130 static const std::set<Connector_t, std::less<>> connectorPool{
131 std::make_unique<NodeConnector>(
"fullyConnected",
132 [](
const Bucket_t& ,
size_t ,
size_t ) {
136 const auto feat_itr = connectorPool.find(connName);
137 if(feat_itr != connectorPool.end()){
143 std::stringstream available{};
145 available<<
known->name()<<
", ";
147 log<<MSG::ERROR<<
"The graph connector "<<connName<<
" is unknown to the factory. "
148 <<
" Please check for typos w.r.t "<<available.str()<<
". Otherwise augment "
149 <<__FILE__<<
" with your desired connection function. "<<
endmsg;