Skip to content

Commit

Permalink
Merge pull request #24078 from davidlange6/printMig_180724T4_L1Trigge…
Browse files Browse the repository at this point in the history
…r_L1TMuonBarrel

Print function migration for L1Trigger_L1TMuonBarrel
  • Loading branch information
cmsbuild committed Jul 27, 2018
2 parents 8677465 + 3b50080 commit 8a993bc
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions L1Trigger/L1TMuonBarrel/test/kalmanTools/makeEtaLuts.py
@@ -1,3 +1,4 @@
from __future__ import print_function
etaLUT0=[8.946,7.508,6.279,6.399]
etaLUT1=[-0.159,-0.116,-0.088,-0.128]

Expand Down Expand Up @@ -25,11 +26,11 @@
p=int(round(etaLUT0[station-1]*p+etaLUT1[station-1]*p*p*p/abs(p)))
lut.append(str(p))
if wheel>0:
print 'etaLUT_plus_{wheel}_{station} = cms.vint32('.format(wheel=wheel,station=station)+','.join(lut)+')\n'
print('etaLUT_plus_{wheel}_{station} = cms.vint32('.format(wheel=wheel,station=station)+','.join(lut)+')\n')
if wheel<0:
print 'etaLUT_minus_{wheel}_{station} = cms.vint32('.format(wheel=abs(wheel),station=station)+','.join(lut)+')\n'
print('etaLUT_minus_{wheel}_{station} = cms.vint32('.format(wheel=abs(wheel),station=station)+','.join(lut)+')\n')
if wheel==0:
print 'etaLUT_0_{station} = cms.vint32('.format(station=station)+','.join(lut)+')\n'
print('etaLUT_0_{station} = cms.vint32('.format(station=station)+','.join(lut)+')\n')

#wite HLS LUT
HLSINFO={}
Expand Down Expand Up @@ -63,9 +64,9 @@
else:
etaTag='0'

print 'const ap_int<8> etaLUT0_'+etaTag+"_"+str(station)+'[128]={'+','.join(d1)+'};\n'
print 'const ap_int<8> etaLUT1_'+etaTag+"_"+str(station)+'[128]={'+','.join(d2)+'};\n'
print 'const ap_int<8> etaLUTQ_'+etaTag+"_"+str(station)+'[128]={'+','.join(d3)+'};\n'
print('const ap_int<8> etaLUT0_'+etaTag+"_"+str(station)+'[128]={'+','.join(d1)+'};\n')
print('const ap_int<8> etaLUT1_'+etaTag+"_"+str(station)+'[128]={'+','.join(d2)+'};\n')
print('const ap_int<8> etaLUTQ_'+etaTag+"_"+str(station)+'[128]={'+','.join(d3)+'};\n')



Expand All @@ -84,8 +85,8 @@


if wheel>0:
print 'etaCoarseLUT_plus_{wheel}= cms.vint32('.format(wheel=wheel)+','.join(lut)+')\n'
print('etaCoarseLUT_plus_{wheel}= cms.vint32('.format(wheel=wheel)+','.join(lut)+')\n')
if wheel<0:
print 'etaCoarseLUT_minus_{wheel} = cms.vint32('.format(wheel=abs(wheel))+','.join(lut)+')\n'
print('etaCoarseLUT_minus_{wheel} = cms.vint32('.format(wheel=abs(wheel))+','.join(lut)+')\n')
if wheel==0:
print 'etaCoarseLUT_0 = cms.vint32('+','.join(lut)+')\n'
print('etaCoarseLUT_0 = cms.vint32('+','.join(lut)+')\n')

0 comments on commit 8a993bc

Please sign in to comment.