#include <FPGATrackSimTrack.h>
Definition at line 18 of file FPGATrackSimTrack.h.
◆ FPGATrackSimTrack()
| FPGATrackSimTrack::FPGATrackSimTrack |
( |
| ) |
|
|
default |
◆ ~FPGATrackSimTrack()
| FPGATrackSimTrack::~FPGATrackSimTrack |
( |
| ) |
|
|
virtual |
◆ barcode()
| unsigned long FPGATrackSimTrack::barcode |
( |
| ) |
const |
|
inline |
◆ 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
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)
235 mtv.push_back(this_mt);
236 }
237 }
238
239
240
241 FPGATrackSimMultiTruth mt(std::accumulate(mtv.begin(), mtv.end(), FPGATrackSimMultiTruth(), FPGATrackSimMultiTruth::AddAccumulator()));
244 const bool ok = mt.best(tbarcode, tfrac);
245 if (ok)
246 {
250 }
251 else
252 {
256 }
257}
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
44 unsigned other_layer = (
m_hits[ilayer].getSide() == 0) ? ilayer + 1 : ilayer - 1;
46 }
47
50
51
53
54 return coords;
55}
TrackCorrType m_trackCorrType
std::vector< double > m_idealRadii
std::vector< float > computeIdealCoords(unsigned ilayer) const
◆ getBankID()
| int FPGATrackSimTrack::getBankID |
( |
| ) |
const |
|
inline |
◆ getBarcode()
◆ getBarcodeFrac()
| float FPGATrackSimTrack::getBarcodeFrac |
( |
| ) |
const |
|
inline |
◆ getBinIdx()
| const std::vector< unsigned > & FPGATrackSimTrack::getBinIdx |
( |
| ) |
const |
|
inline |
◆ getChi2()
| float FPGATrackSimTrack::getChi2 |
( |
| ) |
const |
|
inline |
◆ getChi2Eta()
| float FPGATrackSimTrack::getChi2Eta |
( |
| ) |
const |
|
inline |
◆ getChi2ndof()
| float FPGATrackSimTrack::getChi2ndof |
( |
| ) |
const |
|
inline |
◆ getChi2Phi()
| float FPGATrackSimTrack::getChi2Phi |
( |
| ) |
const |
|
inline |
◆ 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 {
34 }
35
36 return coords;
37}
◆ getD0()
| float FPGATrackSimTrack::getD0 |
( |
| ) |
const |
|
inline |
◆ getDoDeltaGPhis()
| bool FPGATrackSimTrack::getDoDeltaGPhis |
( |
| ) |
const |
|
inline |
◆ getEta()
| float FPGATrackSimTrack::getEta |
( |
| ) |
const |
|
inline |
◆ getEtaCoord()
| float FPGATrackSimTrack::getEtaCoord |
( |
int | ilayer | ) |
const |
Definition at line 57 of file FPGATrackSimTrack.cxx.
57 {
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 |
◆ getFirstSectorID()
| int FPGATrackSimTrack::getFirstSectorID |
( |
| ) |
const |
|
inline |
◆ getFPGATrackSimHits()
| const std::vector< FPGATrackSimHit > & FPGATrackSimTrack::getFPGATrackSimHits |
( |
| ) |
const |
|
inline |
◆ getHitMap()
| unsigned int FPGATrackSimTrack::getHitMap |
( |
| ) |
const |
|
inline |
◆ getHoughX()
| float FPGATrackSimTrack::getHoughX |
( |
| ) |
const |
|
inline |
◆ getHoughXBin()
| unsigned FPGATrackSimTrack::getHoughXBin |
( |
| ) |
const |
|
inline |
◆ getHoughY()
| float FPGATrackSimTrack::getHoughY |
( |
| ) |
const |
|
inline |
◆ getHoughYBin()
| unsigned FPGATrackSimTrack::getHoughYBin |
( |
| ) |
const |
|
inline |
◆ getIdealRadius()
| double FPGATrackSimTrack::getIdealRadius |
( |
int | ilayer | ) |
const |
|
inline |
◆ 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 |
◆ getOrigChi2()
| float FPGATrackSimTrack::getOrigChi2 |
( |
| ) |
const |
|
inline |
◆ getOrigChi2ndof()
| float FPGATrackSimTrack::getOrigChi2ndof |
( |
| ) |
const |
|
inline |
◆ getParameter()
| float FPGATrackSimTrack::getParameter |
( |
int | ipar | ) |
const |
Definition at line 131 of file FPGATrackSimTrack.cxx.
132{
133 switch (ipar) {
134 case 0:
136 break;
137 case 1:
139 break;
140 case 2:
142 break;
143 case 3:
145 break;
146 case 4:
148 break;
149 }
150
151 return 0.;
152}
◆ getPars()
◆ getPatternID()
| int FPGATrackSimTrack::getPatternID |
( |
| ) |
const |
|
inline |
◆ getPhi()
| float FPGATrackSimTrack::getPhi |
( |
| ) |
const |
|
inline |
◆ getPhiCoord()
| float FPGATrackSimTrack::getPhiCoord |
( |
int | ilayer | ) |
const |
Definition at line 67 of file FPGATrackSimTrack.cxx.
67 {
69
70
71
72
73
74
75
76 unsigned target_coord = 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 |
◆ getQOverPt()
| float FPGATrackSimTrack::getQOverPt |
( |
| ) |
const |
|
inline |
◆ getRegion()
| int FPGATrackSimTrack::getRegion |
( |
| ) |
const |
|
inline |
◆ getSecondSectorID()
| int FPGATrackSimTrack::getSecondSectorID |
( |
| ) |
const |
|
inline |
◆ getSubRegion()
| int FPGATrackSimTrack::getSubRegion |
( |
| ) |
const |
|
inline |
◆ getTheta()
| float FPGATrackSimTrack::getTheta |
( |
| ) |
const |
|
inline |
◆ getTrackCorrType()
◆ getTrackID()
| int FPGATrackSimTrack::getTrackID |
( |
| ) |
const |
|
inline |
◆ getTrackStage()
| TrackStage FPGATrackSimTrack::getTrackStage |
( |
| ) |
const |
|
inline |
◆ getTypeMask()
| unsigned int FPGATrackSimTrack::getTypeMask |
( |
| ) |
const |
|
inline |
◆ getUniqueID()
◆ getZ0()
| float FPGATrackSimTrack::getZ0 |
( |
| ) |
const |
|
inline |
◆ isValidCand()
| bool FPGATrackSimTrack::isValidCand |
( |
| ) |
const |
|
inline |
◆ passedOR()
| unsigned int FPGATrackSimTrack::passedOR |
( |
| ) |
const |
|
inline |
◆ setBankID()
| void FPGATrackSimTrack::setBankID |
( |
int | v | ) |
|
|
inline |
◆ setBarcode()
◆ setBarcodeFrac()
| void FPGATrackSimTrack::setBarcodeFrac |
( |
const float & | v | ) |
|
|
inline |
◆ setBinIdx()
| void FPGATrackSimTrack::setBinIdx |
( |
std::vector< unsigned > | x | ) |
|
|
inline |
◆ setChi2()
| void FPGATrackSimTrack::setChi2 |
( |
float | v | ) |
|
|
inline |
◆ setChi2Eta()
| void FPGATrackSimTrack::setChi2Eta |
( |
float | v | ) |
|
|
inline |
◆ setChi2Phi()
| void FPGATrackSimTrack::setChi2Phi |
( |
float | v | ) |
|
|
inline |
◆ setD0()
| void FPGATrackSimTrack::setD0 |
( |
float | v | ) |
|
|
inline |
◆ setDoDeltaGPhis()
| void FPGATrackSimTrack::setDoDeltaGPhis |
( |
bool | v | ) |
|
|
inline |
◆ setEta()
| void FPGATrackSimTrack::setEta |
( |
float | v | ) |
|
|
inline |
◆ setEventIndex()
| void FPGATrackSimTrack::setEventIndex |
( |
const signed long & | v | ) |
|
|
inline |
◆ setFirstSectorID()
| void FPGATrackSimTrack::setFirstSectorID |
( |
int | v | ) |
|
|
inline |
◆ setFPGATrackSimHit()
| void FPGATrackSimTrack::setFPGATrackSimHit |
( |
unsigned | i, |
|
|
const FPGATrackSimHit & | hit ) |
Definition at line 98 of file FPGATrackSimTrack.cxx.
99{
102 else
103 throw std::range_error("FPGATrackSimTrack::setFPGATrackSimHit() out of bounds");
104}
◆ setHitMap()
| void FPGATrackSimTrack::setHitMap |
( |
unsigned int | v | ) |
|
|
inline |
◆ setHoughX()
| void FPGATrackSimTrack::setHoughX |
( |
float | v | ) |
|
|
inline |
◆ setHoughXBin()
| void FPGATrackSimTrack::setHoughXBin |
( |
unsigned | v | ) |
|
|
inline |
◆ setHoughY()
| void FPGATrackSimTrack::setHoughY |
( |
float | v | ) |
|
|
inline |
◆ setHoughYBin()
| void FPGATrackSimTrack::setHoughYBin |
( |
unsigned | v | ) |
|
|
inline |
◆ setIdealRadii()
| void FPGATrackSimTrack::setIdealRadii |
( |
const std::vector< double > & | v | ) |
|
|
inline |
◆ 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.
◆ setNMissing()
| void FPGATrackSimTrack::setNMissing |
( |
int | v | ) |
|
|
inline |
◆ setOrigChi2()
| void FPGATrackSimTrack::setOrigChi2 |
( |
float | v | ) |
|
|
inline |
◆ setParameter()
| void FPGATrackSimTrack::setParameter |
( |
int | ipar, |
|
|
float | val ) |
Definition at line 155 of file FPGATrackSimTrack.cxx.
156{
157 switch (ipar) {
158 case 0:
160 break;
161 case 1:
163 break;
164 case 2:
166 break;
167 case 3:
169 break;
170 case 4:
172 break;
173 }
174}
◆ setPars()
◆ setPassedOR()
| void FPGATrackSimTrack::setPassedOR |
( |
unsigned int | code | ) |
|
◆ setPatternID()
| void FPGATrackSimTrack::setPatternID |
( |
int | v | ) |
|
|
inline |
◆ setPhi()
| void FPGATrackSimTrack::setPhi |
( |
float | v, |
|
|
bool | ForceRange = true ) |
Definition at line 115 of file FPGATrackSimTrack.cxx.
115 {
116 if (ForceRange) {
117
118 if (std::abs(
phi) > 100) {
121 }
122 }
123 else {
126 }
127 }
129}
Scalar phi() const
phi method
◆ setQOverPt()
| void FPGATrackSimTrack::setQOverPt |
( |
float | v | ) |
|
|
inline |
◆ setRegion()
| void FPGATrackSimTrack::setRegion |
( |
unsigned | v | ) |
|
|
inline |
◆ setSecondSectorID()
| void FPGATrackSimTrack::setSecondSectorID |
( |
int | v | ) |
|
|
inline |
◆ setSubRegion()
| void FPGATrackSimTrack::setSubRegion |
( |
unsigned | v | ) |
|
|
inline |
◆ setTrackCorrType()
◆ setTrackID()
| void FPGATrackSimTrack::setTrackID |
( |
int | v | ) |
|
|
inline |
◆ setTrackStage()
| void FPGATrackSimTrack::setTrackStage |
( |
TrackStage | v | ) |
|
|
inline |
◆ setTypeMask()
| void FPGATrackSimTrack::setTypeMask |
( |
unsigned int | v | ) |
|
|
inline |
◆ setUniqueID()
◆ setValidCand()
| void FPGATrackSimTrack::setValidCand |
( |
bool | v | ) |
|
|
inline |
◆ setZ0()
| void FPGATrackSimTrack::setZ0 |
( |
float | v | ) |
|
|
inline |
◆ operator<<
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();
190 streamsize oldprec =
out.precision();
192 out <<
" PHI=" << std::left << setw(10) <<
track.m_phi;
193 out.setf(ios_base::scientific);
195 out <<
" Q/PT=" << std::left << setw(10) <<
track.m_qoverpt;
196 out.unsetf(ios_base::scientific);
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
205 out.precision(oldprec);
206
208
209
211 for (
const auto& hit :
track.m_hits) {
212 out <<
"Hit " <<
iter <<
": " << hit <<
"\n";
214 }
215
217}
◆ m_bankID
| int FPGATrackSimTrack::m_bankID = -1 |
|
private |
◆ m_barcode
◆ m_barcode_frac
| float FPGATrackSimTrack::m_barcode_frac = 0.0F |
|
private |
◆ m_binIdx
| std::vector<unsigned> FPGATrackSimTrack::m_binIdx |
|
private |
◆ m_chi2
| float FPGATrackSimTrack::m_chi2 = 0.0F |
|
private |
◆ m_chi2_eta
| float FPGATrackSimTrack::m_chi2_eta = 0.0F |
|
private |
◆ m_chi2_phi
| float FPGATrackSimTrack::m_chi2_phi = 0.0F |
|
private |
◆ m_d0
| float FPGATrackSimTrack::m_d0 = 0.0F |
|
private |
◆ m_doDeltaGPhis
| bool FPGATrackSimTrack::m_doDeltaGPhis = false |
|
private |
◆ m_eta
| float FPGATrackSimTrack::m_eta = 0.0F |
|
private |
◆ m_eventindex
| signed long FPGATrackSimTrack::m_eventindex = -1 |
|
private |
◆ m_firstSectorID
| int FPGATrackSimTrack::m_firstSectorID = -1 |
|
private |
◆ m_hitmap
| unsigned int FPGATrackSimTrack::m_hitmap = 0 |
|
private |
◆ m_hits
◆ m_houghX
| float FPGATrackSimTrack::m_houghX = 0.0F |
|
private |
◆ m_houghY
| float FPGATrackSimTrack::m_houghY = 0.0F |
|
private |
◆ m_IdealGeoCorr
| int FPGATrackSimTrack::m_IdealGeoCorr = 0 |
|
private |
◆ m_idealRadii
| std::vector<double> FPGATrackSimTrack::m_idealRadii |
|
private |
◆ m_isValidCand
| bool FPGATrackSimTrack::m_isValidCand = true |
|
private |
◆ m_nmissing
| unsigned int FPGATrackSimTrack::m_nmissing = 0 |
|
private |
◆ m_ORcode
| unsigned int FPGATrackSimTrack::m_ORcode = 1 |
|
private |
◆ m_origchi2
| float FPGATrackSimTrack::m_origchi2 = 0.0F |
|
private |
◆ m_patternID
| int FPGATrackSimTrack::m_patternID = 0 |
|
private |
◆ m_phi
| float FPGATrackSimTrack::m_phi = 0.0F |
|
private |
◆ m_qoverpt
| float FPGATrackSimTrack::m_qoverpt = 0.0F |
|
private |
◆ m_region
| int FPGATrackSimTrack::m_region = 0 |
|
private |
◆ m_secondSectorID
| int FPGATrackSimTrack::m_secondSectorID = -1 |
|
private |
◆ m_subregion
| int FPGATrackSimTrack::m_subregion = 0 |
|
private |
◆ m_trackCorrType
◆ m_trackID
| int FPGATrackSimTrack::m_trackID = -1 |
|
private |
◆ m_trackStage
◆ m_typemask
| unsigned int FPGATrackSimTrack::m_typemask = 0 |
|
private |
◆ m_uniqueID
◆ m_xBin
| unsigned FPGATrackSimTrack::m_xBin = 0 |
|
private |
◆ m_yBin
| unsigned FPGATrackSimTrack::m_yBin = 0 |
|
private |
◆ m_z0
| float FPGATrackSimTrack::m_z0 = 0.0F |
|
private |
The documentation for this class was generated from the following files: