ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
FPGATrackSimGNNRoadMakerTool Class Reference

#include <FPGATrackSimGNNRoadMakerTool.h>

Inheritance diagram for FPGATrackSimGNNRoadMakerTool:
Collaboration diagram for FPGATrackSimGNNRoadMakerTool:

Public Member Functions

 FPGATrackSimGNNRoadMakerTool (const std::string &, const std::string &, const IInterface *)
 
virtual StatusCode initialize () override
 
virtual StatusCode makeRoads (const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits, const std::vector< std::shared_ptr< FPGATrackSimGNNHit >> &gnn_hits, const std::vector< std::shared_ptr< FPGATrackSimGNNEdge >> &edges, std::vector< std::shared_ptr< const FPGATrackSimRoad >> &roads)
 
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, V, H > &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
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS > m_Graph
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void doScoreCut (const std::vector< std::shared_ptr< FPGATrackSimGNNEdge >> &edges)
 
void doConnectedComponents ()
 
void addRoads (const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits, const std::vector< std::shared_ptr< FPGATrackSimGNNHit >> &gnn_hits, std::vector< std::shared_ptr< const FPGATrackSimRoad >> &roads)
 
void addRoad (const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits, const std::vector< int > &road_hitIDs)
 
void resetVectors ()
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< IFPGATrackSimMappingSvcm_FPGATrackSimMapping {this, "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"}
 
Gaudi::Property< float > m_edgeScoreCut { this, "edgeScoreCut", 0.0, "Cut value for edge scores to pass for road making algorithm" }
 
Gaudi::Property< std::string > m_roadMakerTool { this, "roadMakerTool", "", "Algorithm to perform graph segmentation into roads"}
 
int m_num_nodes = 0
 
std::vector< int > m_pass_edge_index_1 {}
 
std::vector< int > m_pass_edge_index_2 {}
 
unsigned m_nLayers = 0
 
std::set< int > m_unique_nodes {}
 
std::map< int, int > m_node_index_map {}
 
std::vector< int > m_unique_indices {}
 
std::vector< int > m_component {}
 
int m_num_components = 0
 
std::vector< int > m_labels {}
 
std::vector< std::vector< int > > m_road_hit_list {}
 
std::vector< FPGATrackSimRoadm_roads {}
 
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
 

Detailed Description

Definition at line 32 of file FPGATrackSimGNNRoadMakerTool.h.

Member Typedef Documentation

◆ m_Graph

typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS> FPGATrackSimGNNRoadMakerTool::m_Graph
private

Definition at line 74 of file FPGATrackSimGNNRoadMakerTool.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ FPGATrackSimGNNRoadMakerTool()

FPGATrackSimGNNRoadMakerTool::FPGATrackSimGNNRoadMakerTool ( const std::string &  algname,
const std::string &  name,
const IInterface *  ifc 
)

Definition at line 10 of file FPGATrackSimGNNRoadMakerTool.cxx.

11  : AthAlgTool(algname, name, ifc) {}

Member Function Documentation

◆ addRoad()

void FPGATrackSimGNNRoadMakerTool::addRoad ( const std::vector< std::shared_ptr< const FPGATrackSimHit >> &  hits,
const std::vector< int > &  road_hitIDs 
)
private

Definition at line 104 of file FPGATrackSimGNNRoadMakerTool.cxx.

105 {
106  // Take the HitID values and find the correct hit from FPGATrackSimHit, then insert it into a vector of mapped FPGATrackSimHit which are needed for the FPGATrackSimRoad
107  std::vector<std::shared_ptr<const FPGATrackSimHit>> mapped_road_hits;
108  const FPGATrackSimPlaneMap *pmap = m_FPGATrackSimMapping->PlaneMap_1st(0);
109  layer_bitmask_t hitLayers = 0;
110 
111  for (const auto& hitID : road_hitIDs) {
112  if(hitID+1 < static_cast<int>(hits.size()) && hits[hitID]->isStrip() && hits[hitID+1]->isStrip() &&
113  to_string(hits[hitID]->getHitType()) == "spacepoint" && to_string(hits[hitID+1]->getHitType()) == "spacepoint" &&
114  hits[hitID]->getX() == hits[hitID+1]->getX()) {
115  auto &hit1 = hits[hitID];
116  std::shared_ptr<FPGATrackSimHit> hitCopy1 = std::make_shared<FPGATrackSimHit>(*hit1);
117  pmap->map(*hitCopy1);
118  hitLayers |= 1 << hitCopy1->getLayer();
119  mapped_road_hits.push_back(std::move(hitCopy1));
120  //
121  auto &hit2 = hits[hitID+1];
122  std::shared_ptr<FPGATrackSimHit> hitCopy2 = std::make_shared<FPGATrackSimHit>(*hit2);
123  pmap->map(*hitCopy2);
124  hitLayers |= 1 << hitCopy2->getLayer();
125  mapped_road_hits.push_back(std::move(hitCopy2));
126  }
127  else {
128  auto &hit = hits[hitID];
129  std::shared_ptr<FPGATrackSimHit> hitCopy = std::make_shared<FPGATrackSimHit>(*hit);
130  pmap->map(*hitCopy);
131  hitLayers |= 1 << hitCopy->getLayer();
132  mapped_road_hits.push_back(std::move(hitCopy));
133  }
134  }
135 
136  m_roads.emplace_back();
137  FPGATrackSimRoad & r = m_roads.back();
138  auto sorted_hits = ::sortByLayer(mapped_road_hits);
139  sorted_hits.resize(m_nLayers);
140  r.setRoadID(m_roads.size() - 1);
141  r.setHitLayers(hitLayers);
142  r.setHits(std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>>(std::move(sorted_hits)));
143  r.setSubRegion(0);
144 }

