Commit 89b8f90c authored by David Blyth's avatar David Blyth

trackeff: fix for NaN error bars

parent 2975a301
...@@ -210,6 +210,9 @@ func makeTrackEffPlotters(filename string, pTMin, pTMax, fracCut, etaLimit float ...@@ -210,6 +210,9 @@ func makeTrackEffPlotters(filename string, pTMin, pTMax, fracCut, etaLimit float
if trueY > 0 { if trueY > 0 {
points[i].Y = trackY / trueY points[i].Y = trackY / trueY
yErrors[i].Low = math.Sqrt((1 - trackY/trueY) * trackY / math.Pow(trueY, 2)) yErrors[i].Low = math.Sqrt((1 - trackY/trueY) * trackY / math.Pow(trueY, 2))
if math.IsNaN(yErrors[i].Low) {
yErrors[i].Low = 0
}
yErrors[i].High = yErrors[i].Low yErrors[i].High = yErrors[i].Low
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment