Skip to content

Commit

Permalink
Merge pull request #43170 from smuzaffar/root630-Minuit2-fix
Browse files Browse the repository at this point in the history
Use likelihood fit instead of chi-square fit for PFJetDQMPostProcessor plugin
  • Loading branch information
cmsbuild authored Nov 6, 2023
2 parents 324fa41 + 3d3a3d2 commit dd8547a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Validation/RecoParticleFlow/plugins/PFJetDQMPostProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ void PFJetDQMPostProcessor::fitResponse(TH1F* hreso,
TF1* fg = new TF1("mygaus", "gaus", fitlow, fithigh);
TF1* fg2 = new TF1("fg2", "TMath::Gaus(x,[0],[1],true)*[2]", fitlow, fithigh);

hreso->Fit("mygaus", "RQN");
hreso->Fit("mygaus", "RQNL");

fg2->SetParameter(0, fg->GetParameter(1));
fg2->SetParameter(1, fg->GetParameter(2));
Expand All @@ -259,7 +259,7 @@ void PFJetDQMPostProcessor::fitResponse(TH1F* hreso,
// (3) and number of bins (100)
fg2->FixParameter(2, ngenjet * 3. / 100.);

hreso->Fit("fg2", "RQN");
hreso->Fit("fg2", "RQNL");

fitlow = fg2->GetParameter(0) - 1.5 * fg2->GetParameter(1);
fitlow = TMath::Max(15. / ptlow, fitlow);
Expand Down

0 comments on commit dd8547a

Please sign in to comment.