Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:16:12

0001 void StableGauss(TH1* it, double numSigmas=2)
0002 {
0003   double low   = it->GetBinCenter(1);
0004   double high  = it->GetBinCenter(it->GetNbinsX());
0005 
0006   for (i=0; i<3; i++)
0007     {
0008       it->Fit("gaus", "", "", low, high);
0009       double mean  = it->GetFunction("gaus")->GetParameter(1);
0010       double sigma = it->GetFunction("gaus")->GetParameter(2);
0011       low  = mean - numSigmas*sigma;
0012       high = mean + numSigmas*sigma;
0013     }
0014 }