Skip to content

Commit

Permalink
python print migration L1Trigger/L1TMuonBarrel
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlange6 committed Jul 26, 2018
1 parent e30b382 commit 3b50080
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 3b50080

Please sign in to comment.