ATLAS Offline Software
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 174 of file FPGATrackSimHit.cxx.

175 {
176  return (os << to_string(t));
177 }

◆ sortByLayer()

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

Definition at line 270 of file FPGATrackSimHit.h.

271 {
272  std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>> out;
273  for (auto const &hit : hits)
274  {
275  size_t layer = hit->getLayer();
276  if (layer >= out.size()) out.resize(layer + 1);
277  out[layer].push_back(hit);
278  }
279  return out;
280 }

◆ to_string()

std::string to_string ( HitType  t)

Definition at line 158 of file FPGATrackSimHit.cxx.

159 {
160  switch (t)
161  {
162  case HitType::unmapped: return "unmapped";
163  case HitType::mapped: return "mapped";
164  case HitType::clustered: return "clustered";
165  case HitType::wildcard: return "wildcard";
166  case HitType::guessed: return "guessed";
167  case HitType::extrapolated: return "extrapolated";
168  case HitType::spacepoint: return "spacepoint";
169  default: return "undefined";
170  }
171 }
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:158
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
HitType::clustered
@ clustered
HitType::mapped
@ mapped
HitType::unmapped
@ unmapped