Skip to content

Move fast eta() from MatrixPlugin to MatrixBasePlugin. Rm seemingly unused slow from the later

We have https://gitlab.cern.ch/atlas/athena/-/blob/master/Event/EventPrimitives/EventPrimitives/EventPrimitives.h

#define EIGEN_MATRIXBASE_PLUGIN "EventPrimitives/AmgMatrixBasePlugin.h"
#define EIGEN_MATRIX_PLUGIN "EventPrimitives/AmgMatrixPlugin.h"

We had one eta() in the EIGEN_MATRIXBASE_PLUGIN and another eta() in the EIGEN_MATRIX_PLUGIN if ones looks in EventPrimtives we define everything as a Matrix .

If we run something like this diff (the gist of the test is included in this MR also but not the couts from the PLUGINS code ) [ATLAS-EGamma/athena@5acc5558] It seems that for any concrete Matrix expression which includes Vector3D we use the "later"/"fast" . Which makes some sense as this is what we have as EIGEN_MATRIX_PLUGIN.

So lets rm the slow that should be not really used. Put the fast in the Base and see if something changes. It should not except if we use eta for other types that are not vector3D/Eigen::<Matrix that happen to have the right size ..

This should also help simplify that discussion in !62164 (closed)

Btw the slow atan based method (or any method without protection) would fail the test for 0,0,0 and 0,0,1.

1: -0
1: -22757
1: +inf
1: +inf
1:  0.881374
1:  0.658479

Let me ping also here @jchapman , @dossantn , @ssnyder , @fwinkl , @akraszna .

Edited by Christos Anastopoulos

Merge request reports

Loading