8 jet_sign->resize(
et_.size());
16 if (
et_.size() > (
unsigned int) std::numeric_limits<unsigned int>::digits)
21 const double sum_et = std::accumulate(
et_.begin(),
et_.end(), 0. );
22 const double sum_px = std::accumulate(
px_.begin(),
px_.end(), 0. );
23 const double sum_py = std::accumulate(
py_.begin(),
py_.end(), 0. );
26 double min_delta_sum_et = sum_et;
28 for (
unsigned int i = 0;
i < (1U << (
et_.size() - 1));
i++) {
29 double delta_sum_et = 0.;
30 for (
unsigned int j = 0;
j <
et_.size(); ++
j) {
32 delta_sum_et -=
et_[
j];
34 delta_sum_et +=
et_[
j];
36 delta_sum_et =
std::abs(delta_sum_et);
37 if (delta_sum_et < min_delta_sum_et) {
38 min_delta_sum_et = delta_sum_et;
40 for (
unsigned int j = 0;
j <
et_.size(); ++
j)
41 (*jet_sign)[
j] = ((
i & (1U <<
j)) == 0);
47 return (0.5 * (sum_et - min_delta_sum_et) /
sqrt( sum_et*sum_et - (sum_px*sum_px+sum_py*sum_py) ));
std::vector< double > px_
std::vector< double > py_
double value_(std::vector< bool > *jet_sign) const
std::vector< double > et_
const T & max(const T &a, const T &b)
Abs< T >::type abs(const T &t)