|
[Rivet] RIVET scriptsJanssen Xavier xavier.janssen at uantwerpen.beMon Mar 13 09:39:37 GMT 2017
Hi Chris, Propagating a YODA release take 1-3 weeks depending how our CMSSW release train is going and patching is not easy as well has the release is managed centrally. So I was waiting for next Rivet release to update as well YODA but are you planning to update yoda this time and is 1.6.5 cpmapatible with Rivet 2..5.2. In case I could already update start updating YODA … anyway I advised Genius to use his own modified version of the script last week and this worked ... Xavier. On 13 Mar 2017, at 09:18, Chris Pollard <chris.pollard at cern.ch<mailto:chris.pollard at cern.ch>> wrote: Thanks Xavier, So I guess the best solution for the first problem is to update yoda; if that's not (easily) possible then maybe you just have to patch the script locally until a yoda 1.6.6 is incorporated into CMSSW. As for the second issue, I strongly suggest writing a small python script for these sorts of jobs. This allows you to be precise about the format of the inputs, which yoda can only assume. Something along the lines of the python I pasted below below should work for your case if I understand it correctly. Obviously you should double check that the points and errors are really what they ought to be---I can only guess at the meaning of the values in your histogram. Chris from sys import argv import ROOT import yoda f = ROOT.TFile.Open(argv[1]) h = f.Get("h2") path = "/h2" title = "h2" s = yoda.Scatter2D(path, title) for iBin in range(1, h.GetNbinsX()+1): y = h.GetBinContent(iBin) yerr = h.GetBinError(iBin) x = h.GetBinCenter(iBin) xerr = h.GetBinWidth(iBin)/2 s.addPoint(x, y, xerr, yerr) yoda.write(s, "output.yoda") On Mon, Mar 13, 2017 at 7:56 AM, Janssen Xavier <xavier.janssen at uantwerpen.be<mailto:xavier.janssen at uantwerpen.be>> wrote: I checked the tarball for YODA 165 and the error is present in there. Indeed it is fixed in 166. Sent from Samsung Mobile -------- Original message -------- From: Genius Walia Date:13/03/2017 08:24 (GMT+01:00) To: Chris Pollard Cc: rivet at projects.hepforge.org<mailto:rivet at projects.hepforge.org> Subject: Re: [Rivet] RIVET scripts Hi Chris, Thanks for the reply. 1.) flat2yoda : I am facing this issue in CMSSW release 8_0_X, which I believe uses the latest RIVET version 2.5.2 and YODA version 1.6.5. 2.) root2yoda : Yes the entries are already divided by bin width in the input histogram. Regards, Genius ________________________________ From: Chris Pollard Sent: 13 March 2017 04:55 To: Genius Walia Cc: rivet at projects.hepforge.org<mailto:rivet at projects.hepforge.org> Subject: Re: [Rivet] RIVET scripts Hi Genius, 1.) flat2yoda : It gives following error : File "/cvmfs/cms.cern.ch/slc6_amd64_gcc530/cms/cmssw/CMSSW_8_1_0/external/slc6_amd64_gcc530/bin/flat2yoda<http://cms.cern.ch/slc6_amd64_gcc530/cms/cmssw/CMSSW_8_1_0/external/slc6_amd64_gcc530/bin/flat2yoda>", line 23 opts, args = parser.parse_args() ^ SyntaxError: invalid syntax I looked into the /cvmfs/cms.cern.ch/slc6_amd64_gcc530/cms/cmssw/CMSSW_8_1_0/external/slc6_amd64_gcc530/bin/flat2yoda<http://cms.cern.ch/slc6_amd64_gcc530/cms/cmssw/CMSSW_8_1_0/external/slc6_amd64_gcc530/bin/flat2yoda> file and found that on line 21, the closing bracket is missing. I think this could be the source of the error. I was suggested to write to the authors, to get it fixed in subsequent CMSSW releases. It could be great if you can look into this. ok looking at the most up-to-date version of this script, I don't see an (obvious) issue on line 21. Do you know which version of YODA is installed in your particular CMSSW release? Is the latest file different from what you have? https://yoda.hepforge.org/trac/browser/bin/flat2yoda 2.) root2yoda : I tried using this script giving TH1D histogram as input, in the same CMSSW version. But the output yoda file varies my input cross-section numbers and I get different cross-sections values . I am using the following command for root 2 yoda conversion : root2yoda Data_muon.root It gives the Data_muon.yoda as output. I tried plotting these outputs using rivet-mkhtml Data_muon.yoda command, but it gives .dat file as output. I even tried comparing this Data_muon.yoda to MC, but the output histogram only shows the MC distribution. I am attaching the Data_muon.root and Data_muon.yoda with this mail. Can you tell me if the entries in the histogram you're trying to convert have been divided by the bin widths? I suspect the YODA converter expects the entries to have been normalized this way. Chris _______________________________________________ Rivet mailing list Rivet at projects.hepforge.org<mailto: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/20170313/5d043f5b/attachment.html>
More information about the Rivet mailing list |