ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimTrack Class Reference

#include <FPGATrackSimTrack.h>

Collaboration diagram for FPGATrackSimTrack:

Public Member Functions

 FPGATrackSimTrack ()=default
virtual ~FPGATrackSimTrack ()
TrackCorrType getTrackCorrType () const
TrackStage getTrackStage () const
bool getDoDeltaGPhis () const
int getBankID () const
int getPatternID () const
int getFirstSectorID () const
int getSecondSectorID () const
int getTrackID () const
float getParameter (int) const
float getHoughX () const
float getHoughY () const
float getQOverPt () const
float getPt () const
float getD0 () const
float getPhi () const
float getZ0 () const
float getEta () const
float getTheta () const
float getChi2 () const
float getChi2Phi () const
float getChi2Eta () const
float getOrigChi2 () const
float getChi2ndof () const
float getOrigChi2ndof () const
int getSubRegion () const
int getRegion () const
unsigned getHoughXBin () const
unsigned getHoughYBin () const
int getNMissing () const
unsigned int getTypeMask () const
unsigned int getHitMap () const
int getNCoords () const
signed long getEventIndex () const
HepMcParticleLink::barcode_type getBarcode () const
HepMcParticleLink::barcode_type getUniqueID () const
unsigned long barcode () const
float getBarcodeFrac () const
const std::vector< FPGATrackSimHit > & getFPGATrackSimHits () const
std::vector< float > getCoords (unsigned ilayer) const
std::vector< float > computeIdealCoords (unsigned ilayer) const
float getEtaCoord (int ilayer) const
float getPhiCoord (int ilayer) const
double getIdealRadius (int ilayer) const
bool isValidCand () const
void setTrackCorrType (TrackCorrType v)
void setTrackStage (TrackStage v)
void setDoDeltaGPhis (bool v)
void setBankID (int v)
void setPatternID (int v)
void setFirstSectorID (int v)
void setSecondSectorID (int v)
void setTrackID (int v)
void setParameter (int, float)
void setHoughX (float v)
void setHoughY (float v)
void setQOverPt (float v)
void setD0 (float v)
void setPhi (float v, bool ForceRange=true)
void setZ0 (float v)
void setEta (float v)
void setChi2 (float v)
void setChi2Phi (float v)
void setChi2Eta (float v)
void setOrigChi2 (float v)
void setNMissing (int v)
void setTypeMask (unsigned int v)
void setHitMap (unsigned int v)
void setEventIndex (const signed long &v)
void setBarcode (const HepMcParticleLink::barcode_type &v)
void setUniqueID (const HepMcParticleLink::barcode_type &v)
void setBarcodeFrac (const float &v)
void setSubRegion (unsigned v)
void setRegion (unsigned v)
void setHoughXBin (unsigned v)
void setHoughYBin (unsigned v)
void setValidCand (bool v)
void setIdealRadii (const std::vector< double > &v)
void setBinIdx (std::vector< unsigned > x)
const std::vector< unsigned > & getBinIdx () const
void calculateTruth ()
void setNLayers (int)
 set the number of layers in the track.
void setFPGATrackSimHit (unsigned i, const FPGATrackSimHit &hit)
void setPars (FPGATrackSimTrackPars const &pars)
FPGATrackSimTrackPars getPars () const
unsigned int passedOR () const
void setPassedOR (unsigned int)

Private Attributes

TrackCorrType m_trackCorrType = TrackCorrType::None
TrackStage m_trackStage = TrackStage::FIRST
bool m_doDeltaGPhis = false
int m_bankID = -1
int m_patternID = 0
int m_firstSectorID = -1
int m_secondSectorID = -1
int m_trackID = -1
int m_IdealGeoCorr = 0
float m_houghX = 0.0F
float m_houghY = 0.0F
float m_qoverpt = 0.0F
float m_d0 = 0.0F
float m_phi = 0.0F
float m_z0 = 0.0F
float m_eta = 0.0F
float m_chi2 = 0.0F
float m_chi2_phi = 0.0F
float m_chi2_eta = 0.0F
float m_origchi2 = 0.0F
unsigned int m_nmissing = 0
unsigned int m_typemask = 0
unsigned int m_hitmap = 0
int m_subregion = 0
int m_region = 0
unsigned m_xBin = 0
unsigned m_yBin = 0
std::vector< FPGATrackSimHitm_hits
std::vector< unsigned > m_binIdx
signed long m_eventindex = -1
HepMcParticleLink::barcode_type m_barcode = std::numeric_limits<HepMcParticleLink::barcode_type>::max()
HepMcParticleLink::barcode_type m_uniqueID = std::numeric_limits<HepMcParticleLink::barcode_type>::max()
float m_barcode_frac = 0.0F
bool m_isValidCand = true
std::vector< double > m_idealRadii
unsigned int m_ORcode = 1

