From 6a1ad509088ba43be0e911715859b96fe26d94ac Mon Sep 17 00:00:00 2001 From: Danilo Piparo Date: Thu, 21 Mar 2019 21:59:22 +0100 Subject: [PATCH] Available replacement with standard VecOps helpers --- helpers.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helpers.h b/helpers.h index 2882a3a..456bbe1 100644 --- a/helpers.h +++ b/helpers.h @@ -4,11 +4,13 @@ #include "Math/Vector4D.h" #include #include +// In VecOps: https://root.cern.ch/doc/master/namespaceROOT_1_1VecOps.html#afbb36f30def53183079a0b7c1e6fb2d1 template auto Argmax(const type & v){ return ROOT::VecOps::Reverse(ROOT::VecOps::Argsort(v))[0]; } +// In VecOps: https://root.cern.ch/doc/master/namespaceROOT_1_1VecOps.html#a014f2c5ed975748eef051cf7df955ba5 template auto Max(const type & v){ return v[ROOT::VecOps::Reverse(ROOT::VecOps::Argsort(v))[0]];