20 innerTable_(settings),
21 innerOverlapTable_(settings),
22 innerThirdTable_(settings) {
65 if (
output.substr(0, 10) ==
"allstubout") {
72 if (
output.substr(0, 12) ==
"vmstuboutPHI" ||
output.substr(0, 14) ==
"vmstuboutMEPHI" ||
73 output.substr(0, 15) ==
"vmstuboutTEIPHI" ||
output.substr(0, 15) ==
"vmstuboutTEOPHI") {
74 char seedtype =
memory->getName().substr(11, 1)[0];
75 unsigned int pos = 12;
76 int vmbin =
memory->getName().substr(
pos, 1)[0] -
'0';
79 if (
memory->getName().substr(
pos, 1)[0] !=
'n') {
80 vmbin = vmbin * 10 +
memory->getName().substr(
pos, 1)[0] -
'0';
86 unsigned int inner = 1;
87 if (
memory->getName().substr(3, 2) ==
"TE") {
104 }
else if (seedtype <
'M') {
109 }
else if (seedtype <=
'Z') {
116 }
else if (seedtype < 'o' && seedtype >=
'a') {
121 }
else if (seedtype >
'o' && seedtype <=
'z') {
128 throw cms::Exception(
"LogicError") << __FILE__ <<
" " << __LINE__ <<
" Invalid seeding!";
137 if (seedindex == -1) {
139 vector<VMStubsTEMemory*> avectmp;
146 }
else if (
memory->getName().substr(3, 2) ==
"ME") {
151 throw cms::Exception(
"LogicError") << __FILE__ <<
" " << __LINE__ <<
" should never get here!";
157 throw cms::Exception(
"BadConfig") << __FILE__ <<
" " << __LINE__ <<
" Could not find output : " <<
output;
165 if (
input ==
"stubin") {
168 if (tmp1 !=
nullptr) {
183 throw cms::Exception(
"BadConfig") << __FILE__ <<
" " << __LINE__ <<
" Could not find input : " <<
input;
187 unsigned int allStubCounter = 0;
191 for (
unsigned int i = 0;
i < stubinput->nStubs();
i++) {
196 Stub* stub = stubinput->getStub(
i);
199 bool negdisk = (stub->
disk().
value() < 0);
214 allstub->addStub(stub);
225 unsigned int ivmPlus = ivm;
229 unsigned int ivmMinus = ivm;
230 if (extrabits == 0 && ivm != 0)
242 indexr = stub->
r().
value();
259 int vmbin = melut >> 3;
262 int rzfine = melut & 7;
271 FPGAWord(rzfine, 3,
true, __LINE__, __FILE__),
279 <<
" ivmPlus" << ivmPlus <<
" bin=" << vmbin;
282 if (ivmMinus != ivmPlus) {
287 <<
" ivmMinus" << ivmMinus <<
" bin=" << vmbin;
294 unsigned int iseed = ivmstubTEPHI.seednumber;
295 unsigned int inner = ivmstubTEPHI.stubposition;
313 if (stub->
r().
value() < 10) {
314 lutval = 8 * (1 + (stub->
r().
value() >> 2));
327 if (iseed < Seed::L1D1 || iseed >
Seed::L2D1) {
338 lutval += (lutval2 << 10);
344 FPGAWord binlookup(lutval, lutwidth,
true, __LINE__, __FILE__);
346 if (binlookup.
value() < 0)
356 unsigned int tmp = binlookup.
value() & 7;
357 binlookup.
set(
tmp, 3,
true, __LINE__, __FILE__);
362 VMStubTE tmpstub(stub, finephi, stub->
bend(), binlookup, allStubIndex);
364 unsigned int nmem = ivmstubTEPHI.vmstubmem[ivmte].size();
368 for (
unsigned int l = 0;
l < nmem;
l++) {
371 << ivmstubTEPHI.vmstubmem[ivmte][
l]->getName() <<
" inner=" <<
inner 375 ivmstubTEPHI.vmstubmem[ivmte][
l]->addVMStub(tmpstub);
377 ivmstubTEPHI.vmstubmem[ivmte][
l]->addVMStub(tmpstub,
bin);
void addInput(MemoryBase *memory, std::string input) override
unsigned int vmrlutrbits(unsigned int layerdisk) const
Log< level::Info, true > LogVerbatim
TrackletLUT innerThirdTable_
std::vector< InputLinkMemory * > stubinputdisk2stmp_
unsigned int maxStep(std::string module) const
const FPGAWord & r() const
double lutwidthtab(unsigned int inner, unsigned int iSeed) const
const FPGAWord & z() const
unsigned int nbendbitsmedisk() const
std::vector< InputLinkMemory * > stubinputtmp_
Settings const & settings_
int lookup(unsigned int index) const
const FPGAWord & bend() const
static std::string const input
const FPGAWord & disk() const
FPGAWord iphivmFineBins(int VMbits, int finebits) const
unsigned int nbitsallstubs(unsigned int layerdisk) const
void addOutput(MemoryBase *memory, std::string output) override
double rmindiskl3overlapvm() const
void setAllStubIndex(int nstub)
unsigned int nbitsvmte(unsigned int inner, unsigned int iSeed) const
std::vector< InputLinkMemory * > stubinputs_
double lutwidthtabextended(unsigned int inner, unsigned int iSeed) const
uint16_t mem[nChs][nEvts]
std::string const & getName() const
unsigned int nbitsvmme(unsigned int layerdisk) const
unsigned int overlapbits_
std::vector< VMStubsMEMemory * > vmstubsMEPHI_
void initLayerDisk(unsigned int pos, int &layer, int &disk)
unsigned int nvmte(unsigned int inner, unsigned int iSeed) const
unsigned int nallstubs(unsigned int layerdisk) const
bool debugTracklet() const
void set(int value, int nbits, bool positive=true, int line=-1, const char *file=nullptr)
int nfinephi(unsigned int inner, unsigned int iSeed) const
TrackletLUT innerOverlapTable_
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
const FPGAWord & phicorr() const
unsigned int nvmme(unsigned int layerdisk) const
double nphireg(unsigned int inner, unsigned int iSeed) const
void setAllStubIndex(unsigned int index)
std::vector< AllStubsMemory * > allstubs_
std::vector< VMStubsTEPHI > vmstubsTEPHI_
std::string const & getName() const
void initVMRTable(unsigned int layerdisk, VMRTableType type, int region=-1)
constexpr unsigned int N_BITSMEMADDRESS
unsigned int vmrlutzbits(unsigned int layerdisk) const