Friends

std::ostream & operator<< (std::ostream &out, const FPGATrackSimTrack &track)

Detailed Description

Definition at line 18 of file FPGATrackSimTrack.h.

Constructor & Destructor Documentation

◆ FPGATrackSimTrack()

FPGATrackSimTrack::FPGATrackSimTrack ( )
default

◆ ~FPGATrackSimTrack()

FPGATrackSimTrack::~FPGATrackSimTrack ( )
virtual

Definition at line 18 of file FPGATrackSimTrack.cxx.

18{}

Member Function Documentation

◆ barcode()

unsigned long FPGATrackSimTrack::barcode ( ) const
inline

Definition at line 62 of file FPGATrackSimTrack.h.

62{ return getBarcode(); }
HepMcParticleLink::barcode_type getBarcode() const

◆ calculateTruth()

void FPGATrackSimTrack::calculateTruth ( )

Definition at line 220 of file FPGATrackSimTrack.cxx.

221{
222 vector<FPGATrackSimMultiTruth> mtv;
223 mtv.reserve(m_hits.size());
224
225 // don't loop over coordinates, since we only calculate truth *per hit* and not per coordinate, though hitmap is saved for coordinates, so be careful
226 for (const auto& thishit : m_hits)
227 {
228 if (thishit.isReal())
229 {
230 FPGATrackSimMultiTruth this_mt(thishit.getTruth());
231 this_mt.assign_equal_normalization();
232 if (thishit.isPixel())
233 for ( auto& x : this_mt)
234 x.second *= 2;
235 mtv.push_back(this_mt);
236 }
237 }
238
239 // compute the best geant match, the barcode with the largest number of hits contributing to the track.
240 // frac is then the fraction of the total number of hits on the track attributed to the barcode.
241 FPGATrackSimMultiTruth mt(std::accumulate(mtv.begin(), mtv.end(), FPGATrackSimMultiTruth(), FPGATrackSimMultiTruth::AddAccumulator()));
244 const bool ok = mt.best(tbarcode, tfrac);
245 if (ok)
246 {
247 setEventIndex(tbarcode.first);
248 setBarcode(tbarcode.second);
249 setBarcodeFrac(tfrac);
250 }
251 else
252 {
253 setEventIndex(-1);
254 setBarcode(-1);
256 }
257}
#define x
std::pair< unsigned long, unsigned long > Barcode
void setEventIndex(const signed long &v)
void setBarcode(const HepMcParticleLink::barcode_type &v)
void setBarcodeFrac(const float &v)
std::vector< FPGATrackSimHit > m_hits

◆ computeIdealCoords()

std::vector< float > FPGATrackSimTrack::computeIdealCoords ( unsigned ilayer) const

Definition at line 39 of file FPGATrackSimTrack.cxx.

40{
41
42 double target_r = m_idealRadii[ilayer];
43 if (m_hits[ilayer].getHitType() == HitType::spacepoint) {
44 unsigned other_layer = (m_hits[ilayer].getSide() == 0) ? ilayer + 1 : ilayer - 1;
45 target_r = (target_r + m_idealRadii[other_layer]) / 2.;
46 }
47
48 double hough_x = getHoughX();
49 double hough_y = getHoughY();
50
51 // Use the centralized computeIdealCoords function from FPGATrackSimFunctions
52 std::vector<float> coords = ::computeIdealCoords(m_hits[ilayer], hough_x, hough_y, target_r, m_doDeltaGPhis, m_trackCorrType);
53
54 return coords;
55}
TrackCorrType m_trackCorrType
float getHoughX() const
float getHoughY() const
std::vector< double > m_idealRadii
std::vector< float > computeIdealCoords(unsigned ilayer) const

◆ getBankID()

int FPGATrackSimTrack::getBankID ( ) const
inline

Definition at line 28 of file FPGATrackSimTrack.h.

28{ return m_bankID; }

◆ getBarcode()

HepMcParticleLink::barcode_type FPGATrackSimTrack::getBarcode ( ) const
inline

Definition at line 60 of file FPGATrackSimTrack.h.

60{ return m_barcode; }
HepMcParticleLink::barcode_type m_barcode

◆ getBarcodeFrac()

float FPGATrackSimTrack::getBarcodeFrac ( ) const
inline

Definition at line 63 of file FPGATrackSimTrack.h.

63{ return m_barcode_frac; }

◆ getBinIdx()

const std::vector< unsigned > & FPGATrackSimTrack::getBinIdx ( ) const
inline

