ROOTPWA-Maintainers / ROOTPWA

ROOTPWA is a toolkit for partial-wave analysis of multi-particle final states produced in high-energy particle reactions. It is used to determine hadron spectra from experimental data.
Other
8 stars 14 forks source link

Revise the file manager for on-the-fly binning. #164

Closed legordian closed 8 years ago

legordian commented 8 years ago

Revise the file manager and all the attached scripts to implement a binning logic including on-the-fly binning. At the present stage, this is in a rather rough state: all the scripts should work, but the functionality has not been fully exploited yet. In particular, the fitting scripts in this version are supplied with a integer bin id, which corresponds to an integral bin. This should be replaced by an interface actually passing in the bin and the script system using the integral bins to create an new integral for that bin, if possible. Also, a number of checks are not implemented yet, e.g. it is not checked if every event is actually in a bin and the metadata compatibility is not verified. However, this changeset should provide a good basis to implement these things.

suhlatwork commented 8 years ago
legordian commented 8 years ago

All implemented. Note that merging this pull request will also merge #167, so either merge that one first or only merge this one if #167 is also worthy of inclusion.

suhlatwork commented 8 years ago
#6  0x00007f4d626723f9 in SetBranchAddress<double> (ptr=0x0, add=0x423ba98, bname=0x3fac8a8 "mass", this=0x4141c70) at /nfs/mnemosyne/sys/slc6/sw/root/x86-64/6.04.02/root-6.04.02/include/TTree.h:517
#7  rpwa::pwaLikelihood<std::complex<double> >::setOnTheFlyBinning (this=this
entry=0x3c83f80, binningMap=std::map with 2 elements, evtMetas=std::vector of length 2, capacity 2 = {...}) at /nfs/freenas/tuph/e18/project/compass/analysis/suhl/rootpwa/rootpwa-devel/partialWaveFit/pwaLikelihood.cc:1327
#8  0x00007f4d677dc4ca in (anonymous namespace)::pwaLikelihood_setOnTheFlyBinning (self=..., pyBinningMap=..., pyEvtMetas=...) at /nfs/freenas/tuph/e18/project/compass/analysis/suhl/rootpwa/rootpwa-devel/pyInterface/partialWaveFit/pwaLikelihood_py.cc:230
#9  0x00007f4d677dd04b in invoke<boost::python::to_python_value<bool const&>, bool (*)(rpwa::pwaLikelihood<std::complex<double> >&, boost::python::dict, boost::python::list), boost::python::arg_from_python<rpwa::pwaLikelihood<std::complex<double> >&>, boost::python::arg_from_python<boost::python::dict>, boost::python::arg_from_python<boost::python::list> > (ac2=<synthetic pointer>, ac1=<synthetic pointer>, ac0=<synthetic pointer>, f=
0x1598788: 0x7f4d677dbd70 <(anonymous namespace)::pwaLikelihood_setOnTheFlyBinning(rpwa::pwaLikelihood<std::complex<double> >&, boost::python::dict, boost::python::list)>, rc=...) at /nfs/freenas/tuph/e18/project/compass/analysis/suhl/software/boost/boost_1_59_0/include/boost/python/detail/invoke.hpp:75
suhlatwork commented 8 years ago

Concerning the crash in the likelihood class, the garbage collector of my python version seems to be much more aggressive and deletes the TFile from which the event metadata were read, so the event tree is an invalid pointer. A similar thing happens for the amplitudes.