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 "FPGATrackSimObjects/FPGATrackSimTypes.h"
#include "FPGATrackSimObjects/FPGATrackSimMultiTruth.h"
#include <Rtypes.h>
#include "TMath.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< 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 35 of file FPGATrackSimHit.h.

Function Documentation

◆ operator<<()

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

Definition at line 168 of file FPGATrackSimHit.cxx.

169 {
170  return (os << to_string(t));
171 }

◆ sortByLayer()

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

Definition at line 215 of file FPGATrackSimHit.h.

216 {
217  std::vector<std::vector<const FPGATrackSimHit*>> out;
218  for (FPGATrackSimHit const* hit : hits)
219  {
220  size_t layer = hit->getLayer();
221  if (layer >= out.size()) out.resize(layer + 1);
222  out[layer].push_back(hit);
223  }
224  return out;
225 }

◆ to_string()

std::string to_string ( HitType  t)

Definition at line 152 of file FPGATrackSimHit.cxx.

153 {
154  switch (t)
155  {
156  case HitType::unmapped: return "unmapped";
157  case HitType::mapped: return "mapped";
158  case HitType::clustered: return "clustered";
159  case HitType::wildcard: return "wildcard";
160  case HitType::guessed: return "guessed";
161  case HitType::extrapolated: return "extrapolated";
162  case HitType::spacepoint: return "spacepoint";
163  default: return "undefined";
164  }
165 }
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
FPGATrackSimHit
Definition: FPGATrackSimHit.h:38
HitType::wildcard
@ wildcard
to_string
std::string to_string(HitType t)
Definition: FPGATrackSimHit.cxx:152
LArG4ShowerLibProcessing.hits
hits
Definition: LArG4ShowerLibProcessing.py:136
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
HitType::clustered
@ clustered
HitType::mapped
@ mapped
HitType::unmapped
@ unmapped