예제 #1
0
def compareEndcapBorder(coeff_endc_1, coeff_endc_2) :
    ''' Return an histogram and a map of the differences for each endcap'''

    border_diff_distro_h_eep   = TH1F("borderdiff EE+","diff EE+",100,-2,2)
    border_diff_distro_h_eem   = TH1F("borderdiff EE-","diff EE-",100,-2,2)

    
    border_diff_distro_m_eep   = TH2F("bordermap EE+","map EE+",100,1,101,100,1,101)
    border_diff_distro_m_eem   = TH2F("bordermap EE-","map EE-",100,1,101,100,1,101)
    
    border_diff_distro_m_eep.SetStats(0)
    border_diff_distro_m_eem.SetStats(0)


    for i,c in enumerate(coeff_endc_1):  
      diff = c - coeff_endc_2[i]
      ix,iy,iz = EcalPyUtils.unhashEEIndex(i)
      Rsq = ((ix-50.0)**2+(iy-50.0)**2)
      
      if (iz >0 and (Rsq<144.0 or Rsq>2500.0)):
          border_diff_distro_h_eep.Fill(diff)
          border_diff_distro_m_eep.Fill(ix,iy,diff)
      elif (iz<0 and (Rsq<144.0 or Rsq>2500.0)):
          border_diff_distro_h_eem.Fill(diff)
          border_diff_distro_m_eem.Fill(ix,iy,diff)
      

    return border_diff_distro_h_eep, \
           border_diff_distro_m_eep, \
           border_diff_distro_h_eem, \
           border_diff_distro_m_eem
예제 #2
0
def compareEndcap(coeff_endc_1, coeff_endc_2) :
    ''' Return an histogram and a map of the differences for each endcap'''

    diff_distro_h_eep   = TH1F("diff EE+","diff EE+",100,-2,2)
    diff_distro_h_eem   = TH1F("diff EE-","diff EE-",100,-2,2)

    
    diff_distro_m_eep   = TH2F("map EE+","map EE+",100,1,101,100,1,101)
    diff_distro_m_eem   = TH2F("map EE-","map EE-",100,1,101,100,1,101)

    temp_h = TH1F("tempR","tempR",50,0,50)
    
    diff_distro_m_eep.SetStats(0)
    diff_distro_m_eem.SetStats(0)


    for i,c in enumerate(coeff_endc_1):  
      diff = c - coeff_endc_2[i]
      ix,iy,iz = EcalPyUtils.unhashEEIndex(i)
      R = sqrt((ix-50)*(ix-50)+(iy-50)*(iy-50))
      
      if iz >0:
          diff_distro_h_eep.Fill(diff)
          diff_distro_m_eep.Fill(ix,iy,diff)
          
      else:
          diff_distro_h_eem.Fill(diff)
          diff_distro_m_eem.Fill(ix,iy,diff)

    return diff_distro_h_eep, \
           diff_distro_m_eep, \
           diff_distro_h_eem, \
           diff_distro_m_eem
예제 #3
0
def compareEndcapBorder(coeff_endc_1, coeff_endc_2):
    ''' Return an histogram and a map of the differences for each endcap'''

    border_diff_distro_h_eep = TH1F("borderdiff EE+", "diff EE+", 100, -2, 2)
    border_diff_distro_h_eem = TH1F("borderdiff EE-", "diff EE-", 100, -2, 2)

    border_diff_distro_m_eep = TH2F("bordermap EE+", "map EE+", 100, 1, 101,
                                    100, 1, 101)
    border_diff_distro_m_eem = TH2F("bordermap EE-", "map EE-", 100, 1, 101,
                                    100, 1, 101)

    border_diff_distro_m_eep.SetStats(0)
    border_diff_distro_m_eem.SetStats(0)

    for i, c in enumerate(coeff_endc_1):
        diff = c - coeff_endc_2[i]
        ix, iy, iz = EcalPyUtils.unhashEEIndex(i)
        Rsq = ((ix - 50.0)**2 + (iy - 50.0)**2)

        if (iz > 0 and (Rsq < 144.0 or Rsq > 2500.0)):
            border_diff_distro_h_eep.Fill(diff)
            border_diff_distro_m_eep.Fill(ix, iy, diff)
        elif (iz < 0 and (Rsq < 144.0 or Rsq > 2500.0)):
            border_diff_distro_h_eem.Fill(diff)
            border_diff_distro_m_eem.Fill(ix, iy, diff)


    return border_diff_distro_h_eep, \
           border_diff_distro_m_eep, \
           border_diff_distro_h_eem, \
           border_diff_distro_m_eem
예제 #4
0
def compareEndcap(coeff_endc_1, coeff_endc_2):
    ''' Return an histogram and a map of the differences for each endcap'''

    diff_distro_h_eep = TH1F("diff EE+", "diff EE+", 100, -2, 2)
    diff_distro_h_eem = TH1F("diff EE-", "diff EE-", 100, -2, 2)

    diff_distro_m_eep = TH2F("map EE+", "map EE+", 100, 1, 101, 100, 1, 101)
    diff_distro_m_eem = TH2F("map EE-", "map EE-", 100, 1, 101, 100, 1, 101)

    temp_h = TH1F("tempR", "tempR", 50, 0, 50)

    diff_distro_m_eep.SetStats(0)
    diff_distro_m_eem.SetStats(0)

    for i, c in enumerate(coeff_endc_1):
        diff = c - coeff_endc_2[i]
        ix, iy, iz = EcalPyUtils.unhashEEIndex(i)
        R = sqrt((ix - 50) * (ix - 50) + (iy - 50) * (iy - 50))

        if iz > 0:
            diff_distro_h_eep.Fill(diff)
            diff_distro_m_eep.Fill(ix, iy, diff)

        else:
            diff_distro_h_eem.Fill(diff)
            diff_distro_m_eem.Fill(ix, iy, diff)

    return diff_distro_h_eep, \
           diff_distro_m_eep, \
           diff_distro_h_eem, \
           diff_distro_m_eem
