Skip to content

MELA computation classes

Ulascan Sarica edited this page Feb 18, 2017 · 3 revisions

MELA computation classes

The simplest computational unit is the MELAHypothesis class. It wraps around the Mela ME calls with different settings defined in the options of the pyFragments. Each MELAHypothesis is called as many times as needed, and unless the ME is a copy ME, each ME option in the pyFragment has its own hypothesis. MELAHypothesis objects contain two flags: isUpdated and hasMaximizationClients. hasMaximizationClients is true whenever the option specifies "Options:MaxNumerator=...;MaxDenominator=...". isUpdated is usually turned on at the end of each computation to avoid further evaluations of this ME in case !hasMaximizationClients, and it is reset externally by the MELAComputation class. When hasMaximizationClients, isUpdated is ignored.

MELAComputation comes after MELAHypothesis. It contains a list of other hypotheses that need to multiply, divide, add or subtract the main hypothesis it is supposed to compute. The precedence of these operations is the opposite of mathematical convention: addition>subtraction>multiplication>division. It also contains a list of the hypotheses that form the numerator and denominator of whichever quantity that needs to be maximized. MELAComputation stores maximizationCachedVal with initial value -1 to keep track of the maximization quantity, and the flag contUpdate with initial value of true to check if the hypothesis needs to be called at every call to the computation. The two calls that can be made to the computation are update() and forceUpdate(). update() checks for both flags contUpdate and a passing testMaximizationCache(), and then sets contUpdate to false. forceUpdate only checks for testMaximizationCache(). and does not touch contUpdate.