GENIE-MC/Generator

gspl2root is not useful for IBD v3.04

Closed this issue · 3 comments

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?

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?

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!

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……