Exemplo n.º 1
0
        median[0] = getOBSERVED(f, 2)
        up95[0] = getOBSERVED(f, 4)
        dn95[0] = getOBSERVED(f, 0)
        up68[0] = getOBSERVED(f, 3)
        dn68[0] = getOBSERVED(f, 1)

    elif Method == "MaxLikelihoodFit":
        median[0] = getOBSERVED(f, 0)
        up95[0] = median[0]
        dn95[0] = median[0]
        up68[0] = getOBSERVED(f, 2)
        dn68[0] = getOBSERVED(f, 1)

    else:
        tree = f.Get("limit")
        medianCalc("r_mH" + str(width), tree, median, up68, dn68, up95, dn95)
    print "after mediancalc"
    graph68.SetPoint(i, float(width), median[0] * sm150)
    graph95.SetPoint(i, float(width), median[0] * sm150)
    graphMed.SetPoint(i, float(width), median[0] * sm150)

    print str(width) + "    " + str(median[0] * sm150) + "   " + str(
        median[0] * sm150 * 19620.) + "  " + str(up68[0] * sm150) + "  " + str(
            dn68[0] * sm150) + " " + options.mass

    out_file.write(
        str(width) + "    " + str(median[0] * sm150) + "  " +
        str(up68[0] * sm150) + "  " + str(dn68[0] * sm150) + "  " +
        options.mass + "\n")

    if options.doRatio: graphOne.SetPoint(i, float(width), 1. * sm150)
Exemplo n.º 2
0
  if not options.doRatio: sm = GetBR(mass)*GetXsection(mass) 
  if Method == "Asymptotic":   
      median[0] = getOBSERVED(f,2)
      up95[0]   = getOBSERVED(f,4)
      dn95[0]   = getOBSERVED(f,0)
      up68[0]   = getOBSERVED(f,3)
      dn68[0]   = getOBSERVED(f,1)
      print "Mass - ",mass, median[0], getOBSERVED(f,5) 
      #print "Up 95%   :",up95[0]
      #print "Down 95% :",dn95[0]
      #print "Up 68%   :",up68[0]
      #print "Down 68% :",dn68[0]

  else:
    tree = f.Get("limit")
    medianCalc("r_mH"+str(mass),tree,median,up68,dn68,up95,dn95)

  graph68.SetPoint(i,float(mass),median[0]*sm)
  graph95.SetPoint(i,float(mass),median[0]*sm)
  graphMed.SetPoint(i,float(mass),median[0]*sm)
  graphOne.SetPoint(i,float(mass),1.*sm)
  
  if Method == "HybridNew":

      up95[0]   = FrequentistLimits(f.GetName().replace("0.500.root","0.975.root"))
      dn95[0]   = FrequentistLimits(f.GetName().replace("0.500.root","0.025.root"))
      up68[0]   = FrequentistLimits(f.GetName().replace("0.500.root","0.840.root"))
      dn68[0]   = FrequentistLimits(f.GetName().replace("0.500.root","0.160.root"))

  
  diff95_up = abs(median[0] - up95[0])*sm
      median[0] = getOBSERVED(f,2)
      up95[0]   = getOBSERVED(f,4)
      dn95[0]   = getOBSERVED(f,0)
      up68[0]   = getOBSERVED(f,3)
      dn68[0]   = getOBSERVED(f,1)

  elif Method=="MaxLikelihoodFit":
      median[0] = getOBSERVED(f,0)
      up95[0]   = median[0]
      dn95[0]   = median[0]
      up68[0]   = getOBSERVED(f,2)
      dn68[0]   = getOBSERVED(f,1)

  else:
    tree = f.Get("limit")
    medianCalc("r_mH"+str(width),tree,median,up68,dn68,up95,dn95)

  graph68.SetPoint(i,float(width),median[0]*sm150)
  graph95.SetPoint(i,float(width),median[0]*sm150)
  graphMed.SetPoint(i,float(width),median[0]*sm150)
  
  print str(width)+"    "+str(median[0]*sm150)+"   "+str(median[0]*sm150*19620.)+"  "+str(up68[0]*sm150)+"  "+str(dn68[0]*sm150)+" "+options.mass
  
  out_file.write(str(width)+"    "+str(median[0]*sm150)+"  "+str(up68[0]*sm150)+"  "+str(dn68[0]*sm150)+"  "+options.mass+"\n")
  
  if options.doRatio: graphOne.SetPoint(i,float(width),1.*sm150)
  
  if Method == "HybridNew":

      up95[0]   = FrequentistLimits(f.GetName().replace("0.500.root","0.975.root"))
      dn95[0]   = FrequentistLimits(f.GetName().replace("0.500.root","0.025.root"))