Closed legordian closed 8 years ago
--binning
)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.
calcIntegrals.py
checks whether all events were used to calculate the amplitudes, this makes usage of the -n
switch to calcAmplitudes.py
impossible (even if also calcIntegrals.py
is called with -n
. -n
should probably be removed from both scripts??? bool rpwa::ampIntegralMatrixMetadata::addKeyFileContent(const string&) [/nfs/freenas/tuph/e18/project/compass/analysis/suhl/rootpwa/rootpwa-devel/decayAmplitude/ampIntegralMatrixMetadata.cc:168]: warning: cannot add keyfile content: already present.
) when running calcIntegrals.py
. Fitting of the lower mass bin works, fitting of the higher mass bin crashes with a segfault:#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
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.
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.