Skip to content

Remove MAP_* from Adapters.h, add cone variables

Tommaso Fulghesu requested to merge tfulghes-flattening-relation into master

NEEDS: DaVinci!721 (merged)

CONTENT:

  • Remove MAP_RANGE, MAP_INPUT and MAP_INPUT_ARRAY from Adapters.h, trying to express them using composition of functors.

  • Introduction of RELATION, TO and WEIGHT functors to extract the set of relations from a relation table, to get the To and the Weight side from a single relation respectively.

  • Add perfect forwarding for Arg functor.

Implementing few functors for isolation variables (from ConeVariables.cpp and ConeVariablesForEW.cpp)

  • MAXCONE: evaluates the maximum value of the result of the application of a functor to all the particles inside a cone around a specific head (i.e. related to a given reference particle)
  • MINCONE: same as before, but minimum value
  • NINCONE: evaluates the number of particles inside a cone around a specific head (i.e. related to a given reference particle)
  • ASYM: evaluates the asymmetry variable, defined as \frac{X(REF) - \sum_{REL \in CONE} X(REL)}{X(REF) + \sum_{REL \in CONE} X(REL)}

TODO:

  • Fix old tests for MapRelInputToFunArray and MapRelInputToFunOutput;
  • Implement tests for new track iso variables;
  • Consider the case when the relation table is empty and std::nullopt is returned by Relations functor -> !2977 (merged).

FYI: @graven, @chasse, @amathad, @poluekt, @mvesteri

Edited by Tommaso Fulghesu

Merge request reports

Loading