Definition at line 121 of file FPGATrackSimTrack.h.

121{ return m_binIdx; }
std::vector< unsigned > m_binIdx

◆ getChi2()

float FPGATrackSimTrack::getChi2 ( ) const
inline

Definition at line 43 of file FPGATrackSimTrack.h.

43{ return m_chi2; }

◆ getChi2Eta()

float FPGATrackSimTrack::getChi2Eta ( ) const
inline

Definition at line 45 of file FPGATrackSimTrack.h.

45{ return m_chi2_eta; }

◆ getChi2ndof()

float FPGATrackSimTrack::getChi2ndof ( ) const
inline

Definition at line 47 of file FPGATrackSimTrack.h.

47{ return m_chi2 / (getNCoords() - m_nmissing - 5); }

◆ getChi2Phi()

float FPGATrackSimTrack::getChi2Phi ( ) const
inline

Definition at line 44 of file FPGATrackSimTrack.h.

44{ return m_chi2_phi; }

◆ getCoords()

std::vector< float > FPGATrackSimTrack::getCoords ( unsigned ilayer) const

Definition at line 20 of file FPGATrackSimTrack.cxx.

21{
22 std::vector<float> coords;
23 if (ilayer >= m_hits.size())
24 throw std::range_error("FPGATrackSimTrack::getCoords() out of bounds");
25
27 {
28 coords.push_back(m_hits[ilayer].getEtaIndex());
29 coords.push_back(m_hits[ilayer].getPhiIndex());
30 }
31 else
32 {
33 coords = computeIdealCoords(ilayer);
34 }
35
36 return coords;
37}

◆ getD0()

float FPGATrackSimTrack::getD0 ( ) const
inline

Definition at line 38 of file FPGATrackSimTrack.h.

38{ return m_d0; }

◆ getDoDeltaGPhis()

bool FPGATrackSimTrack::getDoDeltaGPhis ( ) const
inline

Definition at line 27 of file FPGATrackSimTrack.h.

27{ return m_doDeltaGPhis; }

◆ getEta()

float FPGATrackSimTrack::getEta ( ) const
inline

Definition at line 41 of file FPGATrackSimTrack.h.

41{ return m_eta; }

◆ getEtaCoord()

float FPGATrackSimTrack::getEtaCoord ( int ilayer) const

Definition at line 57 of file FPGATrackSimTrack.cxx.

57 {
58 auto coords = getCoords(ilayer);
59 if (coords.size() > 0) {
60 return coords.at(0);
61 }
62 else {
63 throw std::range_error("FPGATrackSimTrack::getCoord(layer,coord) out of bounds");
64 }
65}
std::vector< float > getCoords(unsigned ilayer) const

◆ getEventIndex()

signed long FPGATrackSimTrack::getEventIndex ( ) const
inline

Definition at line 59 of file FPGATrackSimTrack.h.

59{ return m_eventindex; }

◆ getFirstSectorID()

int FPGATrackSimTrack::getFirstSectorID ( ) const
inline

Definition at line 30 of file FPGATrackSimTrack.h.

◆ getFPGATrackSimHits()

const std::vector< FPGATrackSimHit > & FPGATrackSimTrack::getFPGATrackSimHits ( ) const
inline

Definition at line 65 of file FPGATrackSimTrack.h.

65{ return m_hits; }

◆ getHitMap()

unsigned int FPGATrackSimTrack::getHitMap ( ) const
inline

Definition at line 56 of file FPGATrackSimTrack.h.

56{ return m_hitmap; } // coordinate mask!!

◆ getHoughX()

float FPGATrackSimTrack::getHoughX ( ) const
inline

Definition at line 34 of file FPGATrackSimTrack.h.

34{ return m_houghX; }

◆ getHoughXBin()

unsigned FPGATrackSimTrack::getHoughXBin ( ) const
inline

Definition at line 51 of file FPGATrackSimTrack.h.

51{ return m_xBin; }

◆ getHoughY()

float FPGATrackSimTrack::getHoughY ( ) const
inline

Definition at line 35 of file FPGATrackSimTrack.h.

35{ return m_houghY; }

◆ getHoughYBin()

unsigned FPGATrackSimTrack::getHoughYBin ( ) const
inline

Definition at line 52 of file FPGATrackSimTrack.h.

52{ return m_yBin; }

◆ getIdealRadius()

double FPGATrackSimTrack::getIdealRadius ( int ilayer) const
inline

Definition at line 79 of file FPGATrackSimTrack.h.

79{ return m_idealRadii.at(ilayer); };

◆ getNCoords()

int FPGATrackSimTrack::getNCoords ( ) const

Definition at line 89 of file FPGATrackSimTrack.cxx.

