5 #include "TFitResult.h" 13 if ( ipar < 0 || ipar >= pf->GetNpar() )
return 101;
15 TAxis* pax = ph->GetXaxis();
16 double xh1Min = pax->GetXmin();
17 double xh1Max = pax->GetXmax();
18 double xh2Min = xh1Min - xshift;
19 double xh2Max = xh1Max - xshift;
20 pax->SetLimits(xh2Min, xh2Max);
22 double xf1Min = pf->GetXmin();
23 double xf1Max = pf->GetXmax();
24 double xf1Par = pf->GetParameter(ipar);
27 pf->GetParLimits(ipar, xf1Llo, xf1Lhi);
28 bool haveLimits = xf1Llo || xf1Lhi;
29 double xf2Min = xf1Min - xshift;
30 double xf2Max = xf1Max - xshift;
31 double xf2Par = xf1Par - xshift;
32 double xf2Llo = xf1Llo - xshift;
33 double xf2Lhi = xf1Lhi - xshift;
34 pf->SetRange(xf2Min, xf2Max);
35 pf->SetParameter(ipar, xf2Par);
36 if ( haveLimits ) pf->SetParLimits(ipar, xf2Llo, xf2Lhi);
40 xf2Par = pf->GetParameter(ipar);
41 xf1Min = xf2Min + xshift;
42 xf1Max = xf2Max + xshift;
43 xf1Par = xf2Par + xshift;
44 pf->SetRange(xf1Min, xf1Max);
45 pf->SetParameter(ipar, xf1Par);
46 if ( haveLimits ) pf->SetParLimits(ipar, xf1Llo, xf1Lhi);
48 pax->SetLimits(xh1Min, xh1Max);
55 int ipar = pf->GetParNumber(spar.c_str());
int shiftHistFit(TH1 *ph, TF1 *pf, std::string fopt, int ipar, double xshift)
int quietHistFit(TH1 *ph, std::string fname, std::string fopt)