diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/TauNNIdHW.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/TauNNIdHW.h index cee3fa5f2c11c..cf8302dcbf74c 100644 --- a/L1Trigger/Phase2L1ParticleFlow/interface/taus/TauNNIdHW.h +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/TauNNIdHW.h @@ -1,32 +1,24 @@ #ifndef L1Trigger_Phase2L1ParticleFlow_TAUNNIDHW_H_ #define L1Trigger_Phase2L1ParticleFlow_TAUNNIDHW_H_ -#include "DataFormats/L1TParticleFlow/interface/layer1_emulator.h" - #include #include -#include "ap_int.h" -#include "ap_fixed.h" + #include "L1Trigger/Phase2L1ParticleFlow/interface/taus/tau_parameters.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/defines.h" +#include "DataFormats/L1TParticleFlow/interface/layer1_emulator.h" #include "DataFormats/L1TParticleFlow/interface/PFCandidate.h" -#include "L1Trigger/Phase2L1ParticleFlow/interface/common/nnet_layer.h" -#include "L1Trigger/Phase2L1ParticleFlow/interface/common/nnet_activation.h" - -//hls-fpga-machine-learning insert weights -#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w1.h" -#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b1.h" -#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w2.h" -#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b2.h" -#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w3.h" -#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b3.h" -#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w4.h" -#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b4.h" - typedef ap_ufixed<16, 14> pt_t; typedef ap_fixed<10, 4> etaphi_t; +// Tau NN returns two values +struct Tau_NN_Result { + result_t nn_pt_correction; + result_t nn_id; +}; + namespace L1TauEmu { // Data types and constants used in the FPGA and FPGA-optimized functions //etaphi_base maps physical eta phi units onto bits @@ -148,8 +140,8 @@ class TauNNIdHW { void initialize(const std::string &iName, int iNParticles); void SetNNVectorVar(); input_t *NNVectorVar() { return NNvectorVar_.data(); } - result_t EvaluateNN(); - result_t compute(const l1t::PFCandidate &iSeed, std::vector &iParts); + Tau_NN_Result EvaluateNN(); + Tau_NN_Result compute(const l1t::PFCandidate &iSeed, std::vector &iParts); //void print(); std::string fInput_; diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/defines.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/defines.h new file mode 100644 index 0000000000000..1f1a2f73dbb98 --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/defines.h @@ -0,0 +1,70 @@ +#ifndef DEFINES_H_ +#define DEFINES_H_ + +#include "ap_fixed.h" +#include "ap_int.h" + +#include +#include + +// hls-fpga-machine-learning insert numbers +#define N_INPUT_1_1 80 +#define N_LAYER_2 25 +#define N_LAYER_2 25 +#define N_LAYER_5 25 +#define N_LAYER_5 25 +#define N_LAYER_8 15 +#define N_LAYER_8 15 +#define N_LAYER_11 15 +#define N_LAYER_11 15 +#define N_LAYER_14 10 +#define N_LAYER_14 10 +#define N_LAYER_17 1 +#define N_LAYER_17 1 +#define N_LAYER_20 1 + +// hls-fpga-machine-learning insert layer-precision +typedef ap_fixed<16, 6> input_t; +typedef ap_fixed<24, 12> input2_t; +typedef ap_fixed<16, 6> model_default_t; +typedef ap_fixed<16, 6> layer2_t; +typedef ap_fixed<9, 3> weight2_t; +typedef ap_fixed<9, 3> bias2_t; +typedef ap_uint<1> layer2_index; +typedef ap_ufixed<9, 0, AP_RND_CONV, AP_SAT> layer4_t; +typedef ap_fixed<18, 8> relu_1_table_t; +typedef ap_fixed<16, 6> layer5_t; +typedef ap_fixed<9, 3> weight5_t; +typedef ap_fixed<9, 3> bias5_t; +typedef ap_uint<1> layer5_index; +typedef ap_ufixed<9, 0, AP_RND_CONV, AP_SAT> layer7_t; +typedef ap_fixed<18, 8> relu_2_table_t; +typedef ap_fixed<16, 6> layer8_t; +typedef ap_fixed<9, 3> weight8_t; +typedef ap_fixed<9, 3> bias8_t; +typedef ap_uint<1> layer8_index; +typedef ap_ufixed<9, 0, AP_RND_CONV, AP_SAT> layer10_t; +typedef ap_fixed<18, 8> relu_3_table_t; +typedef ap_fixed<16, 6> layer11_t; +typedef ap_fixed<9, 3> weight11_t; +typedef ap_fixed<9, 3> bias11_t; +typedef ap_uint<1> layer11_index; +typedef ap_ufixed<9, 0, AP_RND_CONV, AP_SAT> layer13_t; +typedef ap_fixed<18, 8> relu_4_table_t; +typedef ap_fixed<16, 6> layer14_t; +typedef ap_fixed<9, 3> weight14_t; +typedef ap_fixed<9, 3> bias14_t; +typedef ap_uint<1> layer14_index; +typedef ap_ufixed<9, 0, AP_RND_CONV, AP_SAT> layer16_t; +typedef ap_fixed<18, 8> relu_5_table_t; +typedef ap_fixed<16, 6> layer17_t; +typedef ap_fixed<16, 7> weight17_t; +typedef ap_fixed<16, 7> bias17_t; +typedef ap_uint<1> layer17_index; +typedef ap_fixed<16, 6> result_t; +typedef ap_fixed<18, 8> jetID_output_table_t; +typedef ap_fixed<16, 7> weight20_t; +typedef ap_fixed<16, 7> bias20_t; +typedef ap_uint<1> layer20_index; + +#endif \ No newline at end of file diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/nnet_utils/nnet_activation.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/nnet_utils/nnet_activation.h new file mode 100644 index 0000000000000..e5413aedf5fc5 --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/nnet_utils/nnet_activation.h @@ -0,0 +1,94 @@ +#ifndef NNET_ACTIVATION_H_ +#define NNET_ACTIVATION_H_ + +#include +#include "ap_fixed.h" +#include "nnet_common.h" + +namespace nnet { + + struct activ_config { + // IO size + static const unsigned n_in = 10; + + // Internal info + static const unsigned table_size = 1024; + + // Resource reuse info + static const unsigned io_type = io_parallel; + static const unsigned reuse_factor = 1; + + // Internal data type definitions + typedef ap_fixed<18, 8> table_t; + }; + + // ************************************************* + // LINEAR Activation -- See Issue 53 + // ************************************************* + template + void linear(data_T data[CONFIG_T::n_in], res_T res[CONFIG_T::n_in]) { + for (unsigned ii = 0; ii < CONFIG_T::n_in; ii++) { + res[ii] = data[ii]; + } + } + + // ************************************************* + // RELU Activation + // ************************************************* + template + void relu(data_T data[CONFIG_T::n_in], res_T res[CONFIG_T::n_in]) { + data_T datareg; + for (unsigned ii = 0; ii < CONFIG_T::n_in; ii++) { + datareg = data[ii]; + if (datareg > 0) + res[ii] = datareg; + else + res[ii] = 0; + } + } + + // ************************************************* + // Sigmoid Activation + // ************************************************* + template + inline out_T sigmoid_fcn_float(float input) { + return 1.0 / (1 + exp(-input)); + } + + template + void init_sigmoid_table(res_T table_out[N_TABLE]) { + // Default logistic sigmoid function: + // result = 1/(1+e^(-x)) + for (unsigned ii = 0; ii < N_TABLE; ii++) { + // First, convert from table index to X-value (signed 8-bit, range -8 to +8) + float in_val = 2 * 8.0 * (ii - float(N_TABLE) / 2.0) / float(N_TABLE); + // Next, compute lookup table function + res_T real_val = sigmoid_fcn_float(in_val); + //std::cout << "Lookup table In Value: " << in_val << " Result: " << real_val << std::endl; + table_out[ii] = (res_T)real_val; + } + } + + template + void sigmoid(data_T data[CONFIG_T::n_in], res_T res[CONFIG_T::n_in]) { + // Initialize the lookup table + res_T sigmoid_table[CONFIG_T::table_size]; + init_sigmoid_table(sigmoid_table); + + // Index into the lookup table based on data + int data_round; + unsigned index; + for (unsigned ii = 0; ii < CONFIG_T::n_in; ii++) { + data_round = data[ii] * CONFIG_T::table_size / 16; + index = data_round + 8 * CONFIG_T::table_size / 16; + /*if (index < 0) + index = 0;*/ + if (index > CONFIG_T::table_size - 1) + index = CONFIG_T::table_size - 1; + res[ii] = (res_T)sigmoid_table[index]; + } + } + +} // namespace nnet + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/nnet_utils/nnet_common.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/nnet_utils/nnet_common.h new file mode 100644 index 0000000000000..8441cca4412c2 --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/nnet_utils/nnet_common.h @@ -0,0 +1,52 @@ +#ifndef NNET_COMMON_H_ +#define NNET_COMMON_H_ + +#include "ap_fixed.h" + +// This is a substitute for "ceil(n/(float)d)". +#define DIV_ROUNDUP(n, d) ((n + d - 1) / d) +#define MIN(n, d) (n > d ? d : n) +#define MAX(n, d) (n > d ? n : d) + +#define STRINGIFY(x) #x +#define EXPAND_STRING(x) STRINGIFY(x) + +namespace nnet { + + // Common type definitions + enum io_type { io_parallel = 0, io_stream }; + enum strategy { latency, resource }; + + template + class Op_add { + public: + T operator()(T a, T b) { return a + b; } + }; + + template + class Op_and { + public: + T operator()(T a, T b) { return a && b; } + }; + + template + class Op_or { + public: + T operator()(T a, T b) { return a || b; } + }; + + template + class Op_max { + public: + T operator()(T a, T b) { return a >= b ? a : b; } + }; + + template + class Op_min { + public: + T operator()(T a, T b) { return a <= b ? a : b; } + }; + +} // namespace nnet + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/nnet_utils/nnet_dense.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/nnet_utils/nnet_dense.h new file mode 100644 index 0000000000000..22edbcbf501bd --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/nnet_utils/nnet_dense.h @@ -0,0 +1,72 @@ +#ifndef NNET_DENSE_H_ +#define NNET_DENSE_H_ + +#include "nnet_common.h" +#include "nnet_mult.h" +#include + +namespace nnet { + + struct dense_config { + // Internal data type definitions + typedef float bias_t; + typedef float weight_t; + typedef float accum_t; + + // Layer Sizes + static const unsigned n_in = 10; + static const unsigned n_out = 10; + + // Resource reuse info + int io_type = io_parallel; + int strategy = latency; + int reuse_factor = 1; + static const bool store_weights_in_bram = false; + int n_zeros = 0; + // partitioning arrays cyclically to go with roll factors? + // Product function to use + template + using product = nnet::product::mult; + }; + + template + void dense(data_T data[CONFIG_T::n_in], + res_T res[CONFIG_T::n_out], + typename CONFIG_T::weight_t weights[CONFIG_T::n_in * CONFIG_T::n_out], + typename CONFIG_T::bias_t biases[CONFIG_T::n_out]) { + data_T cache; + typename CONFIG_T::accum_t mult[CONFIG_T::n_in * CONFIG_T::n_out]; + typename CONFIG_T::accum_t acc[CONFIG_T::n_out]; + + // Do the matrix-multiply + for (unsigned ii = 0; ii < CONFIG_T::n_in; ii++) { + cache = data[ii]; + for (unsigned jj = 0; jj < CONFIG_T::n_out; jj++) { + unsigned index = ii * CONFIG_T::n_out + jj; + mult[index] = CONFIG_T::template product::product(cache, weights[index]); + } + } + + // Initialize accumulator with input biases + for (unsigned iacc = 0; iacc < CONFIG_T::n_out; iacc++) { + acc[iacc] = (typename CONFIG_T::accum_t)biases[iacc]; + } + + // Accumulate multiplication result + for (unsigned ii = 0; ii < CONFIG_T::n_in; ii++) { + for (unsigned jj = 0; jj < CONFIG_T::n_out; jj++) { + unsigned index = ii * CONFIG_T::n_out + jj; + acc[jj] += mult[index]; + } + } + + // Cast to "res_t" type + for (unsigned ires = 0; ires < CONFIG_T::n_out; ires++) { + // res[ires] = (res_T) (acc[ires]); + res[ires] = cast(acc[ires]); + } + } + +} // namespace nnet + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/nnet_utils/nnet_mult.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/nnet_utils/nnet_mult.h new file mode 100644 index 0000000000000..3e2ce5b84b080 --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/nnet_utils/nnet_mult.h @@ -0,0 +1,108 @@ +#ifndef NNET_MULT_H_ +#define NNET_MULT_H_ + +#include "nnet_common.h" +#include +#include + +namespace nnet { + + constexpr int ceillog2(int x) { return (x <= 2) ? 1 : 1 + ceillog2((x + 1) / 2); } + + namespace product { + + /* --- + * different methods to perform the product of input and weight, depending on the + * types of each. + * --- */ + + class Product {}; + + template + class both_binary : public Product { + public: + static x_T product(x_T a, w_T w) { return a == w; } + }; + + template + class weight_binary : public Product { + public: + static auto product(x_T a, w_T w) -> decltype(-a) { + if (w == 0) + return -a; + else + return a; + } + }; + + template + class data_binary : public Product { + public: + static auto product(x_T a, w_T w) -> decltype(-w) { + if (a == 0) + return -w; + else + return w; + } + }; + + template + class weight_ternary : public Product { + public: + static auto product(x_T a, w_T w) -> decltype(-a) { + if (w == 0) + return 0; + else if (w == -1) + return -a; + else + return a; // if(w == 1) + } + }; + + template + class mult : public Product { + public: + static auto product(x_T a, w_T w) -> decltype(a * w) { return a * w; } + }; + + template + class weight_exponential : public Product { + public: + using r_T = + ap_fixed<2 * (decltype(w_T::weight)::width + x_T::width), (decltype(w_T::weight)::width + x_T::width)>; + static r_T product(x_T a, w_T w) { + // Shift by the exponent. Negative weights shift right + r_T y = static_cast(a) << w.weight; + + // Negate or not depending on weight sign + return w.sign == 1 ? y : static_cast(-y); + } + }; + + } // namespace product + + template + inline typename std::enable_if>::value && + std::is_same>::value, + ap_int>::type + cast(typename CONFIG_T::accum_t x) { + return (ap_int)(x - CONFIG_T::n_in / 2) * 2; + } + + template + inline typename std::enable_if>::value && + !std::is_same>::value, + res_T>::type + cast(typename CONFIG_T::accum_t x) { + return (res_T)x; + } + + template + inline typename std::enable_if<(!std::is_same>::value), res_T>::type cast( + typename CONFIG_T::accum_t x) { + return (res_T)x; + } + +} // namespace nnet + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/tau_parameters.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/tau_parameters.h index c6344e19f7c52..e488ac1bf4902 100644 --- a/L1Trigger/Phase2L1ParticleFlow/interface/taus/tau_parameters.h +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/tau_parameters.h @@ -1,100 +1,218 @@ #ifndef PARAMETERS_H_ #define PARAMETERS_H_ -#include -#include "ap_int.h" #include "ap_fixed.h" -#include "L1Trigger/Phase2L1ParticleFlow/interface/common/nnet_layer.h" -#include "L1Trigger/Phase2L1ParticleFlow/interface/common/nnet_activation.h" -#include "L1Trigger/Phase2L1ParticleFlow/interface/common/nnet_common.h" - -//hls-fpga-machine-learning insert numbers -#define N_INPUTS 80 -#define N_LAYER_1 25 -#define N_LAYER_2 10 -#define N_LAYER_3 10 -#define N_OUTPUTS 1 - -//hls-fpga-machine-learning insert layer-precision - -typedef ap_fixed<24, 12> input2_t; -typedef ap_fixed<16, 8> input_t; -typedef ap_fixed<16, 8> layer1_t; -typedef ap_fixed<16, 8> layer2_t; -typedef ap_fixed<16, 8> layer3_t; -typedef ap_fixed<16, 8> result_t; -typedef ap_fixed<16, 8> accum_default_t; -typedef ap_fixed<16, 8> weight_default_t; -typedef ap_fixed<16, 8> bias_default_t; - -//hls-fpga-machine-learning insert layer-config -struct config1 : nnet::layer_config { - static const unsigned n_in = N_INPUTS; - static const unsigned n_out = N_LAYER_1; +#include "ap_int.h" + +#include + +// Tau NN components +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/nnet_utils/nnet_activation.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/nnet_utils/nnet_dense.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/defines.h" + +// Load the NN weights +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w2.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b2.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w5.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b5.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w8.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b8.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w11.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b11.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w14.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b14.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w17.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b17.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w20.h" +#include "L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b20.h" + +// hls-fpga-machine-learning insert layer-config +// Dense_1 +struct config2 : nnet::dense_config { + static const unsigned n_in = 80; + static const unsigned n_out = 25; + static const unsigned io_type = nnet::io_parallel; + static const unsigned strategy = nnet::latency; + static const unsigned reuse_factor = 1; + static const unsigned n_zeros = 1205; + static const unsigned n_nonzeros = 795; + static const unsigned multiplier_limit = DIV_ROUNDUP(n_in * n_out, reuse_factor) - n_zeros / reuse_factor; + static const bool store_weights_in_bram = false; + typedef model_default_t accum_t; + typedef bias2_t bias_t; + typedef weight2_t weight_t; + typedef layer2_index index_t; + template + using product = nnet::product::mult; +}; + +// relu_1 +struct relu_config4 : nnet::activ_config { + static const unsigned n_in = 25; + static const unsigned table_size = 1024; + static const unsigned io_type = nnet::io_parallel; + static const unsigned reuse_factor = 1; + typedef relu_1_table_t table_t; +}; + +// Dense_2 +struct config5 : nnet::dense_config { + static const unsigned n_in = 25; + static const unsigned n_out = 25; + static const unsigned io_type = nnet::io_parallel; + static const unsigned strategy = nnet::latency; + static const unsigned reuse_factor = 1; + static const unsigned n_zeros = 375; + static const unsigned n_nonzeros = 250; + static const unsigned multiplier_limit = DIV_ROUNDUP(n_in * n_out, reuse_factor) - n_zeros / reuse_factor; + static const bool store_weights_in_bram = false; + typedef model_default_t accum_t; + typedef bias5_t bias_t; + typedef weight5_t weight_t; + typedef layer5_index index_t; + template + using product = nnet::product::mult; +}; + +// relu_2 +struct relu_config7 : nnet::activ_config { + static const unsigned n_in = 25; + static const unsigned table_size = 1024; + static const unsigned io_type = nnet::io_parallel; + static const unsigned reuse_factor = 1; + typedef relu_2_table_t table_t; +}; + +// Dense_3 +struct config8 : nnet::dense_config { + static const unsigned n_in = 25; + static const unsigned n_out = 15; static const unsigned io_type = nnet::io_parallel; + static const unsigned strategy = nnet::latency; static const unsigned reuse_factor = 1; - //static const unsigned reuse_factor = 6; - static const unsigned n_zeros = 0; + static const unsigned n_zeros = 225; + static const unsigned n_nonzeros = 150; + static const unsigned multiplier_limit = DIV_ROUNDUP(n_in * n_out, reuse_factor) - n_zeros / reuse_factor; static const bool store_weights_in_bram = false; - typedef accum_default_t accum_t; - typedef bias_default_t bias_t; - typedef weight_default_t weight_t; + typedef model_default_t accum_t; + typedef bias8_t bias_t; + typedef weight8_t weight_t; + typedef layer8_index index_t; + template + using product = nnet::product::mult; }; -struct relu_config1 : nnet::activ_config { - static const unsigned n_in = N_LAYER_1; + +// relu_3 +struct relu_config10 : nnet::activ_config { + static const unsigned n_in = 15; static const unsigned table_size = 1024; static const unsigned io_type = nnet::io_parallel; + static const unsigned reuse_factor = 1; + typedef relu_3_table_t table_t; }; -struct config2 : nnet::layer_config { - static const unsigned n_in = N_LAYER_1; - static const unsigned n_out = N_LAYER_2; + +// Dense_4 +struct config11 : nnet::dense_config { + static const unsigned n_in = 15; + static const unsigned n_out = 15; static const unsigned io_type = nnet::io_parallel; + static const unsigned strategy = nnet::latency; static const unsigned reuse_factor = 1; - //static const unsigned reuse_factor = 6; - static const unsigned n_zeros = 0; + static const unsigned n_zeros = 135; + static const unsigned n_nonzeros = 90; + static const unsigned multiplier_limit = DIV_ROUNDUP(n_in * n_out, reuse_factor) - n_zeros / reuse_factor; static const bool store_weights_in_bram = false; - typedef accum_default_t accum_t; - typedef bias_default_t bias_t; - typedef weight_default_t weight_t; + typedef model_default_t accum_t; + typedef bias11_t bias_t; + typedef weight11_t weight_t; + typedef layer11_index index_t; + template + using product = nnet::product::mult; }; -struct relu_config2 : nnet::activ_config { - static const unsigned n_in = N_LAYER_2; + +// relu_4 +struct relu_config13 : nnet::activ_config { + static const unsigned n_in = 15; static const unsigned table_size = 1024; static const unsigned io_type = nnet::io_parallel; + static const unsigned reuse_factor = 1; + typedef relu_4_table_t table_t; }; -struct config3 : nnet::layer_config { - static const unsigned n_in = N_LAYER_2; - static const unsigned n_out = N_LAYER_3; + +// Dense_5 +struct config14 : nnet::dense_config { + static const unsigned n_in = 15; + static const unsigned n_out = 10; static const unsigned io_type = nnet::io_parallel; + static const unsigned strategy = nnet::latency; static const unsigned reuse_factor = 1; - //static const unsigned reuse_factor = 6; - static const unsigned n_zeros = 0; + static const unsigned n_zeros = 90; + static const unsigned n_nonzeros = 60; + static const unsigned multiplier_limit = DIV_ROUNDUP(n_in * n_out, reuse_factor) - n_zeros / reuse_factor; static const bool store_weights_in_bram = false; - typedef accum_default_t accum_t; - typedef bias_default_t bias_t; - typedef weight_default_t weight_t; + typedef model_default_t accum_t; + typedef bias14_t bias_t; + typedef weight14_t weight_t; + typedef layer14_index index_t; + template + using product = nnet::product::mult; }; -struct relu_config3 : nnet::activ_config { - static const unsigned n_in = N_LAYER_3; + +// relu_5 +struct relu_config16 : nnet::activ_config { + static const unsigned n_in = 10; static const unsigned table_size = 1024; static const unsigned io_type = nnet::io_parallel; + static const unsigned reuse_factor = 1; + typedef relu_5_table_t table_t; }; -struct config4 : nnet::layer_config { - static const unsigned n_in = N_LAYER_3; - static const unsigned n_out = N_OUTPUTS; + +// Dense_6 +struct config17 : nnet::dense_config { + static const unsigned n_in = 10; + static const unsigned n_out = 1; static const unsigned io_type = nnet::io_parallel; + static const unsigned strategy = nnet::latency; static const unsigned reuse_factor = 1; - //static const unsigned reuse_factor = 6; - static const unsigned n_zeros = 0; + static const unsigned n_zeros = 6; + static const unsigned n_nonzeros = 4; + static const unsigned multiplier_limit = DIV_ROUNDUP(n_in * n_out, reuse_factor) - n_zeros / reuse_factor; static const bool store_weights_in_bram = false; - typedef accum_default_t accum_t; - typedef bias_default_t bias_t; - typedef weight_default_t weight_t; + typedef model_default_t accum_t; + typedef bias17_t bias_t; + typedef weight17_t weight_t; + typedef layer17_index index_t; + template + using product = nnet::product::mult; }; -struct sigmoid_config4 : nnet::activ_config { - static const unsigned n_in = N_OUTPUTS; + +// jetID_output +struct sigmoid_config19 : nnet::activ_config { + static const unsigned n_in = 1; static const unsigned table_size = 1024; static const unsigned io_type = nnet::io_parallel; + static const unsigned reuse_factor = 1; + typedef jetID_output_table_t table_t; +}; + +// pT_output +struct config20 : nnet::dense_config { + static const unsigned n_in = 10; + static const unsigned n_out = 1; + static const unsigned io_type = nnet::io_parallel; + static const unsigned strategy = nnet::latency; + static const unsigned reuse_factor = 1; + static const unsigned n_zeros = 6; + static const unsigned n_nonzeros = 4; + static const unsigned multiplier_limit = DIV_ROUNDUP(n_in * n_out, reuse_factor) - n_zeros / reuse_factor; + static const bool store_weights_in_bram = false; + typedef model_default_t accum_t; + typedef bias20_t bias_t; + typedef weight20_t weight_t; + typedef layer20_index index_t; + template + using product = nnet::product::mult; }; -#endif +#endif \ No newline at end of file diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b1.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b1.h deleted file mode 100644 index cc14299dc03eb..0000000000000 --- a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b1.h +++ /dev/null @@ -1,14 +0,0 @@ -//Numpy array shape [25] -//Min -0.734825849533 -//Max 1.288661003113 -//Number of zeros 0 - -#ifndef B1_H_ -#define B1_H_ - -weight_default_t b1[25] = {-0.12057505, -0.05409636, 0.27422485, 0.49775919, -0.73482585, 0.44995615, 0.52624124, - -0.71328187, -0.43596983, 0.10772870, -0.68372047, 0.22197038, -0.53673136, -0.00771000, - 0.06140821, 1.28866100, -0.12453079, 0.16897179, 0.18858922, -0.17255782, -0.24242370, - -0.21922758, 0.40799412, 0.46138164, 0.85911417}; - -#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b11.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b11.h new file mode 100644 index 0000000000000..289d5b76f7f7f --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b11.h @@ -0,0 +1,25 @@ +//Numpy array shape [15] +//Min -0.062500000000 +//Max 0.250000000000 +//Number of zeros 3 + +#ifndef B11_H_ +#define B11_H_ + +bias11_t b11[15] = {0.031250, + 0.000000, + 0.000000, + 0.078125, + 0.234375, + -0.062500, + 0.093750, + 0.000000, + 0.062500, + 0.109375, + -0.062500, + -0.015625, + 0.250000, + 0.109375, + -0.046875}; + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b14.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b14.h new file mode 100644 index 0000000000000..9de3170588cec --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b14.h @@ -0,0 +1,12 @@ +//Numpy array shape [10] +//Min -0.031250000000 +//Max 0.250000000000 +//Number of zeros 0 + +#ifndef B14_H_ +#define B14_H_ + +bias14_t b14[10] = { + 0.031250, 0.015625, 0.046875, -0.015625, -0.031250, 0.046875, 0.203125, 0.015625, 0.250000, -0.015625}; + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b17.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b17.h new file mode 100644 index 0000000000000..540e383f1cdf0 --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b17.h @@ -0,0 +1,11 @@ +//Numpy array shape [1] +//Min -0.714843750000 +//Max -0.714843750000 +//Number of zeros 0 + +#ifndef B17_H_ +#define B17_H_ + +bias17_t b17[1] = {-0.714844}; + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b2.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b2.h index 8a0d269df26f1..b9cf57fb0c52d 100644 --- a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b2.h +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b2.h @@ -1,20 +1,13 @@ -//Numpy array shape [10] -//Min -0.380347400904 -//Max 0.551839828491 +//Numpy array shape [25] +//Min -0.640625000000 +//Max 1.328125000000 //Number of zeros 0 #ifndef B2_H_ #define B2_H_ -weight_default_t b2[10] = {0.55183983, - 0.36323273, - -0.13108490, - -0.38034740, - 0.08559006, - 0.01700789, - 0.13562575, - -0.32752651, - 0.48282012, - -0.15096320}; +bias2_t b2[25] = {-0.312500, -0.281250, 0.687500, -0.250000, -0.640625, 0.656250, 0.500000, 0.265625, 0.171875, + -0.046875, -0.093750, 0.156250, -0.156250, -0.093750, -0.171875, 0.234375, 0.046875, 0.125000, + -0.140625, 0.187500, 0.937500, -0.046875, -0.250000, -0.250000, 1.328125}; #endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b20.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b20.h new file mode 100644 index 0000000000000..8887c33e169f4 --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b20.h @@ -0,0 +1,11 @@ +//Numpy array shape [1] +//Min 0.238281250000 +//Max 0.238281250000 +//Number of zeros 0 + +#ifndef B20_H_ +#define B20_H_ + +bias20_t b20[1] = {0.238281}; + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b3.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b3.h deleted file mode 100644 index 740a1482c32e2..0000000000000 --- a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b3.h +++ /dev/null @@ -1,20 +0,0 @@ -//Numpy array shape [10] -//Min -0.936354994774 -//Max 0.407682240009 -//Number of zeros 0 - -#ifndef B3_H_ -#define B3_H_ - -weight_default_t b3[10] = {-0.58549309, - -0.06117089, - -0.24173595, - 0.17925857, - -0.93635499, - 0.18813914, - 0.13134949, - 0.04132507, - 0.40768224, - 0.29987794}; - -#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b4.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b4.h deleted file mode 100644 index 07d968b7f0a5a..0000000000000 --- a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b4.h +++ /dev/null @@ -1,11 +0,0 @@ -//Numpy array shape [1] -//Min 0.023343238980 -//Max 0.023343238980 -//Number of zeros 0 - -#ifndef B4_H_ -#define B4_H_ - -weight_default_t b4[1] = {0.02334324}; - -#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b5.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b5.h new file mode 100644 index 0000000000000..82ab448e8b98e --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b5.h @@ -0,0 +1,13 @@ +//Numpy array shape [25] +//Min -0.125000000000 +//Max 0.265625000000 +//Number of zeros 1 + +#ifndef B5_H_ +#define B5_H_ + +bias5_t b5[25] = {-0.015625, 0.046875, -0.109375, 0.078125, 0.171875, 0.156250, 0.062500, 0.171875, 0.109375, + 0.265625, 0.234375, 0.125000, -0.046875, -0.062500, 0.015625, -0.062500, 0.156250, 0.093750, + 0.078125, -0.109375, 0.109375, 0.093750, 0.000000, -0.125000, 0.140625}; + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b8.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b8.h new file mode 100644 index 0000000000000..2cfe199fc7265 --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/b8.h @@ -0,0 +1,25 @@ +//Numpy array shape [15] +//Min -0.109375000000 +//Max 0.265625000000 +//Number of zeros 0 + +#ifndef B8_H_ +#define B8_H_ + +bias8_t b8[15] = {0.093750, + 0.046875, + -0.015625, + 0.265625, + 0.046875, + -0.078125, + 0.031250, + -0.062500, + -0.015625, + 0.015625, + 0.062500, + 0.062500, + -0.109375, + -0.046875, + 0.140625}; + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w1.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w1.h deleted file mode 100644 index 34e95d5f9469b..0000000000000 --- a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w1.h +++ /dev/null @@ -1,234 +0,0 @@ -//Numpy array shape [80, 25] -//Min -2.676796197891 -//Max 3.172224998474 -//Number of zeros 0 - -#ifndef W1_H_ -#define W1_H_ - -weight_default_t w1[2000] = { - -0.24994563, -0.01592130, 0.02984710, -0.03246316, -0.19607241, -0.02163565, -0.00572438, 0.01376110, 0.06863546, - -0.21986796, -0.05606571, 0.06991967, 0.07118288, -0.00832175, -0.03974251, -0.12646708, 0.01565769, 0.02143256, - 0.04822187, -0.01806841, -0.00104700, 0.08732048, -0.19190465, -0.00814264, -0.15155232, 1.28681350, 0.13748017, - 0.39079481, -0.31852159, -0.28351930, 0.04033466, -0.42634365, -0.13127394, -0.20465094, -0.26889697, 0.70893532, - 0.43394735, 0.70848930, 0.04386011, 0.51139277, 0.40600044, -0.50317824, -0.25791675, 0.66503000, -0.40065920, - 0.65473962, -0.00253041, -0.33962274, -0.08765265, -0.11767972, 0.06714126, -0.60412002, -0.38466910, 0.15584932, - -0.06518575, -0.71045715, 0.46661234, 0.24567224, 0.29929164, 0.07424527, 0.00885416, 0.34313247, -0.40707770, - 0.49099818, -0.74588889, -0.10123775, 0.53515995, -0.42928374, -0.12010060, 0.12295905, -0.69315630, 0.38088876, - 0.01870272, 0.10997168, 0.26679659, 0.93503916, 1.01998508, -0.10151886, 0.15381983, 0.08079384, 0.12287367, - -0.29244336, 0.00544387, -0.31489906, -0.21896380, -0.07303306, 0.38462871, -0.88183403, 0.03077884, 0.05728795, - 1.33863544, 0.30312559, 0.28246397, -0.04266880, -0.50959545, 0.60257953, 0.41271350, 0.17042276, 0.60114610, - 0.22945273, 0.73635733, 0.20843484, 0.33445162, -1.11147344, -0.30075341, 0.51580977, -0.18865807, -0.91119158, - -0.39129823, 0.03684294, -0.68891215, -0.59370238, 0.65122741, -0.17603758, 0.66590655, 1.25159955, -0.37625167, - 0.32980818, 0.77502394, -1.58798909, 0.22748075, -0.95392829, -0.37276012, -0.61004913, 0.92332447, -0.09721770, - -0.72238702, -0.34178290, 1.19741392, -0.44719616, -0.75276721, 0.17758735, 0.02224001, -0.08087371, 0.25889483, - 0.03444218, 0.33437315, -0.78717542, 0.07385066, -1.37520838, -0.00982160, 0.42453086, 0.38150313, 0.19821575, - 0.93540424, -1.05033779, 0.57981151, 0.33810690, 0.24172245, -0.02910789, -2.12628174, -0.63280356, 0.29773250, - 3.17222500, -0.49264374, 0.29331800, 1.39211619, -0.76175922, -0.45130953, 0.42933312, -1.54781485, 0.02419901, - -2.16194177, -0.48207095, -0.31510717, -2.11770678, 0.76639241, 1.87467754, -0.52695322, 1.70596778, -2.33492446, - 0.41794685, 1.27378273, -0.10234303, -0.49648684, 1.86050689, -0.50189257, -0.16991651, -0.46694538, -0.00889901, - 0.58299482, 0.08892005, -0.20688151, 0.31415370, -0.20101114, -0.33977607, 0.07279664, 0.60349727, -0.34133548, - -0.48008150, 1.27710438, -0.29224181, -0.02558731, 0.86315304, 0.27016857, 0.12425910, -0.73576742, -0.41963914, - 0.04202708, 0.95604628, 0.15431352, 0.01539763, -0.01423682, 0.10296305, -0.08639759, 0.11045294, -0.03732327, - 0.13618803, 0.10233897, 0.21258777, 0.09800927, -0.05657235, -0.05041919, -0.16974531, 0.12601873, -0.14161462, - 0.12978475, -0.18991150, 0.07589593, 0.06911660, 0.10042754, -0.24628711, -0.28696042, -0.25114185, 0.07191065, - 0.36939719, 0.20196825, 0.19622889, 0.01961792, -0.52867746, 0.02060650, 0.32239082, 0.21925712, -0.29252347, - -0.07450268, 0.07430969, 0.19808058, -0.08999527, -0.41864324, 0.12763937, 0.10551479, 0.13380286, 0.26029557, - -0.09461474, 0.01125190, -0.01001714, 0.38791370, -0.59581864, -0.31798267, 0.13044289, -0.29599217, 0.06823352, - -0.13354187, -0.04749685, 0.44879583, -0.51446730, 0.37497100, -0.19995253, 0.11865021, -0.35735917, 0.28974858, - 0.12435340, 0.00421873, 0.08717419, -0.20247488, -0.05830143, -0.04514945, 0.03859331, -0.02609805, -0.22617900, - 0.09613950, -0.33556163, 0.23096344, 0.06258421, -0.05920995, -0.81900448, -0.61287695, 0.12958381, 0.79978222, - -0.32717428, 0.23371933, -0.11298512, 0.06942000, 0.52603680, 0.06176474, -1.15612555, 0.38241693, 0.13082752, - -0.69803941, -0.44519529, 0.24077913, -0.18162382, -0.41263813, 0.00626828, -0.56472856, -0.09948663, -0.18302669, - 0.95950598, -0.30670726, 0.02000829, 1.03344405, 0.48644996, 0.34142539, -0.14057057, -0.08406556, 0.58438534, - -0.22699004, -1.44362915, -0.95808500, 0.35579941, 0.29348719, -0.11956982, 0.27683857, 0.57247722, 1.37406516, - 0.18090977, -0.48121765, 0.06628983, -0.17082840, -0.86288124, -0.12994859, -0.10934682, -0.44934374, 0.64140421, - 0.43463030, -0.40653625, -0.92759031, -0.26878390, 0.47970986, -0.45654160, -0.31465080, 0.94702774, -0.16918387, - -0.42442611, 0.00438548, 0.00923580, 0.90002447, -0.55483723, -0.11998936, -0.24002072, 0.48533896, 0.11834613, - -0.07799944, -0.42383757, -0.16936988, -0.90337831, 0.50523067, 0.72644299, 0.32532176, 0.05432085, 0.68847007, - -0.60442829, 0.80158204, 0.99259549, -0.30103669, 0.05667507, 0.36611405, -0.94233608, 0.23696357, -0.61583829, - 0.52145499, 0.14344153, 0.00328588, 0.36766458, -0.71754855, 0.42685041, -0.52480674, -0.41898140, 0.29636848, - -0.70113719, -0.20197862, -0.37344661, -0.17589939, -0.54375410, -0.72718179, -1.11110735, 0.32055253, -0.25643155, - -0.30023971, -0.58632553, 0.50699002, 0.73423439, 0.04769143, -0.69287294, 0.71418941, -0.98707741, -0.48756132, - 0.14591850, -0.00972518, -0.18280549, 0.33020869, 0.07739078, -0.27737662, 0.32508579, 0.52724129, -0.13557516, - 0.27238563, 0.73315942, 0.99855763, 0.84088510, 0.08538753, 0.13155562, -0.14930172, 0.02797297, 0.10585469, - 0.02903437, -0.30760777, -0.08591483, -0.16532275, -0.04133916, 0.12315685, 0.08694953, 0.12440344, -0.39931026, - -0.06502170, -0.07466459, 0.25206035, -0.11492801, 0.01234671, 0.02252278, 0.10730736, 0.00707526, -0.04144976, - 0.16572779, -0.06111651, -0.05090914, 0.22255808, 0.21892326, 0.02140033, -0.26701146, -0.09199855, -0.34320089, - 0.04647652, 0.24066357, 0.00315903, -0.14013545, 0.20657861, 0.19460022, 0.13409390, -0.12650517, -0.00711635, - -0.36546883, -0.27223793, 0.22557122, 0.15888590, -0.19231611, -0.01208463, -0.42694032, 0.00924643, -0.04871246, - 0.14489457, 0.19934957, 0.03268532, -0.26802376, -0.06917346, -0.08818764, -0.06936200, -0.00991716, -0.14875649, - 0.20260695, -0.03016085, -0.11772685, -0.06528303, 0.33984911, -0.42861041, 0.04678998, 0.24468878, -0.26212654, - 0.05760178, -0.01277140, 0.25944546, 0.21451963, -0.22919317, 0.08311309, 0.01015522, -0.07370505, -0.28775448, - 0.28065524, 0.80104679, -0.69237137, 0.09623399, 0.04745018, -0.11536954, 0.21645974, -0.17521553, -0.12839432, - -0.32616171, -0.19263010, -0.05076053, -0.32757092, 0.14068608, -0.31371123, -0.36700678, 1.02383471, 0.41596910, - -0.39243886, -0.39699236, -0.18623418, 0.23590773, 0.44462955, -0.01158825, 0.15543512, 0.36914709, -0.19606984, - 0.04083448, 0.11609410, 0.10854912, -0.93667829, -0.59664226, -0.10577209, -0.03770705, -0.82973319, 0.07100462, - 0.46515539, 0.70493704, 0.11769867, -0.09642658, 0.19184169, -0.60267162, -0.15556012, -0.06323973, 0.25728056, - 0.32714555, 0.37354282, 0.64966816, -0.85379928, -0.52891093, -0.53338081, 0.00071357, -0.80146301, -0.23014045, - 0.31370798, 0.19652064, -0.30330509, 0.59732527, -0.61618036, 0.43174049, -0.33461112, -0.09222537, -0.57418764, - 0.31234556, -0.06441883, -0.29923901, 0.04574157, 0.00199618, -0.07604899, 0.18836573, 0.22399814, 0.11964659, - 0.27587023, 0.54073912, -0.07070547, 1.09669447, 0.60586989, -0.56627184, 0.73163223, -0.06587803, -0.95469141, - 0.05797904, -0.32544577, 0.46618402, -0.42818251, -0.15697184, -0.07984095, -0.06863761, 0.27211952, -0.63966370, - -0.85368210, 1.04474986, -0.03273144, 0.04721467, -0.57129002, -0.51463783, -0.01716019, 0.41848388, -0.92354447, - -0.02085111, -0.35023081, -0.28929639, -0.12352847, -0.06491212, 0.62791741, 0.52128577, -0.08786132, 0.50663567, - -0.85222739, -0.67956436, -0.07901944, -0.20291066, -0.12427756, 0.21070847, 0.36405188, 0.01811016, -0.35558707, - -0.07505420, -0.51016599, 0.08317504, 0.78687006, 0.26184845, 0.32996735, -0.11742579, 0.13708171, 0.09675904, - 0.00351471, 0.17156938, 0.04663955, -0.01313619, 0.07353903, 0.11845510, -0.03040916, -0.11860044, -0.05890951, - 0.13578244, -0.27024615, 0.12044270, -0.06773756, 0.26196989, 0.03754797, -0.69103962, 0.11767364, 0.08418153, - -0.07073509, -0.08945126, -0.04465364, -0.01228451, 0.61217988, 0.36905605, -0.06841971, 0.01820075, 0.22142294, - 0.20999679, -0.00854848, -0.21310976, -0.48690179, -0.06172886, 0.09083650, 0.47623742, -0.38875908, 0.29984316, - 0.35164335, 0.07724196, 0.25907773, -0.03366175, 0.00794181, -0.16796382, 0.12707716, 0.67827290, -0.46863237, - 0.40221474, -0.01072991, -0.01881496, -0.22039062, -0.00463564, -0.20179020, 0.14899430, 0.09645735, 0.08785056, - 0.05667125, -0.08783643, -0.57045329, -0.27956113, 0.32969514, -0.32422251, 0.03947007, 0.04782788, 0.12597121, - 0.12803499, 0.24237561, 0.03641291, 0.02941555, -0.13378389, 0.71286631, 0.13059177, -0.11221728, -0.04303265, - 0.32258469, 0.03121127, 0.19749436, 0.80445844, -0.83933711, 0.40717539, -0.08058111, 0.18654235, 0.58147413, - -0.22004756, -0.21094175, -0.49914742, -0.07245248, 0.21281776, -0.72978270, 0.11609764, -0.12739497, -0.49795446, - 0.91565651, 0.71345496, -0.19992878, 0.12728572, -0.34958413, 0.51537168, 0.36229423, -0.20545541, -0.04014085, - -0.15503673, 0.46182132, -0.18324539, -0.02288571, -0.12150281, -0.35487393, -0.25479561, 0.34288880, 0.01429710, - 0.03762121, 0.01153337, 0.11537866, -0.11222634, -0.04343228, 0.09371492, 0.24208696, 0.02680596, 0.08744393, - -0.01195653, -0.02051427, 0.46111181, 0.34674245, 0.17142926, -0.32360074, -0.30470049, -0.08778754, 0.56703365, - -0.39670938, 0.01970642, -0.24996454, 0.59148031, -0.04976763, 0.42775628, -0.51978588, 0.74823248, -0.24332942, - -0.10120203, -0.71067011, -0.05833459, 0.24460207, 0.12378100, 0.39883280, 0.15179272, -0.45821238, -0.26472330, - -0.11036454, 0.47337988, -0.19236894, 0.44863826, 0.19078662, 0.46045646, 0.55434424, -1.23575699, 0.89674824, - 0.14763579, -0.29703000, 0.11096095, -0.23884353, 0.32712832, -0.55054861, 0.67220551, -0.28248659, -0.10569336, - 0.04621894, -0.49375376, -0.12733379, 0.67400223, -0.12935409, 0.09695239, -0.28661168, -0.36145869, 0.06896356, - 0.46334738, -0.83616781, -0.68781477, -0.22872619, -0.02656318, -0.46397430, -0.16735579, 0.57318032, -0.05219025, - -0.06242780, 0.30701312, -0.43937260, -0.05616235, -0.35246953, 0.47527167, -0.36845928, 0.13797158, 0.46169606, - 0.03073783, -0.16647297, 0.35587814, -0.52273571, 0.22240485, 0.32394350, 0.29325587, 0.38622752, -0.12588513, - 0.21903162, -0.03870760, -0.07586532, 0.09732155, -0.44541699, 0.01353051, 0.07500879, -0.22210084, -0.02879842, - -0.02839135, 0.02233995, 0.01847041, -0.22886260, 0.09602077, -0.10249722, 0.02895709, -0.11213382, -0.32242554, - 0.21315952, 0.13921122, -0.05876900, -0.14110731, 0.17718993, 0.06612965, -0.03701587, 0.34920025, -0.22553837, - -0.25041988, 0.16762421, -0.04839466, -0.57936865, 0.20034809, 0.28770819, 0.07073146, 0.06286270, -0.14398633, - 0.08881986, -0.26472491, 0.27725342, 0.22914961, 0.32062715, 0.15277733, -0.33009961, 0.21074554, -0.15565939, - 0.47236079, 0.03225322, 0.06781324, -0.16307135, 0.73327172, -0.11553932, -0.13312288, -0.30246657, -0.04846320, - -0.39416528, 0.15607847, 0.08472254, -0.12179766, 0.23342557, -0.02313556, -0.16107082, 0.19552790, -0.05060831, - 0.08372914, 0.37613615, -0.26624736, 0.05994382, 0.57154304, -0.03778595, 0.15102805, 0.26144159, -0.64846903, - -0.11667332, 0.64444566, 0.53041399, -0.37275234, 0.12701584, 0.25457710, -0.91777927, 0.63840097, -0.04469256, - -0.01554284, 0.52316505, -0.07778227, -0.11871518, 0.13643374, -0.16263111, 0.12193766, -0.43915382, 0.17769964, - 0.06158905, -0.40595376, 0.36887977, 0.21324196, -0.16621692, 0.07623006, -0.07362154, 0.53180701, 0.40119246, - -0.41867191, -0.17060547, 0.11066595, 0.33041847, -0.30610490, -0.01155049, 0.06596804, 0.06266157, 0.11539320, - 0.53958863, -0.19265023, 0.19687888, -0.32241911, 0.17509246, 0.06316098, 0.22965759, -0.10924519, 0.13696006, - 0.34725070, 0.05508206, -0.31879237, -0.07152238, 0.30400902, 0.47540823, 0.05332027, -1.34034514, -0.63157010, - -0.20077212, 0.82977784, -0.83980680, 0.05455742, 0.23470649, 0.15096639, -0.02279334, 0.74177665, -0.51908326, - 0.57153726, -0.20008761, -0.44515362, -0.52133244, -0.53501129, 0.30665237, 0.03230446, -0.27042213, 0.69568527, - -0.53271943, 0.12585282, 0.84569460, 1.16614997, 0.30099568, 1.01664233, -0.04021535, 0.35936305, 0.12363404, - -0.44788554, 0.65720278, 0.14622304, -0.57894391, -0.17871566, -0.13646793, 0.06899100, -0.13851331, 0.07404158, - -0.32255191, 0.22225420, 0.05467210, -0.22595364, -0.09422892, 0.08064129, -0.14696676, 0.24685700, -0.36180913, - -0.50487852, 0.09818821, 0.23832101, -1.06369340, -0.94318706, 0.00698828, 0.28264612, -0.01870376, -0.69367069, - 0.32556781, 0.29627222, 0.17554468, 0.22879148, -0.32052159, 0.18480402, -0.76028723, 0.17409454, -0.52946806, - -1.31131041, 0.72142994, -0.21024033, 0.65006751, 0.28911707, -0.45603541, 0.30260912, 0.22917707, 0.76010191, - 0.50517660, -0.43544480, 0.01703142, 0.15579990, -0.06952365, 0.26123571, -0.32477272, -0.07388589, 0.23853466, - 0.02649050, -0.04410565, 0.35238847, 0.10454764, -0.21788062, -0.05252795, 0.12990016, -0.20476976, 0.02988371, - -0.20392458, 0.07077907, 0.07255822, 0.03174250, 0.19428524, -0.27959460, 0.17289197, -0.06749524, 0.07314484, - 0.04101936, 0.00711376, 0.39040637, -0.09693181, -0.13249642, 0.06778622, -0.20384689, -0.08403887, -0.06206702, - 0.39903295, 0.01676942, 0.16174519, -0.24540325, -0.15171684, 0.36854738, -0.04578711, -0.20637585, -0.58331889, - 0.23066565, -0.40027916, -0.33852276, 0.22725138, -0.22780336, -0.45288083, 0.05498514, -0.15462326, -0.01167145, - 0.14075157, -0.23809917, -0.04884083, -0.15133418, 0.16887660, 0.08024041, -0.26719818, -0.08086196, 0.27881959, - 0.03904902, -0.05400108, -0.14138514, 0.16911660, -0.10002459, 0.31475541, 0.20939967, 0.07277112, 0.10095973, - 0.33317840, -0.23609909, 0.10387685, 0.08162952, 0.30970895, -0.19202805, 0.11137805, -0.08374452, -0.64609599, - 0.49284625, -0.02431013, 0.22352953, 0.35399213, -0.04173037, 0.01117679, -0.26933041, -0.07039601, 0.30380678, - -0.05741419, 0.47689995, 0.20879868, -0.06093958, -0.08551129, -0.07670606, -0.23868953, -0.26600242, -0.24509941, - 0.40901592, 0.42221358, -0.76004744, 0.13680586, -0.25070697, 0.08168428, -0.19393569, -0.23131981, -0.35523322, - 0.31124046, -0.02291389, 0.52390915, -0.46724460, 0.13923384, -0.12886441, -0.03299529, -0.27032244, -1.19288146, - 0.24336755, -0.20915434, -0.14846808, 0.10754984, 0.02535326, 0.28236297, 0.90321386, 0.28560060, 0.31486535, - -0.78192097, -0.21997991, -0.19503053, 0.71680617, -0.23815078, -0.38749680, 0.09747923, -0.11504970, 0.19734858, - 0.98412722, -0.13073727, 0.75299066, -0.85745215, -0.40456349, -0.51684064, -0.47700635, 0.39638016, 0.17537507, - 0.52784997, 0.63105047, -0.69734496, -0.28434739, 0.58557647, 0.96909130, 0.17804323, 0.09428761, 0.17061329, - 0.33784506, -0.14671242, -0.48270255, 0.31931961, 0.04116327, -0.46874690, -0.45884821, -0.19885214, -0.39863971, - -0.41624883, 0.43567199, -0.28685057, 0.40880397, 0.18431477, -0.15750097, -0.56084317, -0.13018279, 0.18903515, - 0.30848095, -0.34719062, -0.19633505, -0.02658261, 0.24495831, -0.78052413, -0.85096359, -0.37101209, 0.22163752, - -0.14013411, -0.24140479, 0.23052573, 0.54393709, 0.13316275, 0.12203635, 0.20220585, 0.49100202, -0.62808341, - 0.16586047, -0.38358831, -1.00215280, 0.77456385, -0.27937427, 0.11909273, 0.50655580, -0.87544155, 0.59288806, - 0.01167453, 0.57931119, -0.02249480, -0.12532967, -0.25048557, -0.28306130, 0.06188992, 0.48368040, -0.36783400, - -0.21773575, 0.14827894, 0.13848552, 0.04230130, -0.04214389, -0.07091486, -0.04140090, -0.30136281, 0.00464335, - -0.21866782, -0.02765239, -0.17025313, 0.08577426, 0.06893988, 0.11575132, 0.07546596, 0.02867554, 0.19112501, - 0.27582642, 0.12627265, 0.10898180, -0.18745209, 0.23613420, 0.23121634, 0.28491151, 0.02902788, 0.15380767, - 0.03966511, -0.01862929, -0.00648489, 0.01908036, -0.19008325, -0.18426324, -0.07000075, -0.29073888, -0.22639032, - -0.11762336, 0.33500755, -0.21507888, -0.07346634, -0.03355709, -0.04096937, -0.33768243, -0.19027354, -0.18297306, - -0.50098300, -0.02807480, 0.23949267, -0.15996224, -0.07754000, -0.17378184, 0.00657926, 0.39929193, 0.45185298, - -0.34957576, -0.24467568, 0.21933684, -0.10674803, -0.35011348, 0.35258722, -0.14792293, 0.02977267, 0.63623291, - 0.01652745, 0.28561106, -0.24670583, 0.39176771, 0.05463742, 0.32333028, 0.14167164, -0.06670932, 0.23938650, - 0.31829852, -0.41095898, 0.35032102, 0.03883050, 0.14073621, 0.64508480, 0.25743634, -0.24900754, 0.26631746, - -0.12656187, 0.01745303, -0.18157384, 0.34143060, 0.32021353, 0.30565801, -0.26965511, 0.23778385, -0.02008655, - -0.08103817, -0.07159230, 0.32048982, 0.06949183, -2.33522058, 0.02816298, -0.10037031, 0.37423018, -0.22492132, - -0.36854437, 0.40015242, 0.28485346, 0.22778602, 0.19501299, -0.93215930, 0.07858350, -0.40451255, -0.27547240, - -0.02443204, -1.41666114, 0.05133143, -0.06660908, 0.50325763, 0.31695950, -0.18681468, -0.12560664, 2.13244534, - 0.22775133, 0.42665431, -1.29449880, -0.23370074, 0.01759187, 0.25374168, 0.06429626, -0.52347112, 0.34470561, - -0.26376522, -0.04219850, -0.01756793, -0.43413332, -0.22707182, 0.05281873, -0.45199049, 0.04030637, -0.54730064, - -0.13315515, 0.10807105, -0.34840381, -0.12949815, -0.38297817, -0.13845149, 0.97675931, 0.20487542, 0.41703507, - 0.23882188, 0.23847181, 0.40595204, 0.22122343, -0.59291810, 0.16200593, -0.23582739, -0.33778340, -0.05766481, - -0.25944924, -0.28257781, -0.02519164, 0.15628809, 0.22581941, 0.29877603, 0.11747632, -0.13611910, -0.68844485, - 0.10147709, -0.19454663, 0.21278845, 0.02120594, 0.12139316, -0.17088807, 0.38014871, -0.78083509, -0.60448849, - 0.05090213, 0.61401623, -0.32977888, -0.38970327, 0.26832360, 0.53781092, 0.20194471, 0.82220250, 0.23819874, - 0.49616402, -0.43314114, -0.50223577, -0.46702045, -1.17008650, 0.48856854, -0.03626145, 0.75825346, 0.49573380, - -0.68196982, 0.29390180, 0.22509925, 0.79214412, 0.17140889, -0.22514503, 0.10945672, -0.20663217, -0.00440216, - 0.21418120, -0.34781390, -0.11805713, 0.12930803, -0.02661256, -0.16583513, 0.50446808, 0.12406299, -0.18522657, - -0.42358905, 0.14963409, -1.34551275, 0.13522045, 0.17906164, 0.25551242, 0.31629464, -0.21916427, -0.00383488, - -0.16207457, 0.18151720, -0.08251988, 0.89760458, 0.44453332, -0.27497387, 0.29844183, 0.01738336, 0.12566963, - 0.00516657, -0.15164798, -0.07898259, -0.25138238, 0.47278392, 0.46358061, 0.20548722, 0.38698843, -0.07769089, - 0.21403231, -0.12140352, 0.01454621, 0.27465621, -0.04136071, -0.18499696, -0.33877471, -0.52207792, -0.06982010, - -0.67964226, -0.37841988, -0.05654239, -0.44023779, -0.34978950, -0.11707290, 0.43336329, 0.23595251, 0.51182544, - 0.45589104, 0.46062201, -0.28254399, 0.04058569, 0.35703275, 0.09476561, -0.19271792, -0.85225898, 0.18226382, - 0.07547066, -0.23841362, 0.07214766, 0.05686964, -0.64615160, 0.89725614, -0.09489815, -0.24773495, 0.18898845, - -0.05227394, -0.04989563, -0.04141004, -0.68845397, 0.44256380, 0.15174553, 0.16641839, 0.20559123, 0.18821712, - -0.18444933, 0.75212121, 0.04695220, -0.14553900, -0.25279966, -0.78429103, 0.21485479, 0.24854848, -0.34898055, - 0.12131061, -0.01442323, 0.31166860, -0.03168157, 0.23537874, -0.04150987, -0.73491955, 0.30445504, 0.01360191, - 0.11793279, -0.01071012, -0.86158031, -0.44057927, -0.11391853, -0.08041152, 0.30659840, -0.07929188, 0.14337794, - -0.16240485, -0.37871391, -0.12544847, -0.75813878, 0.07463507, 0.30250356, -0.08979524, -0.05500457, -0.00572075, - -0.15594503, 0.03389021, 0.33084431, 0.39045012, -0.42743438, -0.61926889, -1.01879334, 0.43193951, 0.11156862, - -0.76947951, -0.20159762, 0.24022132, 0.20872289, 0.69780248, -0.16525456, 0.63648707, -1.59807694, -0.14674914, - -0.52725124, -0.42184243, 0.85394889, 0.03816247, -0.73201150, 0.72350580, -0.94382733, 0.30476892, 0.62137985, - 0.76275116, 0.58395672, 0.12438627, 0.09742960, 0.15616673, -0.26625797, 0.15280285, 0.40855104, -0.06499965, - 0.07652657, -0.03907230, -0.03445091, -0.13297464, 0.12203576, 0.49042386, -0.46612582, 0.23596950, -0.60011405, - 0.01329148, -0.40629655, 0.34626818, 0.00672128, 0.21219759, 0.12195532, -0.24550790, 0.25495195, 0.50089574, - -0.69004655, -0.82626939, -0.04906785, 0.22566023, -0.19735636, -0.32598498, -0.23328499, 0.59350103, 0.50138974, - 0.03376095, -0.21038638, 0.23230115, -0.67481101, -0.46950540, -0.53264731, -1.31645954, 0.43338448, -0.07359013, - 0.19401260, 0.85574108, -0.58386785, 0.27350774, 0.94151503, 0.99626285, 0.16530964, -0.52822798, 0.02781926, - 0.19514728, 0.02097620, 0.00889074, -0.16201399, -0.07028764, 0.22292475, -0.00996018, 0.11951973, -0.02360463, - 0.18132643, 0.03626538, -0.40536785, -0.24706507, -1.10316157, 0.23488073, -0.11203269, -0.26491979, 0.32530117, - -0.07893114, -0.00744999, 0.26029640, 0.33739540, 0.02217237, 0.02589254, -0.42112139, 0.24534294, 0.70596570, - -0.23823494, -0.01574550, -0.57523948, -0.01305772, -0.10088185, 0.27640396, -0.16561478, 0.15046248, -0.04703883, - 0.12256249, -0.13618535, -0.25345358, 0.13640152, 0.11063136, 0.76222241, 0.26646805, -0.26234278, 0.19928859, - 0.05528985, -0.14719652, 0.09461970, -0.29426023, -0.11857925, -0.33014619, -0.16937710, 0.49556774, 0.09860725, - -0.08043962, 0.60073936, -0.16133121, 0.60515904, 0.05304303, 0.21871525, 0.45007041, -0.18452203, -0.23329300, - 0.15948120, 0.03171407, 0.05523947, -0.19391575, -0.06312876, 0.05657719, -0.01570622, 0.34798819, 0.35875756, - 0.64115590, -0.12868474, -0.21662687, -0.07916048, -0.02071994, -0.39688477, 0.34791452, -0.01536988, -0.01980658, - 0.20821385, 0.32254547, 0.03658571, 0.53079057, 0.11581320, -0.52330321, 0.08113370, -0.35415897, -0.01983317, - 0.34641969, -0.06101644, -0.00271639, -0.19201282, -0.43245769, -0.21427184, 0.11255077, -0.15757668, -1.97429311, - 0.25491333, 0.18619338, -0.13669698, -0.33716843, -1.20977962, -0.06677102, 0.12260284, 0.31985071, 0.98761481, - -0.66411626, -0.41700807, -0.00110240, -0.32249039, 0.21490636, -0.67965972, -0.16568908, -0.11263562, -1.06136537, - -0.06080189, 0.00003523, -0.27638850, 0.54172385, 0.15916675, 0.66536385, -0.61083424, -1.17721260, -0.79620224, - 1.62779248, -1.29850137, -0.40923908, -0.21678016, 1.11565304, 1.38857508, 1.67485464, -0.48776993, 1.54490137, - -0.99453592, -0.23702216, -1.28989625, -0.32184783, 1.73645914, 0.50596559, -0.42633674, 2.06059289, -1.31561661, - 0.09407058, 0.71311694, 1.60583699, 0.67549241, -0.75638843, -0.11993816, 0.25794804, -0.30944440, -0.43204123, - 0.36899459, 0.19363843, -0.08060863, -0.05935695, 0.27492559, -0.16506658, -0.00417477, 0.57574582, -0.39738783, - 0.30795437, -1.27800059, -0.36806244, 0.00201544, 0.41062146, -0.01292078, 0.33908349, 0.05562977, 0.15150607, - 0.33948043, -0.19380097, -0.34239587, -0.26843691, 0.14322159, 0.16285747, -0.12242185, -0.39411676, -0.39972457, - 0.32914063, -0.14964050, 0.18657172, -0.32965264, 0.50208765, -0.61841202, -0.96437931, -0.19447599, -1.48685813, - 0.36768064, -0.19042422, -0.14381048, 0.16720532, -0.38585469, 0.28041863, 1.07230306, 0.34857085, 0.56100559, - -0.60621732, -0.27094939, 0.03308203, 0.28440759, -0.05372868, -0.37450859, -0.23122661, 0.14196907, -0.08391851, - 0.58788222, 0.06581475, 0.12165748, -0.56094503, -0.62536222, -0.32290021, -1.14628315, 0.28745806, 0.09321925, - -0.11868286, 0.73546922, -0.14506210, 0.10030940, 0.65942341, 0.56377023, 0.38628533, -0.42766783, -0.12002008, - -0.27770182, 0.38072130, -0.41092056, 0.07260298, 0.32786149, -0.18012661, -0.02678201, 0.29315698, -0.62710303, - 0.16001518, -0.31741443, -0.36174574, -0.17293620, -0.11350867, 0.18780905, 0.17321175, 0.81462449, 0.27337193, - -0.34306210, -0.12359867, 0.26058146, 0.48336327, 0.48286983, 0.00497185, -0.08108788, -0.37280399, -0.07095718, - 0.07272183, 0.25405398, -0.01350151, 0.19333066, 0.50434202, 0.30863705, 0.23423783, 0.27947450, -0.35671273, - 0.39509684, -0.28312561, 0.13625887, 0.05653338, 0.26617846, 0.24114241, 0.22899513, -0.34379941, 0.14200218, - 0.16892987, 0.41087806, 0.25089607, -0.16019906, 0.13426897, -0.13074127, -0.23068653, -0.45294666, 0.30708107, - -0.05777374, -0.03524012, -0.18545437, 0.26572716, 0.34135580, -0.10212494, 0.15759155, -0.29985228, 0.00604882, - -1.35232568, 0.02671386, -0.18605591, 0.28203139, 0.06673647, 0.21136442, 0.02198954, -0.02589645, -0.13472135, - -0.33945116, -1.36670744, 0.26497167, -0.01333835, 0.35838512, -0.00214932, -0.67533672, -0.01949281, -0.15939406, - -0.17611854, 0.62018734, -1.11697268, 0.25882152, -0.40646151, -0.21743414, -0.35022104, -0.48264894, 0.15348732, - 0.32525846, -0.62968028, -0.14668293, 0.04142878, -0.18443897, 1.67367685, 0.29640922, 0.54300213, -0.38739282, - -1.12135983, -0.95634991, 1.56781328, -0.78718096, -0.65814853, -0.09405752, 1.45496094, 1.55392945, 1.32255197, - -0.49480981, 1.84735644, -1.09742570, 0.03602623, -1.19865084, 0.01194180, 1.76398528, 0.22691993, -0.24130857, - 2.00458288, -1.63459969, 0.28926355, 0.26902235, 1.57351863, 0.59064698, -2.67679620, 0.40217704, 0.49060968, - 0.01024920, -0.21290652, 0.01566074, -0.11393169, -0.32448450, -0.27194211, 0.21742176, -0.57667369, -0.03412761, - 0.36706647, -0.42090943, 0.39278191, -0.02046515, -0.30790815, -0.07676671, 0.48708537, -0.19606759, 0.39258122, - 0.11010294, 1.56427002, -0.23800702, 0.70309281, -1.84958696, -0.04740064, 0.06504993, 0.21830852, -0.09291255, - -1.47656202, -0.76586556, -0.02407140, -0.12262835, 0.55286926, -0.37243509, -0.11549302, -0.16901262, -0.81201553, - -0.16746910, -1.11338747, -0.03933520, 0.25118551, -0.27406788, 0.25855088, -0.24614365, -0.05488263, 0.42877647, - 0.41920695, 0.49124199}; - -#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w11.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w11.h new file mode 100644 index 0000000000000..ba69fb192e297 --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w11.h @@ -0,0 +1,34 @@ +//Numpy array shape [15, 15] +//Min -0.984375000000 +//Max 1.203125000000 +//Number of zeros 135 + +#ifndef W11_H_ +#define W11_H_ + +weight11_t w11[225] = { + 0.734375, 0.000000, 0.000000, 1.015625, -0.781250, 0.000000, 1.203125, 0.687500, 0.000000, 0.000000, + 0.593750, 0.281250, 0.843750, 0.000000, -0.343750, 0.000000, 0.000000, 0.000000, -0.937500, 0.531250, + 0.000000, 0.000000, 0.000000, -0.453125, 0.000000, 0.484375, 0.000000, 0.546875, -0.671875, -0.296875, + 0.000000, 0.000000, 0.375000, -0.625000, 0.203125, 0.000000, -0.734375, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, -0.515625, 0.000000, 0.000000, 0.500000, -0.453125, 0.000000, 0.000000, 0.500000, + -0.359375, 0.000000, 0.000000, 0.000000, 0.468750, 0.000000, 0.000000, 0.000000, 0.328125, -0.406250, + 0.000000, 0.359375, 0.359375, -0.375000, 0.000000, 0.000000, -0.296875, 0.406250, 0.000000, 0.000000, + 0.406250, 0.328125, -0.515625, 0.421875, 0.000000, 0.000000, 0.000000, -0.281250, 0.000000, 0.000000, + 0.000000, 0.312500, 0.000000, 0.000000, 0.000000, -0.453125, 0.000000, 0.000000, 0.000000, -0.375000, + 0.000000, -0.453125, -0.984375, 0.000000, -0.406250, 0.000000, 0.421875, -0.343750, 0.000000, 0.000000, + 0.000000, -0.437500, 0.000000, 0.343750, 0.000000, 0.375000, -0.453125, 0.000000, -0.343750, 0.000000, + -0.421875, 0.000000, 0.406250, 0.000000, 0.328125, 0.343750, 0.375000, 0.000000, -0.343750, 0.000000, + 0.328125, 0.000000, -0.359375, 0.000000, 0.000000, -0.453125, 0.000000, 0.000000, 0.000000, 0.000000, + 0.328125, 0.000000, 0.468750, 0.000000, 0.000000, 0.000000, 0.000000, 0.375000, 0.000000, 0.000000, + 0.000000, 0.531250, -0.281250, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + -0.671875, 0.000000, 0.000000, 0.000000, 0.437500, 0.000000, 0.000000, 0.000000, -0.765625, 0.000000, + 0.421875, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.421875, 0.000000, + 0.000000, 0.000000, 0.000000, 0.343750, 0.000000, -0.437500, -0.375000, 0.000000, 0.000000, 0.375000, + 0.296875, 0.000000, 0.000000, 0.000000, 0.000000, 0.375000, 0.000000, 0.000000, 0.390625, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + -0.328125, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.562500, 0.000000, + -0.421875, 0.000000, 0.000000, 0.312500, -0.140625, 0.359375, -0.390625, -0.359375, 0.406250, 0.625000, + -0.484375, 0.000000, 0.000000, 0.687500, -0.406250}; + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w14.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w14.h new file mode 100644 index 0000000000000..f4103cee867e2 --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w14.h @@ -0,0 +1,26 @@ +//Numpy array shape [15, 10] +//Min -0.921875000000 +//Max 1.031250000000 +//Number of zeros 90 + +#ifndef W14_H_ +#define W14_H_ + +weight14_t w14[150] = { + -0.296875, -0.843750, 0.000000, 0.000000, -0.406250, 0.000000, -0.281250, 1.031250, 0.000000, 0.000000, + 0.453125, 0.000000, 0.359375, 0.375000, 0.406250, -0.421875, 0.000000, 0.000000, 0.375000, 0.000000, + 0.000000, 0.828125, 0.000000, 0.000000, 0.000000, 0.000000, -0.312500, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, -0.406250, 0.796875, 0.421875, 0.640625, 0.546875, 0.000000, 0.000000, 0.000000, + -0.328125, 0.000000, 0.000000, 0.000000, -0.328125, -0.890625, 0.000000, 0.859375, 0.750000, 0.000000, + 0.453125, 0.000000, 0.000000, 0.000000, 0.000000, -0.328125, 0.000000, 0.000000, -0.328125, -0.359375, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.750000, 0.640625, 0.000000, 0.000000, + 0.000000, -0.484375, 0.000000, 0.000000, -0.421875, 0.000000, -0.421875, 0.781250, 0.000000, 0.000000, + 0.437500, 0.000000, 0.328125, 0.000000, 0.359375, 0.000000, 0.000000, 0.000000, -0.546875, 0.000000, + 0.484375, 0.640625, 0.531250, 0.000000, 0.000000, 0.000000, 0.625000, -0.296875, 0.000000, -0.437500, + 0.000000, 0.000000, 0.000000, 0.000000, 0.421875, 0.000000, 0.000000, 0.000000, 0.000000, 0.375000, + 0.000000, 0.000000, 0.000000, -0.296875, -0.390625, 0.375000, 0.000000, 0.000000, -0.328125, 0.000000, + 0.000000, 0.000000, -0.671875, 0.000000, -0.921875, 0.000000, -0.875000, 0.000000, 0.000000, 0.000000, + 0.468750, 0.718750, 0.484375, 0.812500, 0.000000, 0.375000, 0.000000, 0.000000, -0.390625, 0.000000, + -0.390625, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.390625, 0.000000}; + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w17.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w17.h new file mode 100644 index 0000000000000..0ce1c2b014117 --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w17.h @@ -0,0 +1,12 @@ +//Numpy array shape [10, 1] +//Min -2.798828125000 +//Max 1.773437500000 +//Number of zeros 6 + +#ifndef W17_H_ +#define W17_H_ + +weight17_t w17[10] = { + 0.000000, 1.773438, 1.755859, 0.000000, 0.000000, 0.000000, 1.603516, 0.000000, -2.798828, 0.000000}; + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w2.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w2.h index 592ab44151bbc..cd94ddd044393 100644 --- a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w2.h +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w2.h @@ -1,39 +1,211 @@ -//Numpy array shape [25, 10] -//Min -1.512127518654 -//Max 2.787853240967 -//Number of zeros 0 +//Numpy array shape [80, 25] +//Min -1.515625000000 +//Max 1.312500000000 +//Number of zeros 1205 #ifndef W2_H_ #define W2_H_ -weight_default_t w2[250] = { - 0.20997065, 0.23109458, 0.56466961, 0.22711204, -0.20132071, -0.27363914, 0.14927717, -0.16103272, -0.83456266, - -0.16359854, 0.42116061, 0.25756207, 0.04047282, 0.21591994, -0.26583776, -0.55054820, 0.41611665, -0.02321975, - 0.07042803, 0.50135452, 0.00703545, -0.20829202, -0.33702660, -0.12396229, -0.11880612, -0.27329573, -0.11452802, - -0.31897750, 0.21264470, 0.13742544, -0.28871939, 0.41868410, -0.63091415, -0.19237195, -0.65478534, 0.38763866, - -0.24744406, -0.16881032, 0.39083633, -0.50035834, -0.19310105, -0.31465644, 0.00439816, 0.10827218, -0.49906382, - -0.32572702, -0.91848624, 0.37550700, -0.71738565, -0.34755468, 0.06423171, 0.32547599, 0.02474762, 0.03221778, - 0.48550412, -0.33728692, -0.32770881, 0.17164232, 0.55661368, 0.11896797, 0.36957362, 0.47705862, -0.49895954, - 0.33941826, 0.19965869, 0.01562935, 0.11520918, -0.64897013, 0.09584811, -0.06691046, -0.22340138, -0.28523839, - 0.47164100, 0.39281282, -0.27396747, 0.23841321, -0.16906965, 0.23569225, -0.15681265, 0.18717216, -0.60413569, - -0.08125137, 0.03988006, -0.21231870, -0.22519483, 0.12118224, 0.16755132, 0.12627158, 0.01710406, 0.12804474, - 0.15039428, -0.44942543, -0.31897655, 0.23188710, 0.18285972, 0.19390795, -1.01665187, 0.21815108, -0.29137248, - -0.33327803, -0.59519506, 0.28375888, -0.21275434, 0.20035347, 0.24234673, -0.23726320, 0.13105272, -0.11671171, - -1.04230368, -0.01892293, 0.24302486, -0.11491518, 0.00009525, 0.16215059, -0.33812979, 0.25157502, 0.08174099, - 0.02176141, 0.21500087, 0.09077536, -0.76118916, 0.10925286, 0.29795000, 0.12469041, 0.37909570, -0.20281483, - 0.27489746, 0.37251407, 0.22438200, 0.38048640, 0.05875695, -0.26088551, -0.21821247, -0.16538695, 0.41207287, - -0.16648161, -0.84085250, -0.41789296, -0.34957457, -0.61002076, 0.31845343, 0.14742102, 0.19950806, 0.16061406, - 0.06558945, -0.37494221, -0.08883159, -0.04767518, -0.01558618, -0.38022742, -1.51212752, 0.86078125, 0.19461697, - 0.17105880, -0.30809617, -0.31512862, 2.78785324, -0.00088534, 1.45783448, 1.60251164, 0.00830983, -0.11042736, - -0.09234238, -0.63981187, -0.12528154, 0.26517308, -0.64378422, 0.26114368, -0.03288542, -0.30414325, 0.06316128, - 0.20465648, 0.13085699, -0.47638854, -0.23346442, 0.28762946, 0.11337498, -0.16003485, -0.03085457, -0.34413737, - -0.20898604, 0.25293669, 0.12700504, -0.57297736, 0.37069905, -0.10958206, -0.02782927, -0.04480676, 0.37059775, - 0.22780053, -0.46436781, 0.21395527, -0.12828122, 0.25643846, 0.42216083, 0.38164839, -0.21980932, 0.36473754, - 0.07016987, -0.35408738, -0.16640140, -0.25358951, 0.39250490, -0.54550570, -0.19580491, -0.40004924, 0.17290805, - 0.03295039, 0.15710174, 0.38565248, 0.17310381, -0.26752374, -0.01243732, 0.19979088, -0.15178865, 0.05851814, - -0.30287826, -0.22805928, 0.13903613, -0.17035685, 0.42811340, -0.32098049, 0.01897480, 0.19527332, 0.15685958, - 0.24155772, -1.29652667, 0.23406981, -0.14959824, 0.22470856, 0.06737669, -0.17472392, -0.07033237, 0.12923102, - -0.45487776, 0.28186423, -0.08404353, 0.05938773, -0.14591871, -0.37163615, -0.11934289, 0.09545202, 0.20201178, - 0.15774842, 0.09092412, 0.54094648, 0.01843318, -0.20180281, -1.01475310, -0.02641589}; +weight2_t w2[2000] = { + 0.000000, 0.000000, 0.000000, 0.109375, 0.046875, 0.078125, 0.000000, 0.281250, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, -0.046875, -0.125000, 0.000000, 0.703125, 0.031250, 0.000000, + 0.000000, -0.203125, 0.000000, -1.296875, -0.656250, 0.000000, 0.000000, 0.390625, 0.000000, 0.000000, + 0.203125, 0.125000, 0.000000, 0.000000, 0.000000, 0.234375, -0.343750, 0.000000, 0.203125, 0.000000, + 0.359375, -1.515625, 1.312500, 0.546875, 0.000000, -0.046875, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, -0.156250, -0.125000, -0.250000, 0.000000, 0.187500, 0.000000, -0.906250, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.718750, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.578125, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.093750, 0.000000, 0.390625, + 0.406250, 0.625000, 0.000000, 0.000000, -0.140625, 0.000000, -0.125000, 0.000000, 0.000000, 0.000000, + -0.546875, -0.109375, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.218750, + 0.000000, 0.000000, 0.000000, 0.390625, -0.265625, -0.234375, 0.000000, -0.265625, 0.000000, 0.000000, + 0.562500, 0.000000, 0.140625, 0.000000, 0.000000, 0.296875, 0.000000, -0.812500, 0.000000, -0.375000, + 0.000000, 0.000000, 0.062500, 0.234375, 0.000000, 0.000000, 0.062500, 0.000000, 0.000000, 0.062500, + -0.140625, -0.078125, 0.187500, -0.906250, 0.000000, 0.000000, 0.000000, 0.000000, -0.281250, 0.000000, + 0.718750, 0.296875, -0.937500, -0.937500, 0.000000, 0.000000, 0.000000, -0.062500, 0.843750, 0.031250, + 0.000000, 0.468750, 0.000000, 0.000000, -0.484375, 0.000000, -0.656250, 0.875000, 0.000000, -0.109375, + -0.015625, 0.000000, 0.000000, 0.140625, -0.343750, -0.421875, 0.343750, 0.078125, 0.000000, 0.000000, + 0.171875, 0.000000, 0.000000, -0.531250, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + -0.375000, 0.000000, 0.000000, 0.000000, 0.218750, 0.546875, 0.015625, -0.109375, 0.000000, 0.000000, + -0.125000, 0.000000, 0.000000, 0.000000, -0.078125, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.046875, 0.578125, 0.000000, 0.000000, 0.000000, -0.093750, 0.000000, 0.000000, 0.000000, 0.000000, + 0.093750, 0.000000, -0.078125, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.312500, 0.000000, 0.000000, 0.000000, 0.062500, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.031250, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.171875, 0.000000, -0.031250, 0.000000, 0.453125, 0.000000, 0.000000, 0.000000, 0.703125, + 0.125000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.265625, 0.000000, + 0.000000, -0.484375, 0.000000, -0.031250, 0.000000, 0.000000, -0.156250, 0.000000, 0.187500, 0.484375, + 0.343750, 0.000000, 0.000000, 0.000000, 0.000000, 0.015625, 0.000000, 0.000000, 0.156250, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.140625, 0.000000, 0.000000, -0.062500, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.390625, 0.000000, -0.125000, -0.156250, + 0.000000, 0.000000, 0.000000, -0.062500, 0.000000, 0.218750, -0.671875, 0.000000, 0.281250, 0.000000, + 0.000000, 0.000000, 0.125000, -0.125000, 0.000000, 0.000000, 0.000000, 0.000000, 0.203125, 0.593750, + 0.000000, 0.000000, 0.000000, 0.000000, 0.281250, 0.000000, -0.140625, -0.171875, -0.265625, 0.000000, + 0.437500, -0.343750, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.140625, 0.000000, 0.000000, + 0.000000, -0.281250, -0.125000, 0.000000, 1.234375, -0.171875, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.234375, 0.078125, 0.000000, -0.546875, 0.421875, 0.000000, -0.312500, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.250000, -0.375000, 0.000000, + 0.000000, 0.515625, 0.000000, 0.000000, 0.000000, -0.171875, 0.000000, -0.515625, -0.156250, 0.000000, + 0.171875, -0.453125, 0.000000, 0.000000, -0.500000, 0.000000, 0.171875, -0.187500, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.296875, 0.187500, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.156250, 0.062500, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.156250, 0.187500, 0.000000, 0.000000, 0.000000, + -0.421875, 0.000000, -0.281250, 0.000000, 0.000000, 0.000000, -0.187500, 0.000000, 0.000000, 0.187500, + 0.000000, 0.000000, 0.359375, 0.000000, 0.000000, 0.187500, -0.093750, 0.000000, 0.000000, 0.046875, + -0.250000, 0.000000, 0.000000, 0.156250, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.031250, 0.000000, 0.000000, + -0.250000, 0.000000, 0.000000, -0.125000, 0.000000, 0.000000, 0.000000, 0.000000, -0.078125, 0.000000, + -0.078125, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.015625, 0.000000, 0.000000, + -0.406250, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.109375, 0.000000, 0.000000, + -0.218750, -0.359375, 0.000000, 0.421875, 0.000000, 0.062500, 0.000000, -0.421875, -0.046875, 0.000000, + 0.093750, 0.000000, 0.000000, 0.000000, -0.515625, 0.000000, 0.000000, 0.015625, 0.000000, 0.000000, + -0.218750, 0.281250, 0.000000, 0.281250, -0.156250, 0.250000, 0.000000, 0.000000, 0.109375, 0.015625, + 0.000000, 0.000000, 0.187500, 0.000000, 0.406250, -0.062500, -0.281250, -0.078125, 0.000000, 0.000000, + 0.000000, -0.250000, -0.453125, -0.046875, 0.421875, 0.000000, -0.109375, 0.109375, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.281250, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.218750, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.656250, 0.000000, 0.000000, 0.000000, 0.046875, 0.000000, 0.484375, -0.546875, -0.031250, -0.421875, + 0.000000, -0.781250, 0.000000, 0.000000, -0.546875, 0.265625, 0.171875, -0.203125, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, -0.062500, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.171875, 0.125000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.328125, 0.000000, + 0.140625, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.062500, 0.171875, 0.000000, 0.015625, + 0.000000, 0.000000, 0.000000, 0.000000, -0.234375, 0.000000, 0.000000, 0.000000, 0.000000, -0.078125, + 0.000000, 0.000000, 0.000000, 0.093750, 0.203125, -0.140625, 0.000000, -0.328125, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, -0.359375, 0.000000, 0.187500, -0.171875, -0.187500, 0.000000, 0.031250, + 0.000000, 0.000000, 0.125000, 0.015625, 0.000000, 0.000000, 0.000000, 0.000000, -0.109375, 0.000000, + -0.296875, 0.000000, -0.187500, 0.250000, 0.000000, 0.000000, 0.390625, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.078125, 0.000000, 0.000000, -0.015625, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.093750, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.250000, 0.000000, -0.109375, -0.296875, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.234375, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.187500, 0.000000, + 0.125000, 0.000000, 0.109375, -0.750000, 0.125000, 0.000000, -0.187500, 0.156250, 0.000000, 0.109375, + 0.000000, 0.109375, 0.000000, -0.265625, -0.031250, 0.000000, 0.125000, 0.000000, 0.203125, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.187500, 0.000000, -0.203125, + 0.000000, 0.000000, 0.187500, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.062500, 0.031250, + 0.015625, 0.000000, 0.078125, -0.328125, -0.031250, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.015625, 0.000000, -0.468750, -0.031250, 0.000000, + 0.000000, -0.046875, 0.703125, 0.000000, -0.093750, 0.265625, 0.312500, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.328125, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.375000, 0.000000, -0.187500, + 0.109375, 0.000000, 0.000000, 0.125000, 0.000000, -0.078125, 0.000000, 0.000000, 0.000000, -0.250000, + -0.156250, 0.000000, 0.250000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, -0.187500, 0.000000, 0.109375, 0.000000, 0.031250, 0.031250, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.234375, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.171875, 0.000000, -0.328125, 0.000000, 0.000000, 0.000000, 0.000000, -0.281250, + 0.000000, 0.000000, -0.265625, 0.000000, 0.125000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + -0.312500, 0.000000, 0.000000, 0.000000, 0.000000, -0.031250, 0.000000, 0.390625, 0.000000, 0.000000, + -0.343750, 0.000000, 0.000000, -0.015625, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.046875, + -0.109375, 0.171875, -0.031250, 0.125000, 0.000000, 0.000000, -0.359375, -0.171875, -0.328125, 0.000000, + 0.000000, 0.218750, 0.281250, -0.437500, 0.000000, 0.000000, 0.109375, -0.093750, 0.000000, -0.125000, + 0.000000, 0.000000, 0.140625, 0.156250, 0.000000, 0.000000, 0.375000, 0.000000, 0.156250, 0.000000, + 0.000000, 0.265625, 0.000000, 0.000000, 0.296875, 0.000000, 0.000000, -0.140625, 0.000000, -0.250000, + 0.000000, -0.187500, 0.296875, 0.000000, -0.218750, 0.000000, 0.218750, 0.000000, -0.171875, -0.218750, + 0.000000, -0.328125, 0.000000, 0.062500, 0.000000, 0.234375, 0.000000, 0.000000, 0.000000, -0.062500, + 0.000000, 0.000000, 0.265625, 0.000000, 0.000000, 0.000000, 0.046875, 0.000000, 0.000000, 0.093750, + -0.265625, 0.000000, 0.265625, -0.359375, 0.000000, 0.000000, 0.062500, 0.000000, 0.140625, 0.000000, + 0.046875, 0.000000, 0.000000, 0.000000, 0.156250, 0.000000, 0.203125, 0.000000, 0.000000, -0.203125, + 0.000000, 0.000000, 0.328125, 0.000000, -0.484375, 0.000000, 0.281250, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.390625, 0.000000, 0.000000, + 0.000000, 0.000000, -0.031250, 0.000000, -0.375000, -0.156250, 0.000000, -0.015625, 0.000000, -0.421875, + 0.000000, 0.093750, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.312500, 0.000000, + 0.015625, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.390625, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.125000, 0.046875, 0.000000, 0.000000, 0.000000, + -0.296875, 0.000000, 0.000000, 0.000000, 0.078125, 0.000000, 0.000000, 0.281250, 0.156250, 0.000000, + 0.000000, -0.156250, 0.218750, 0.375000, 0.000000, 0.000000, 0.000000, -0.015625, -0.125000, 0.015625, + 0.359375, 0.171875, 0.000000, -0.078125, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.031250, + 0.000000, 0.187500, 0.000000, 0.000000, 0.000000, 0.000000, 0.281250, 0.171875, 0.000000, 0.171875, + 0.000000, -0.078125, -0.312500, 0.000000, 0.000000, 0.000000, 0.000000, -0.250000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.031250, 0.000000, 0.296875, 0.000000, 0.000000, -0.265625, 0.000000, + 0.000000, 0.343750, 0.250000, 0.000000, -0.265625, 0.000000, 0.000000, 0.000000, 0.000000, -0.109375, + 0.000000, 0.078125, 0.000000, -0.140625, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.187500, 0.000000, 0.078125, -0.156250, 0.234375, -0.031250, 0.000000, 0.234375, 0.000000, 0.109375, + 0.031250, 0.000000, -0.187500, 0.000000, 0.093750, 0.343750, -0.062500, 0.000000, -0.015625, 0.093750, + 0.000000, 0.000000, 0.000000, 0.015625, 0.015625, 0.000000, 0.140625, 0.234375, 0.156250, 0.000000, + 0.000000, -0.062500, 0.187500, 0.000000, 0.000000, 0.000000, 0.015625, -0.125000, 0.000000, 0.234375, + -0.234375, -0.171875, 0.171875, 0.015625, 0.000000, 0.375000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.171875, -0.218750, 0.000000, 0.171875, 0.000000, 0.000000, -0.718750, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, -0.328125, 0.000000, 0.218750, -0.265625, 0.000000, 0.000000, + 0.000000, 0.187500, 0.000000, 0.109375, 0.000000, -0.171875, 0.062500, 0.000000, 0.000000, 0.093750, + 0.000000, 0.000000, -0.078125, 0.000000, -0.328125, 0.000000, 0.000000, 0.187500, 0.000000, -0.359375, + -0.015625, 0.000000, 0.000000, 0.000000, 0.000000, 0.203125, -0.093750, 0.000000, 0.078125, 0.000000, + 0.000000, -0.187500, 0.000000, 0.000000, 0.000000, -0.109375, 0.000000, 0.312500, 0.187500, 0.000000, + 0.000000, -0.078125, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.203125, -0.171875, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.140625, 0.156250, 0.187500, 0.000000, 0.109375, + 0.000000, 0.000000, 0.000000, 0.000000, 0.078125, 0.000000, 0.000000, 0.000000, 0.000000, 0.140625, + 0.000000, -0.156250, 0.000000, 0.312500, 0.000000, 0.000000, 0.000000, 0.000000, 0.031250, -0.031250, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, -0.046875, 0.062500, 0.000000, 0.000000, 0.000000, -0.015625, -0.125000, 0.000000, 0.000000, + 0.000000, -0.156250, -0.015625, 0.250000, -0.109375, -0.171875, 0.000000, 0.000000, 0.000000, 0.000000, + 0.343750, 0.437500, -0.031250, 0.093750, 0.000000, -0.250000, 0.031250, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.078125, 0.031250, 0.000000, 0.000000, 0.437500, + 0.000000, 0.140625, 0.296875, 0.125000, 0.000000, -0.078125, -0.156250, 0.000000, 0.000000, -0.109375, + 0.000000, -0.156250, -0.062500, 0.203125, -0.062500, 0.000000, 0.140625, -0.125000, 0.218750, 0.000000, + 0.000000, -0.421875, 0.000000, 0.000000, 0.312500, 0.000000, 0.000000, 0.234375, 0.250000, 0.000000, + 0.000000, 0.000000, 0.406250, 0.000000, -0.062500, 0.000000, 0.015625, 0.000000, 0.000000, 0.000000, + -0.281250, 0.000000, 0.515625, 0.000000, 0.000000, 0.484375, 0.187500, 0.000000, -0.218750, 0.000000, + 0.312500, 0.000000, 0.125000, 0.062500, 0.125000, 0.000000, 0.468750, -0.578125, 0.000000, -0.546875, + -0.265625, 0.000000, 0.000000, 0.000000, -0.328125, 0.234375, 0.296875, -0.468750, 0.000000, 0.000000, + 0.187500, 0.000000, 0.000000, 0.046875, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.093750, + 0.000000, 0.640625, -0.421875, 0.000000, -0.296875, 0.000000, 0.000000, 0.093750, 0.000000, -0.234375, + 0.000000, 0.000000, -0.281250, -0.265625, 0.000000, -0.250000, 0.250000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.046875, 0.015625, 0.000000, 0.000000, 0.156250, 0.000000, 0.000000, 0.250000, + -0.062500, 0.000000, 0.000000, 0.000000, 0.187500, 0.000000, 0.000000, 0.000000, 0.250000, 0.000000, + -0.140625, -0.125000, 0.000000, 0.250000, 0.000000, 0.000000, -0.343750, 0.000000, 0.343750, 0.000000, + 0.000000, -0.140625, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.281250, 0.000000, 0.000000, + 0.234375, 0.000000, 0.078125, -0.515625, 0.000000, -0.234375, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.375000, 0.000000, -0.046875, 0.000000, 0.296875, 0.296875, 0.000000, 0.109375, + 0.312500, 0.000000, -0.281250, 0.000000, 0.109375, 0.218750, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.281250, 0.000000, -0.109375, 0.000000, 0.203125, 0.000000, -0.046875, 0.000000, + 0.000000, 0.000000, -0.281250, 0.000000, -0.234375, 0.515625, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.109375, 0.109375, 0.000000, -0.031250, -0.156250, -0.296875, 0.000000, -0.390625, + 0.000000, 0.171875, -0.093750, 0.000000, 0.312500, 0.312500, 0.000000, -0.125000, 0.000000, 0.171875, + -0.093750, 0.125000, 0.000000, 0.000000, 0.000000, 0.203125, 0.000000, 0.046875, 0.000000, -0.281250, + -0.281250, -0.265625, 0.000000, 0.000000, 0.000000, 0.343750, 0.000000, 0.000000, 0.000000, -0.140625, + 0.000000, 0.359375, 0.203125, 0.000000, -0.125000, 0.000000, 0.000000, -0.140625, -0.046875, 0.171875, + 0.421875, -0.078125, 0.187500, 0.000000, 0.000000, 0.250000, 0.156250, 0.000000, -0.234375, -0.500000, + 0.031250, 0.265625, 0.390625, -0.453125, 0.000000, 0.000000, 0.000000, -0.296875, -0.109375, -0.390625, + 0.000000, -0.250000, 0.000000, 0.000000, -0.203125, 0.000000, 0.250000, -0.234375, 0.000000, -0.078125, + 0.265625, 0.140625, -0.140625, 0.000000, 0.000000, 0.000000, 0.281250, 0.546875, 0.000000, 0.000000, + 0.000000, 0.000000, -0.359375, 0.000000, -0.328125, 0.156250, -0.296875, 0.171875, 0.000000, 0.000000, + 0.171875, 0.000000, -0.625000, 0.000000, 0.000000, 0.000000, 0.000000, 0.171875, -0.140625, 0.000000, + -0.187500, 0.000000, 0.078125, -0.281250, 0.187500, 0.000000, 0.125000, -0.093750, 0.000000, 0.203125, + -0.203125, 0.000000, -0.187500, 0.031250, 0.000000, -0.156250, -0.078125, -0.078125, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.281250, 0.000000, 0.078125, 0.000000, 0.296875, 0.000000, 0.000000, + -0.234375, 0.000000, -0.015625, 0.000000, 0.078125, 0.281250, 0.000000, 0.171875, 0.109375, 0.000000, + 0.203125, -0.406250, -0.187500, 0.000000, 0.000000, 0.000000, -0.328125, 0.046875, 0.000000, 0.296875, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.234375, + 0.265625, -0.156250, -0.203125, 0.000000, -0.281250, 0.171875, 0.000000, 0.000000, 0.375000, -0.062500, + 0.000000, 0.406250, 0.000000, 0.296875, -0.031250, -0.046875, 0.000000, 0.328125, 0.000000, 0.000000, + 0.000000, 0.218750, -0.109375, 0.000000, 0.000000, 0.125000, -0.093750, -0.125000, 0.000000, -0.171875, + 0.234375, -0.140625, 0.000000, 0.062500, -0.015625, 0.000000, 0.156250, -0.453125, 0.000000, 0.000000, + 0.109375, -0.140625, 0.109375, 0.000000, 0.312500, 0.000000, -0.171875, 0.125000, -0.250000, 0.000000, + 0.187500, -0.078125, 0.156250, 0.000000, 0.125000, 0.203125, 0.000000, -0.281250, 0.000000, 0.000000, + 0.000000, 0.000000, 0.109375, 0.000000, 0.000000, 0.250000, 0.187500, 0.000000, 0.171875, -0.109375, + 0.000000, 0.000000, -0.031250, 0.000000, 0.187500, 0.203125, 0.000000, 0.000000, 0.000000, 0.062500, + 0.093750, 0.156250, 0.000000, 0.015625, 0.000000, 0.515625, 0.328125, 0.000000, -0.015625, 0.000000, + 0.000000, 0.312500, 0.484375, 0.000000, 0.000000, -0.312500, 0.000000, -0.531250, -0.250000, -0.140625, + 0.125000, 0.000000, 0.406250, 0.000000, 0.000000, 0.171875, 0.296875, -0.875000, 0.000000, -0.281250, + 0.359375, 0.000000, 0.000000, 0.000000, -0.375000, 0.000000, 0.250000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, -0.500000, 0.000000, -0.140625, 0.000000, -0.156250, 0.000000, 0.000000, -0.218750, + 0.296875, 0.000000, -1.109375, 0.000000, 0.000000, 0.000000, 0.250000, 0.000000, -0.046875, 0.062500, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.328125, 0.000000, 0.109375, 0.000000, -0.109375, + 0.531250, 0.203125, 0.000000, 0.000000, 0.156250, -0.203125, -0.484375, 0.000000, 0.000000, -0.281250, + 0.000000, 0.000000, -0.156250, 0.000000, 0.000000, -0.078125, 0.203125, -0.109375, 0.000000, 0.000000, + 0.000000, -0.062500, -0.062500, 0.000000, 0.000000, 0.000000, -0.109375, -0.250000, 0.000000, 0.000000, + 0.000000, -0.046875, -0.281250, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.093750, + 0.328125, 0.000000, 0.312500, 0.000000, 0.000000, 0.000000, 0.515625, -0.187500, 0.000000, 0.062500, + -0.031250, -0.250000, 0.281250, -0.015625, -0.312500, 0.000000, 0.140625, 0.000000, 0.000000, 0.000000, + 0.218750, 0.375000, -0.203125, 0.343750, 0.000000, 0.125000, 0.125000, 0.359375, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.093750, 0.312500, 0.000000, 0.000000, 0.250000, 0.000000, + 0.359375, -0.015625, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.312500, 0.000000, 0.000000, + -0.125000, 0.156250, 0.000000, -0.781250, 0.000000, 0.000000, -0.093750, 0.156250, -0.328125, 0.078125, + 0.125000, 0.140625, 0.000000, 0.109375, -0.187500, 0.171875, 0.140625, -0.265625, -0.234375, 0.000000, + 0.000000, 0.000000, 0.000000, -0.093750, 0.000000, 0.000000, 0.171875, 0.000000, 0.078125, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.218750, -0.171875, 0.000000, -0.187500, + -0.234375, 0.000000, 0.140625, 0.156250, 0.000000, 0.484375, 0.406250, -0.234375, 0.343750, -0.812500, + 0.000000, 0.000000, 0.000000, -1.265625, 0.000000, 0.000000, 0.000000, -0.421875, 0.000000, 0.000000, + 0.000000, -0.265625, 0.000000, 0.000000, 0.000000, 0.281250, 0.000000, 0.000000, -0.843750, 0.000000}; #endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w20.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w20.h new file mode 100644 index 0000000000000..25d75a1880f14 --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w20.h @@ -0,0 +1,12 @@ +//Numpy array shape [10, 1] +//Min -0.931640625000 +//Max 1.476562500000 +//Number of zeros 6 + +#ifndef W20_H_ +#define W20_H_ + +weight20_t w20[10] = { + 0.000000, 0.000000, 0.000000, 1.185547, 0.000000, 1.476562, -0.931641, 0.769531, 0.000000, 0.000000}; + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w3.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w3.h deleted file mode 100644 index b67cf178a716e..0000000000000 --- a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w3.h +++ /dev/null @@ -1,23 +0,0 @@ -//Numpy array shape [10, 10] -//Min -1.255380868912 -//Max 1.165371656418 -//Number of zeros 0 - -#ifndef W3_H_ -#define W3_H_ - -weight_default_t w3[100] = { - -0.24639761, 0.36854371, -0.20667994, 0.63942766, -0.48512432, -0.20601453, 0.95860600, -0.76670301, -0.62915105, - -0.16087309, -0.71208179, -0.22137630, -0.61618358, -0.28030652, -0.16592601, 0.01428368, -0.02218036, 0.18670039, - -0.05923353, 0.38925353, -0.03025977, 0.18113941, 0.04013579, -0.24923514, 0.04662795, -0.21779495, -0.11618838, - 0.27686477, -0.12692934, -0.14645813, 0.13050388, -0.61944312, -0.97363800, 0.34909710, -0.49283633, 0.35699531, - -0.21654762, 0.29707199, -0.37069076, -0.45038351, 0.23440604, -0.01497080, -0.43628553, 0.47897390, -0.57205141, - 0.28325596, 0.45101821, 0.30717590, -0.82709831, -1.01788270, 0.11227678, 0.40207320, -0.01430387, 0.33558398, - 0.14979517, 0.40087056, 0.56262153, -0.08988120, -0.39212254, 0.19313116, 0.18044059, -0.09485760, 0.07735054, - -1.25538087, -0.37033975, 0.96087897, -0.62376523, 0.97630143, 0.54678482, 1.16537166, -0.38099980, 0.25253880, - -0.48733908, 0.30896747, 0.00154836, -1.06780457, -0.38455144, 0.22028424, 0.40647805, -0.58109504, -0.29596746, - -0.19207183, -0.55882788, 0.12817945, -0.23813887, 0.05867399, 0.29090765, 0.50279891, 0.23116076, 0.11913682, - -0.03850375, -0.61140555, 0.42096528, -0.28724584, 0.06309307, -0.41296995, -0.22518104, 0.10956753, 0.17092451, - 0.46520787}; - -#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w4.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w4.h deleted file mode 100644 index d2b8c3be33f48..0000000000000 --- a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w4.h +++ /dev/null @@ -1,20 +0,0 @@ -//Numpy array shape [10, 1] -//Min -0.562117636204 -//Max 0.764084100723 -//Number of zeros 0 - -#ifndef W4_H_ -#define W4_H_ - -weight_default_t w4[10] = {0.41375983, - -0.10875144, - 0.31972024, - -0.56211764, - 0.16606922, - 0.33737957, - -0.11298771, - 0.61149263, - 0.09088434, - 0.76408410}; - -#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w5.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w5.h new file mode 100644 index 0000000000000..f001160129b86 --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w5.h @@ -0,0 +1,74 @@ +//Numpy array shape [25, 25] +//Min -1.203125000000 +//Max 1.078125000000 +//Number of zeros 375 + +#ifndef W5_H_ +#define W5_H_ + +weight5_t w5[625] = { + -0.578125, 0.515625, 0.000000, -0.796875, 0.359375, -0.562500, 0.000000, 0.000000, 0.359375, 0.000000, + 0.390625, 0.000000, 0.000000, -0.281250, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, -0.484375, -0.718750, 0.000000, 0.000000, 0.000000, -0.578125, 0.000000, 0.000000, + 0.000000, 0.343750, 0.000000, 0.421875, 0.000000, 0.218750, 0.000000, 0.000000, -0.281250, 0.000000, + 0.218750, 0.000000, 0.000000, 0.000000, 0.000000, -0.625000, 0.250000, -0.375000, 0.000000, 0.000000, + 0.000000, 0.000000, -1.062500, 0.000000, 0.515625, 0.000000, -0.203125, -0.546875, 0.828125, 0.734375, + 0.000000, 0.500000, 0.000000, 0.000000, -1.203125, 0.000000, -1.062500, 0.375000, 0.000000, 0.000000, + 0.000000, 0.000000, -0.375000, 0.703125, 0.000000, 0.000000, 0.000000, 0.000000, 0.390625, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.375000, 0.000000, 0.000000, -0.250000, 0.265625, + -0.312500, 0.000000, 0.171875, 0.312500, 0.000000, 0.000000, 0.250000, 0.000000, 0.000000, 0.203125, + 0.000000, 0.000000, -0.328125, 0.546875, 0.000000, 0.000000, 0.000000, 0.000000, -0.343750, 0.000000, + 0.000000, 0.000000, 0.000000, -0.218750, 0.281250, -0.296875, 0.000000, -0.187500, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, -0.468750, 0.000000, 0.328125, 0.000000, -0.234375, 0.000000, + 0.421875, 0.000000, 0.000000, 0.312500, 0.000000, 0.000000, 0.000000, 0.140625, 0.000000, 0.000000, + 0.296875, -0.390625, 0.000000, 0.000000, 0.000000, -0.593750, 0.421875, 0.250000, 0.000000, -0.234375, + 0.000000, 0.078125, 0.000000, 0.328125, 0.000000, 0.000000, -0.187500, -0.156250, 0.000000, -0.281250, + 0.000000, 0.000000, 0.359375, 0.000000, 0.218750, -0.281250, 0.000000, -0.171875, 0.218750, 0.000000, + 0.000000, 0.000000, 0.000000, 0.312500, 0.000000, 0.000000, 0.406250, 0.000000, 0.000000, 0.000000, + 0.312500, -0.468750, 0.000000, 0.000000, 0.421875, 0.000000, 0.000000, 0.000000, 0.000000, -0.281250, + -0.218750, -0.484375, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.156250, 0.328125, + 0.421875, 0.000000, 0.218750, 0.640625, 0.000000, 0.187500, 0.000000, 0.000000, -0.234375, -0.531250, + 0.671875, 0.000000, -0.250000, 0.000000, 0.000000, -0.375000, 0.000000, 0.390625, -0.203125, 0.000000, + 0.000000, -0.375000, 0.390625, -0.468750, -0.421875, -0.015625, 0.437500, 0.000000, -0.531250, -0.781250, + 0.500000, 0.000000, 0.671875, 0.421875, 0.000000, 0.000000, -0.359375, 0.000000, 0.000000, 0.359375, + 0.000000, -0.156250, 0.000000, 0.000000, 0.218750, -0.328125, 0.000000, 0.000000, 0.000000, 0.000000, + -0.281250, 0.093750, -0.328125, 0.000000, 0.312500, 0.000000, -0.171875, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.343750, -0.234375, 0.125000, -0.250000, + 0.000000, 0.000000, 0.421875, 0.437500, -0.343750, 0.375000, 0.000000, -0.390625, 0.000000, 0.281250, + 0.000000, 0.203125, 0.000000, 0.000000, 0.000000, 0.000000, -0.234375, -0.312500, -0.312500, 0.000000, + 0.000000, -0.250000, 0.234375, 0.000000, 0.000000, 0.000000, 0.000000, -0.187500, 0.000000, 0.000000, + 0.000000, 0.000000, 0.281250, 0.000000, 0.000000, -0.359375, 0.453125, 0.000000, 0.000000, -0.093750, + -0.406250, 0.250000, 0.000000, -0.281250, 0.000000, 0.000000, -0.250000, -0.250000, 0.000000, -0.234375, + -0.125000, -0.171875, 0.468750, -0.484375, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.375000, 0.000000, 0.000000, 0.140625, + -0.156250, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.187500, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.218750, 0.000000, 0.000000, 0.000000, + -0.125000, 0.390625, 0.000000, -0.328125, 1.078125, 0.234375, 0.312500, 0.000000, 0.000000, 0.000000, + 0.781250, -0.218750, 0.000000, 0.312500, 0.000000, 0.000000, 0.000000, -0.500000, -0.906250, -0.687500, + 0.000000, 0.500000, 0.437500, 0.000000, 0.000000, 0.000000, -0.265625, 0.078125, 0.000000, 0.000000, + 0.000000, -0.500000, 0.265625, 0.000000, 0.000000, 0.000000, -0.562500, 0.000000, 0.656250, 0.000000, + 0.468750, 0.000000, 0.000000, 0.000000, 0.140625, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, -0.562500, 0.000000, 0.000000, -0.343750, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.671875, -0.328125, 0.468750, 0.000000, 0.468750, 0.000000, + 0.062500, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.203125, 0.109375, 0.000000, 0.000000, + -0.328125, 0.000000, 0.218750, 0.000000, 0.000000, -0.328125, -0.187500, 0.000000, 0.203125, 0.296875, + -0.671875, 0.031250, -0.546875, -0.234375, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.812500, + 0.000000, 0.250000, 0.000000, 0.265625, -0.468750, 0.234375, 0.000000, 0.281250, 0.000000, 0.000000, + -0.828125, -0.671875, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.031250, + -0.203125, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.421875, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.656250, 0.000000, 0.453125, 0.343750, 0.343750, 0.000000, 0.000000, + 0.000000, 0.265625, 0.218750, 0.000000, -0.546875, 0.000000, 0.000000, -0.296875, 0.296875, 0.000000, + 0.000000, 0.000000, 0.281250, -0.234375, 0.234375, 0.203125, 0.000000, 0.000000, 0.000000, 0.359375, + 0.000000, -1.078125, 0.000000, 0.000000, 0.000000, -0.187500, 0.437500, 0.000000, 0.000000, -0.500000, + 0.484375, 0.000000, 0.000000, 0.281250, 0.000000, 0.359375, 0.000000, 0.000000, -0.187500, 0.000000, + 0.000000, 0.000000, 0.000000, -0.437500, 0.203125, 0.203125, 0.000000, -0.328125, 0.000000, 0.000000, + -0.250000, 0.000000, 0.000000, 0.000000, 0.390625, 0.000000, 0.328125, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.125000, 0.000000, -0.265625, 0.171875, 0.000000, 0.000000, 0.000000, 0.000000, + -0.421875, 0.359375, 0.000000, -0.390625, -0.093750, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, -0.156250, 0.000000, 0.296875, 0.187500, 0.406250, 0.000000, 0.000000, 0.281250, 0.000000, + 0.000000, -0.046875, 0.000000, 0.000000, 0.000000, -0.265625, -0.250000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.375000, 0.000000, -0.375000, 0.000000, 0.000000, 0.000000, 0.000000, -0.968750, + -0.640625, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.500000, 0.000000, 0.000000, 0.515625, + 0.531250, 0.000000, 0.000000, 0.000000, 0.000000}; + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w8.h b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w8.h new file mode 100644 index 0000000000000..30533952a7b8f --- /dev/null +++ b/L1Trigger/Phase2L1ParticleFlow/interface/taus/weights/w8.h @@ -0,0 +1,49 @@ +//Numpy array shape [25, 15] +//Min -0.859375000000 +//Max 0.750000000000 +//Number of zeros 225 + +#ifndef W8_H_ +#define W8_H_ + +weight8_t w8[375] = { + 0.000000, -0.250000, 0.000000, 0.000000, 0.000000, 0.000000, 0.562500, -0.187500, 0.312500, 0.234375, + 0.234375, 0.140625, -0.203125, 0.000000, 0.000000, -0.218750, -0.281250, 0.000000, 0.000000, 0.000000, + 0.187500, 0.296875, 0.000000, -0.296875, 0.000000, -0.203125, 0.328125, -0.390625, 0.000000, 0.000000, + 0.593750, -0.234375, 0.000000, 0.000000, -0.375000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.265625, 0.000000, 0.000000, 0.000000, 0.000000, -0.343750, 0.000000, 0.000000, 0.062500, + 0.000000, 0.000000, 0.000000, 0.312500, 0.000000, 0.000000, 0.406250, -0.265625, -0.421875, 0.000000, + 0.171875, 0.000000, 0.000000, 0.000000, 0.000000, -0.328125, 0.000000, 0.000000, -0.468750, 0.000000, + 0.000000, 0.000000, 0.000000, 0.562500, 0.453125, 0.453125, 0.000000, 0.000000, 0.421875, -0.437500, + -0.296875, -0.250000, -0.359375, 0.000000, -0.234375, -0.625000, 0.000000, -0.328125, 0.000000, -0.359375, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.343750, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, -0.859375, 0.000000, 0.000000, 0.671875, 0.000000, 0.000000, 0.203125, + 0.218750, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.468750, -0.234375, 0.296875, 0.000000, + -0.640625, 0.359375, 0.000000, 0.000000, 0.000000, 0.000000, -0.343750, 0.203125, -0.312500, -0.234375, + 0.000000, 0.250000, 0.187500, 0.000000, 0.000000, 0.000000, 0.000000, 0.531250, 0.000000, 0.000000, + -0.250000, 0.000000, 0.000000, -0.187500, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.468750, -0.218750, 0.375000, 0.000000, -0.265625, 0.000000, -0.218750, -0.296875, 0.265625, + -0.562500, 0.281250, 0.000000, 0.390625, 0.437500, 0.000000, 0.000000, 0.218750, 0.625000, 0.000000, + 0.000000, 0.218750, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.203125, 0.000000, 0.750000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.187500, -0.234375, + 0.265625, 0.171875, -0.328125, 0.328125, 0.000000, 0.250000, 0.000000, 0.000000, -0.218750, 0.000000, + 0.000000, -0.281250, 0.000000, -0.312500, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.500000, 0.125000, 0.000000, 0.265625, 0.312500, 0.203125, 0.562500, 0.000000, -0.234375, 0.187500, + 0.000000, 0.000000, 0.203125, 0.000000, 0.000000, -0.156250, 0.515625, 0.000000, 0.000000, 0.000000, + -0.187500, 0.000000, 0.000000, -0.296875, 0.000000, -0.093750, -0.296875, 0.000000, 0.484375, 0.000000, + 0.453125, 0.000000, -0.203125, 0.000000, 0.000000, -0.406250, 0.000000, -0.187500, 0.250000, -0.343750, + 0.000000, 0.000000, 0.000000, -0.343750, 0.000000, 0.000000, 0.000000, 0.000000, 0.578125, 0.000000, + 0.000000, 0.000000, 0.000000, 0.250000, 0.000000, 0.000000, 0.171875, 0.218750, 0.000000, 0.000000, + 0.000000, -0.281250, 0.000000, 0.468750, -0.375000, 0.000000, 0.000000, 0.000000, 0.000000, -0.343750, + 0.000000, 0.453125, 0.000000, 0.000000, 0.000000, 0.281250, 0.609375, 0.000000, 0.000000, 0.000000, + -0.218750, 0.000000, -0.406250, 0.000000, -0.328125, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, -0.734375, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.250000, 0.000000, + 0.000000, 0.000000, -0.328125, 0.000000, 0.640625, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, -0.593750, -0.375000, 0.000000, 0.312500, 0.312500, 0.000000, 0.562500, + 0.000000, 0.000000, -0.593750, 0.000000, 0.281250, 0.218750, 0.359375, 0.000000, 0.000000, -0.296875, + 0.000000, 0.000000, -0.296875, -0.250000, 0.000000, -0.500000, 0.000000, 0.000000, 0.593750, 0.000000, + 0.000000, 0.000000, 0.000000, -0.328125, -0.343750, 0.531250, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, -0.234375, 0.000000, 0.000000, 0.000000, 0.000000, -0.421875, -0.250000, + 0.000000, 0.000000, -0.375000, -0.437500, -0.437500}; + +#endif diff --git a/L1Trigger/Phase2L1ParticleFlow/plugins/L1NNTauProducer.cc b/L1Trigger/Phase2L1ParticleFlow/plugins/L1NNTauProducer.cc index 68baad7517a74..9359f761dce2f 100644 --- a/L1Trigger/Phase2L1ParticleFlow/plugins/L1NNTauProducer.cc +++ b/L1Trigger/Phase2L1ParticleFlow/plugins/L1NNTauProducer.cc @@ -29,8 +29,9 @@ class L1NNTauProducer : public edm::stream::EDProducer fTauNNId_; - std::unique_ptr fTauNNIdHW_; + std::unique_ptr fTauNNIdHW_; // Default void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override; void process_SW(const l1t::PFCandidateCollection& parts, std::unique_ptr& iTaus); @@ -212,6 +213,7 @@ void L1NNTauProducer::makeTau_HW(const l1t::PFCandidate& seed, L1TauEmu::z0_t z0 = 0; L1TauEmu::dxy_t dxy = 0; + // Reconstruct the Tau Cone for (unsigned i0 = 0; i0 < parts.size(); i0++) { if (L1TauEmu::inCone(seed, (parts[i0]), rCone2)) { if (parts[i0].id() == l1t::PFCandidate::Electron || parts[i0].id() == l1t::PFCandidate::ChargedHadron || @@ -246,17 +248,19 @@ void L1NNTauProducer::makeTau_HW(const l1t::PFCandidate& seed, if (pt < fSeedPt_) return; - result_t NN = fTauNNIdHW_->compute(seed, parts); - input_t* lNNVector = fTauNNIdHW_->NNVectorVar(); + // Tau NN Inference + Tau_NN_Result NN_ouput = fTauNNIdHW_->compute(seed, parts); + // Needed for making PFTau + input_t* lNNVector = fTauNNIdHW_->NNVectorVar(); float pNNVec[80]; for (unsigned i0 = 0; i0 < 80; i0++) pNNVec[i0] = float(lNNVector[i0]); //Firmware Tau l1ct::Tau l1ctTau; - l1ctTau.hwPt = l1ct::pt_t(pt); //l1gt is <16,11> and currently <16,14> - l1ctTau.hwEta = l1ct::Scales::makeGlbEta(seed.eta()); // seed.eta() and seed.phi() are in physical coordinates + l1ctTau.hwPt = l1ct::pt_t(pt * NN_ouput.nn_pt_correction); //l1gt is <16,11> and currently <16,14> + l1ctTau.hwEta = l1ct::Scales::makeGlbEta(seed.eta()); // seed.eta() and seed.phi() are in physical coordinates l1ctTau.hwPhi = l1ct::Scales::makeGlbPhi(seed.phi()); l1ctTau.hwSeedPt = seed.pt(); @@ -264,7 +268,7 @@ void L1NNTauProducer::makeTau_HW(const l1t::PFCandidate& seed, l1ctTau.hwCharge = seed.charge(); l1ctTau.hwType = l1ct::Tau::type_t(lId); - l1ctTau.hwRawId = ap_uint<10>(NN * 1024); //NN Output is ap_fixed<16, 8> so need to cast. + l1ctTau.hwRawId = ap_uint<10>(NN_ouput.nn_id * 1024); //NN Output is ap_fixed<16, 6> so need to cast. //Convert to GT format and pack to encodedTau of PFTau l1gt::Tau l1gtTau = l1ctTau.toGT(); @@ -277,7 +281,7 @@ void L1NNTauProducer::makeTau_HW(const l1t::PFCandidate& seed, l1gt::Scales::floatPhi(l1gtTau.v3.phi), float(mass)); - l1t::PFTau l1PFTau(tempP4, pNNVec, NN, 0, lId); + l1t::PFTau l1PFTau(tempP4, pNNVec, NN_ouput.nn_id, 0, lId); l1PFTau.setZ0(float(z0) * 0.05); //L1TauEmu::z0_base); l1PFTau.setDxy(float(dxy) * 0.05); //L1TauEmu::dxy_base); diff --git a/L1Trigger/Phase2L1ParticleFlow/src/taus/TauNNIdHW.cc b/L1Trigger/Phase2L1ParticleFlow/src/taus/TauNNIdHW.cc index 4f87a9a56b760..f4e996f6a665e 100644 --- a/L1Trigger/Phase2L1ParticleFlow/src/taus/TauNNIdHW.cc +++ b/L1Trigger/Phase2L1ParticleFlow/src/taus/TauNNIdHW.cc @@ -12,6 +12,8 @@ void TauNNIdHW::initialize(const std::string &iInput, int iNParticles) { fId_ = std::make_unique(fNParticles_); fInput_ = iInput; } + +//Prepare the inputs for the Tau NN void TauNNIdHW::SetNNVectorVar() { NNvectorVar_.clear(); for (unsigned i0 = 0; i0 < fNParticles_; i0++) { @@ -35,35 +37,62 @@ void TauNNIdHW::SetNNVectorVar() { } } -result_t TauNNIdHW::EvaluateNN() { - input_t data[N_INPUTS]; +// Main architecture of the NN here +Tau_NN_Result TauNNIdHW::EvaluateNN() { + input_t model_input[N_INPUT_1_1]; for (unsigned int i = 0; i < NNvectorVar_.size(); i++) { - data[i] = input_t(NNvectorVar_[i]); + model_input[i] = input_t(NNvectorVar_[i]); } - layer1_t layer1_out[N_LAYER_1]; - layer1_t logits1[N_LAYER_1]; - nnet::compute_layer(data, logits1, w1, b1); - nnet::relu(logits1, layer1_out); - layer2_t layer2_out[N_LAYER_2]; - layer2_t logits2[N_LAYER_2]; - nnet::compute_layer(layer1_out, logits2, w2, b2); - nnet::relu(logits2, layer2_out); + nnet::dense(model_input, layer2_out, w2, b2); // Dense_1 + + layer4_t layer4_out[N_LAYER_2]; + nnet::relu(layer2_out, layer4_out); // relu_1 + + layer5_t layer5_out[N_LAYER_5]; + nnet::dense(layer4_out, layer5_out, w5, b5); // Dense_2 + + layer7_t layer7_out[N_LAYER_5]; + nnet::relu(layer5_out, layer7_out); // relu_2 + + layer8_t layer8_out[N_LAYER_8]; + nnet::dense(layer7_out, layer8_out, w8, b8); // Dense_3 + + layer10_t layer10_out[N_LAYER_8]; + nnet::relu(layer8_out, layer10_out); // relu_3 + + layer11_t layer11_out[N_LAYER_11]; + nnet::dense(layer10_out, layer11_out, w11, b11); // Dense_4 + + layer13_t layer13_out[N_LAYER_11]; + nnet::relu(layer11_out, layer13_out); // relu_4 + + layer14_t layer14_out[N_LAYER_14]; + nnet::dense(layer13_out, layer14_out, w14, b14); // Dense_5 + + layer16_t layer16_out[N_LAYER_14]; + nnet::relu(layer14_out, layer16_out); // relu_5 - layer3_t layer3_out[N_LAYER_3]; - layer3_t logits3[N_LAYER_3]; - nnet::compute_layer(layer2_out, logits3, w3, b3); - nnet::relu(logits3, layer3_out); + layer17_t layer17_out[N_LAYER_17]; + nnet::dense(layer16_out, layer17_out, w17, b17); // Dense_6 - result_t logits4[N_OUTPUTS]; - nnet::compute_layer(layer3_out, logits4, w4, b4); - result_t res[N_OUTPUTS]; - nnet::sigmoid(logits4, res); + result_t layer19_out[N_LAYER_17]; + nnet::sigmoid(layer17_out, layer19_out); // jetID_output - return res[0]; + result_t layer20_out[N_LAYER_20]; + nnet::dense(layer16_out, layer20_out, w20, b20); // pT_output + + // Return both pT correction and the NN ID + Tau_NN_Result nn_out; + nn_out.nn_pt_correction = layer20_out[0]; + nn_out.nn_id = layer19_out[0]; + + return nn_out; } + /* +// Uncomment for debugging purposes void TauNNIdHW::print() { for (unsigned i0 = 0; i0 < fNParticles_; i0++) { input_t pPt = input_t(fPt_.get()[i0]); @@ -78,30 +107,43 @@ void TauNNIdHW::print() { fprintf(file_, "\n"); } */ -result_t TauNNIdHW::compute(const l1t::PFCandidate &iSeed, std::vector &iParts) { + +Tau_NN_Result TauNNIdHW::compute(const l1t::PFCandidate &iSeed, std::vector &iParts) { + // Initialize the input vector for (unsigned i0 = 0; i0 < fNParticles_; i0++) { fPt_.get()[i0] = 0.; fEta_.get()[i0] = 0.; fPhi_.get()[i0] = 0.; fId_.get()[i0] = 0.; } + + // Sort the candidates by pT std::sort(iParts.begin(), iParts.end(), [](l1t::PFCandidate i, l1t::PFCandidate j) { return (pt_t(i.pt()) > pt_t(j.pt())); }); + + // Compute the values w.r.t to the seeds for (unsigned int i0 = 0; i0 < iParts.size(); i0++) { if (i0 >= fNParticles_) break; + fPt_.get()[i0] = pt_t(iParts[i0].pt()); fEta_.get()[i0] = etaphi_t(iSeed.eta() - iParts[i0].eta()); etaphi_t lDPhi = etaphi_t(iSeed.phi()) - etaphi_t(iParts[i0].phi()); etaphi_t lMPI = 3.1415; + if (lDPhi > lMPI) lDPhi = lDPhi - lMPI; if (lDPhi < -lMPI) lDPhi = lDPhi + lMPI; + fPhi_.get()[i0] = lDPhi; fId_.get()[i0] = id_t(iParts[i0].id()); } + + // Set the inputs SetNNVectorVar(); + + // Return the N outputs with the inputs return EvaluateNN(); }