3#ifndef FPGATrackPATHFINDEREXTENSION_H
4#define FPGATrackPATHFINDEREXTENSION_H
13#include "GaudiKernel/ServiceHandle.h"
30#include "GaudiKernel/ITHistSvc.h"
32#include "GaudiKernel/IChronoStatSvc.h"
43 std::vector<std::shared_ptr<const FPGATrackSimHit>>
m_hits;
46 std::shared_ptr<const FPGATrackSimHit>
getHit(
size_t layer)
const {
49 return std::make_shared<const FPGATrackSimHit>(dummyHit);
52 std::vector<std::shared_ptr<const FPGATrackSimHit>>&
getHits() {
56 std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>>
getVecHits()
const {
57 std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>> vecHits;
58 vecHits.resize(
m_hits.size());
59 for (
unsigned layer = 0; layer <
m_hits.size(); layer++) {
60 std::vector<std::shared_ptr<const FPGATrackSimHit>> thislayerVec;
61 thislayerVec.push_back(
m_hits[layer]);
62 vecHits[layer] = std::move(thislayerVec);
78 if (!hit->isReal()) nwc++;
85 for (
unsigned layer = 0; layer <
m_hits.size(); layer++)
86 if (!((*
m_hits[layer]).isReal()))
87 wcLayers |= (0x1 << layer);
93 for (
unsigned layer = 0; layer <
m_hits.size(); layer++)
94 if ((*
m_hits[layer]).isReal())
95 hitLayers |= (0x1 << layer);
102 void setHits(std::vector<std::shared_ptr<const FPGATrackSimHit>> &hits) {
105 void addHits(
const std::vector<std::shared_ptr<const FPGATrackSimHit>> &hits) {
109 void setHit(
unsigned layer,
const std::shared_ptr<const FPGATrackSimHit> & hit) {
114 void addHit(
const std::shared_ptr<const FPGATrackSimHit> & hit) {
131 using base_class::base_class;
135 virtual StatusCode
extendTracks(
const std::vector<std::shared_ptr<const FPGATrackSimHit>> & hits,
137 std::vector<FPGATrackSimRoad> & roads)
override;
142 return StatusCode::SUCCESS;
151 Gaudi::Property<unsigned>
m_maxMiss {
this,
"threshold", 2,
"Maximum number of missing hits to reject a road"};
152 Gaudi::Property <std::string>
m_region {
this,
"OutputRegion",
"",
"region ID"};
158 Gaudi::Property<std::vector<float>>
m_windowR {
this,
"windowR", {20.0},
"Window Size to search in for r, either pass one value for all layers or use the number of layers"};
159 Gaudi::Property<std::vector<float>>
m_windowZ {
this,
"windowZ", {20.0},
"Window Size to search in for z, either pass one value for all layers or use the number of layers"};
160 Gaudi::Property<std::vector<float>>
m_windowPhi {
this,
"windowPhi", {0.4},
"Window Size to search in for phi, either pass one value for all layers or use the number of layers"};
161 Gaudi::Property<std::vector<int>>
m_windowFineID {
this,
"windowFineID", {0},
"Fine ID indexing for windows"};
169 Gaudi::Property <float>
m_missedHitRScaling {
this,
"missedHitRScaling", -1,
"Amount to scale R window if previous hit was missed. Negative means this is disabled"};
170 Gaudi::Property <float>
m_missedHitZScaling {
this,
"missedHitZScaling", -1,
"Amount to scale Z window if previous hit was missed. Negative means this is disabled"};
171 Gaudi::Property <float>
m_missedHitPhiScaling {
this,
"missedHitPhiScaling", -1,
"Amount to scale Phi window if previous hit was missed. Negative means this is disabled"};
172 Gaudi::Property <int>
m_maxBranches {
this,
"maxBranches", -1,
"Max number of branches before we stop, if negative this is disabled"};
173 Gaudi::Property <bool>
m_doOutsideIn {
this,
"doOutsideIn",
true,
"Setup the tool so it's doing outside in extrap"};
175 Gaudi::Property <bool>
m_useCartesian {
this,
"useCartesian",
true,
"If true, NNs use Cartestian coordinates. If false,they use cylindrical coordiantes"};
198 StatusCode
getPredictedHit(std::vector<float>& inputTensorValues, std::vector<float>& outputTensorValues,
long& fineID);
200 StatusCode
getFakeHit(
miniRoad& currentRoad, std::vector<float>& predhit,
const long& fineID, std::vector<std::shared_ptr<const FPGATrackSimHit>>& hits);
201 StatusCode
getLastLayer(
miniRoad& currentRoad,
unsigned& lastHitLayer, std::shared_ptr<const FPGATrackSimHit>& lastHit);
203 StatusCode
findHitinNextStripLayer(std::shared_ptr<const FPGATrackSimHit> hit,
const std::vector<std::shared_ptr<const FPGATrackSimHit>>& hitList, std::vector<std::shared_ptr<const FPGATrackSimHit>>& hits);
: FPGATrackSim-specific class to represent an hit in the detector.
Maps physical layers to logical layers.
Maps ITK module indices to FPGATrackSim regions.
Defines a class for roads.
std::vector< FPGATrackSimTrack > FPGATrackSimTrackCollection
void setHit(unsigned layer, const std::shared_ptr< const FPGATrackSimHit > &hit)
size_t getNHitLayers() const
layer_bitmask_t getHitLayers() const
void addHits(const std::vector< std::shared_ptr< const FPGATrackSimHit > > &hits)
miniRoad(unsigned nLayers)
size_t getNLayers() const
void addHit(const std::shared_ptr< const FPGATrackSimHit > &hit)
std::vector< std::shared_ptr< const FPGATrackSimHit > > & getHits()
std::vector< std::shared_ptr< const FPGATrackSimHit > > m_hits
std::shared_ptr< const FPGATrackSimHit > getHit(size_t layer) const
unsigned getNHits() const
size_t getNWCLayers() const
std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > getVecHits() const
void setNLayers(unsigned layers)
layer_bitmask_t getWCLayers() const
void setHits(std::vector< std::shared_ptr< const FPGATrackSimHit > > &hits)