◆ addRoads()

void FPGATrackSimGNNRoadMakerTool::addRoads ( const std::vector< std::shared_ptr< const FPGATrackSimHit >> &  hits,
const std::vector< std::shared_ptr< FPGATrackSimGNNHit >> &  gnn_hits,
std::vector< std::shared_ptr< const FPGATrackSimRoad >> &  roads 
)
private

Definition at line 82 of file FPGATrackSimGNNRoadMakerTool.cxx.

85 {
86  roads.clear();
87  m_roads.clear();
88 
90  for (size_t i = 0; i < m_labels.size(); i++) {
91  if(m_labels[i] != -1) {
92  m_road_hit_list[m_labels[i]].push_back(gnn_hits[i]->getHitID());
93  }
94  }
95 
96  for (const auto& hit_list : m_road_hit_list) {
97  addRoad(hits, hit_list);
98  }
99 
100  roads.reserve(m_roads.size());
101  for (const FPGATrackSimRoad & r : m_roads) roads.emplace_back(std::make_shared<const FPGATrackSimRoad>(r));
102 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ doConnectedComponents()

void FPGATrackSimGNNRoadMakerTool::doConnectedComponents ( )
private

Definition at line 49 of file FPGATrackSimGNNRoadMakerTool.cxx.

50 {
51  // Remove isolated nodes from list of nodes using list of edges and indices
54 
55  int index = 0;
56  for (int node : m_unique_nodes) {
57  m_node_index_map[node] = index++; // Mapping original node index to new graph index
58  }
59 
60  for (const auto& entry : m_node_index_map) {
61  m_unique_indices.push_back(entry.first); // Push the original node index into unique_indices
62  }
63 
64  m_Graph g(m_unique_nodes.size());
65 
66  for (size_t i = 0; i < m_pass_edge_index_1.size(); i++) {
69  add_edge(u, v, g); // Add the edge between the mapped node indices
70  }
71 
72  m_component.resize(num_vertices(g), -1);
73  m_num_components = boost::connected_components(g, &m_component[0]);
74 
75  m_labels.resize(m_num_nodes,-1);
76 
77  for (size_t i = 0; i < m_unique_indices.size(); i++) {
79  }
80 }

◆ doScoreCut()

void FPGATrackSimGNNRoadMakerTool::doScoreCut ( const std::vector< std::shared_ptr< FPGATrackSimGNNEdge >> &  edges)
private

Definition at line 39 of file FPGATrackSimGNNRoadMakerTool.cxx.

40 {
41  for (const auto& edge : edges) {
42  if(edge->getEdgeScore() > m_edgeScoreCut) {
43  m_pass_edge_index_1.push_back(edge->getEdgeIndex1());
44  m_pass_edge_index_2.push_back(edge->getEdgeIndex2());
45  }
46  }
47 }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

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

◆ initialize()

StatusCode FPGATrackSimGNNRoadMakerTool::initialize ( )
overridevirtual

Definition at line 13 of file FPGATrackSimGNNRoadMakerTool.cxx.

14 {
15  ATH_CHECK(m_FPGATrackSimMapping.retrieve());
16  m_nLayers = m_FPGATrackSimMapping->PlaneMap_1st(0)->getNLogiLayers();
17 
18  return StatusCode::SUCCESS;
19 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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.

◆ makeRoads()

StatusCode FPGATrackSimGNNRoadMakerTool::makeRoads ( const std::vector< std::shared_ptr< const FPGATrackSimHit >> &  hits,
const std::vector< std::shared_ptr< FPGATrackSimGNNHit >> &  gnn_hits,
const std::vector< std::shared_ptr< FPGATrackSimGNNEdge >> &  edges,
std::vector< std::shared_ptr< const FPGATrackSimRoad >> &  roads 
)
virtual

Definition at line 24 of file FPGATrackSimGNNRoadMakerTool.cxx.

25 {
26  m_num_nodes = gnn_hits.size();
27  doScoreCut(edges);
28 
29  if(m_roadMakerTool == "ConnectedComponents") {
31  addRoads(hits, gnn_hits, roads);
32  }
33 
34  resetVectors();
35 
36  return StatusCode::SUCCESS;
37 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ resetVectors()

void FPGATrackSimGNNRoadMakerTool::resetVectors ( )
private

Definition at line 146 of file FPGATrackSimGNNRoadMakerTool.cxx.

147 {
148  m_pass_edge_index_1.clear();
149  m_pass_edge_index_2.clear();
150  m_unique_nodes.clear();
151  m_node_index_map.clear();
152  m_unique_indices.clear();
153  m_component.clear();
154  m_labels.clear();
155  m_road_hit_list.clear();
156 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_component

std::vector<int> FPGATrackSimGNNRoadMakerTool::m_component {}
private

Definition at line 75 of file FPGATrackSimGNNRoadMakerTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_edgeScoreCut

Gaudi::Property<float> FPGATrackSimGNNRoadMakerTool::m_edgeScoreCut { this, "edgeScoreCut", 0.0, "Cut value for edge scores to pass for road making algorithm" }
private

Definition at line 61 of file FPGATrackSimGNNRoadMakerTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_FPGATrackSimMapping

ServiceHandle<IFPGATrackSimMappingSvc> FPGATrackSimGNNRoadMakerTool::m_FPGATrackSimMapping {this, "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"}
private

Definition at line 56 of file FPGATrackSimGNNRoadMakerTool.h.

◆ m_labels

std::vector<int> FPGATrackSimGNNRoadMakerTool::m_labels {}
private

Definition at line 77 of file FPGATrackSimGNNRoadMakerTool.h.

◆ m_nLayers

unsigned FPGATrackSimGNNRoadMakerTool::m_nLayers = 0
private

Definition at line 70 of file FPGATrackSimGNNRoadMakerTool.h.

◆ m_node_index_map

std::map<int, int> FPGATrackSimGNNRoadMakerTool::m_node_index_map {}
private

Definition at line 72 of file FPGATrackSimGNNRoadMakerTool.h.

◆ m_num_components

int FPGATrackSimGNNRoadMakerTool::m_num_components = 0
private

Definition at line 76 of file FPGATrackSimGNNRoadMakerTool.h.

◆ m_num_nodes

int FPGATrackSimGNNRoadMakerTool::m_num_nodes = 0
private

Definition at line 67 of file FPGATrackSimGNNRoadMakerTool.h.

◆ m_pass_edge_index_1

std::vector<int> FPGATrackSimGNNRoadMakerTool::m_pass_edge_index_1 {}
private

Definition at line 68 of file FPGATrackSimGNNRoadMakerTool.h.

◆ m_pass_edge_index_2

std::vector<int> FPGATrackSimGNNRoadMakerTool::m_pass_edge_index_2 {}
private

Definition at line 69 of file FPGATrackSimGNNRoadMakerTool.h.

◆ m_road_hit_list

std::vector<std::vector<int> > FPGATrackSimGNNRoadMakerTool::m_road_hit_list {}
private

Definition at line 78 of file FPGATrackSimGNNRoadMakerTool.h.

◆ m_roadMakerTool

Gaudi::Property<std::string> FPGATrackSimGNNRoadMakerTool::m_roadMakerTool { this, "roadMakerTool", "", "Algorithm to perform graph segmentation into roads"}
private

Definition at line 62 of file FPGATrackSimGNNRoadMakerTool.h.

◆ m_roads

std::vector<FPGATrackSimRoad> FPGATrackSimGNNRoadMakerTool::m_roads {}
private

Definition at line 94 of file FPGATrackSimGNNRoadMakerTool.h.

◆ m_unique_indices

std::vector<int> FPGATrackSimGNNRoadMakerTool::m_unique_indices {}
private

Definition at line 73 of file FPGATrackSimGNNRoadMakerTool.h.

◆ m_unique_nodes

std::set<int> FPGATrackSimGNNRoadMakerTool::m_unique_nodes {}
private

Definition at line 71 of file FPGATrackSimGNNRoadMakerTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
beamspotman.r
def r
Definition: beamspotman.py:674
FPGATrackSimGNNRoadMakerTool::m_edgeScoreCut
Gaudi::Property< float > m_edgeScoreCut
Definition: FPGATrackSimGNNRoadMakerTool.h:61
getMenu.algname
algname
Definition: getMenu.py:54
FPGATrackSimGNNRoadMakerTool::m_component
std::vector< int > m_component
Definition: FPGATrackSimGNNRoadMakerTool.h:75
FPGATrackSimGNNRoadMakerTool::addRoads
void addRoads(const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits, const std::vector< std::shared_ptr< FPGATrackSimGNNHit >> &gnn_hits, std::vector< std::shared_ptr< const FPGATrackSimRoad >> &roads)
Definition: FPGATrackSimGNNRoadMakerTool.cxx:82
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
FPGATrackSimGNNRoadMakerTool::m_roadMakerTool
Gaudi::Property< std::string > m_roadMakerTool
Definition: FPGATrackSimGNNRoadMakerTool.h:62
FPGATrackSimGNNRoadMakerTool::m_num_nodes
int m_num_nodes
Definition: FPGATrackSimGNNRoadMakerTool.h:67
index
Definition: index.py:1
FPGATrackSimGNNRoadMakerTool::doConnectedComponents
void doConnectedComponents()
Definition: FPGATrackSimGNNRoadMakerTool.cxx:49
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
FPGATrackSimGNNRoadMakerTool::m_pass_edge_index_2
std::vector< int > m_pass_edge_index_2
Definition: FPGATrackSimGNNRoadMakerTool.h:69
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
FPGATrackSimHit::getLayer
int getLayer() const
Definition: FPGATrackSimHit.cxx:87
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
FPGATrackSimGNNRoadMakerTool::m_unique_nodes
std::set< int > m_unique_nodes
Definition: FPGATrackSimGNNRoadMakerTool.h:71
FPGATrackSimGNNRoadMakerTool::addRoad
void addRoad(const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits, const std::vector< int > &road_hitIDs)
Definition: FPGATrackSimGNNRoadMakerTool.cxx:104
FPGATrackSimGNNRoadMakerTool::m_node_index_map
std::map< int, int > m_node_index_map
Definition: FPGATrackSimGNNRoadMakerTool.h:72
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
FPGATrackSimGNNRoadMakerTool::resetVectors
void resetVectors()
Definition: FPGATrackSimGNNRoadMakerTool.cxx:146
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
FPGATrackSimGNNRoadMakerTool::m_nLayers
unsigned m_nLayers
Definition: FPGATrackSimGNNRoadMakerTool.h:70
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
FPGATrackSimGNNRoadMakerTool::m_labels
std::vector< int > m_labels
Definition: FPGATrackSimGNNRoadMakerTool.h:77
FPGATrackSimPlaneMap::map
void map(FPGATrackSimHit &hit) const
Definition: FPGATrackSimPlaneMap.cxx:234
lumiFormat.i
int i
Definition: lumiFormat.py:85
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
FPGATrackSimGNNRoadMakerTool::m_pass_edge_index_1
std::vector< int > m_pass_edge_index_1
Definition: FPGATrackSimGNNRoadMakerTool.h:68
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
PyPoolBrowser.node
node
Definition: PyPoolBrowser.py:131
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
FPGATrackSimPlaneMap
Definition: FPGATrackSimPlaneMap.h:62
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
FPGATrackSimGNNRoadMakerTool::m_FPGATrackSimMapping
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Definition: FPGATrackSimGNNRoadMakerTool.h:56
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
python.PyAthena.v
v
Definition: PyAthena.py:154
a
TList * a
Definition: liststreamerinfos.cxx:10
h
FPGATrackSimGNNRoadMakerTool::m_road_hit_list
std::vector< std::vector< int > > m_road_hit_list
Definition: FPGATrackSimGNNRoadMakerTool.h:78
layer_bitmask_t
uint32_t layer_bitmask_t
Definition: FPGATrackSimTypes.h:22
FPGATrackSimGNNRoadMakerTool::m_num_components
int m_num_components
Definition: FPGATrackSimGNNRoadMakerTool.h:76
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
FPGATrackSimGNNRoadMakerTool::doScoreCut
void doScoreCut(const std::vector< std::shared_ptr< FPGATrackSimGNNEdge >> &edges)
Definition: FPGATrackSimGNNRoadMakerTool.cxx:39
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
FPGATrackSimGNNRoadMakerTool::m_roads
std::vector< FPGATrackSimRoad > m_roads
Definition: FPGATrackSimGNNRoadMakerTool.h:94
FPGATrackSimGNNRoadMakerTool::m_unique_indices
std::vector< int > m_unique_indices
Definition: FPGATrackSimGNNRoadMakerTool.h:73
FPGATrackSimGNNRoadMakerTool::m_Graph
boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS > m_Graph
Definition: FPGATrackSimGNNRoadMakerTool.h:74
node
Definition: node.h:21
FPGATrackSimRoad
Definition: FPGATrackSimRoad.h:31
fitman.k
k
Definition: fitman.py:528
sortByLayer
std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > sortByLayer(Container const &hits)
Definition: FPGATrackSimHit.h:315