[Rivet] Cuts rewrite syntax feedback

Andy Buckley andy.buckley at cern.ch
Tue Nov 26 15:52:58 GMT 2013


Hi David, all,

Apologies for another late catch-up from me...

First, an off-topic thing, since we'll probably discuss this in
Copenhagen... James, did you find out any info about that hotel near NBI
with a reduced rate?

Now replying to David:

On 12/11/13 13:47, David Grellscheid wrote:
>> It's good, but a bit more verbose than I had had in mind.
> 
> Yes, that's been my worry, too. One thing would be to avoid the Cuts
> namespace by importing the symbols on an analysis-by-analysis basis?
> 
>> Would it be possible to make cosmetic wrapper functions for the most
>> common ones, e.g. EtaIn(-2,2) & PtGtr(5*GeV)
> 
> No problem, but which ones? The two you listed are by far the most
> common, but now we've got exactly the "Gtr-Less" crud we wanted to avoid
> in the design in the first place.

Heh, I never minded it... that's what my design looked like ;-) Yes,
it's crud, but in a header that no-one looks at and with a fully
predictable naming scheme I don't think it's so bad.

> There is a need for an is-in-range expression, but the other one can
> just as well be (pT > 5*GeV) assuming we import the Cuts namespace.

True. But now I worry about clashes since analysis code is rammed full
of variables called "pT", "pt", "eta", etc. :-/

> Do we need other shortcuts, too?
> 
>> Just one cosmetic/consistency point: through the Rivet API we've got 
>> "pT" rather than "pt" for transverse momentum, so I think the
>> Cuts::pt should follow the same convention. Mea culpa for making it
>> that way in the first place, but since it's the convention we should
>> stick to it.
> 
> I'll fix it.

Actually, I think we might want to do some "big" overhauling of our
vectors system to make it more compatible with FastJet, and incorporate
some other lessons I've learned in the intervening (gosh) 6 or 7 or
whatever years. So we could make a Rivet API pT -> pt decision at the
same time.

Andy

-- 
Dr Andy Buckley, Royal Society University Research Fellow
Particle Physics Expt Group, University of Glasgow / PH Dept, CERN


More information about the Rivet mailing list