ATLAS Offline Software
Loading...
Searching...
No Matches
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 "Identifier/Identifier.h"
Include dependency graph for FPGATrackSimHit.h:

Go to the source code of this file.

Classes

class  FPGATrackSimHit

Enumerations

enum class  HitType {
  unmapped , mapped , clustered , wildcard ,
  guessed , undefined , extrapolated , 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 class HitType
strong
Enumerator
unmapped 
mapped 
clustered 
wildcard 
guessed 
undefined 
extrapolated 
spacepoint 

Definition at line 39 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}
std::string to_string(HitType t)

◆ sortByLayer()

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

Definition at line 319 of file FPGATrackSimHit.h.

320{
321 std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>> out;
322 for (auto const &hit : hits)
323 {
324 size_t layer = hit->getLayer();
325 if (layer >= out.size()) out.resize(layer + 1);
326 out[layer].push_back(hit);
327 }
328 return out;
329}
@ layer
Definition HitInfo.h:79

◆ 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}