3#ifndef FPGATrackPATHFINDEREXTENSION_H
4#define FPGATrackPATHFINDEREXTENSION_H
13#include "GaudiKernel/ServiceHandle.h"
30#include "GaudiKernel/ITHistSvc.h"
41 std::vector<std::shared_ptr<const FPGATrackSimHit>>
m_hits;
44 std::shared_ptr<const FPGATrackSimHit>
getHit(
size_t layer)
const {
47 return std::make_shared<const FPGATrackSimHit>(dummyHit);
50 std::vector<std::shared_ptr<const FPGATrackSimHit>>&
getHits() {
54 std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>>
getVecHits()
const {
55 std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>> vecHits;
56 vecHits.resize(
m_hits.size());
57 for (
unsigned layer = 0; layer <
m_hits.size(); layer++) {
58 std::vector<std::shared_ptr<const FPGATrackSimHit>> thislayerVec;
59 thislayerVec.push_back(
m_hits[layer]);
60 vecHits[layer] = std::move(thislayerVec);
76 if (!hit->isReal()) nwc++;
83 for (
unsigned layer = 0; layer <
m_hits.size(); layer++)
84 if (!((*
m_hits[layer]).isReal()))
85 wcLayers |= (0x1 << layer);
91 for (
unsigned layer = 0; layer <
m_hits.size(); layer++)
92 if ((*
m_hits[layer]).isReal())
93 hitLayers |= (0x1 << layer);
100 void setHits(std::vector<std::shared_ptr<const FPGATrackSimHit>> &hits) {
103 void addHits(
const std::vector<std::shared_ptr<const FPGATrackSimHit>> &hits) {
107 void setHit(
unsigned layer,
const std::shared_ptr<const FPGATrackSimHit> & hit) {
112 void addHit(
const std::shared_ptr<const FPGATrackSimHit> & hit) {
129 using base_class::base_class;
133 virtual StatusCode
extendTracks(
const std::vector<std::shared_ptr<const FPGATrackSimHit>> & hits,
134 const std::vector<std::shared_ptr<const FPGATrackSimTrack>> & tracks,
135 std::vector<std::shared_ptr<const FPGATrackSimRoad>> & roads)
override;
140 return StatusCode::SUCCESS;
148 Gaudi::Property<unsigned>
m_maxMiss {
this,
"threshold", 2,
"Maximum number of missing hits to reject a road"};
149 Gaudi::Property <std::string>
m_region {
this,
"OutputRegion",
"",
"region ID"};
155 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"};
156 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"};
157 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"};
158 Gaudi::Property<std::vector<int>>
m_windowFineID {
this,
"windowFineID", {0},
"Fine ID indexing for windows"};
166 Gaudi::Property <float>
m_missedHitRScaling {
this,
"missedHitRScaling", -1,
"Amount to scale R window if previous hit was missed. Negative means this is disabled"};
167 Gaudi::Property <float>
m_missedHitZScaling {
this,
"missedHitZScaling", -1,
"Amount to scale Z window if previous hit was missed. Negative means this is disabled"};
168 Gaudi::Property <float>
m_missedHitPhiScaling {
this,
"missedHitPhiScaling", -1,
"Amount to scale Phi window if previous hit was missed. Negative means this is disabled"};
169 Gaudi::Property <int>
m_maxBranches {
this,
"maxBranches", -1,
"Max number of branches before we stop, if negative this is disabled"};
170 Gaudi::Property <bool>
m_doOutsideIn {
this,
"doOutsideIn",
true,
"Setup the tool so it's doing outside in extrap"};
172 Gaudi::Property <bool>
m_useCartesian {
this,
"useCartesian",
true,
"If true, NNs use Cartestian coordinates. If false,they use cylindrical coordiantes"};
195 StatusCode
getPredictedHit(std::vector<float>& inputTensorValues, std::vector<float>& outputTensorValues,
long& fineID);
197 StatusCode
getFakeHit(
miniRoad& currentRoad, std::vector<float>& predhit,
const long& fineID, std::vector<std::shared_ptr<const FPGATrackSimHit>>& hits);
198 StatusCode
getLastLayer(
miniRoad& currentRoad,
unsigned& lastHitLayer, std::shared_ptr<const FPGATrackSimHit>& lastHit);
200 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.
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)