import FWCore.ParameterSet.Config as cms
calibration = cms.VPSet(
    cms.PSet(
        etaMax = cms.double(0.435),
        etaMin = cms.double(0),
        l1tCalibrationFactors = cms.vdouble(
            1.23979294877, 1.23979294877, 1.23979294877, 1.2055534748, 1.16221465185, 
            1.1287061285, 1.10174091558, 1.08560073006, 1.06054297933, 1.05390045065, 
            1.04755164016, 1.04056108809, 1.03288843815, 1.02558076448, 1.01840595314, 
            1.01028026223, 0.994979528345, 0.994359643857, 0.993589993902, 0.992484418292, 
            0.991580925563, 0.990450519445, 0.989274770481, 0.989062288938, 0.987526878875, 
            0.987143421961, 0.986960123031, 0.985118762072, 0.983812522399, 0.982603964756, 
            0.982487894417, 0.9776664197
        ),
        l1tPtBins = cms.vdouble(
            -float('inf'), 16.8880031307, 23.7353661004, 31.9930260358, 41.2104176206, 
            50.6051414267, 60.247220362, 69.8880955069, 79.7508114194, 89.9187170854, 
            99.552677671, 109.444721239, 120.318481705, 131.427409379, 142.167155912, 
            153.513517796, 170.885803296, 192.373045006, 219.860641852, 262.12573798, 
            307.407472656, 353.248854037, 405.226529713, 436.515403398, 475.910561056, 
            519.15927673, 531.933201461, 577.566348974, 648.509090909, 705.189285714, 
            735.044642857, 846.330357143, float('inf')
        )
    ), 
    cms.PSet(
        etaMax = cms.double(0.783),
        etaMin = cms.double(0.435),
        l1tCalibrationFactors = cms.vdouble(
            1.26088033666, 1.26088033666, 1.26088033666, 1.2249182059, 1.17603697403, 
            1.13860928847, 1.11140597558, 1.09630616073, 1.06349385292, 1.05842913938, 
            1.05398549405, 1.04895539789, 1.04466168817, 1.03903857045, 1.03439337381, 
            1.02704723184, 1.01728260528, 1.00806725137, 1.00707008321, 1.01235956493, 
            1.01667298057, 1.02381172068, 1.02613493771, 1.03240539224, 1.03261816221, 
            1.03819304914, 1.04119620768, 1.04378137592, 1.04875440814, 1.05051419343, 
            1.05716649068, 1.06763963981
        ),
        l1tPtBins = cms.vdouble(
            -float('inf'), 16.693599742, 23.4533780602, 31.574804867, 40.607871487, 
            50.0226273473, 59.5432535328, 68.9906256857, 78.7889753636, 89.2161833142, 
            99.0522298664, 108.852466017, 118.497599303, 128.756191525, 139.378383999, 
            151.782981506, 169.483440448, 189.1175302, 214.728316677, 255.782543996, 
            301.126430305, 355.202323162, 399.880704365, 440.459131006, 471.072245322, 
            498.400961538, 538.905603448, 565.293103448, 600.982142857, 632.773809524, 
            672.494791667, 753.359375, float('inf')
        )
    ), 
    cms.PSet(
        etaMax = cms.double(1.131),
        etaMin = cms.double(0.783),
        l1tCalibrationFactors = cms.vdouble(
            1.27397054477, 1.27397054477, 1.27397054477, 1.22056106783, 1.15938219586, 
            1.1160040995, 1.09031092233, 1.08156433802, 1.05625132693, 1.04972333604, 
            1.04407369194, 1.03742876202, 1.03092173843, 1.02452207329, 1.0174828527, 
            1.0081675749, 0.995620430116, 0.997797998703, 0.994732173644, 0.990755096265, 
            0.985892068632, 0.981548089599, 0.976271265679, 0.973826119963, 0.968463015729, 
            0.967588482776, 0.961575991775, 0.957590009436, 0.946036734844, 0.943173725323, 
            0.939992812643, 0.933960176944
        ),
        l1tPtBins = cms.vdouble(
            -float('inf'), 16.880217392, 23.9022653333, 32.2717617865, 41.5428951519, 
            51.1274314482, 60.6194200011, 70.1354681051, 79.7123453897, 89.5991512838, 
            99.1387572012, 108.769969768, 119.072828547, 129.183554009, 139.711187156, 
            152.522826668, 169.649214185, 190.606597094, 218.71218636, 257.712877156, 
            306.665735047, 357.65034307, 410.926384374, 453.687469423, 496.926339286, 
            531.46780303, 569.60530303, 624.972727273, 711.022727273, 790.854166667, 
            824.322916667, 875.34375, float('inf')
        )
    ), 
    cms.PSet(
        etaMax = cms.double(1.479),
        etaMin = cms.double(1.131),
        l1tCalibrationFactors = cms.vdouble(
            1.34802320734, 1.34802320734, 1.34802320734, 1.30212233785, 1.24209460275, 
            1.19015306181, 1.15264110831, 1.12372171912, 1.10729927389, 1.10106230836, 
            1.09548001551, 1.08898845858, 1.08276378762, 1.07376271165, 1.07053777522, 
            1.06006587987, 1.04671444238, 1.03585271305, 1.04610056164, 1.03768418, 
            1.03119548102, 1.02676678101, 1.01915019189, 1.01242076126, 1.00893312811, 
            1.00508141223, 1.00136013543, 0.995951447598, 0.984231225019, 0.980800927737, 
            0.973451186577, 0.926524468915
        ),
        l1tPtBins = cms.vdouble(
            -float('inf'), 16.9252841647, 23.7590878196, 31.7131252613, 40.1274040838, 
            49.1249022327, 58.1527487225, 67.4760337457, 77.3005352247, 86.9408929333, 
            95.9552442624, 105.163768208, 114.862223233, 126.474646588, 135.799222426, 
            146.245567688, 164.415226489, 182.882205173, 207.962905257, 252.719711752, 
            302.236065785, 338.504892994, 378.520698052, 426.179788961, 460.12202381, 
            484.504166667, 509.6625, 539.993269231, 596.897435897, 647.229166667, 
            683.041666667, 863.354166667, float('inf')
        )
    ), 
    cms.PSet(
        etaMax = cms.double(1.83),
        etaMin = cms.double(1.479),
        l1tCalibrationFactors = cms.vdouble(
            1.64615015562, 1.64615015562, 1.64615015562, 1.64615015562, 1.62354748453, 
            1.58955281827, 1.5596420256, 1.52857227236, 1.4981491184, 1.47483671945, 
            1.44848305769, 1.42279372844, 1.41374089612, 1.4008972173, 1.39160024497, 
            1.37606952993, 1.3577735774, 1.32702431242, 1.28941444869, 1.28016614572, 
            1.24765615972, 1.22053713127, 1.17427545004, 1.15813500374, 1.14591122897, 
            1.10386182373, 1.08986646446, 1.08400487869, 1.05705595373, 0.986136154545, 
            0.970000328559, 0.926367737882, 0.92097540828
        ),
        l1tPtBins = cms.vdouble(
            -float('inf'), 14.2534283688, 19.3658902191, 24.8886644469, 31.0322354574, 
            37.7896859331, 44.4976332373, 51.4162446385, 59.0148938612, 66.284690538, 
            73.8402824355, 82.7989717528, 90.9876146413, 99.3412409944, 107.78800796, 
            117.259892418, 130.164931944, 148.875922888, 174.955265646, 212.930051719, 
            261.237428866, 306.506597467, 362.21578114, 409.590242347, 431.123798077, 
            472.326923077, 514.875, 529.95, 554.859090909, 629.159090909, 
            695.25, 740.625, 777.84375, float('inf')
        )
    ), 
    cms.PSet(
        etaMax = cms.double(2.172),
        etaMin = cms.double(1.83),
        l1tCalibrationFactors = cms.vdouble(
            1.46868261989, 1.46868261989, 1.46868261989, 1.46868261989, 1.43911078656, 
            1.40910755658, 1.38320919564, 1.35606709317, 1.32433798702, 1.30822665905, 
            1.27541632146, 1.2610425712, 1.25048382907, 1.23727857048, 1.22557226003, 
            1.20350464618, 1.17346110455, 1.15438568707, 1.17264007703, 1.14234287567, 
            1.09578935279, 1.05521480704, 1.05300376705, 0.948841272141, 0.90157065563, 
            0.900460510028, 0.886102626899, 0.870622263217, 0.794268915654
        ),
        l1tPtBins = cms.vdouble(
            -float('inf'), 15.0001433736, 20.3973850042, 26.6770760436, 33.5779131491, 
            40.9929083245, 48.3312410359, 55.7380156093, 64.5733527179, 72.1987214889, 
            78.6859384392, 87.4179205144, 95.9828439006, 104.146361706, 112.70409741, 
            124.306269775, 142.207731347, 159.081299984, 186.111094647, 227.056412071, 
            278.975766649, 337.838362069, 366.74375, 438.608333333, 540.914583333, 
            573.6, 584.05, 604.208333333, 666.25, float('inf')
        )
    ), 
    cms.PSet(
        etaMax = cms.double(2.5),
        etaMin = cms.double(2.172),
        l1tCalibrationFactors = cms.vdouble(
            1.33772238866, 1.33772238866, 1.33772238866, 1.33473934195, 1.30242829723, 
            1.27631075498, 1.25143840782, 1.2365993847, 1.22283208594, 1.21383948973, 
            1.20270942905, 1.19242313522, 1.18157505638, 1.17163939573, 1.16212445691, 
            1.15064512868, 1.12111242416, 1.10180561512, 1.06494795446, 1.02791008468, 
            0.979565936906, 0.935460737671, 0.922476716325, 0.870214599247, 0.862692426562, 
            0.780257657402, 0.726159840141, 0.698509844652
        ),
        l1tPtBins = cms.vdouble(
            -float('inf'), 15.2987042682, 20.6666592562, 27.150657531, 34.834542074, 
            42.9223748303, 51.5696382427, 59.9311353298, 68.6376432274, 76.9323193226, 
            85.3108305134, 95.1635083363, 104.886459308, 114.448100114, 123.396424629, 
            133.054919468, 151.922665869, 174.391475487, 200.175498357, 244.035295655, 
            306.180445151, 373.469537815, 415.021825397, 462.511111111, 506.025, 
            571.5, 670.875, 730.375, float('inf')
        )
    ), 
    cms.PSet(
        etaMax = cms.double(3),
        etaMin = cms.double(2.5),
        l1tCalibrationFactors = cms.vdouble(
            0.674661962699, 0.674661962699, 0.727593234951, 0.822725694893, 0.927569668143, 
            0.97660505882, 0.987209098964, 1.03132324625, 1.02714227345, 1.02334276675, 
            1.01880895382, 1.01335319939, 1.01008031255, 1.00497131654, 1.00149634384, 
            0.991533222988, 0.9837688439, 1.00989570361, 1.00167820652, 0.985530405844, 
            0.971802700851, 0.943756240228, 0.937016745904
        ),
        l1tPtBins = cms.vdouble(
            -float('inf'), 26.0451028139, 30.9749499579, 36.7640499457, 45.5682186743, 
            55.4542083976, 65.3014519722, 75.6207108652, 85.4615770865, 94.6729848702, 
            104.29165568, 115.822037843, 125.897005668, 135.571730212, 145.479710821, 
            160.990528129, 181.45236014, 203.493072087, 229.468858801, 267.709270335, 
            314.597744361, 380.160714286, 434.755952381, float('inf')
        )
    ), 
    cms.PSet(
        etaMax = cms.double(5.191),
        etaMin = cms.double(3),
        l1tCalibrationFactors = cms.vdouble(
            1.0, 1.0, 1.0, 1.0, 1.0, 
            1.0, 1.0
        ),
        l1tPtBins = cms.vdouble(
            -float('inf'), 50.6609817658, 87.2333638822, 128.156144343, 165.535850739, 
            220.379807692, 214.8125, float('inf')
        )
    )
)

l1tPhase1JetCalibrator9 = cms.EDProducer('Phase1L1TJetCalibrator',
  inputCollectionTag = cms.InputTag("l1tPhase1JetProducer", "UncalibratedPhase1L1TJetFromPfCandidates", ""),
  absEtaBinning = cms.vdouble([p.etaMin.value() for p in calibration] + [calibration[-1].etaMax.value()]),
  calibration = calibration,
  outputCollectionName = cms.string("Phase1L1TJetFromPfCandidates")
)
