22 std::vector<float> coords;
23 if (ilayer >= m_hits.size())
24 throw std::range_error(
"FPGATrackSimTrack::getCoords() out of bounds");
28 coords.push_back(m_hits[ilayer].getEtaCoord());
29 coords.push_back(m_hits[ilayer].getPhiCoord());
42 double target_r = m_idealRadii[ilayer];
44 unsigned other_layer = (m_hits[ilayer].getSide() == 0) ? ilayer + 1 : ilayer - 1;
45 target_r = (target_r + m_idealRadii[other_layer]) / 2.;
48 double hough_x = getHoughX();
49 double hough_y = getHoughY();
52 std::vector<float> coords =
::computeIdealCoords(m_hits[ilayer], hough_x, hough_y, target_r, m_doDeltaGPhis, m_trackCorrType);
58 auto coords = getCoords(ilayer);
59 if (coords.size() > 0) {
63 throw std::range_error(
"FPGATrackSimTrack::getCoord(layer,coord) out of bounds");
68 auto coords = getCoords(ilayer);
77 unsigned target_coord = 1;
78 if (m_hits[ilayer].getHitType() ==
HitType::spacepoint && (m_hits[ilayer].getPhysLayer() % 2) == 1) {
82 if (coords.size() > target_coord) {
83 return coords.at(target_coord);
86 throw std::range_error(
"FPGATrackSimTrack::getCoord(layer,coord) out of bounds");
92 for (
const auto& hit : m_hits) {
93 nCoords += hit.getDim();
101 if (m_hits.size() >
i)
104 throw std::range_error(
"FPGATrackSimTrack::setFPGATrackSimHit() out of bounds");
110 if (m_hits.size() > 0) m_hits.clear();
119 if (std::abs(
phi) > 100) {
181 out <<
"TRACK: ID=" << std::left << setw(8) <<
track.m_trackID;
182 out <<
" SECTOR1=" << std::left << setw(8) <<
track.m_firstSectorID;
183 out <<
" BANK=" << std::left << setw(8) <<
track.m_bankID;
184 out <<
" BARCODE=" << std::left << setw(6) <<
track.m_barcode;
185 out <<
" BARCODE_F=" << std::left << setw(9) <<
track.m_barcode_frac;
186 out <<
" EVENT=" << std::left << setw(6) <<
track.m_eventindex;
187 out <<
" HITMAP=" << std::left << setw(8) <<
track.getHitMap();
188 out <<
" TYPE=" << std::left << setw(3) <<
track.m_typemask;
189 out <<
" NMISS=" << std::left << setw(3) <<
track.getNMissing();
191 streamsize oldprec =
out.precision();
193 out <<
" PHI=" << std::left << setw(10) <<
track.m_phi;
194 out.setf(ios_base::scientific);
196 out <<
" Q/PT=" << std::left << setw(10) <<
track.m_qoverpt;
197 out.unsetf(ios_base::scientific);
199 out <<
" d0=" << std::left << setw(10) <<
track.m_d0;
200 out <<
" ETA=" << std::left << setw(10) <<
track.m_eta;
201 out <<
" z0=" << std::left << setw(10) <<
track.m_z0;
202 out <<
" Chi2=" << std::left << setw(12) <<
track.m_chi2;
203 out <<
" OChi2=" << std::left << setw(12) <<
track.m_origchi2;
206 out.precision(oldprec);
212 for (
const auto& hit :
track.m_hits) {
213 out <<
"Hit " << iter <<
": " << hit <<
"\n";
223 vector<FPGATrackSimMultiTruth> mtv;
224 mtv.reserve(m_hits.size());
227 for (
const auto& thishit : m_hits)
229 if (thishit.isReal())
233 if (thishit.isPixel())
234 for (
auto&
x : this_mt)
236 mtv.push_back(this_mt);
245 const bool ok = mt.
best(tbarcode, tfrac);
248 setEventIndex(tbarcode.first);
249 setBarcode(tbarcode.second);
250 setBarcodeFrac(tfrac);