-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DTC_merge2 branch updated to 1130 #74
Changes from 3 commits
67f080b
8e775d1
650ff58
b140ffe
04d9dfa
549ac30
e647457
b51b039
cf5498d
1bf7df1
936da8a
314eb77
0371772
c9c646a
da78939
5f76609
a181be9
946b120
4c6a774
6255829
c19d68d
52d12b8
023c439
00a8a23
f4109cc
bd26658
c7487ed
d4d39b7
44ea72e
6d8b6f8
3124072
a40f339
ed2269e
271ec43
be7420e
c90b216
b26fc19
576bda0
de0f887
2a823e0
64cd602
cc9e791
e164c32
0c972b5
35928d1
e8618ed
adcfecf
d51d818
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -256,12 +256,12 @@ void MatchProcessor::execute(unsigned int iSector, double phimin) { | |
|
||
FPGAWord fpgaphi = proj->proj(layerdisk_).fpgaphiproj(); | ||
|
||
if (print) cout << "PROJECTION "<<projMem->getName()<<": "<<proj->proj(layerdisk_).fpgaphiproj().value() | ||
<< " " << proj->proj(layerdisk_).fpgarzproj().value() | ||
<< " " << proj->proj(layerdisk_).fpgaphiprojder().value() | ||
<< " " << proj->proj(layerdisk_).fpgarzprojder().value() | ||
<< "TC index trackletIndex : "<<proj->TCIndex()<<" "<<proj->trackletIndex() | ||
<<endl; | ||
//if (print) cout << "PROJECTION "<<projMem->getName()<<": "<<proj->proj(layerdisk_).fpgaphiproj().value() | ||
// << " " << proj->proj(layerdisk_).fpgarzproj().value() | ||
// << " " << proj->proj(layerdisk_).fpgaphiprojder().value() | ||
// << " " << proj->proj(layerdisk_).fpgarzprojder().value() | ||
// << "TC index trackletIndex : "<<proj->TCIndex()<<" "<<proj->trackletIndex() | ||
// <<endl; | ||
|
||
unsigned int iphi = (fpgaphi.value() >> (fpgaphi.nbits() - nvmbits_)) & (nvmbins_ - 1); | ||
|
||
|
@@ -270,6 +270,8 @@ void MatchProcessor::execute(unsigned int iSector, double phimin) { | |
|
||
unsigned int extrabits = fpgaphi.bits(fpgaphi.nbits() - overlapbits, nextrabits); | ||
|
||
if (print) cout << "iphi extrabits: "<<iphi<<" "<<extrabits<<endl; | ||
|
||
unsigned int ivmPlus = iphi; | ||
|
||
int shift = 0; | ||
|
@@ -284,9 +286,11 @@ void MatchProcessor::execute(unsigned int iSector, double phimin) { | |
ivmMinus--; | ||
} | ||
|
||
|
||
int projrinv = -1; | ||
if (barrel_) { | ||
projrinv = (1 << (nrinv_ - 1)) + (proj->fpgarinv().value() >> (proj->fpgarinv().nbits() - nrinv_)); | ||
FPGAWord phider = proj->proj(layerdisk_).fpgaphiprojder(); | ||
projrinv = (1 << (nrinv_ - 1)) - 1 - (phider.value() >> (phider.nbits() - nrinv_)); | ||
} else { | ||
//The next lines looks up the predicted bend based on: | ||
// 1 - r projections | ||
|
@@ -314,6 +318,10 @@ void MatchProcessor::execute(unsigned int iSector, double phimin) { | |
unsigned int slot = proj->proj(layerdisk_).fpgarzbin1projvm().value(); | ||
bool second = proj->proj(layerdisk_).fpgarzbin2projvm().value(); | ||
|
||
if (print) cout << "istep="<<istep<<" TrkId stubindex : "<<128*proj->TCIndex()+proj->trackletIndex() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete or use message logger There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||
<<" ivmMinus ivmPlus shift "<<ivmMinus<<" "<<ivmPlus<<" "<<shift | ||
<<"second: "<<second<<" iphiproj="<<fpgaphi.value()<<endl; | ||
|
||
unsigned int projfinephi = (fpgaphi.value() >> (fpgaphi.nbits() - (nvmbits_ + 3))) & 7; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "magic numbers" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
int projfinerz = proj->proj(layerdisk_).fpgafinerzvm().value(); | ||
|
||
|
@@ -356,7 +364,7 @@ void MatchProcessor::execute(unsigned int iSector, double phimin) { | |
for (unsigned int iME = 0; iME < nMatchEngines_; iME++) { | ||
if (!matchengines_[iME].idle()) | ||
countme++; | ||
matchengines_[iME].step(); | ||
matchengines_[iME].step(print); | ||
//if match engine empty and we have queued projections add to match engine | ||
if ((!addedProjection) && matchengines_[iME].idle() && (!inputProjBuffer_.empty())) { | ||
ProjectionTemp tmpProj = inputProjBuffer_.read(); | ||
|
@@ -370,7 +378,7 @@ void MatchProcessor::execute(unsigned int iSector, double phimin) { | |
if (layerdisk_ >= 6) | ||
nbins = 16; | ||
|
||
if (print) cout << "istep = "<<istep<<" Initialize matchengine : "<<iME<<endl; | ||
//if (print) cout << "istep = "<<istep<<" Initialize matchengine : "<<iME<<endl; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete or use messagelogger There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed. |
||
matchengines_[iME].init(stubmem, | ||
nbins, | ||
tmpProj.slot(), | ||
|
@@ -420,7 +428,7 @@ void MatchProcessor::execute(unsigned int iSector, double phimin) { | |
} | ||
oldTracklet = tracklet; | ||
|
||
if (print) cout << "istep = "<<istep<<" Call matchCalculator on iME:"<<iMEbest<<endl; | ||
//if (print) cout << "istep = "<<istep<<" Call matchCalculator on iME:"<<iMEbest<<endl; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete or use messagelogger There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||
bool match = matchCalculator(tracklet, fpgastub, print, istep); | ||
|
||
if (settings_.debugTracklet() && match) { | ||
|
@@ -449,7 +457,7 @@ void MatchProcessor::execute(unsigned int iSector, double phimin) { | |
bool MatchProcessor::matchCalculator(Tracklet* tracklet, const Stub* fpgastub, bool print, unsigned int istep) { | ||
const L1TStub* stub = fpgastub->l1tstub(); | ||
|
||
if (print) cout << "matchCalculator tcid trackletindex stubindex : "<<tracklet->TCIndex()<<" "<<tracklet->trackletIndex()<<" "<<fpgastub->allStubIndex().value()<<endl; | ||
if (print) cout << "MatchCalculator istep="<<istep<<" TrkId stubindex : "<<128*tracklet->TCIndex()+tracklet->trackletIndex()<<" "<<fpgastub->allStubIndex().value()<<endl; | ||
|
||
if (layerdisk_ < N_LAYER) { | ||
const Projection& proj = tracklet->proj(layerdisk_); | ||
|
@@ -465,7 +473,7 @@ bool MatchProcessor::matchCalculator(Tracklet* tracklet, const Stub* fpgastub, b | |
int ideltaz = fpgastub->z().value() - iz; | ||
int ideltaphi = (fpgastub->phi().value() - iphi) << phishift_; | ||
|
||
if (print) cout << "ideltaphi : " << fpgastub->phi().value()<<" "<<iphi<<" "<<icorr<<endl; | ||
//if (print) cout << "ideltaphi : " << fpgastub->phi().value()<<" "<<iphi<<" "<<icorr<<endl; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete or use messagelogger There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed. |
||
|
||
//Floating point calculations | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,11 +143,11 @@ void VMRouterTable::init(unsigned int layerdisk, std::string const& name) { | |
if (layerdisk == 1 || layerdisk == 2 || layerdisk == 3 || layerdisk == 5) { | ||
std::string fnamesuffix = "L" + to_string(layerdisk + 1); | ||
writeVMTable(settings_.tablePath(), "VMTableOuter" + fnamesuffix + ".tab", vmrtable_); | ||
// write disk teouter tables (D1, D2, D4) | ||
if (layerdisk == 6 || layerdisk == 7 || layerdisk == 9) { | ||
std::string fnamesuffix = "D" + to_string(layerdisk - N_LAYER + 1); | ||
writeVMTable(settings_.tablePath(), "VMTableOuter" + fnamesuffix + ".tab", vmrtabletedisk_); | ||
} | ||
} | ||
// write disk teouter tables (D1, D2, D4) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indentation problems here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was more than indentation - a { was misplaced. Has been corrected. |
||
if (layerdisk == 6 || layerdisk == 7 || layerdisk == 9) { | ||
std::string fnamesuffix = "D" + to_string(layerdisk - N_LAYER + 1); | ||
writeVMTable(settings_.tablePath(), "VMTableOuter" + fnamesuffix + ".tab", vmrtabletedisk_); | ||
} | ||
} else { | ||
std::string fname = "VMRME_"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed