Closed kkauder closed 4 years ago
Tagging @osbornjd so he can follow
Well. It happens here (and similar for djangoh etc.) https://github.com/eic/eic-smear/blob/6358651e9caf4fcfd2d66e7f10f9b3920ee6a827/src/erhic/File.cxx#L77-L78
git blame doesn't immediately show the reason for this behavior. Digging deeper.
That method is off (the last Write() will never get called), but it's not the main problem. The method just never gets called. I suspect that it needs the logfile together with the text file to actually create a log reader object, since only the logfile has the needed information. More of a documentation issue.
Calling with the logfile explicitly as the fourth argument, like
BuildTree("out.txt",".",-1,"logfile.log")
indeed creates
KEY: TObjString crossSection;1 Collectable string class
KEY: TObjString nEvents;1 Collectable string class
So, the main issue is one of documenting this fact. Nevertheless, the bug found in the process will lead to nTrials not recorded. Will fix that as well.
Just to confirm, I can also see the crossSection and nEvents when using the suggested logfile fix.
@osbornjd Joe, for the time being, you can just use nEvents. The wiki is blurry on the difference between trials and events. I will follow up, but all existing pythia logs I checked have nEvents==nTrials
Perfect, I will do that then. Thanks for the bug help!
As reported by Joe Osborn, output trees from the BuildTree function don’t have objects corresponding to nEvents or crossSection as used in https://wiki.bnl.gov/eic/index.php/Simulations#How_to_get_a_cross_section
Initial diagnosis is that they should but something is off in serialization.