예제 #5
0
def makedist(coeff_barl, coeff_endc):

    ebmap = TH2F("EB", "EB", 360, 1, 261, 171, -85, 86)
    eePmap = TH2F("EE", "EE", 100, 1, 101, 100, 1, 101)
    eeMmap = TH2F("EEminus", "EEminus", 100, 1, 101, 100, 1, 101)
    ebdist = TH1F("EBdist", "EBdist", 100, -2, 2)
    ebBorderdist = TH1F("EBBorderdist", "EBBorderdist", 100, -2, 2)

    ebeta = TH2F("ebeta", "ebeta", 171, -85, 86, 100, -2, 2)
    ebphi = TH2F("ebphi", "ebphi", 360, 1, 361, 100, -2, 2)

    eePL = TH2F("EEPL", "EEPlus Left", 50, 10, 55, 100, -2, 2)
    eePR = TH2F("EEPR", "EEPlus Right", 50, 10, 55, 100, -2, 2)
    eeML = TH2F("EEML", "EEMinus Left", 50, 10, 55, 100, -2, 2)
    eeMR = TH2F("EEMR", "EEMinus Right", 50, 10, 55, 100, -2, 2)

    for i, c in enumerate(coeff_barl):
        ieta, iphi = EcalPyUtils.unhashEBIndex(i)
        ebmap.Fill(iphi, ieta, c)
        ebdist.Fill(c)
        ebeta.Fill(ieta, c)
        ebphi.Fill(iphi, c)

        if (abs(ieta) == 85 or abs(ieta) == 65 or abs(ieta) == 64
                or abs(ieta) == 45 or abs(ieta) == 44 or abs(ieta) == 25
                or abs(ieta) == 24 or abs(ieta) == 1 or iphi % 20 == 1
                or iphi % 20 == 0):
            ebBorderdist.Fill(c)

    for i, c in enumerate(coeff_endc):
        ix, iy, iz = EcalPyUtils.unhashEEIndex(i)
        R = sqrt((ix - 50) * (ix - 50) + (iy - 50) * (iy - 50))

        if iz > 0:
            eePmap.Fill(ix, iy, c)
            if ix < 50:
                eePL.Fill(R, c, 1)
            if ix > 50:
                eePR.Fill(R, c, 1)

        if iz < 0:
            eeMmap.Fill(ix, iy, c)
            if ix < 50:
                eeML.Fill(R, c, 1)
            if ix > 50:
                eeMR.Fill(R, c, 1)

    prof_eePL = eePL.ProfileX()
    prof_eePR = eePR.ProfileX()
    prof_eeML = eeML.ProfileX()
    prof_eeMR = eeMR.ProfileX()

    return ebmap, ebeta, ebphi, eePmap, ebdist, eeMmap, prof_eePL, prof_eePR, prof_eeML, prof_eeMR, ebBorderdist
예제 #6
0
def makedist(coeff_barl, coeff_endc) :

    ebmap = TH2F("EB","EB",360,1,261,171, -85,86)
    eePmap = TH2F("EE","EE",100, 1,101,100,1,101)
    eeMmap = TH2F("EEminus","EEminus",100,1,101,100,1,101)
    ebdist = TH1F("EBdist","EBdist",100,-2,2)
    ebBorderdist = TH1F("EBBorderdist","EBBorderdist",100,-2,2)

    ebeta = TH2F("ebeta","ebeta",171,-85,86,100,-2,2)
    ebphi = TH2F("ebphi","ebphi",360,1,361,100,-2,2)

    eePL = TH2F("EEPL","EEPlus Left",50,10,55,100,-2,2)
    eePR = TH2F("EEPR","EEPlus Right",50,10,55,100,-2,2)
    eeML = TH2F("EEML","EEMinus Left",50,10,55,100,-2,2)
    eeMR = TH2F("EEMR","EEMinus Right",50,10,55,100,-2,2)
    
    for i,c in enumerate(coeff_barl):
        ieta,iphi = EcalPyUtils.unhashEBIndex(i)
        ebmap.Fill(iphi,ieta,c)
        ebdist.Fill(c)
        ebeta.Fill(ieta,c)
        ebphi.Fill(iphi,c)

        if (abs(ieta)==85 or abs(ieta)==65 or abs(ieta)==64 or abs(ieta)==45 or abs(ieta)==44 or abs(ieta)==25 or abs(ieta)==24 or abs(ieta)==1 or iphi%20==1 or iphi%20==0):
            ebBorderdist.Fill(c)


    for i,c in enumerate(coeff_endc):
        ix,iy,iz = EcalPyUtils.unhashEEIndex(i)
        R = sqrt((ix-50)*(ix-50)+(iy-50)*(iy-50))

        if  iz>0:
            eePmap.Fill(ix,iy,c)
            if ix<50:
                eePL.Fill(R,c,1)
            if ix>50:
                eePR.Fill(R,c,1)

        if iz<0:
            eeMmap.Fill(ix,iy,c)
            if ix<50:
                eeML.Fill(R,c,1)
            if ix>50:
                eeMR.Fill(R,c,1)

    prof_eePL = eePL.ProfileX()
    prof_eePR = eePR.ProfileX()
    prof_eeML = eeML.ProfileX()
    prof_eeMR = eeMR.ProfileX()
    
    return ebmap, ebeta, ebphi, eePmap, ebdist, eeMmap, prof_eePL, prof_eePR, prof_eeML, prof_eeMR, ebBorderdist