 |
ATLAS Offline Software
|
#include <FPGATrackSimGNNRoadMakerTool.h>
|
| 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 |
|
|
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 | addRoadForPixelSeed (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...
|
|
|
ServiceHandle< IFPGATrackSimMappingSvc > | m_FPGATrackSimMapping {this, "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"} |
|
ToolHandle< ITrigL2LayerNumberTool > | m_layerNumberTool {this, "LayerNumberTool", "TrigL2LayerNumberToolITk"} |
|
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"} |
|
Gaudi::Property< bool > | m_doGNNPixelSeeding { this, "doGNNPixelSeeding", false, "Flag to configure for GNN Pixel Seeding" } |
|
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 {} |
|
const std::vector< short > * | m_pix_h2l {nullptr} |
|
const std::vector< TrigInDetSiLayer > * | m_layerGeometry {nullptr} |
|
std::vector< FPGATrackSimRoad > | m_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 |
|
◆ m_Graph
◆ StoreGateSvc_t
◆ FPGATrackSimGNNRoadMakerTool()
FPGATrackSimGNNRoadMakerTool::FPGATrackSimGNNRoadMakerTool |
( |
const std::string & |
algname, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
ifc |
|
) |
| |
◆ addRoad()
void FPGATrackSimGNNRoadMakerTool::addRoad |
( |
const std::vector< std::shared_ptr< const FPGATrackSimHit >> & |
hits, |
|
|
const std::vector< int > & |
road_hitIDs |
|
) |
| |
|
private |
Definition at line 108 of file FPGATrackSimGNNRoadMakerTool.cxx.
111 std::vector<std::shared_ptr<const FPGATrackSimHit>> mapped_road_hits;
115 for (
const auto& hitID : road_hitIDs) {
116 if(hitID+1 <
static_cast<int>(
hits.size()) &&
hits[hitID]->isStrip() &&
hits[hitID+1]->isStrip() &&
118 hits[hitID]->getX() ==
hits[hitID+1]->getX()) {
119 auto &hit1 =
hits[hitID];
120 std::shared_ptr<FPGATrackSimHit> hitCopy1 = std::make_shared<FPGATrackSimHit>(*hit1);
121 pmap->
map(*hitCopy1);
122 hitLayers |= 1 << hitCopy1->
getLayer();
123 mapped_road_hits.push_back(std::move(hitCopy1));
125 auto &hit2 =
hits[hitID+1];
126 std::shared_ptr<FPGATrackSimHit> hitCopy2 = std::make_shared<FPGATrackSimHit>(*hit2);
127 pmap->
map(*hitCopy2);
128 hitLayers |= 1 << hitCopy2->
getLayer();
129 mapped_road_hits.push_back(std::move(hitCopy2));
132 auto &hit =
hits[hitID];
133 std::shared_ptr<FPGATrackSimHit> hitCopy = std::make_shared<FPGATrackSimHit>(*hit);
135 hitLayers |= 1 << hitCopy->
getLayer();
136 mapped_road_hits.push_back(std::move(hitCopy));
145 r.setHitLayers(hitLayers);
146 r.setHits(std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>>(std::move(sorted_hits)));
◆ addRoadForPixelSeed()
void FPGATrackSimGNNRoadMakerTool::addRoadForPixelSeed |
( |
const std::vector< std::shared_ptr< const FPGATrackSimHit >> & |
hits, |
|
|
const std::vector< int > & |
road_hitIDs |
|
) |
| |
|
private |
Definition at line 150 of file FPGATrackSimGNNRoadMakerTool.cxx.
152 std::vector<std::shared_ptr<const FPGATrackSimHit>> all_hits;
153 std::vector<std::shared_ptr<const FPGATrackSimHit>> track_hit_list;
155 for (
const auto& hitID : road_hitIDs) {
156 auto &hit =
hits[hitID];
157 all_hits.push_back(hit);
161 std::sort(all_hits.begin(), all_hits.end(),
162 [](
const std::shared_ptr<const FPGATrackSimHit>& hit1,
163 const std::shared_ptr<const FPGATrackSimHit>& hit2) {
164 double rho1 = std::hypot(hit1->getX(), hit1->getY());
165 double rho2 = std::hypot(hit2->getX(), hit2->getY());
170 std::unordered_set<int> seenLayers;
171 for (
const auto &hit : all_hits) {
172 short layer =
m_pix_h2l->at(
static_cast<int>(hit->getIdentifierHash()));
174 int combinedId = layerGeometry.
m_subdet;
176 if (seenLayers.count(combinedId) == 0) {
177 track_hit_list.push_back(hit);
178 seenLayers.insert(combinedId);
182 std::size_t nSp = track_hit_list.size();
183 std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>> seed_hit_list;
189 auto spacePointIndicesFun = [](std::size_t nSp, std::size_t nSeeds) -> std::vector<std::size_t> {
190 std::vector<std::size_t>
idx;
192 for (std::size_t
i = 0;
i < nSeeds; ++
i) {
193 std::size_t
pos = (
i * (nSp - 1)) / (nSeeds - 1);
203 std::size_t nSeeds = std::min<std::size_t>(5, nSp);
204 auto indices = spacePointIndicesFun(nSp, nSeeds);
207 seed_hit_list.push_back({track_hit_list[
idx]});
212 r.setHits(std::move(seed_hit_list));
◆ addRoads()
◆ 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()
◆ doConnectedComponents()
void FPGATrackSimGNNRoadMakerTool::doConnectedComponents |
( |
| ) |
|
|
private |
◆ doScoreCut()
◆ 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
◆ initialize()
StatusCode FPGATrackSimGNNRoadMakerTool::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.
◆ makeRoads()
◆ 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()
◆ resetVectors()
void FPGATrackSimGNNRoadMakerTool::resetVectors |
( |
| ) |
|
|
private |
◆ 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_component
std::vector<int> FPGATrackSimGNNRoadMakerTool::m_component {} |
|
private |
◆ m_detStore
◆ m_doGNNPixelSeeding
Gaudi::Property<bool> FPGATrackSimGNNRoadMakerTool::m_doGNNPixelSeeding { this, "doGNNPixelSeeding", false, "Flag to configure for GNN Pixel Seeding" } |
|
private |
◆ m_edgeScoreCut
Gaudi::Property<float> FPGATrackSimGNNRoadMakerTool::m_edgeScoreCut { this, "edgeScoreCut", 0.0, "Cut value for edge scores to pass for road making algorithm" } |
|
private |
◆ m_evtStore
◆ m_FPGATrackSimMapping
◆ m_labels
std::vector<int> FPGATrackSimGNNRoadMakerTool::m_labels {} |
|
private |
◆ m_layerGeometry
◆ m_layerNumberTool
◆ m_nLayers
unsigned FPGATrackSimGNNRoadMakerTool::m_nLayers = 0 |
|
private |
◆ m_node_index_map
std::map<int, int> FPGATrackSimGNNRoadMakerTool::m_node_index_map {} |
|
private |
◆ m_num_components
int FPGATrackSimGNNRoadMakerTool::m_num_components = 0 |
|
private |
◆ m_num_nodes
int FPGATrackSimGNNRoadMakerTool::m_num_nodes = 0 |
|
private |
◆ m_pass_edge_index_1
std::vector<int> FPGATrackSimGNNRoadMakerTool::m_pass_edge_index_1 {} |
|
private |
◆ m_pass_edge_index_2
std::vector<int> FPGATrackSimGNNRoadMakerTool::m_pass_edge_index_2 {} |
|
private |
◆ m_pix_h2l
const std::vector<short>* FPGATrackSimGNNRoadMakerTool::m_pix_h2l {nullptr} |
|
private |
◆ m_road_hit_list
std::vector<std::vector<int> > FPGATrackSimGNNRoadMakerTool::m_road_hit_list {} |
|
private |
◆ m_roadMakerTool
Gaudi::Property<std::string> FPGATrackSimGNNRoadMakerTool::m_roadMakerTool { this, "roadMakerTool", "", "Algorithm to perform graph segmentation into roads"} |
|
private |
◆ m_roads
◆ m_unique_indices
std::vector<int> FPGATrackSimGNNRoadMakerTool::m_unique_indices {} |
|
private |
◆ m_unique_nodes
std::set<int> FPGATrackSimGNNRoadMakerTool::m_unique_nodes {} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
std::pair< long int, long int > indices
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
@ u
Enums for curvilinear frames.
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void map(FPGATrackSimHit &hit) const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
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
std::string to_string(const DetectorType &type)
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > sortByLayer(Container const &hits)