89 {
90 int nCoords = 0;
91 for (const auto& hit : m_hits) {
92 nCoords += hit.getDim();
93 }
94 return nCoords;
95}

◆ getNMissing()

int FPGATrackSimTrack::getNMissing ( ) const
inline

Definition at line 54 of file FPGATrackSimTrack.h.

54{ return m_nmissing; } // missing coordinates

◆ getOrigChi2()

float FPGATrackSimTrack::getOrigChi2 ( ) const
inline

Definition at line 46 of file FPGATrackSimTrack.h.

46{ return m_origchi2; }

◆ getOrigChi2ndof()

float FPGATrackSimTrack::getOrigChi2ndof ( ) const
inline

Definition at line 48 of file FPGATrackSimTrack.h.

48{ return m_origchi2 / (getNCoords() - m_nmissing - 5); }

◆ getParameter()

float FPGATrackSimTrack::getParameter ( int ipar) const

Definition at line 131 of file FPGATrackSimTrack.cxx.

132{
133 switch (ipar) {
134 case 0:
135 return m_qoverpt;
136 break;
137 case 1:
138 return m_d0;
139 break;
140 case 2:
141 return m_phi;
142 break;
143 case 3:
144 return m_z0;
145 break;
146 case 4:
147 return m_eta;
148 break;
149 }
150
151 return 0.;
152}

◆ getPars()

FPGATrackSimTrackPars FPGATrackSimTrack::getPars ( ) const
inline

Definition at line 135 of file FPGATrackSimTrack.h.

135 {
136 FPGATrackSimTrackPars pars;
137 pars.qOverPt = getQOverPt();
138 pars.eta = getEta();
139 pars.phi = getPhi();
140 pars.d0 = getD0();
141 pars.z0 = getZ0();
142
143 return pars;
144 }
float getQOverPt() const

◆ getPatternID()

int FPGATrackSimTrack::getPatternID ( ) const
inline

Definition at line 29 of file FPGATrackSimTrack.h.

29{ return m_patternID; }

◆ getPhi()

float FPGATrackSimTrack::getPhi ( ) const
inline

Definition at line 39 of file FPGATrackSimTrack.h.

39{ return m_phi; }

◆ getPhiCoord()

float FPGATrackSimTrack::getPhiCoord ( int ilayer) const

Definition at line 67 of file FPGATrackSimTrack.cxx.

67 {
68 auto coords = getCoords(ilayer);
69 // If this is a spacepoint, and if this is the "outer" hit on a strip module
70 // (side = 1) then we actually return the z/eta coord.
71 // Since spacepoints are duplicated, this avoids using the same phi coord
72 // twice and alsp avoids having to teach the code that strip spacepoints are
73 // "2D" hits despite being in the strips, which everything assumes is 1D.
74 // This makes it easy to mix and match spacepoints with strip hits that aren't
75 // spacepoints (since the number of strip layers is held fixed).
76 unsigned target_coord = 1;
77 if (m_hits[ilayer].getHitType() == HitType::spacepoint && (m_hits[ilayer].getPhysLayer() % 2) == 1) {
78 target_coord = 0;
79 }
80
81 if (coords.size() > target_coord) {
82 return coords.at(target_coord);
83 }
84 else {
85 throw std::range_error("FPGATrackSimTrack::getCoord(layer,coord) out of bounds");
86 }
87}

◆ getPt()

float FPGATrackSimTrack::getPt ( ) const
inline

Definition at line 37 of file FPGATrackSimTrack.h.

37{ return m_qoverpt != 0 ? std::abs(1 / m_qoverpt) : 99999999.; }

◆ getQOverPt()

float FPGATrackSimTrack::getQOverPt ( ) const
inline

Definition at line 36 of file FPGATrackSimTrack.h.

36{ return m_qoverpt; }

◆ getRegion()

int FPGATrackSimTrack::getRegion ( ) const
inline

Definition at line 50 of file FPGATrackSimTrack.h.

50{ return m_region; }

◆ getSecondSectorID()

int FPGATrackSimTrack::getSecondSectorID ( ) const
inline

Definition at line 31 of file FPGATrackSimTrack.h.

◆ getSubRegion()

int FPGATrackSimTrack::getSubRegion ( ) const
inline

Definition at line 49 of file FPGATrackSimTrack.h.

49{ return m_subregion; }

◆ getTheta()

float FPGATrackSimTrack::getTheta ( ) const
inline

Definition at line 42 of file FPGATrackSimTrack.h.

42{ return 2*std::atan(std::exp(-m_eta)); }

◆ getTrackCorrType()

TrackCorrType FPGATrackSimTrack::getTrackCorrType ( ) const
inline

