I am using the openmc C++ API openmc_tally_results() to get the tally results. However, I find that the tally results I get in C++ is different from the results in the file named tally.out. The result in C++ seems to always be 8 times the results in the tally.out file.
I would like to know if I am using this C++ API wrong, or if there is anything I need to pay attention to when using it？
@Zhiying The tallies.out gives you the mean and standard deviation of each tally bin. The openmc_tally_results function gives you the “sum of realizations” and the “sum of squared realizations”. To see the relationship between them, please have a look at our theory/methodology guide. You can also look at how the Python bindings to the C/C++ API turn the raw sum/sum-squared values into a mean and standard deviation: