|
[Rivet] Cut and sorter args now available in jet retrievalAndy Buckley andy.buckley at cern.chThu Nov 20 14:28:26 GMT 2014
Hi all, I just pushed a few updates to the Rivet trunk which add use of optional cut objects and sorter functions when retrieving jets. For example you can now do: applyProjection<JetAlg>("Jets").jetsByPt(Cuts::pT > 20*GeV & Cuts::abseta < 2.5); [@DavidG: Actually, g++ helpfully warns to put extra parentheses around each cut expression, I guess because bitwise logical operators are less commonly used with <,<=,etc. than && and ||, and also because they have slightly tighter operator precedence than the non-bitwise versions. I've added the parentheses to all affected analyses to keep the compilation quiet, but it's a bit annoying: is there anything we can do about that, and what's the reason that we can't use the "full" || and && operators with Cut?] I've migrated 8 or so analyses which were using jetsByPt or jetsByEt with lots-of-doubles arguments to implement these cuts, and removed those old methods. I've kept the jetsByPt(ptmin=0) and Cut-arg versions of the other jetsByX methods, as with particlesByX, at least for now. Hopefully these analysis tweaks won't create any significant conflicts with the multiweight stuff happening on a branch repo -- I tried to avoid touching code that used event.weight(). Cheers, 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 |