Dear experts,
I am trying to do unfolding using TUnfold with regularization, scanning LCurve method. I am using 12 bins for reco MC and 6 bins for Gen MC and data. I am getting errors like-
Info in TUnfold::SetConstraint: fConstraint=0
Info in TUnfold::TUnfold: 12 input bins and 8 output bins (includes 2 underflow/overflow bins)
Warning in TUnfold::SetInput: 7/12 input bins have zero error, and are ignored.
Error in TUnfold::GetInputInverseEmatrix: number of parameters 8 > 5 (rank of input covariance). Problem can not be solved
Info in TUnfold::InvertMSparseSymmPos: cholesky-decomposition failed, try eigenvalue analysis
Warning in TUnfold::DoUnfold: rank of matrix E 5 expect 8
Info in TUnfold::InvertMSparseSymmPos: cholesky-decomposition failed, try eigenvalue analysis
Warning in TUnfold::DoUnfold: rank of output covariance is 5 expect 8
Error in TUnfold::ScanLcurve: too few input bins, NDF<=0 -3
Info in TUnfold::ScanLcurve: logtau=-Infinity X=-28.254760 Y=7.000336
Fatal in TUnfold::AddMSparse: Nan detected 0 1 1
aborting
[/opt/homebrew/Cellar/root/6.28.06/lib/root/libCore.so] ErrorHandler (no debug info)
[/opt/homebrew/Cellar/root/6.28.06/lib/root/libCore.so] TObject::Fatal(char const*, char const*, …) const (no debug info)
[/opt/homebrew/Cellar/root/6.28.06/lib/root/libUnfold.so] TUnfold::AddMSparse(TMatrixTSparse, double, TMatrixTSparse const) const (no debug info)
[/opt/homebrew/Cellar/root/6.28.06/lib/root/libUnfold.so] TUnfold::DoUnfold() (no debug info)
[/opt/homebrew/Cellar/root/6.28.06/lib/root/libUnfold.so] TUnfold::ScanLcurve(int, double, double, TGraph**, TSpline**, TSpline**, TSpline**) (no debug info)
[] (no debug info)
[] (no debug info)
[/opt/homebrew/Cellar/root/6.28.06/lib/root/libCling.so] cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const (no debug info)
The part of the code for unfolding is given below-
TUnfold::ERegMode regMode=TUnfold::kRegModeSize;
TUnfold::EConstraint constraintMode=TUnfold::kEConstraintNone;
TUnfoldDensity::EDensityMode densityFlags = TUnfoldDensity::kDensityModeBinWidth;
TUnfold::EHistMap outputMap = TUnfold::kHistMapOutputHoriz;
TUnfold unfold(hEleMu_RecoGenTauPt[0],
TUnfold::kHistMapOutputHoriz,
TUnfold::kRegModeSize,
TUnfold::kEConstraintNone);
unfold.SetInput( hMu_Pt_data_bkgSub,1.0);
TGraph *lcurve=0;
TSpline *logTauX=0,*logTauY=0;
unfold.ScanLcurve(10,0.,0.,&lcurve,&logTauX,&logTauY);
double tau=unfold.GetTau();
double logTau=TMath::Log10(tau);
double lcurveX=logTauX->Eval(logTau);
double lcurveY=logTauY->Eval(logTau);
unfold.DoUnfold(tau,hMu_Pt_data_bkgSub);
TH1 *hUnfold_TauPt_data;
unfold.GetOutput(hUnfold_TauPt_data);
How can I solve this problem?
Just to mention non-regularization worked (Not proper unfolding but code ran) for this case with simple case tau=0.
Any help would be appreciated. Thanks in advance!
Regards,
Pranati