132 nPoints = graph.GetN()
134 newGraph=TGraphAsymmErrors(nPoints)
140 for iPoint
in xrange(0,nPoints) :
142 dataPointX = Double(0)
143 dataPointY = Double(0)
144 graph.GetPoint(iPoint,dataPointX,dataPointY)
145 dataErrorX = graph.GetErrorX(iPoint)
146 dataErrorY = graph.GetErrorY(iPoint)
149 newDataPointX = dataPointX * dataPointY
151 newErrorXLeft = fabs(newDataPointX - (dataPointX-dataErrorX))
152 newErrorXRight = fabs(newDataPointX - (dataPointX+dataErrorX))
155 newGraph.SetPoint(iPoint, newDataPointX, dataPointY)
156 newGraph.SetPointEXhigh(iPoint, newErrorXRight)
157 newGraph.SetPointEXlow(iPoint, newErrorXLeft)
158 newGraph.SetPointEYhigh(iPoint, dataErrorY)
159 newGraph.SetPointEYlow(iPoint, dataErrorY)
161 print dataPointY, newDataPointX
163 binRangeLow = dataPointX-dataErrorX
164 binRangeHigh = dataPointX+dataErrorX
165 if newDataPointX<binRangeLow
or newDataPointX>binRangeHigh :
166 print "Warning! Data point should not be here!"
167 print "Old data point: ", dataPointX
168 print "New NI data point:" , newDataPointX
169 print "XLow: ", binRangeLow
170 print "XHigh: ", binRangeHigh
171 newGraph.SetPoint(iPoint, dataPointX, 0.0000000000001)
172 newGraph.SetPointEXhigh(iPoint, dataErrorX)
173 newGraph.SetPointEXlow(iPoint, dataErrorX)
174 newGraph.SetPointEYhigh(iPoint, dataErrorY)
175 newGraph.SetPointEYlow(iPoint, dataErrorY)