|
[Rivet] how to handle multiple event weights with rivetMarco Zaro m.zaro at nikhef.nlFri Feb 2 10:03:32 GMT 2018
Hi Andy, all, thanks for your answer. I played a bit with rivet (I have v2.5.4), and I found something which may be too simple to be true, although it looks like it is working. I added a function to access the individual weights to the rivet code, in particular to the file src/Core/Event.cc (and of course its declaration to the header) double Event::weights(const int i=0) const { return (!_genevent.weights().empty()) ? _genevent.weights()[i] : 1.0; } Via this function, the various weights in the .hepmc file can be accessed. In the rivet analysis, the number of histograms to be declared is N_observables * N_weights, and one can use a (global) Histo1DPtr array to easily loop over them all. The only thing I missed, and that I had to hardcode, is the tag for each weight (e.g. scale variation, PDF variation, …), but it should not be too much complicated to have it working in a general way (I am quite a newbie with c++). In any case, if you think this can be a working solution, feel free to use it, and if you have comments or suggestions I would be very happy to hear. Bye, Marco On 01 Feb 2018, at 22:04, Andy Buckley <andy.buckley at cern.ch> wrote: > Hi Marco, > > It's a painfully long-standing project! The Rivet 3.0.0alpha pre-release will do it, but is a year old now. David & Chris, any chance we can get a beta out soon, closer to sync with the current mainstream release? > > Andy > > Dr Andy Buckley, Lecturer / Royal Society University Research Fellow > Particle Physics Experiment Group, University of Glasgow > On Jan 31 2018, at 9:24 am, Marco Zaro <m.zaro at nikhef.nl> wrote: > > Dear Rivet authors, > I have a question concerning the usage of rivet: is there any practical way to have the possibility to use the multiple event weights (e.g. for scale and PDF variations) within a rivet analysis? I currently have rivet 2.5.4 installed on my machine. > Thanks in advance. > > Best wishes, > > Marco Zaro > _______________________________________________ > Rivet mailing list > Rivet at projects.hepforge.org > https://www.hepforge.org/lists/listinfo/rivet -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://www.hepforge.org/lists-archive/rivet/attachments/20180202/cba5412f/attachment.html>
More information about the Rivet mailing list |