GENIE-MC / Generator

The popular GENIE Generator product is used by nearly all accelerator neutrino experiments and it plays a key role in the exploitation of neutrino data. The Generator implements a modern software framework and it includes state-of-the-art physics modules. It captures the latest results of the GENIE global analysis of neutrino scattering data and includes several tunes that were produced using the proprietary Comparisons and Tuning products. The GENIE physics model is universal and comprehensive: It handles all neutrinos and targets, and all processes relevant from MeV to PeV energy scales. The Generator includes several tools (flux drivers, detector geometry navigators, specialized event generation apps, event reweighting engines) to simulate complex experimental setups in full detail and to support generator-related analysis tasks.
http://www.genie-mc.org
42 stars 92 forks source link

gspl2root is not useful for IBD v3.04 #326

Closed WentaiLuo closed 11 months ago

WentaiLuo commented 11 months ago

631404eab3d2495edf9205508059d40 2fcaca7598388ae3dd27df0110fdc67 Hello, the version of genie I'm using is 3.04. I have used gmkspl to generate cross section data for nue-bar with H1 in the energy interval 0.001-0.6 GeV However when I convert the cross section data into a root file using gspl2root, it prompts that the IBD cannot be found. attached is the problem and the command line to use gspl2root. May I know how to solve it?

candreop commented 11 months ago

Thanks for reporting this, Wentai. It is probably a quick fix. if you edit https://github.com/GENIE-MC/Generator/blob/master/src/Apps/gSplineXml2Root.cxx, go somewhere just after line 610, and add `else if (proc.IsInverseBetaDecay() ) { title << "ibd"; }' a TGraph would be created for that process and added to the output ROOT file.

I seem to think that's the only change that is required. Then, the graph should be added automatically when graphs for the total cross-section are constructed, but please do verify this.

Please can you submit a pull request if you have a validated fix?

WentaiLuo commented 11 months ago

Thanks for reporting this, Wentai. It is probably a quick fix. if you edit https://github.com/GENIE-MC/Generator/blob/master/src/Apps/gSplineXml2Root.cxx, go somewhere just after line 610, and add `else if (proc.IsInverseBetaDecay() ) { title << "ibd"; }' a TGraph would be created for that process and added to the output ROOT file.

I seem to think that's the only change that is required. Then, the graph should be added automatically when graphs for the total cross-section are constructed, but please do verify this.

Please can you submit a pull request if you have a validated fix?

Thank you brother! You're too nice! After adding that line of code, recompiling Genie generated ibd successfully, thanks so much!

WentaiLuo commented 11 months ago

Thanks for reporting this, Wentai. It is probably a quick fix. if you edit https://github.com/GENIE-MC/Generator/blob/master/src/Apps/gSplineXml2Root.cxx, go somewhere just after line 610, and add `else if (proc.IsInverseBetaDecay() ) { title << "ibd"; }' a TGraph would be created for that process and added to the output ROOT file.

I seem to think that's the only change that is required. Then, the graph should be added automatically when graphs for the total cross-section are constructed, but please do verify this.

Please can you submit a pull request if you have a validated fix?

After fix all problems, I will submit a pull request! Another issue is open……