File indexing completed on 2024-04-06 12:21:37
0001 #include <vector>
0002 #include <iostream>
0003 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCTLookupTables.h"
0004 #include "CondFormats/L1TObjects/interface/L1RCTParameters.h"
0005 using std::cout;
0006 using std::endl;
0007 int main() {
0008
0009 std::vector<double> eGammaECalScaleFactors(32, 1.0);
0010 std::vector<double> eGammaHCalScaleFactors(32, 1.0);
0011 std::vector<double> jetMETECalScaleFactors(32, 1.0);
0012 std::vector<double> jetMETHCalScaleFactors(32, 1.0);
0013 std::vector<double> c,d,e,f,g,h;
0014 L1RCTParameters* rctParameters =
0015 new L1RCTParameters(1.0,
0016 1.0,
0017 3.0,
0018 40.0,
0019 0.5,
0020 1.0,
0021 50.0,
0022 1.0,
0023 2.0,
0024 3.0,
0025 3,
0026 3,
0027 3,
0028 false,
0029 false,
0030 false,
0031 false,
0032 eGammaECalScaleFactors,
0033 eGammaHCalScaleFactors,
0034 jetMETECalScaleFactors,
0035 jetMETHCalScaleFactors,
0036 c,
0037 d,
0038 e,
0039 f,
0040 g,
0041 h
0042 );
0043 L1RCTLookupTables* lut = new L1RCTLookupTables();
0044 lut->setRCTParameters(rctParameters);
0045 std::cout << lut->lookup(0,0,0,0,0,0) << " should equal 0" << std::endl;
0046 std::cout << lut->lookup(2,0,0,0,0,0) << " should equal 514" << std::endl;
0047 std::cout << lut->lookup(10,0,0,0,0,0) << " should equal 133642 " << std::endl;
0048 std::cout << lut->lookup(10,0,1,0,0,0) << " should equal 133770 " << std::endl;
0049 std::cout << lut->lookup(0,10,0,0,0,0) << " should equal 133770 " << std::endl;
0050 std::cout << lut->lookup(0,10,1,0,0,0) << " should equal 133770 " << std::endl;
0051 std::cout << lut->lookup(255,0,0,0,0,0) << " should equal 196479 " << std::endl;
0052 }
0053