[Rivet] Rivet usability

Andy Buckley andy.buckley at durham.ac.uk
Tue May 12 16:16:49 BST 2009


Hendrik Hoeth wrote:
> Hi,
> 
> People outside the Rivet developer circle are starting to use Rivet, and
> we should strive to make it a pleasant experience for them. But every
> time I write an analysis, I curse about having to use monsters like
> particle.momentum().pseudorapidity() and particle.momentum().azimuthalAngle()
> instead of eta() and phi(). Nobody outside our own little world will
> find this intuitive (quite frankly -- I don't either, and I have to look
> up the names each time).
> 
> Are there any objections against introducing eta(), phi(), and theta()
> in the same way we alread have pT() as synonym for polarRadius()?

I'm fine with that. I purposefully introduced the more explicit names to
make the code a bit more readable, but I think in those cases the
synonyms are justifiable. I can remember the names, but I also find the
length of them annoying. They should be added to the Vector3 class.

If you think there's a good enough case for it, you could also introduce
perp() as a synonym for polarRadius(), and hence pT(). perp2() would
also be needed. Personally, I prefer using pT() since almost all vectors
in analyses are momenta --- it's both shorter and more readable, IMO ---
but many people are used to perp() and it's certainly more pleasant for
length-type 4-vectors than polarRadius().

Andy

-- 
Dr Andy Buckley
Institute for Particle Physics Phenomenology
Durham University
0191 3343798 | 0191 3732613 | www.insectnation.org


More information about the Rivet mailing list