def getobs(obslo,obshi,xs): x = []; y = []; iGDM=1;iGQ=0.25;iMDM=1.; for i in range( obslo.GetN() ): lDMWidth = avtotwidth(2,iGDM,iGQ,obslo.GetX()[i],iMDM) lWidth = avtotwidth(2,0. ,iGQ,obslo.GetX()[i],iMDM) factor = xs.Eval( obslo.GetX()[i] ) / (6./5.); x.append( obslo.GetX()[i] ); y.append( math.sqrt( (lWidth/lDMWidth)*obslo.GetY()[i] / factor ) / 4. ); for i in range( obshi.GetN() ): lDMWidth = avtotwidth(2,iGDM,iGQ,obshi.GetX()[i],iMDM) lWidth = avtotwidth(2,0. ,iGQ,obshi.GetX()[i],iMDM) if obshi.GetX()[i] > 3700.: break; factor = xs.Eval( obshi.GetX()[i] ) / (6./5.); x.append( obshi.GetX()[i] ); y.append( math.sqrt( (lWidth/lDMWidth)*obshi.GetY()[i] / factor ) / 4. ); obs_gr = makeAGraph( x, y ); return obs_gr
def getobs(obslo, obshi, xs): x = [] y = [] iGDM = 1 iGQ = 0.25 iMDM = 1. for i in range(obslo.GetN()): lDMWidth = avtotwidth(2, iGDM, iGQ, obslo.GetX()[i], iMDM) lWidth = avtotwidth(2, 0., iGQ, obslo.GetX()[i], iMDM) factor = xs.Eval(obslo.GetX()[i]) / (6. / 5.) x.append(obslo.GetX()[i]) y.append( math.sqrt((lWidth / lDMWidth) * obslo.GetY()[i] / factor) / 4.) for i in range(obshi.GetN()): lDMWidth = avtotwidth(2, iGDM, iGQ, obshi.GetX()[i], iMDM) lWidth = avtotwidth(2, 0., iGQ, obshi.GetX()[i], iMDM) if obshi.GetX()[i] > 3700.: break factor = xs.Eval(obshi.GetX()[i]) / (6. / 5.) x.append(obshi.GetX()[i]) y.append( math.sqrt((lWidth / lDMWidth) * obshi.GetY()[i] / factor) / 4.) obs_gr = makeAGraph(x, y) return obs_gr
def divide(iG, iXS, iGB=False, iGDM=1, iGQ=0.25, iMDM=1.): for i0 in range(0, iG.GetN()): iG.GetY()[i0] = iG.GetY()[i0] / iXS.Eval(iG.GetX()[i0]) / (5. / 6.) lDMWidth = avtotwidth(2, iGDM, iGQ, iG.GetX()[i0], iMDM) lWidth = avtotwidth(2, 0., iGQ, iG.GetX()[i0], iMDM) iG.GetY()[i0] = (lWidth / lDMWidth) * iG.GetY()[i0] if iGB: iG.GetY()[i0] = (math.sqrt(iG.GetY()[i0])) * 0.25 * 6
def divide(iG,iXS,iGB=False,iGDM=1,iGQ=0.25,iMDM=1.): for i0 in range(0,iG.GetN()): iG.GetY()[i0] = iG.GetY()[i0]/iXS.Eval(iG.GetX()[i0])/(5./6.) lDMWidth = avtotwidth(2,iGDM,iGQ,iG.GetX()[i0],iMDM) lWidth = avtotwidth(2,0. ,iGQ,iG.GetX()[i0],iMDM) iG.GetY()[i0] = (lWidth/lDMWidth)*iG.GetY()[i0] if iGB: iG.GetY()[i0]=(math.sqrt(iG.GetY()[i0]))*0.25*6
def getexp(explo, exphi, xs): x = [] y = [] yup = [] ydn = [] iGDM = 1 iGQ = 0.25 iMDM = 1. for i in range(explo.GetN()): lDMWidth = avtotwidth(2, iGDM, iGQ, explo.GetX()[i], iMDM) lWidth = avtotwidth(2, 0., iGQ, explo.GetX()[i], iMDM) if explo.GetX()[i] < 600.0: continue factor = xs.Eval(explo.GetX()[i]) / (6. / 5.) cury = explo.GetY()[i] curyup = explo.GetY()[i] + explo.GetEYhigh()[i] curydn = explo.GetY()[i] - explo.GetEYlow()[i] cury /= factor curyup /= factor curydn /= factor x.append(explo.GetX()[i]) y.append(math.sqrt((lWidth / lDMWidth) * cury) / 4.) yup.append(math.sqrt((lWidth / lDMWidth) * curyup) / 4.) ydn.append(math.sqrt((lWidth / lDMWidth) * curydn) / 4.) for i in range(exphi.GetN()): lDMWidth = avtotwidth(2, iGDM, iGQ, exphi.GetX()[i], iMDM) lWidth = avtotwidth(2, 0., iGQ, exphi.GetX()[i], iMDM) print(exphi.GetY()[i]) if exphi.GetX()[i] > 3700.: continue factor = xs.Eval(exphi.GetX()[i]) / (6. / 5.) cury = exphi.GetY()[i] curyup = exphi.GetY()[i] + exphi.GetEYhigh()[i] curydn = exphi.GetY()[i] - exphi.GetEYlow()[i] cury /= factor curyup /= factor curydn /= factor x.append(exphi.GetX()[i]) y.append(math.sqrt((lWidth / lDMWidth) * cury) / 4.) yup.append(math.sqrt((lWidth / lDMWidth) * curyup) / 4.) ydn.append(math.sqrt((lWidth / lDMWidth) * curydn) / 4.) exp_gr = makeAGraph(x, y) exp_gr_band = makeAFillGraph(x, ydn, yup) return exp_gr, exp_gr_band
def getexp(explo,exphi,xs): x = []; y = []; yup = []; ydn = []; iGDM=1;iGQ=0.25;iMDM=1.; for i in range( explo.GetN() ): lDMWidth = avtotwidth(2,iGDM,iGQ,explo.GetX()[i],iMDM) lWidth = avtotwidth(2,0. ,iGQ,explo.GetX()[i],iMDM) factor = xs.Eval( explo.GetX()[i] ) / (6./5.); cury = explo.GetY()[i]; curyup = explo.GetY()[i] + explo.GetEYhigh()[i]; curydn = explo.GetY()[i] - explo.GetEYlow()[i]; cury /= factor; curyup /= factor; curydn /= factor; x.append( explo.GetX()[i] ); y.append( math.sqrt((lWidth/lDMWidth)*cury) / 4. ); yup.append( math.sqrt((lWidth/lDMWidth)*curyup) / 4. ); ydn.append( math.sqrt((lWidth/lDMWidth)*curydn) / 4. ); for i in range( exphi.GetN() ): lDMWidth = avtotwidth(2,iGDM,iGQ,exphi.GetX()[i],iMDM) lWidth = avtotwidth(2,0. ,iGQ,exphi.GetX()[i],iMDM) if exphi.GetX()[i] > 3700.: break; factor = xs.Eval( exphi.GetX()[i] ) / (6./5.); cury = exphi.GetY()[i]; curyup = exphi.GetY()[i] + exphi.GetEYhigh()[i]; curydn = exphi.GetY()[i] - exphi.GetEYlow()[i]; cury /= factor; curyup /= factor; curydn /= factor; x.append( exphi.GetX()[i] ); y.append( math.sqrt((lWidth/lDMWidth)*cury) / 4. ); yup.append( math.sqrt((lWidth/lDMWidth)*curyup) / 4. ); ydn.append( math.sqrt((lWidth/lDMWidth)*curydn) / 4. ); exp_gr = makeAGraph( x, y ); exp_gr_band = makeAFillGraph( x, ydn, yup ); return exp_gr, exp_gr_band