Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
miniRoad Struct Reference

#include <FPGATrackSimNNPathfinderExtensionTool.h>

Collaboration diagram for miniRoad:

Public Member Functions

 miniRoad ()
 
 miniRoad (unsigned nLayers)
 
std::shared_ptr< const FPGATrackSimHitgetHit (size_t layer) const
 
std::vector< std::shared_ptr< const FPGATrackSimHit > > & getHits ()
 
std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > getVecHits () const
 
unsigned getNHits () const
 
size_t getNLayers () const
 
size_t getNHitLayers () const
 
size_t getNWCLayers () const
 
layer_bitmask_t getWCLayers () const
 
layer_bitmask_t getHitLayers () const
 
void setNLayers (unsigned layers)
 
void setHits (std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits)
 
void addHits (const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits)
 
void setHit (unsigned layer, const std::shared_ptr< const FPGATrackSimHit > &hit)
 
void addHit (const std::shared_ptr< const FPGATrackSimHit > &hit)
 

Public Attributes

std::vector< std::shared_ptr< const FPGATrackSimHit > > m_hits
 

Detailed Description

Definition at line 35 of file FPGATrackSimNNPathfinderExtensionTool.h.

Constructor & Destructor Documentation

◆ miniRoad() [1/2]

miniRoad::miniRoad ( )
inline

Definition at line 37 of file FPGATrackSimNNPathfinderExtensionTool.h.

37 {}

◆ miniRoad() [2/2]

miniRoad::miniRoad ( unsigned  nLayers)
inline

Definition at line 38 of file FPGATrackSimNNPathfinderExtensionTool.h.

38 {m_hits.resize(nLayers);}

Member Function Documentation

◆ addHit()

void miniRoad::addHit ( const std::shared_ptr< const FPGATrackSimHit > &  hit)
inline

Definition at line 112 of file FPGATrackSimNNPathfinderExtensionTool.h.

112  {
113  m_hits.push_back(hit);
114  }

◆ addHits()

void miniRoad::addHits ( const std::vector< std::shared_ptr< const FPGATrackSimHit >> &  hits)
inline

Definition at line 103 of file FPGATrackSimNNPathfinderExtensionTool.h.

103  {
104  m_hits.insert(m_hits.end(), hits.begin(), hits.end());
105  }

◆ getHit()

std::shared_ptr<const FPGATrackSimHit> miniRoad::getHit ( size_t  layer) const
inline

Definition at line 44 of file FPGATrackSimNNPathfinderExtensionTool.h.

44  {
45  if (layer < m_hits.size()) return m_hits[layer];
46  const FPGATrackSimHit dummyHit;
47  return std::make_shared<const FPGATrackSimHit>(dummyHit);
48  }

◆ getHitLayers()

layer_bitmask_t miniRoad::getHitLayers ( ) const
inline

Definition at line 89 of file FPGATrackSimNNPathfinderExtensionTool.h.

89  {
90  layer_bitmask_t hitLayers = 0;
91  for (unsigned layer = 0; layer < m_hits.size(); layer++)
92  if ((*m_hits[layer]).isReal())
93  hitLayers |= (0x1 << layer);
94  return hitLayers;
95  }

◆ getHits()

std::vector<std::shared_ptr<const FPGATrackSimHit> >& miniRoad::getHits ( )
inline

Definition at line 50 of file FPGATrackSimNNPathfinderExtensionTool.h.

50  {
51  return m_hits;
52  }

◆ getNHitLayers()

size_t miniRoad::getNHitLayers ( ) const
inline

Definition at line 70 of file FPGATrackSimNNPathfinderExtensionTool.h.

70  {
71  return getNLayers() - getNWCLayers();
72  }

◆ getNHits()

unsigned miniRoad::getNHits ( ) const
inline

Definition at line 65 of file FPGATrackSimNNPathfinderExtensionTool.h.

65  {
66  return m_hits.size();
67  }

◆ getNLayers()

size_t miniRoad::getNLayers ( ) const
inline

Definition at line 69 of file FPGATrackSimNNPathfinderExtensionTool.h.

69 { return m_hits.size(); }

◆ getNWCLayers()

size_t miniRoad::getNWCLayers ( ) const
inline

Definition at line 73 of file FPGATrackSimNNPathfinderExtensionTool.h.

73  {
74  size_t nwc = 0;
75  for (auto hit : m_hits) {
76  if (!hit->isReal()) nwc++;
77  }
78  return nwc;
79  }

◆ getVecHits()

std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit> > > miniRoad::getVecHits ( ) const
inline

Definition at line 54 of file FPGATrackSimNNPathfinderExtensionTool.h.

54  {
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] = thislayerVec;
61  }
62  return vecHits;
63  }

◆ getWCLayers()

layer_bitmask_t miniRoad::getWCLayers ( ) const
inline

Definition at line 81 of file FPGATrackSimNNPathfinderExtensionTool.h.

81  {
82  layer_bitmask_t wcLayers = 0;
83  for (unsigned layer = 0; layer < m_hits.size(); layer++)
84  if (!((*m_hits[layer]).isReal()))
85  wcLayers |= (0x1 << layer);
86  return wcLayers;
87  }

◆ setHit()

void miniRoad::setHit ( unsigned  layer,
const std::shared_ptr< const FPGATrackSimHit > &  hit 
)
inline

Definition at line 107 of file FPGATrackSimNNPathfinderExtensionTool.h.

107  {
108  if (layer >= m_hits.size()) m_hits.resize(layer + 1);
109  m_hits[layer] = hit;
110  }

◆ setHits()

void miniRoad::setHits ( std::vector< std::shared_ptr< const FPGATrackSimHit >> &  hits)
inline

Definition at line 100 of file FPGATrackSimNNPathfinderExtensionTool.h.

100  {
101  m_hits = hits;
102  }

◆ setNLayers()

void miniRoad::setNLayers ( unsigned  layers)
inline

Definition at line 99 of file FPGATrackSimNNPathfinderExtensionTool.h.

99 { m_hits.resize(layers); }

Member Data Documentation

◆ m_hits

std::vector<std::shared_ptr<const FPGATrackSimHit> > miniRoad::m_hits

Definition at line 41 of file FPGATrackSimNNPathfinderExtensionTool.h.


The documentation for this struct was generated from the following file:
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
miniRoad::m_hits
std::vector< std::shared_ptr< const FPGATrackSimHit > > m_hits
Definition: FPGATrackSimNNPathfinderExtensionTool.h:41
FPGATrackSimHit
Definition: FPGATrackSimHit.h:41
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
miniRoad::getNLayers
size_t getNLayers() const
Definition: FPGATrackSimNNPathfinderExtensionTool.h:69
miniRoad::getNWCLayers
size_t getNWCLayers() const
Definition: FPGATrackSimNNPathfinderExtensionTool.h:73
layer_bitmask_t
uint32_t layer_bitmask_t
Definition: FPGATrackSimTypes.h:22