|
[Rivet] reading a YODA file in a Rivet RoutinePatrick L.S. Connor connorpa at mail.desy.deFri Oct 30 15:21:50 GMT 2015
Hi Andy, Thanks a lot for your answer. It could be indeed very nice if such a method as multiply() could exist, but I need some solution quite fast, so I can code some script on my own. What I want to do is to compute some kind of correction factor and apply it to some data: data = correction factor * measurement where the correction factor and the "measurement" are produced from different MC events. What I am thinking to do is to write a script that would extract and multiply the respective histograms from two .yoda files, and store the result in a third .yoda file. As you obviously know much better the framework, please tell me if you have any suggestion. Thanks again and cheers, Patrick On Wed, 28 Oct 2015, Andy Buckley wrote: > Hi Patrick, > > As it happens, we don't have multiply functions between histograms, because > until now nobody had a use-case for it: histogram divisions yes, > multiplications... not that I've seen. > > What exactly is it that you're doing? Note that histograms in YODA are > objects with fill history, not e.g. lookup tables of efficiencies or > similar... although a future version will contain such objects, too. > > We can add such methods to YODA quite easily, but just preferred not to fill > it up with "for completeness" functions that wouldn't be used. > > If we add these multiply methods, you would be able to call them on the YODA > objects loaded into Rivet... modulo the detail that the histogram handles > that you get in Rivet are smart pointers, and we provide dedicated divide() > functions to handle the registration and path setting on the resulting > Scatter2D. > > Andy > > > On 28/10/15 11:53, Patrick L.S. Connor wrote: >> Dear Rivet Programmers, >> >> I would like to multiply some YODA histograms from different Rivet >> routines, but I could not find any way. Would there be anything like >> this already implemented? >> >> I thought of two ideas: >> - either mutliply histograms from the YODA files just before running >> make-plots, >> - or load the YODA file from the routine A inside the routine B and >> apply the multiplication there, >> but unsuccessfully... >> >> Could you please help me? >> Thanks in advance. >> >> Regards, >> >> Patrick >> >> >> >> >> ---- >> Patrick L.S. Connor >> Doktorand - CMS Team >> Deutsches Elektronen-Synchrotron >> Tel.: +49 40 8998-2617 >> Geb.: 01b/O2.208 >> _______________________________________________ >> Rivet mailing list >> Rivet at projects.hepforge.org >> https://www.hepforge.org/lists/listinfo/rivet > > > -- > Dr Andy Buckley, Lecturer / Royal Society University Research Fellow > Particle Physics Expt Group, University of Glasgow > ---- Patrick L.S. Connor Doktorand - CMS Team Deutsches Elektronen-Synchrotron Tel.: +49 40 8998-2617 Geb.: 01b/O2.208
More information about the Rivet mailing list |