Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when doing Weighted Likelihood fit #14458

Closed
1 task done
lmoneta opened this issue Jan 26, 2024 · 3 comments · Fixed by #14459
Closed
1 task done

Crash when doing Weighted Likelihood fit #14458

lmoneta opened this issue Jan 26, 2024 · 3 comments · Fixed by #14459

Comments

@lmoneta
Copy link
Member

lmoneta commented Jan 26, 2024

Check duplicate issues.

  • Checked for duplicates

Description

ROOT crashes when performing the uncertainty correction in (Fitter::DoWeightMinimization) when doing a weighted likelihood fit.
See https://root-forum.cern.ch/t/root-crashes-when-doing-a-weighted-likelihood-fit/57976

Reproducer

void test(){                                                                                                                                                                                                
  TH1F* h = new TH1F("h","h",3,0,3);                                                                                                                                                                        
  for(int i = 0; i < 3; i++)h->Fill(0.5);                                                                                                                                                                   
  for(int i = 0; i < 4; i++)h->Fill(1.5);                                                                                                                                                                   
  for(int i = 0; i < 3; i++)h->Fill(2.5);                                                                                                                                                                   
                                                                                                                                                                                                            
  //This works                                                                                                                                                                                              
  std::cout << "Likelihood Fit:" << std::endl;                                                                                                                                                              
  h->Fit("pol0","L");                                                                                                                                                                                       
                                                                                                                                                                                                            
  //This dosn't                                                                                                                                                                                             
  h->Sumw2();                                                                                                                                                                                               
  h->Scale(10);                                                                                                                                                                                             
  std::cout << "Weighted Likelihood Fit:" << std::endl;                                                                                                                                                     
  h->Fit("pol0","WL");                                                                                                                                                                                      
}    

ROOT version

6.28, 6.30 and master

Installation method

all

Operating system

all

Additional context

No response

Copy link

Hi @lmoneta,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

2 similar comments
Copy link

github-actions bot commented Feb 1, 2024

Hi @lmoneta,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

Copy link

github-actions bot commented Feb 2, 2024

Hi @lmoneta,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

@lmoneta lmoneta added this to Issues in Fixed in 6.32.00 via automation Feb 2, 2024
@lmoneta lmoneta added this to Issues in Fixed in 6.30.06 via automation Feb 2, 2024
@hahnjo hahnjo added this to Issues in Fixed in 6.28/14 Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

1 participant