Definition at line 25 of file FPGATrackSimTrack.h.

25{ return m_trackCorrType; }

◆ getTrackID()

int FPGATrackSimTrack::getTrackID ( ) const
inline

Definition at line 32 of file FPGATrackSimTrack.h.

32{ return m_trackID; }

◆ getTrackStage()

TrackStage FPGATrackSimTrack::getTrackStage ( ) const
inline

Definition at line 26 of file FPGATrackSimTrack.h.

26{ return m_trackStage; }

◆ getTypeMask()

unsigned int FPGATrackSimTrack::getTypeMask ( ) const
inline

Definition at line 55 of file FPGATrackSimTrack.h.

55{ return m_typemask; }

◆ getUniqueID()

HepMcParticleLink::barcode_type FPGATrackSimTrack::getUniqueID ( ) const
inline

Definition at line 61 of file FPGATrackSimTrack.h.

61{ return m_uniqueID; }
HepMcParticleLink::barcode_type m_uniqueID

◆ getZ0()

float FPGATrackSimTrack::getZ0 ( ) const
inline

Definition at line 40 of file FPGATrackSimTrack.h.

40{ return m_z0; }

◆ isValidCand()

bool FPGATrackSimTrack::isValidCand ( ) const
inline

Definition at line 81 of file FPGATrackSimTrack.h.

81{ return m_isValidCand; }

◆ passedOR()

unsigned int FPGATrackSimTrack::passedOR ( ) const
inline

Definition at line 147 of file FPGATrackSimTrack.h.

147{ return m_ORcode; }

◆ setBankID()

void FPGATrackSimTrack::setBankID ( int v)
inline

Definition at line 86 of file FPGATrackSimTrack.h.

◆ setBarcode()

void FPGATrackSimTrack::setBarcode ( const HepMcParticleLink::barcode_type & v)
inline

Definition at line 107 of file FPGATrackSimTrack.h.

107{ m_barcode = v; }

◆ setBarcodeFrac()

void FPGATrackSimTrack::setBarcodeFrac ( const float & v)
inline

Definition at line 109 of file FPGATrackSimTrack.h.

109{ m_barcode_frac = v; }

◆ setBinIdx()

void FPGATrackSimTrack::setBinIdx ( std::vector< unsigned > x)
inline

Definition at line 120 of file FPGATrackSimTrack.h.

120{ m_binIdx = std::move(x); }

◆ setChi2()

void FPGATrackSimTrack::setChi2 ( float v)
inline

Definition at line 99 of file FPGATrackSimTrack.h.

99{ m_chi2 = v; }

◆ setChi2Eta()

void FPGATrackSimTrack::setChi2Eta ( float v)
inline

Definition at line 101 of file FPGATrackSimTrack.h.

101{ m_chi2_eta = v; }

◆ setChi2Phi()

void FPGATrackSimTrack::setChi2Phi ( float v)
inline

Definition at line 100 of file FPGATrackSimTrack.h.

100{ m_chi2_phi = v; }

◆ setD0()

void FPGATrackSimTrack::setD0 ( float v)
inline

Definition at line 95 of file FPGATrackSimTrack.h.

95{ m_d0 = v; }

◆ setDoDeltaGPhis()

void FPGATrackSimTrack::setDoDeltaGPhis ( bool v)
inline

Definition at line 85 of file FPGATrackSimTrack.h.

85{ m_doDeltaGPhis = v; }

◆ setEta()

void FPGATrackSimTrack::setEta ( float v)
inline

Definition at line 98 of file FPGATrackSimTrack.h.

98{ m_eta = v; }

◆ setEventIndex()

void FPGATrackSimTrack::setEventIndex ( const signed long & v)
inline

Definition at line 106 of file FPGATrackSimTrack.h.

106{ m_eventindex = v; }

◆ setFirstSectorID()

void FPGATrackSimTrack::setFirstSectorID ( int v)
inline

Definition at line 88 of file FPGATrackSimTrack.h.

88{ m_firstSectorID = v; }

◆ setFPGATrackSimHit()

void FPGATrackSimTrack::setFPGATrackSimHit ( unsigned i,
const FPGATrackSimHit & hit )

Definition at line 98 of file FPGATrackSimTrack.cxx.

99{
100 if (m_hits.size() > i)
101 m_hits[i] = hit;
102 else
103 throw std::range_error("FPGATrackSimTrack::setFPGATrackSimHit() out of bounds");
104}

◆ setHitMap()

void FPGATrackSimTrack::setHitMap ( unsigned int v)
inline

Definition at line 105 of file FPGATrackSimTrack.h.

105{ m_hitmap = v; }

◆ setHoughX()

