HEP-FCC / heppy

[deprecated] A python analysis framework for high energy physics
Other
11 stars 32 forks source link

analyzer.Matcher returns the dr in theta-phi instead of eta-phi in hadron-hadron colliders #52

Closed simonecid closed 7 years ago

simonecid commented 7 years ago

The matcher module calls the function "matchObjectCollection" [1] to perform the match between two objects in the eta-phi space (in hh colliders) or theta-phi space (in ee colliders). This is heavily dependent on the behaviour of the deltaR2 [2] function. deltaR2 can either receive two particles or directly their eta-phi (theta-phi) values. When two particles are passed, the function checks what kind of collider is being used and automatically calls eta() (hh) or theta() (ee) based on that. This leads to an inconsistency with what later happens in the Matcher module, in [3] deltaR is called by explicitly passing theta and phi, which is correct for ee colliders, but not for hh colliders, thus returning the value in the wrong space, even though the match is performed in right variables. This can be easily solved by directly passing the particles instead of their properties and then leaving the decision to the deltaR2 function.

[1] : https://github.com/HEP-FCC/heppy/blob/master/analyzers/Matcher.py#L105 [2] : https://github.com/HEP-FCC/heppy/blob/master/utils/deltar.py#L11 [3] : https://github.com/HEP-FCC/heppy/blob/master/analyzers/Matcher.py#L117

cbernet commented 7 years ago

Thanks again, I merged your fix so I'm closing