Combine processes in stage2

Dear Experts,

I’m performing a large background study regarding LLPs with the winter2023 production, and I’m wondering if there’s a nice way to combine backgrounds in stage2 such that:

  • The output histogram is a combination of all backgrounds
  • The event yield table gives a row which is a combination of all backgrounds

Is this something which is supported?

Best,
Axel

Hi @axgallen,

The histogram can be made out of “vector” column.
It should be possible to create combination column similarly to this:

Combination function (declared at the top of the analysis script):

ROOT.gInterpreter.Declare("""
ROOT::VecOps::RVec<double> combine(double a1, double a2, double a3) {
  ROOT::VecOps::RVec<double> result;
  result.push_back(a1);
  result.push_back(a2);
  result.push_back(a3);

  return result;
}
""")

Creating combined column:

.Define("pt_all", "combine(pt1, pt2, pt3)")

Best,
Juraj