Fatal: row[irowmin] >= this->fRowLwb && row[irowmax] <= this->fRowLwb+this->fNrows-1 violated at line 1176 of `/build/bellenot/SPI/x86_64-slc5-gcc43-opt/root/math/matrix/src/TMatrixTSparse.cxx’
Is the “migmat” filled at the point where you instantiate TUnfoldSys?
The messages seem to indicate that the histogram is empty. Please note, the histogram needs to be filled at the point where TUnfold(Sys) is instantiated. Filling the migmat only after instantiating TUnfold does not work.
In TUnfold, there is a test done whether the generator bin does contribute to at least one of the data bins (at least one of the matrix elements non-zero). All the generator level bins which fail that test are excluded from the unfolding.
The message
Warning in TUnfold::TUnfold: the following output bins are not connected to the input side 0-25
indicates that the bin numbers 0-25 all fail that test. I suspect that your histogram only has bin numbers 0-25, such that none of the generator level bins remains. Then, TUnfold continues its calculations with Matrices of dimension zero and one of the matrix operations produce the crash.
If needed, a protection can be added for such cases.
Please let me know whether this solved the problem. Otherwise prepare a root file with the TH2F and send it to me for testing.
Some documentation on errors/warnings is available from my home page desy.de/~sschmitt
However, the info messages are not documented.
Here are the comments to the messages you observed:
Info in TUnfold::TUnfold::SetConstraint: fConstraint=0
this means that you do not use the area constraint for the unfolding. Using the area constraint is optional, so I believe this is what you intended.
Info in TUnfold::TUnfold: the following output bins are not connected to the input side 0 25
this means that in your matrix of migrations there are no reconstructed events corresponding to the generator bins 0 and 25. Presumably these are the underflow and overflow bins, and you simply do not use them. The message tells you that TUnfold recognized that these bins can not be unfolded. As a consequence, bin 0 and 25 of the output histogram will be empty and their errors will be set to zero.
Info in TUnfold::TUnfold: 96 input bins and 24 output bins
this is a summary of the information available for the unfolding. So you have 96 bins on detector level and 24 bins on generator level, which is fine. If you have the same number of bins on detector/generator level, there will be a warning message. If you have less bins on detector than on generator level, there will be an error.