Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <FPGATrackSimGNNGraphConstructionTool.h>
|
| FPGATrackSimGNNGraphConstructionTool (const std::string &, const std::string &, const IInterface *) |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | getEdges (const std::vector< std::shared_ptr< FPGATrackSimGNNHit >> &hits, std::vector< std::shared_ptr< FPGATrackSimGNNEdge >> &edges) |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
void | loadDoubletModuleMap () |
|
void | doModuleMap (const std::vector< std::shared_ptr< FPGATrackSimGNNHit >> &hits, std::vector< std::shared_ptr< FPGATrackSimGNNEdge >> &edges) |
|
void | getDoubletEdges (const std::vector< std::shared_ptr< FPGATrackSimGNNHit >> &hits, std::vector< std::shared_ptr< FPGATrackSimGNNEdge >> &edges) |
|
void | applyDoubletCuts (const std::shared_ptr< FPGATrackSimGNNHit > &hit1, const std::shared_ptr< FPGATrackSimGNNHit > &hit2, std::vector< std::shared_ptr< FPGATrackSimGNNEdge >> &edges, int hit1_index, int hit2_index, unsigned int modulemap_id) |
|
bool | doMask (float val, float min, float max) |
|
bool | doMinMaxMask (float val, float min, float max) |
|
float | featureSign (float feature) |
|
void | doMetricLearning (const std::vector< std::shared_ptr< FPGATrackSimGNNHit >> &hits, std::vector< std::shared_ptr< FPGATrackSimGNNEdge >> &edges) |
|
std::vector< float > | getNodeFeatures (const std::vector< std::shared_ptr< FPGATrackSimGNNHit >> &hits) |
|
std::vector< float > | embed (const std::vector< std::shared_ptr< FPGATrackSimGNNHit >> &hits) |
|
void | doClustering (const std::vector< std::shared_ptr< FPGATrackSimGNNHit >> &hits, std::vector< std::shared_ptr< FPGATrackSimGNNEdge >> &edges, std::vector< float > &gEmbedded) |
|
void | computeEdgeFeatures (std::shared_ptr< FPGATrackSimGNNEdge > &edge, const std::shared_ptr< FPGATrackSimGNNHit > &hit1, const std::shared_ptr< FPGATrackSimGNNHit > &hit2) |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
ToolHandle< AthOnnx::IOnnxRuntimeInferenceTool > | m_MLInferenceTool {this, "MLInferenceTool", "AthOnnx::OnnxRuntimeInferenceTool"} |
|
Gaudi::Property< std::string > | m_graphTool { this, "graphTool", "", "Tool for graph construction" } |
|
Gaudi::Property< std::string > | m_moduleMapType { this, "moduleMapType", "", "Type for Module Map for graph construction" } |
|
Gaudi::Property< std::string > | m_moduleMapFunc { this, "moduleMapFunc", "", "Function for Module Map for graph construction" } |
|
Gaudi::Property< float > | m_moduleMapTol { this, "moduleMapTol", 0.0, "Tolerance value for Module Map cut calculations" } |
|
Gaudi::Property< std::string > | m_moduleMapPath { this, "moduleMapPath", "", "Location of Module Map ROOT file" } |
|
Gaudi::Property< float > | m_metricLearningR { this, "metricLearningR", 0.0, "Clustering radius for Metric Learning"} |
|
Gaudi::Property< int > | m_metricLearningMaxN { this, "metricLearningMaxN", 1, "Max number of neighbours for Metric Learning"} |
|
std::vector< unsigned int > | m_mid1 {} |
|
std::vector< unsigned int > | m_mid2 {} |
|
std::vector< float > | m_z0min_12 {} |
|
std::vector< float > | m_dphimin_12 {} |
|
std::vector< float > | m_phislopemin_12 {} |
|
std::vector< float > | m_detamin_12 {} |
|
std::vector< float > | m_z0max_12 {} |
|
std::vector< float > | m_dphimax_12 {} |
|
std::vector< float > | m_phislopemax_12 {} |
|
std::vector< float > | m_detamax_12 {} |
|
StringArrayProperty | m_MLFeatureNamesVec |
|
FloatArrayProperty | m_MLFeatureScalesVec |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
◆ StoreGateSvc_t
◆ FPGATrackSimGNNGraphConstructionTool()
FPGATrackSimGNNGraphConstructionTool::FPGATrackSimGNNGraphConstructionTool |
( |
const std::string & |
algname, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
ifc |
|
) |
| |
◆ applyDoubletCuts()
Definition at line 136 of file FPGATrackSimGNNGraphConstructionTool.cxx.
146 float dz = hit2->
getZ() - hit1->
getZ();
156 float phislope =
dr==0. ? 0. : dphi /
dr;
160 std::shared_ptr<FPGATrackSimGNNEdge> edge = std::make_shared<FPGATrackSimGNNEdge>();
164 edges.emplace_back(edge);
◆ computeEdgeFeatures()
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ doClustering()
void FPGATrackSimGNNGraphConstructionTool::doClustering |
( |
const std::vector< std::shared_ptr< FPGATrackSimGNNHit >> & |
hits, |
|
|
std::vector< std::shared_ptr< FPGATrackSimGNNEdge >> & |
edges, |
|
|
std::vector< float > & |
gEmbedded |
|
) |
| |
|
private |
Definition at line 238 of file FPGATrackSimGNNGraphConstructionTool.cxx.
250 std::vector<float>
start(n_dim);
256 for(
int j = 0; j < n_dim; ++j){
257 start[j] = gEmbedded[
k*n_dim + j];
262 for(
int d = 0;
d < n_dim; ++
d){
267 std::shared_ptr<FPGATrackSimGNNEdge> edge = std::make_shared<FPGATrackSimGNNEdge>();
271 if (d_i_sq < d_k_sq){
282 edges.emplace_back(edge);
◆ doMask()
bool FPGATrackSimGNNGraphConstructionTool::doMask |
( |
float |
val, |
|
|
float |
min, |
|
|
float |
max |
|
) |
| |
|
private |
◆ doMetricLearning()
◆ doMinMaxMask()
bool FPGATrackSimGNNGraphConstructionTool::doMinMaxMask |
( |
float |
val, |
|
|
float |
min, |
|
|
float |
max |
|
) |
| |
|
private |
◆ doModuleMap()
◆ embed()
std::vector< float > FPGATrackSimGNNGraphConstructionTool::embed |
( |
const std::vector< std::shared_ptr< FPGATrackSimGNNHit >> & |
hits | ) |
|
|
private |
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ featureSign()
float FPGATrackSimGNNGraphConstructionTool::featureSign |
( |
float |
feature | ) |
|
|
private |
◆ getDoubletEdges()
Definition at line 106 of file FPGATrackSimGNNGraphConstructionTool.cxx.
110 for (
size_t i = 0;
i <
m_mid2.size();
i++) {
111 std::vector<std::shared_ptr<FPGATrackSimGNNHit>> hit1_matches;
112 std::vector<std::shared_ptr<FPGATrackSimGNNHit>> hit2_matches;
114 std::vector<int> hit1_indices;
115 std::vector<int> hit2_indices;
117 for (
size_t j = 0; j <
hits.size(); j++) {
119 hit1_matches.emplace_back(
hits[j]);
120 hit1_indices.emplace_back(j);
123 hit2_matches.emplace_back(
hits[j]);
124 hit2_indices.emplace_back(j);
128 for (
size_t h1 = 0;
h1 < hit1_matches.size();
h1++) {
129 for (
size_t h2 = 0; h2 < hit2_matches.size(); h2++) {
◆ getEdges()
◆ getNodeFeatures()
std::vector< float > FPGATrackSimGNNGraphConstructionTool::getNodeFeatures |
( |
const std::vector< std::shared_ptr< FPGATrackSimGNNHit >> & |
hits | ) |
|
|
private |
Definition at line 205 of file FPGATrackSimGNNGraphConstructionTool.cxx.
207 std::vector<float> gNodeFeatures;
209 for(
auto hit :
hits) {
210 std::map<std::string, float> features;
211 features[
"r"] = hit->getR();
212 features[
"phi"] = hit->getPhi();
213 features[
"z"] = hit->getZ();
216 gNodeFeatures.push_back(
220 return gNodeFeatures;
◆ initialize()
StatusCode FPGATrackSimGNNGraphConstructionTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ loadDoubletModuleMap()
void FPGATrackSimGNNGraphConstructionTool::loadDoubletModuleMap |
( |
| ) |
|
|
private |
Definition at line 50 of file FPGATrackSimGNNGraphConstructionTool.cxx.
53 std::unique_ptr<TTree>
tree(
static_cast<TTree*
>(
file->Get(
"TreeModuleDoublet")));
55 unsigned int mid1_value = 0;
56 unsigned int mid2_value = 0;
57 float z0min_12_value = 0.0;
58 float dphimin_12_value = 0.0;
59 float phislopemin_12_value = 0.0;
60 float detamin_12_value = 0.0;
61 float z0max_12_value = 0.0;
62 float dphimax_12_value = 0.0;
63 float phislopemax_12_value = 0.0;
64 float detamax_12_value = 0.0;
66 tree->SetBranchAddress(
"Module1", &mid1_value);
67 tree->SetBranchAddress(
"Module2", &mid2_value);
68 tree->SetBranchAddress(
"z0min_12", &z0min_12_value);
69 tree->SetBranchAddress(
"dphimin_12", &dphimin_12_value);
70 tree->SetBranchAddress(
"phiSlopemin_12", &phislopemin_12_value);
71 tree->SetBranchAddress(
"detamin_12", &detamin_12_value);
72 tree->SetBranchAddress(
"z0max_12", &z0max_12_value);
73 tree->SetBranchAddress(
"dphimax_12", &dphimax_12_value);
74 tree->SetBranchAddress(
"phiSlopemax_12", &phislopemax_12_value);
75 tree->SetBranchAddress(
"detamax_12", &detamax_12_value);
80 m_mid1.emplace_back(mid1_value);
81 m_mid2.emplace_back(mid2_value);
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detamax_12
std::vector<float> FPGATrackSimGNNGraphConstructionTool::m_detamax_12 {} |
|
private |
◆ m_detamin_12
std::vector<float> FPGATrackSimGNNGraphConstructionTool::m_detamin_12 {} |
|
private |
◆ m_detStore
◆ m_dphimax_12
std::vector<float> FPGATrackSimGNNGraphConstructionTool::m_dphimax_12 {} |
|
private |
◆ m_dphimin_12
std::vector<float> FPGATrackSimGNNGraphConstructionTool::m_dphimin_12 {} |
|
private |
◆ m_evtStore
◆ m_graphTool
Gaudi::Property<std::string> FPGATrackSimGNNGraphConstructionTool::m_graphTool { this, "graphTool", "", "Tool for graph construction" } |
|
private |
◆ m_metricLearningMaxN
Gaudi::Property<int> FPGATrackSimGNNGraphConstructionTool::m_metricLearningMaxN { this, "metricLearningMaxN", 1, "Max number of neighbours for Metric Learning"} |
|
private |
◆ m_metricLearningR
Gaudi::Property<float> FPGATrackSimGNNGraphConstructionTool::m_metricLearningR { this, "metricLearningR", 0.0, "Clustering radius for Metric Learning"} |
|
private |
◆ m_mid1
std::vector<unsigned int> FPGATrackSimGNNGraphConstructionTool::m_mid1 {} |
|
private |
◆ m_mid2
std::vector<unsigned int> FPGATrackSimGNNGraphConstructionTool::m_mid2 {} |
|
private |
◆ m_MLFeatureNamesVec
StringArrayProperty FPGATrackSimGNNGraphConstructionTool::m_MLFeatureNamesVec |
|
private |
◆ m_MLFeatureScalesVec
FloatArrayProperty FPGATrackSimGNNGraphConstructionTool::m_MLFeatureScalesVec |
|
private |
◆ m_MLInferenceTool
◆ m_moduleMapFunc
Gaudi::Property<std::string> FPGATrackSimGNNGraphConstructionTool::m_moduleMapFunc { this, "moduleMapFunc", "", "Function for Module Map for graph construction" } |
|
private |
◆ m_moduleMapPath
Gaudi::Property<std::string> FPGATrackSimGNNGraphConstructionTool::m_moduleMapPath { this, "moduleMapPath", "", "Location of Module Map ROOT file" } |
|
private |
◆ m_moduleMapTol
Gaudi::Property<float> FPGATrackSimGNNGraphConstructionTool::m_moduleMapTol { this, "moduleMapTol", 0.0, "Tolerance value for Module Map cut calculations" } |
|
private |
◆ m_moduleMapType
Gaudi::Property<std::string> FPGATrackSimGNNGraphConstructionTool::m_moduleMapType { this, "moduleMapType", "", "Type for Module Map for graph construction" } |
|
private |
◆ m_phislopemax_12
std::vector<float> FPGATrackSimGNNGraphConstructionTool::m_phislopemax_12 {} |
|
private |
◆ m_phislopemin_12
std::vector<float> FPGATrackSimGNNGraphConstructionTool::m_phislopemin_12 {} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_z0max_12
std::vector<float> FPGATrackSimGNNGraphConstructionTool::m_z0max_12 {} |
|
private |
◆ m_z0min_12
std::vector<float> FPGATrackSimGNNGraphConstructionTool::m_z0min_12 {} |
|
private |
The documentation for this class was generated from the following files:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
void setEdgeIndex1(int v)
void setEdgePhiSlope(float v)
void setEdgeIndex2(int v)
virtual void setOwner(IDataHandleHolder *o)=0
void setEdgeDPhi(float v)
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
::StatusCode StatusCode
StatusCode definition for legacy code.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void setEdgeRPhiSlope(float v)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
void setEdgeDEta(float v)
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>