21 meTableOld_(settings),
22 diskTableOld_(settings),
23 innerTable_(settings),
24 innerOverlapTable_(settings),
25 innerThirdTable_(settings) {
78 if (
output ==
"allinnerstubout") {
81 char memtype =
memory->getName().back();
86 if (
output.substr(0, 10) ==
"allstubout") {
92 if (
output.substr(0, 9) ==
"vmstubout") {
93 if (
memory->getName().substr(3, 2) ==
"TE") {
95 int i =
output.find_last_of(
'_');
105 char seedtype =
memory->getName().substr(11, 1)[0];
106 unsigned int pos = 12;
107 int vmbin =
memory->getName().substr(
pos, 1)[0] -
'0';
109 if (pos < memory->
getName().size()) {
110 if (
memory->getName().substr(
pos, 1)[0] !=
'n') {
111 vmbin = vmbin * 10 +
memory->getName().substr(
pos, 1)[0] -
'0';
115 unsigned int inner = 1;
116 if (seedtype <
'I') {
120 }
else if (seedtype <
'M') {
123 }
else if (seedtype <=
'Z') {
126 }
else if (seedtype < 'o' && seedtype >=
'a') {
129 }
else if (seedtype >
'o' && seedtype <=
'z') {
132 throw cms::Exception(
"LogicError") << __FILE__ <<
" " << __LINE__ <<
" Invalid seeding!";
141 if (seedindex == -1) {
143 vector<VMStubsTEMemory*> avectmp;
148 if (!isTripletSeed) {
155 }
else if (
memory->getName().substr(3, 2) ==
"ME") {
161 throw cms::Exception(
"LogicError") << __FILE__ <<
" " << __LINE__ <<
" memory: " <<
memory->getName()
162 <<
" => should never get here!";
168 throw cms::Exception(
"BadConfig") << __FILE__ <<
" " << __LINE__ <<
" Could not find output : " <<
output;
176 if (
input ==
"stubin") {
179 if (tmp1 !=
nullptr) {
184 throw cms::Exception(
"BadConfig") << __FILE__ <<
" " << __LINE__ <<
" Could not find input : " <<
input;
188 unsigned int allStubCounter = 0;
195 for (
unsigned int i = 0;
i < stubinput->nStubs();
i++) {
201 Stub* stub = stubinput->getStub(
i);
205 bool negdisk = (stub->
disk().
value() < 0);
219 allstub->addStub(stub);
228 unsigned int phicutmax = 4;
229 unsigned int phicutmin = 4;
238 char memtype = allstub.first;
239 if (memtype ==
'R' && iphipos < phicutmax)
241 if (memtype ==
'L' && iphipos >= phicutmin)
243 if (memtype ==
'A' && iphipos < 4)
245 if (memtype ==
'B' && iphipos >= 4)
247 if (memtype ==
'E' && iphipos >= 4)
249 if (memtype ==
'F' && iphipos < 4)
251 if (memtype ==
'C' && iphipos >= 4)
253 if (memtype ==
'D' && iphipos < 4)
268 if (memtype ==
'M' || memtype ==
'R' || memtype ==
'L') {
281 allstub.second->addStub(stub);
298 indexr = stub->
r().
value();
325 indexrOld = stub->
r().
value();
362 for (
unsigned int i = 0;
i < nmems;
i++) {
368 unsigned int iseed = ivmstubTEPHI.seednumber;
376 unsigned int inner = (!isTripletSeed ? 1 : ivmstubTEPHI.stubposition);
386 lutval = (!isTripletSeed ? melut : melutOld);
390 if (stub->
r().
value() < 10) {
391 lutval = 8 * (1 + (stub->
r().
value() >> 2));
407 if (iseed < Seed::L1D1 || iseed >
Seed::L2D1) {
419 lutval += (lutval2 << lutshift);
426 FPGAWord binlookup(lutval, lutwidth,
true, __LINE__, __FILE__);
428 if (binlookup.
value() < 0)
444 VMStubTE tmpstub(stub, finephi, stub->
bend(), binlookup, allStubIndex);
446 unsigned int nmem = ivmstubTEPHI.vmstubmem[!isTripletSeed ? 0 : ivmte].size();
449 for (
unsigned int l = 0;
l < nmem;
l++) {
452 << ivmstubTEPHI.vmstubmem[!isTripletSeed ? 0 : ivmte][
l]->getName()
453 <<
" bin=" <<
bin <<
" ivmte " << ivmte <<
" finephi " << finephi.
value()
458 ivmstubTEPHI.vmstubmem[0][
l]->addVMStub(tmpstub,
bin, ivmte);
461 ivmstubTEPHI.vmstubmem[ivmte][
l]->addVMStub(tmpstub);
463 ivmstubTEPHI.vmstubmem[ivmte][
l]->addVMStub(tmpstub,
bin, 0,
false);
unsigned int vmrlutrbits(unsigned int layerdisk) const
Log< level::Info, true > LogVerbatim
TrackletLUT innerOverlapTable_
constexpr double VMROUTERCUTZL1L3L5
unsigned int maxStep(std::string module) const
const FPGAWord & r() const
double lutwidthtab(unsigned int inner, unsigned int iSeed) const
unsigned int NLONGVMBITS() const
unsigned int nbits() const
constexpr double VMROUTERCUTZL1
const FPGAWord & z() const
constexpr unsigned int N_SEED
std::vector< InputLinkMemory * > stubinputs_
unsigned int nbendbitsmedisk() const
Settings const & settings_
int lookup(unsigned int index) const
std::vector< std::pair< char, AllInnerStubsMemory * > > allinnerstubs_
const FPGAWord & bend() const
std::vector< VMStubsMEMemory * > vmstubsMEPHI_
constexpr unsigned int N_DSS_MOD
constexpr double VMROUTERCUTZL2
TrackletLUT diskTableOld_
static std::string const input
unsigned int NLONGVMBINS() const
const FPGAWord & disk() const
FPGAWord iphivmFineBins(int VMbits, int finebits) const
void execute(unsigned int iSector)
unsigned int nbitsallstubs(unsigned int layerdisk) const
std::vector< VMStubsTEPHICM > vmstubsTEPHI_
void initVMRTable(unsigned int layerdisk, VMRTableType type, int region=-1, bool combined=true)
double rmindiskl3overlapvm() const
unsigned int overlapbits_
void setAllStubIndex(int nstub)
TrackletLUT innerThirdTable_
void addOutput(MemoryBase *memory, std::string output) override
unsigned int nbitsvmte(unsigned int inner, unsigned int iSeed) const
constexpr double VMROUTERCUTRD1D3
Abs< T >::type abs(const T &t)
double lutwidthtabextended(unsigned int inner, unsigned int iSeed) const
unsigned int nbitsvmme(unsigned int layerdisk) const
void initLayerDisk(unsigned int pos, int &layer, int &disk)
unsigned int nvmte(unsigned int inner, unsigned int iSeed) const
constexpr unsigned int NFINERZBITS
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
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)
void addInput(MemoryBase *memory, std::string input) override
std::vector< AllStubsMemory * > allstubs_
std::string const & getName() const
constexpr unsigned int N_PHIBITS
constexpr unsigned int N_BITSMEMADDRESS
unsigned int vmrlutzbits(unsigned int layerdisk) const