8 const std::pair<unsigned, unsigned>
range) {
9 TH1* fake = (TH1*)(
candidates[0]->Clone(basename.c_str()));
22 delete combined.
chi2_;
23 combined.
chi2_ =
nullptr;
25 return combined.
chi2_;
42 minmaxUsable_(findUsableMinMax()),
59 unsigned NEAR(0), FAR(0);
61 for (
unsigned L = 0;
L <
cont.size();
L++) {
64 for (
unsigned R =
L;
R <
cont.size();
R++) {
72 if ((far > near) && (far - near) > (FAR - NEAR)) {
78 return std::make_pair(NEAR, FAR);
82 std::vector<std::pair<unsigned, unsigned> >
ranges;
87 std::pair<unsigned, unsigned>
range(
i,
i + 1);
88 while (++i <= Nbins && symm_candidate_->GetBinError(
i))
100 for (
int i = 1;
i <=
chi2_->GetNbinsX(); ++
i) {
124 return pow(y0 -
y1, 2) / (e0 * e0 +
e1 *
e1);
129 if (
p.empty() ||
p[0] <
chi2_->GetBinCenter(1) ||
p[0] >
chi2_->GetBinCenter(
chi2_->GetNbinsX()))
133 f->SetParameter(0,
p[0]);
134 f->SetParLimits(0,
p[0],
p[0]);
135 f->SetParameter(1,
p[1]);
136 f->SetParLimits(1,
p[1],
p[1]);
137 f->SetParameter(2,
p[2]);
138 f->SetParLimits(2,
p[2],
p[2]);
139 f->SetParameter(3,
ndf_);
141 chi2_->Fit(
f.get(),
"WQ");
146 TF1*
f =
new TF1(
"SymmetryFit",
"((x-[0])/[1])**2+[2]+0*[3]");
147 f->SetParName(0,
"middle");
148 f->SetParName(1,
"uncertainty");
149 f->SetParName(2,
"chi2");
150 f->SetParName(3,
"NDF");
155 std::vector<double>
v;
161 std::vector<double>
p;
162 p.push_back(
func.GetParameter(0));
163 p.push_back(
func.GetParameter(1));
164 p.push_back(
func.GetParameter(2));
166 v.push_back(-0.5 *
p[1] /
p[2]);
167 v.push_back(1. /
sqrt(
p[2]));
168 v.push_back(
p[0] - 0.25 *
p[1] *
p[1] /
p[2]);
175 std::vector<double>
v;
177 auto func = std::make_unique<TF1>(
"mypol3",
"pol3");
180 std::vector<double>
p;
181 p.push_back(
func->GetParameter(0));
182 p.push_back(
func->GetParameter(1));
183 p.push_back(
func->GetParameter(2));
184 p.push_back(
func->GetParameter(3));
185 double radical =
p[2] *
p[2] - 3 *
p[1] *
p[3];
187 double x0 = (-
p[2] +
sqrt(radical)) / (3 *
p[3]);
189 v.push_back(
pow(radical, -0.25));
190 v.push_back(
p[0] +
p[1] * x0 +
p[2] * x0 * x0 +
p[3] * x0 * x0 * x0);