ATLAS Offline Software
Functions
FPGATrackSimHit.cxx File Reference
#include "FPGATrackSimObjects/FPGATrackSimHit.h"
#include <stdexcept>
Include dependency graph for FPGATrackSimHit.cxx:

Go to the source code of this file.

Functions

 ClassImp (FPGATrackSimHit) bool FPGATrackSimHit
 
std::ostream & operator<< (std::ostream &out, const FPGATrackSimHit &hit)
 
std::string to_string (HitType t)
 
std::ostream & operator<< (std::ostream &os, HitType t)
 

Function Documentation

◆ ClassImp()

ClassImp ( FPGATrackSimHit  )

Definition at line 10 of file FPGATrackSimHit.cxx.

15 {
16  switch (m_hitType)
17  {
18  case HitType::unmapped:
19  case HitType::undefined:
20  return false;
21  default:
22  return true;
23  }
24 }
25 
27 {
28  switch (m_hitType)
29  {
30  case HitType::clustered: // TODO do wildcard and guessed hits have cluster info too?
32  return true;
33  default:
34  return false;
35  }
36 }
37 
38 bool FPGATrackSimHit::isReal() const
39 {
40  switch (m_hitType)
41  {
42  case HitType::unmapped:
43  case HitType::mapped:
44  case HitType::clustered:
46  return true;
47  default:
48  return false;
49  }
50 }
51 
52 // Sets using the physical layer index as defined by FPGATrackSimPlaneMap
53 void FPGATrackSimHit::setPhysLayer(unsigned v)
54 {
56  {
57  m_layer_disk = v / 2;
58  m_side = v % 2;
59  }
60  else
61  {
62  m_layer_disk = v;
63  }
64 }

◆ operator<<() [1/2]

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

Definition at line 168 of file FPGATrackSimHit.cxx.

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

◆ operator<<() [2/2]

std::ostream& operator<< ( std::ostream &  out,
const FPGATrackSimHit hit 
)

Definition at line 137 of file FPGATrackSimHit.cxx.

138 {
139  out << "type=" << hit.m_hitType
140  << " tech=" << hit.m_detType
141  << " zone=" << hit.m_detectorZone
142  << " etamod=" << hit.getEtaModule()
143  << " phimod=" << hit.getPhiModule()
144  << " physLayer=" << hit.getPhysLayer()
145  << " eta=" << hit.getEtaCoord()
146  << " phi=" << hit.getPhiCoord();
147 
148  return out;
149 }

◆ 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 }
FPGATrackSimHit::m_detType
SiliconTech m_detType
Definition: FPGATrackSimHit.h:155
FPGATrackSimHit::getPhiModule
unsigned getPhiModule() const
Definition: FPGATrackSimHit.h:83
SiliconTech::strip
@ strip
FPGATrackSimHit::getPhysLayer
unsigned getPhysLayer() const
Definition: FPGATrackSimHit.cxx:67
HitType::extrapolated
@ extrapolated
FPGATrackSimHit::isClustered
bool isClustered() const
FPGATrackSimHit::isReal
bool isReal() const
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
HitType::spacepoint
@ spacepoint
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
FPGATrackSimHit::m_hitType
HitType m_hitType
Definition: FPGATrackSimHit.h:153
HitType::guessed
@ guessed
FPGATrackSimHit::getEtaModule
unsigned getEtaModule() const
Definition: FPGATrackSimHit.h:82
HitType::undefined
@ undefined
HitType::wildcard
@ wildcard
FPGATrackSimHit::getPhiCoord
float getPhiCoord() const
Definition: FPGATrackSimHit.h:103
to_string
std::string to_string(HitType t)
Definition: FPGATrackSimHit.cxx:152
FPGATrackSimHit::setPhysLayer
void setPhysLayer(unsigned v)
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
HitType::clustered
@ clustered
FPGATrackSimHit::getEtaCoord
float getEtaCoord() const
Definition: FPGATrackSimHit.h:104
HitType::mapped
@ mapped
python.PyAthena.v
v
Definition: PyAthena.py:157
FPGATrackSimHit::m_detectorZone
DetectorZone m_detectorZone
Definition: FPGATrackSimHit.h:154
FPGATrackSimHit::m_layer_disk
unsigned m_layer_disk
Definition: FPGATrackSimHit.h:159
FPGATrackSimHit::m_side
unsigned m_side
Definition: FPGATrackSimHit.h:160
HitType::unmapped
@ unmapped