24 using namespace PhysicsTools;
33 ~ProcMultiply()
override {}
35 void configure(ConfIterator iter,
unsigned int n)
override;
36 void eval(ValueIterator iter,
unsigned int n)
const override;
37 std::vector<double> deriv(ValueIterator iter,
unsigned int n)
const override;
40 typedef std::vector<unsigned int>
Config;
43 std::vector<Config>
out;
53 void ProcMultiply::configure(ConfIterator iter,
unsigned int n) {
57 for (
unsigned int i = 0;
i <
in;
i++)
58 iter++(Variable::FLAG_NONE);
60 for (
unsigned int i = 0;
i <
out.size();
i++)
61 iter << Variable::FLAG_NONE;
64 void ProcMultiply::eval(ValueIterator iter,
unsigned int n)
const {
65 double *
values = (
double *)alloca(in *
sizeof(
double));
66 for (
double *pos = values; iter; iter++, pos++) {
68 throw cms::Exception(
"ProcMultiply") <<
"Special input variable encountered "
70 << (pos -
values) <<
"." << std::endl;
77 product *= values[*
var];
83 std::vector<double> ProcMultiply::deriv(ValueIterator iter,
unsigned int n)
const {
84 std::vector<double>
values;
85 std::vector<unsigned int>
offsets;
86 unsigned int size = 0;
88 offsets.push_back(size);
90 values.push_back(*iter++);
96 for (
unsigned int i = 0;
i <
config->size();
i++) {
98 for (
unsigned int j = 0;
j <
config->size();
j++)
100 product *= values[(*config)[
j]];
102 result[k * size + offsets[
i]] = product;
list var
if using global norm cols_to_minmax = ['t_delta', 't_hmaxNearP','t_emaxNearP', 't_hAnnular', 't_eAnnular','t_pt','t_nVtx','t_ieta','t_eHcal10', 't_eHcal30','t_rhoh','t_eHcal'] df[cols_to_minmax] = df[cols_to_minmax].apply(lambda x: (x - x.min()) / (x.max() - x.min()) if (x.max() - x.min() > 0) else 1.0/200.0)
tuple config
parse the configuration file
tuple size
Write out results.