void FPGATrackSimTrack::setHoughX ( float v)
inline

Definition at line 92 of file FPGATrackSimTrack.h.

92{ m_houghX = v; }

◆ setHoughXBin()

void FPGATrackSimTrack::setHoughXBin ( unsigned v)
inline

Definition at line 113 of file FPGATrackSimTrack.h.

113{ m_xBin = v; }

◆ setHoughY()

void FPGATrackSimTrack::setHoughY ( float v)
inline

Definition at line 93 of file FPGATrackSimTrack.h.

93{ m_houghY = v; }

◆ setHoughYBin()

void FPGATrackSimTrack::setHoughYBin ( unsigned v)
inline

Definition at line 114 of file FPGATrackSimTrack.h.

114{ m_yBin = v;}

◆ setIdealRadii()

void FPGATrackSimTrack::setIdealRadii ( const std::vector< double > & v)
inline

Definition at line 117 of file FPGATrackSimTrack.h.

117{ m_idealRadii = v; }

◆ setNLayers()

void FPGATrackSimTrack::setNLayers ( int dim)

set the number of layers in the track.

=0 is used to clear the track

Definition at line 107 of file FPGATrackSimTrack.cxx.

108{
109 if (m_hits.size() > 0) m_hits.clear();
110 m_hits.resize(dim);
111}

◆ setNMissing()

void FPGATrackSimTrack::setNMissing ( int v)
inline

Definition at line 103 of file FPGATrackSimTrack.h.

103{ m_nmissing = v; }

◆ setOrigChi2()

void FPGATrackSimTrack::setOrigChi2 ( float v)
inline

Definition at line 102 of file FPGATrackSimTrack.h.

102{ m_origchi2 = v; }

◆ setParameter()

void FPGATrackSimTrack::setParameter ( int ipar,
float val )

Definition at line 155 of file FPGATrackSimTrack.cxx.

156{
157 switch (ipar) {
158 case 0:
159 m_qoverpt = val;
160 break;
161 case 1:
162 m_d0 = val;
163 break;
164 case 2:
165 m_phi = val;
166 break;
167 case 3:
168 m_z0 = val;
169 break;
170 case 4:
171 m_eta = val;
172 break;
173 }
174}

◆ setPars()

void FPGATrackSimTrack::setPars ( FPGATrackSimTrackPars const & pars)
inline

Definition at line 126 of file FPGATrackSimTrack.h.

127 {
128 setQOverPt(pars.qOverPt);
129 setPhi(pars.phi, false);
130 setEta(pars.eta);
131 setD0(pars.d0);
132 setZ0(pars.z0);
133 }
void setQOverPt(float v)
void setPhi(float v, bool ForceRange=true)

◆ setPassedOR()

void FPGATrackSimTrack::setPassedOR ( unsigned int code)

Definition at line 259 of file FPGATrackSimTrack.cxx.

260{
261 m_ORcode = code;
262}

◆ setPatternID()

void FPGATrackSimTrack::setPatternID ( int v)
inline

Definition at line 87 of file FPGATrackSimTrack.h.

87{ m_patternID = v; }

◆ setPhi()

void FPGATrackSimTrack::setPhi ( float v,
bool ForceRange = true )

Definition at line 115 of file FPGATrackSimTrack.cxx.

115 {
116 if (ForceRange) {
117 // when phi is ridiculously large, there is no point in adjusting it
118 if (std::abs(phi) > 100) {
119 if (m_chi2 < 100) { // this is a BAD track, so fail it if chi2 hasn't done so already
120 m_chi2 += 100; // we want to fail this event anyway
121 }
122 }
123 else {
124 while (phi >= M_PI) phi -= (2. * M_PI);
125 while (phi < -M_PI) phi += (2. * M_PI);
126 }
127 }
128 m_phi = phi;
129}
#define M_PI
Scalar phi() const
phi method

◆ setQOverPt()

void FPGATrackSimTrack::setQOverPt ( float v)
inline

Definition at line 94 of file FPGATrackSimTrack.h.

94{ m_qoverpt = v; }

◆ setRegion()

void FPGATrackSimTrack::setRegion ( unsigned v)
inline

Definition at line 112 of file FPGATrackSimTrack.h.

112{ m_region = v; }

◆ setSecondSectorID()

void FPGATrackSimTrack::setSecondSectorID ( int v)
inline

Definition at line 89 of file FPGATrackSimTrack.h.

◆ setSubRegion()

void FPGATrackSimTrack::setSubRegion ( unsigned v)
inline

Definition at line 111 of file FPGATrackSimTrack.h.

111{ m_subregion = v; }

◆ setTrackCorrType()

