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 182 of file FPGATrackSimHit.cxx.

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

◆ sortByLayer()

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

Definition at line 315 of file FPGATrackSimHit.h.

316 {
317  std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>> out;
318  for (auto const &hit : hits)
319  {
320  size_t layer = hit->getLayer();
321  if (layer >= out.size()) out.resize(layer + 1);
322  out[layer].push_back(hit);
323  }
324  return out;
325 }

◆ to_string()

std::string to_string ( HitType  t)

Definition at line 166 of file FPGATrackSimHit.cxx.

167 {
168  switch (t)
169  {
170  case HitType::unmapped: return "unmapped";
171  case HitType::mapped: return "mapped";
172  case HitType::clustered: return "clustered";
173  case HitType::wildcard: return "wildcard";
174  case HitType::guessed: return "guessed";
175  case HitType::extrapolated: return "extrapolated";
176  case HitType::spacepoint: return "spacepoint";
177  default: return "undefined";
178  }
179 }
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
HitType::extrapolated
@ extrapolated
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
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:166
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
HitType::clustered
@ clustered
HitType::mapped
@ mapped
HitType::unmapped
@ unmapped