|
[Rivet] flip3() in FourVector and FourMomentumAndy Buckley andy.buckley at cern.chThu Oct 1 21:52:48 BST 2015
On 01/10/15 08:37, Leif Lönnblad wrote: > On 2015-10-01 00:27, Andy Buckley wrote: >> I've added a "flip3()" method to FourVector and FourMomentum, >> which does just that. > > Do you have any other use cases for this? If we can't find a > reasonable name that describes what it does, maybe it is an > indication that it is not really needed and that you should actually > do it explicitly in MissingMomentum. Sorry, that was probably not > very useful ;o) (Back on list...) Hi Leif, I'm not convinced -- I think the lack of name (modulo Ben's nice suggestion) says more about my limited lexicon than restricted usefulness of the physics concept! I think there is a usability case for certain 3-vector operations (the ones which don't introduce ambiguity or inconsistency about how the E term should be updated) are useful to have directly on the 4-vector classes. 3-rotations of 4-vectors are already possible via the (barely used) LorentzTransformation class, and I think the only other such natural operation is this reflection/parity/reversal. Without a helper method, the user has to manually fix up the components somehow, which is not exactly hard, but is also easy not to think about (as I demonstrated). And making simple things easy is definitely Rivet philosophy as I've tried to implement it. Alternative views welcome -- it looks like we'll have another day or so until the analysis integration is finished, so this can have the discussion that API changes deserve. Thanks, Andy -- Dr Andy Buckley, Lecturer / Royal Society University Research Fellow Particle Physics Expt Group, University of Glasgow
More information about the Rivet mailing list |