void FPGATrackSimTrack::setTrackCorrType ( TrackCorrType v)
inline

Definition at line 83 of file FPGATrackSimTrack.h.

83{ m_trackCorrType = v; }

◆ setTrackID()

void FPGATrackSimTrack::setTrackID ( int v)
inline

Definition at line 90 of file FPGATrackSimTrack.h.

90{ m_trackID = v; }

◆ setTrackStage()

void FPGATrackSimTrack::setTrackStage ( TrackStage v)
inline

Definition at line 84 of file FPGATrackSimTrack.h.

84{ m_trackStage = v; }

◆ setTypeMask()

void FPGATrackSimTrack::setTypeMask ( unsigned int v)
inline

Definition at line 104 of file FPGATrackSimTrack.h.

104{ m_typemask = v; }

◆ setUniqueID()

void FPGATrackSimTrack::setUniqueID ( const HepMcParticleLink::barcode_type & v)
inline

Definition at line 108 of file FPGATrackSimTrack.h.

108{ m_uniqueID = v; }

◆ setValidCand()

void FPGATrackSimTrack::setValidCand ( bool v)
inline

Definition at line 116 of file FPGATrackSimTrack.h.

116{ m_isValidCand = v; }

◆ setZ0()

void FPGATrackSimTrack::setZ0 ( float v)
inline

Definition at line 97 of file FPGATrackSimTrack.h.

97{ m_z0 = v; }

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const FPGATrackSimTrack & track )
friend

Definition at line 177 of file FPGATrackSimTrack.cxx.

178{
179
180 out << "TRACK: ID=" << std::left << setw(8) << track.m_trackID;
181 out << " SECTOR1=" << std::left << setw(8) << track.m_firstSectorID;
182 out << " BANK=" << std::left << setw(8) << track.m_bankID;
183 out << " BARCODE=" << std::left << setw(6) << track.m_barcode;
184 out << " BARCODE_F=" << std::left << setw(9) << track.m_barcode_frac;
185 out << " EVENT=" << std::left << setw(6) << track.m_eventindex;
186 out << " HITMAP=" << std::left << setw(8) << track.getHitMap();
187 out << " TYPE=" << std::left << setw(3) << track.m_typemask;
188 out << " NMISS=" << std::left << setw(3) << track.getNMissing();
189 out << "\n";
190 streamsize oldprec = out.precision();
191 out.precision(4);
192 out << " PHI=" << std::left << setw(10) << track.m_phi;
193 out.setf(ios_base::scientific);
194 out.precision(2);
195 out << " Q/PT=" << std::left << setw(10) << track.m_qoverpt;
196 out.unsetf(ios_base::scientific);
197 out.precision(4);
198 out << " d0=" << std::left << setw(10) << track.m_d0;
199 out << " ETA=" << std::left << setw(10) << track.m_eta;
200 out << " z0=" << std::left << setw(10) << track.m_z0;
201 out << " Chi2=" << std::left << setw(12) << track.m_chi2;
202 out << " OChi2=" << std::left << setw(12) << track.m_origchi2;
203
204 out << endl;
205 out.precision(oldprec);
206
207 out << endl;
208
209 // print the hits
210 int iter = 0;
211 for (const auto& hit : track.m_hits) {
212 out << "Hit " << iter << ": " << hit << "\n";
213 iter++;
214 }
215
216 return out;
217}

Member Data Documentation

◆ m_bankID

int FPGATrackSimTrack::m_bankID = -1
private

Definition at line 158 of file FPGATrackSimTrack.h.

◆ m_barcode

HepMcParticleLink::barcode_type FPGATrackSimTrack::m_barcode = std::numeric_limits<HepMcParticleLink::barcode_type>::max()
private

Definition at line 197 of file FPGATrackSimTrack.h.

◆ m_barcode_frac

float FPGATrackSimTrack::m_barcode_frac = 0.0F
private

Definition at line 200 of file FPGATrackSimTrack.h.

◆ m_binIdx

std::vector<unsigned> FPGATrackSimTrack::m_binIdx
private

Definition at line 194 of file FPGATrackSimTrack.h.

◆ m_chi2

float FPGATrackSimTrack::m_chi2 = 0.0F
private

Definition at line 173 of file FPGATrackSimTrack.h.

◆ m_chi2_eta

float FPGATrackSimTrack::m_chi2_eta = 0.0F
private

Definition at line 175 of file FPGATrackSimTrack.h.

◆ m_chi2_phi

float FPGATrackSimTrack::m_chi2_phi = 0.0F
private

Definition at line 174 of file FPGATrackSimTrack.h.

◆ m_d0

float FPGATrackSimTrack::m_d0 = 0.0F
private

