Minimize two quantities at the same time

Hi,

I would like to minimize two quantities, 1-S and N/S, at the time same.
S = p0x + p1(x+25)
N = sqrt(p0p0 + p1p1)

I am wondering whether this can be done with TMinuit

Best regards,
Ming

[quote=“cmkuo”] . . . .I would like to minimize two quantities, 1-S and N/S, at the time same.
S = p0x + p1(x+25)
N = sqrt(p0p0 + p1p1)

I am wondering whether this can be done with TMinuit
[/quote]What about
U[i] = 1-S(x[i])
V[j] = N/S(x[j])
F(p0,p1) = Sigma((U[i] - U(x[i])) **2) + Sigma((V[j]- V(x[j])) **2)

[]

Hi Ming,

[quote=“cmkuo”]Hi,

I would like to minimize two quantities, 1-S and N/S, at the time same.
S = p0x + p1(x+25)
N = sqrt(p0p0 + p1p1)

I am wondering whether this can be done with TMinuit

[/quote]

The problem you ask is ill-defined. Assuming both functions don’t have a minimum at the same place, how is Minuit supposed to know which one you really want to be smaller. You are going to have to define a single function (e.g., what Valeri suggested) and minimize that.

Cheers,
Charles

I’ve uploaded the working example answering another topic:
root.cern.ch/phpBB2/viewtopic.php?p=37908#37908