Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Enumerations | Functions
FPGATrackSimHit.h File Reference

: FPGATrackSim-specific class to represent an hit in the detector. More...

#include <vector>
#include <ostream>
#include <memory>
#include "FPGATrackSimObjects/FPGATrackSimTypes.h"
#include "FPGATrackSimObjects/FPGATrackSimMultiTruth.h"
#include <Rtypes.h>
#include "TMath.h"
#include "GeneratorObjects/HepMcParticleLink.h"
Include dependency graph for FPGATrackSimHit.h:

Go to the source code of this file.

Classes

class  FPGATrackSimHit
 

Enumerations

enum  HitType {
  HitType::unmapped, HitType::mapped, HitType::clustered, HitType::wildcard,
  HitType::guessed, HitType::undefined, HitType::extrapolated, HitType::spacepoint
}
 

Functions

template<class Container >
std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > sortByLayer (Container const &hits)
 
std::ostream & operator<< (std::ostream &os, HitType t)
 
std::string to_string (HitType t)
 

Detailed Description

: FPGATrackSim-specific class to represent an hit in the detector.

Author
: Lots of peeps
Date
: Lightyears ago Declarations in this file: enum class HitType class FPGATrackSimHit vector<vector<const FPGATrackSimHit*>> sortByLayer(vector<const FPGATrackSimHit*> const & hits); ostream & operator<<(ostream & os, HitType t);

Pay close attention to the enum HitType below. Several members of the class will be invalid until the hit is put through some step of the processing, like mapping or clustering. Calling a get function on the wrong type will throw std::domain_error.

Definition in file FPGATrackSimHit.h.

Enumeration Type Documentation

◆ HitType

enum HitType
strong
Enumerator
unmapped 
mapped 
clustered 
wildcard 
guessed 
undefined 
extrapolated 
spacepoint 

Definition at line 38 of file FPGATrackSimHit.h.

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
HitType  t 
)

Definition at line 183 of file FPGATrackSimHit.cxx.

184 {
185  return (os << to_string(t));
186 }

◆ sortByLayer()

template<class Container >
std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit> > > sortByLayer ( Container const hits)

Definition at line 300 of file FPGATrackSimHit.h.

301 {
302  std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>> out;
303  for (auto const &hit : hits)
304  {
305  size_t layer = hit->getLayer();
306  if (layer >= out.size()) out.resize(layer + 1);
307  out[layer].push_back(hit);
308  }
309  return out;
310 }

◆ to_string()

std::string to_string ( HitType  t)

Definition at line 167 of file FPGATrackSimHit.cxx.

168 {
169  switch (t)
170  {
171  case HitType::unmapped: return "unmapped";
172  case HitType::mapped: return "mapped";
173  case HitType::clustered: return "clustered";
174  case HitType::wildcard: return "wildcard";
175  case HitType::guessed: return "guessed";
176  case HitType::extrapolated: return "extrapolated";
177  case HitType::spacepoint: return "spacepoint";
178  default: return "undefined";
179  }
180 }
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
HitType::extrapolated
@ extrapolated
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
HitType::spacepoint
@ spacepoint
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
HitType::guessed
@ guessed
HitType::undefined
@ undefined
HitType::wildcard
@ wildcard
to_string
std::string to_string(HitType t)
Definition: FPGATrackSimHit.cxx:167
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
HitType::clustered
@ clustered
HitType::mapped
@ mapped
HitType::unmapped
@ unmapped