Definition at line 169 of file FPGATrackSimTrack.h.

◆ m_doDeltaGPhis

bool FPGATrackSimTrack::m_doDeltaGPhis = false
private

Definition at line 156 of file FPGATrackSimTrack.h.

◆ m_eta

float FPGATrackSimTrack::m_eta = 0.0F
private

Definition at line 172 of file FPGATrackSimTrack.h.

◆ m_eventindex

signed long FPGATrackSimTrack::m_eventindex = -1
private

Definition at line 196 of file FPGATrackSimTrack.h.

◆ m_firstSectorID

int FPGATrackSimTrack::m_firstSectorID = -1
private

Definition at line 160 of file FPGATrackSimTrack.h.

◆ m_hitmap

unsigned int FPGATrackSimTrack::m_hitmap = 0
private

Definition at line 181 of file FPGATrackSimTrack.h.

◆ m_hits

std::vector<FPGATrackSimHit> FPGATrackSimTrack::m_hits
private

Definition at line 191 of file FPGATrackSimTrack.h.

◆ m_houghX

float FPGATrackSimTrack::m_houghX = 0.0F
private

Definition at line 166 of file FPGATrackSimTrack.h.

◆ m_houghY

float FPGATrackSimTrack::m_houghY = 0.0F
private

Definition at line 167 of file FPGATrackSimTrack.h.

◆ m_IdealGeoCorr

int FPGATrackSimTrack::m_IdealGeoCorr = 0
private

Definition at line 164 of file FPGATrackSimTrack.h.

◆ m_idealRadii

std::vector<double> FPGATrackSimTrack::m_idealRadii
private

Definition at line 211 of file FPGATrackSimTrack.h.

◆ m_isValidCand

bool FPGATrackSimTrack::m_isValidCand = true
private

Definition at line 206 of file FPGATrackSimTrack.h.

◆ m_nmissing

unsigned int FPGATrackSimTrack::m_nmissing = 0
private

Definition at line 179 of file FPGATrackSimTrack.h.

◆ m_ORcode

unsigned int FPGATrackSimTrack::m_ORcode = 1
private

Definition at line 215 of file FPGATrackSimTrack.h.

◆ m_origchi2

float FPGATrackSimTrack::m_origchi2 = 0.0F
private

Definition at line 176 of file FPGATrackSimTrack.h.

◆ m_patternID

int FPGATrackSimTrack::m_patternID = 0
private

Definition at line 159 of file FPGATrackSimTrack.h.

◆ m_phi

float FPGATrackSimTrack::m_phi = 0.0F
private

Definition at line 170 of file FPGATrackSimTrack.h.

◆ m_qoverpt

float FPGATrackSimTrack::m_qoverpt = 0.0F
private

Definition at line 168 of file FPGATrackSimTrack.h.

◆ m_region

int FPGATrackSimTrack::m_region = 0
private

Definition at line 186 of file FPGATrackSimTrack.h.

◆ m_secondSectorID

int FPGATrackSimTrack::m_secondSectorID = -1
private

Definition at line 161 of file FPGATrackSimTrack.h.

◆ m_subregion

int FPGATrackSimTrack::m_subregion = 0
private

Definition at line 184 of file FPGATrackSimTrack.h.

◆ m_trackCorrType

TrackCorrType FPGATrackSimTrack::m_trackCorrType = TrackCorrType::None
private

Definition at line 154 of file FPGATrackSimTrack.h.

◆ m_trackID

int FPGATrackSimTrack::m_trackID = -1
private

Definition at line 162 of file FPGATrackSimTrack.h.

◆ m_trackStage

TrackStage FPGATrackSimTrack::m_trackStage = TrackStage::FIRST
private

Definition at line 155 of file FPGATrackSimTrack.h.

◆ m_typemask

unsigned int FPGATrackSimTrack::m_typemask = 0
private

Definition at line 180 of file FPGATrackSimTrack.h.

◆ m_uniqueID

HepMcParticleLink::barcode_type FPGATrackSimTrack::m_uniqueID = std::numeric_limits<HepMcParticleLink::barcode_type>::max()
private

Definition at line 198 of file FPGATrackSimTrack.h.

◆ m_xBin

unsigned FPGATrackSimTrack::m_xBin = 0
private

Definition at line 188 of file FPGATrackSimTrack.h.

◆ m_yBin

unsigned FPGATrackSimTrack::m_yBin = 0
private

Definition at line 189 of file FPGATrackSimTrack.h.

◆ m_z0

float FPGATrackSimTrack::m_z0 = 0.0F
private

Definition at line 171 of file FPGATrackSimTrack.h.


The documentation for this class was generated from the following files: