|
[Rivet] New projection method names without "projection"Andy Buckley andy.buckley at cern.chMon May 23 20:35:38 BST 2016
Hi, As some of you at the MCnet Computing School last week (which was excellent, by the way) know, I think we made a mistake when we used the word "projection" to name a concept in Rivet. We're too far down the rabbit-hole to completely reverse that now, but we can reduce the number of times that normal users have to encounter the word "projection". The main such methods are defined in ProjectionApplier. And the main two that users will actually encounter are addProjection and applyProjection. I think it could be nice to define aliases for at least these, and probably also for the templated getProjection methods. For addProjection, the "Projection" part of the name is redundant because the argument type is an object derived from Projection. But I don't think "add" is a very clear name anyway, so maybe something like register(myproj, "MyObs") would be better? We could have "add" as another alias to ease the transition from addProjection. For both applyProjection and getProjection (the templated methods only, I suggest), the "Projection" part is again redundant. So apply<MyProj>(evt, "MyObs") and get<MyProj>(evt, "MyObs") are a bit neater. But I am also tempted to try and ease that awkward templating syntax a little, to make the command read like English: applyAs<MyProj>(evt, "MyObs") and getAs<MyProj>(evt, "MyObs"). Thoughts? Opinions on all the above are more than welcome. I'm not fixed on any of the above proposals, but would like to get rid of the "projection" word from most people's Rivet experience, if possible! Whatever we decide on is trivial to implement, so it'll easily go into the 2.5.x series, with full backward compatibility. Cheers, Andy -- Dr Andy Buckley, Lecturer / Royal Society University Research Fellow Particle Physics Expt Group, University of Glasgow
More information about the Rivet mailing list |