示例#1
0
def do_endcap_allr9_fits():
    '''
    E N D C A P S   A L L   R 9
    '''

    systematics = 0.1

    #______________________________________________________________________________
    ## Float everything
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_restrue_EE_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCTruth_Endcaps',
        title     = 'Endcaps, MC Truth',
        systematics = systematics,
        )
    fitter.run()
    fitters.append(fitter)
    eefitter = fitter


    #______________________________________________________________________________
    ## Fix S to TB
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_restrue_EE_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCTruth_Endcaps_SfromTB',
        title     = 'Endcaps, MC Truth, S from TB',
        systematics = systematics,
        )
    fitter.S.setVal(_stochastic_from_tb/_mean_sqrt_cosh_eta_endcaps)
    fitter.N.setVal(eefitter.N.getVal())
    fitter.C.setVal(eefitter.C.getVal())

    fitter.S.setConstant()
    fitter.run()
    fitters.append(fitter)


    #______________________________________________________________________________
    ## Fix N to TB
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_restrue_EE_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCTruth_Endcaps_NfromTB',
        title     = 'Endcaps, MC Truth, N from TB',
        systematics = systematics,
        )
    fitter.S.setVal(eefitter.S.getVal())
    fitter.N.setVal(_noise_from_tb/_mean_cosh_eta_endcaps)
    fitter.C.setVal(eefitter.C.getVal())

    fitter.N.setConstant()
    fitter.run()
    fitters.append(fitter)
示例#2
0
def do_barrel_allr9_fits():
    '''
    B A R R E L   A L L   R 9
    '''
    systematics = 0.1
    #______________________________________________________________________________
    ## Float everything
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_restrue_EB_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCTruth_Barrel',
        title     = 'Barrel, MC Truth',
        systematics = systematics,
        )
    fitter.run()
    fitters.append(fitter)
    ebfitter = fitter


    #______________________________________________________________________________
    ## S from TB
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_restrue_EB_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCTruth_Barrel_SfromTB',
        title     = 'Barrel, MC Truth, S from TB',
        systematics = systematics,
        )
    fitter.S.setVal(_stochastic_from_tb/_mean_sqrt_cosh_eta_barrel)
    fitter.N.setVal(ebfitter.N.getVal())
    fitter.C.setVal(ebfitter.C.getVal())

    fitter.S.setConstant()
    fitter.run()
    fitters.append(fitter)


    #______________________________________________________________________________
    ## N from TB 
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_restrue_EB_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCTruth_Barrel_NfromTB',
        title     = 'Barrel, MC Truth, N from TB',
        systematics = systematics,
        )
    fitter.S.setVal(ebfitter.S.getVal())
    fitter.N.setVal(_noise_from_tb/_mean_cosh_eta_barrel)
    fitter.C.setVal(ebfitter.C.getVal())

    fitter.N.setConstant()
    fitter.run()
    fitters.append(fitter)
示例#3
0
def do_endcap_lowr9_fits():
    '''
    E N D C A P S   L O W   R 9
    '''
    systematics = 1.0
    #______________________________________________________________________________
    ## Float everything
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_resdata_EE_lowR9_jan2012rereco',
        name      = 'PhotonResolutionVsEt_DataFit_Endcaps_lowR9',
        title     = 'Endcaps, R9 < 0.95, Data Fit',
        systematics = systematics,
        )
    fitter.run()
    fitters.append(fitter)
    eefitter = fitter

    #______________________________________________________________________________
    ## Fix S to TB
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_resdata_EE_lowR9_jan2012rereco',
        name      = 'PhotonResolutionVsEt_DataFit_Endcaps_lowR9_SfromTB',
        title     = 'Endcaps, R9 < 0.95, Data Fit, S from TB',
        systematics = systematics,
        )
    fitter.S.setVal(_stochastic_from_tb/1.91)
    fitter.N.setVal(eefitter.N.getVal())
    fitter.C.setVal(eefitter.C.getVal())

    fitter.S.setConstant()
    fitter.run()
    fitters.append(fitter)

    #______________________________________________________________________________
    ## Fix N to MC
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_resdata_EE_lowR9_jan2012rereco',
        name      = 'PhotonResolutionVsEt_DataFit_Endcaps_lowR9_NfromMC',
        title     = 'Endcaps, R9 < 0.95, Data Fit, N from MC',
        systematics = systematics,
        )
    fitter.S.setVal(_stochastic_from_tb/1.91)
    fitter.N.setVal(_noise_from_mc_endcaps_lowr9)
    fitter.C.setVal(eefitter.C.getVal())

    fitter.N.setConstant()
    fitter.run()
    fitters.append(fitter)

    #______________________________________________________________________________
    ## Fix S to TB and N to MC
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_resdata_EE_lowR9_jan2012rereco',
        name      = 'PhotonResolutionVsEt_DataFit_Endcaps_lowR9_SfromTB_NfromMC',
        title     = 'Endcaps, R9 < 0.95, Data Fit, S from TB, N from MC',
        systematics = systematics,
        )
    fitter.S.setVal(_stochastic_from_tb/1.91)
    fitter.N.setVal(_noise_from_mc_endcaps_lowr9)
    fitter.C.setVal(eefitter.C.getVal())

    fitter.S.setConstant()
    fitter.N.setConstant()
    fitter.run()
    fitters.append(fitter)
示例#4
0
def do_barrel_allr9_fits():
    '''
    B A R R E L   A L L   R 9
    '''
    systematics = 0.5
    #__________________________________________________________________________
    ## Float everything
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_resdata_EB_jan2012rereco',
        name      = 'PhotonResolutionVsEt_DataFit_Barrel_allR9',
        title     = 'Barrel, Data Fit',
        systematics = systematics,
        )
    fitter.run()
    fitters.append(fitter)
    ebfitter = fitter


    #__________________________________________________________________________
    ## Fix S to TB
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_resdata_EB_jan2012rereco',
        name      = 'PhotonResolutionVsEt_DataFit_Barrel_allR9_SfromTB',
        title     = 'Barrel, Data Fit, S from TB',
        systematics = systematics,
        )
    fitter.S.setVal(_stochastic_from_tb/1.16)
    fitter.N.setVal(ebfitter.N.getVal())
    fitter.C.setVal(ebfitter.C.getVal())

    fitter.S.setConstant()
    fitter.run()
    fitters.append(fitter)


    #__________________________________________________________________________
    ## Fix N to MC
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_resdata_EB_jan2012rereco',
        name      = 'PhotonResolutionVsEt_DataFit_Barrel_allR9_NfromMC',
        title     = 'Barrel, Data Fit, N from MC',
        systematics = systematics,
        )
    fitter.S.setVal(_stochastic_from_tb/1.16)
    fitter.N.setVal(_noise_from_mc_barrel_allr9)
    fitter.C.setVal(ebfitter.C.getVal())

    fitter.N.setConstant()
    fitter.run()
    fitters.append(fitter)

    #__________________________________________________________________________
    ## Fix S to TB and N to MC
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_resdata_EB_jan2012rereco',
        name      = 'PhotonResolutionVsEt_DataFit_Barrel_allR9_SfromTB_NfromMC',
        title     = 'Barrel, Data Fit, S from TB, N from MC',
        systematics = systematics,
        )
    fitter.S.setVal(_stochastic_from_tb/1.16)
    fitter.N.setVal(_noise_from_mc_barrel_allr9)
    fitter.C.setVal(ebfitter.C.getVal())

    fitter.S.setConstant()
    fitter.N.setConstant()
    fitter.run()
    fitters.append(fitter)
示例#5
0
def do_barrel_lowr9_fits():
    '''
    B A R R E L   L O W   R 9
    '''

    systematics = 0.5
    #__________________________________________________________________________
    ## Float everything
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_resmc_EB_lowR9_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCFit_Barrel_lowR9',
        title     = 'Barrel, R9 < 0.94, MC Fit',
        systematics = systematics,
        yrange    = (-1, 20),
        )
    fitter.run()
    fitters.append(fitter)
    ebfitter = fitter


    #__________________________________________________________________________
    ## Fix S to TB
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_resmc_EB_lowR9_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCFit_Barrel_lowR9_SfromTB',
        title     = 'Barrel, R9 < 0.94, MC Fit, S from TB',
        systematics = systematics,
        # yrange    = (-1, 6),
        )
    fitter.S.setVal(_stochastic_from_tb/1.16)
    fitter.N.setVal(ebfitter.N.getVal())
    fitter.C.setVal(ebfitter.C.getVal())

    fitter.S.setConstant()
    fitter.run()
    fitters.append(fitter)


    #__________________________________________________________________________
    ## Fix N to MC
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_resmc_EB_lowR9_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCFit_Barrel_lowR9_NfromMC',
        title     = 'Barrel, R9 < 0.94, MC Fit, N from MC',
        systematics = systematics,
        # yrange    = (-1, 6),
        )
    fitter.S.setVal(_stochastic_from_tb/1.16)
    fitter.N.setVal(_noise_from_mc_barrel_lowr9)
    fitter.C.setVal(ebfitter.C.getVal())

    fitter.N.setConstant()
    fitter.run()
    fitters.append(fitter)

    #__________________________________________________________________________
    ## Fix S to TB and N to MC
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_resmc_EB_lowR9_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCFit_Barrel_lowR9_SfromTB_NfromMC',
        title     = 'Barrel, R9 < 0.94, MC Fit, S from TB, N from MC',
        systematics = systematics,
        # yrange    = (-1, 6),
        )
    fitter.S.setVal(_stochastic_from_tb/1.16)
    fitter.N.setVal(_noise_from_mc_barrel_lowr9)
    fitter.C.setVal(ebfitter.C.getVal())

    fitter.S.setConstant()
    fitter.N.setConstant()
    fitter.run()
    fitters.append(fitter)
示例#6
0
def do_barrel_highr9_fits():
    '''
    B A R R E L   H I G H   R 9
    '''
    systematics = 0.05
    
    #______________________________________________________________________________
    ## Float everything
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_restrue_EB_highR9_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCTruth_Barrel_highR9',
        title     = 'Barrel, R9 > 0.94, MC Truth',
        systematics = systematics,
        yrange    = (-1, 5),
        )

    fitter.S.setVal(4.258)
    fitter.N.setVal(_noise_from_tb/_mean_cosh_eta_barrel)
    fitter.C.setVal(0.5098)

    fitter.run()
    fitters.append(fitter)
    ebfitter = fitter


    #______________________________________________________________________________
    ## S from TB
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_restrue_EB_highR9_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCTruth_Barrel_highR9_SfromTB',
        title     = 'Barrel, R9 > 0.94, MC Truth, S from TB',
        systematics = systematics,
        yrange    = (-1, 5),
        )
    fitter.S.setVal(_stochastic_from_tb/_mean_sqrt_cosh_eta_barrel)
    fitter.N.setVal(ebfitter.N.getVal())
    fitter.C.setVal(ebfitter.C.getVal())

    fitter.S.setConstant()
    fitter.run()
    fitters.append(fitter)


    #______________________________________________________________________________
    ## N from TB 
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_restrue_EB_highR9_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCTruth_Barrel_highR9_NfromTB',
        title     = 'Barrel, R9 > 0.94, MC Truth, N from TB',
        systematics = systematics,
        yrange    = (-1, 5),
        )
    fitter.S.setVal(ebfitter.S.getVal())
    fitter.N.setVal(_noise_from_tb/_mean_cosh_eta_barrel)
    fitter.C.setVal(ebfitter.C.getVal())

    fitter.N.setConstant()
    fitter.run()
    fitters.append(fitter)
示例#7
0
def do_endcap_lowr9_fits():
    '''
    E N D C A P S   L O W   R 9
    '''

    systematics = 0.1
    
    #______________________________________________________________________________
    ## Float everything
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_restrue_EE_lowR9_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCTruth_Endcaps_lowR9',
        title     = 'Endcaps, R9 < 0.95, MC Truth',
        systematics = systematics,
        # yrange    = (-1, 5),
        )

    fitter.S.setVal(_stochastic_from_tb/_mean_sqrt_cosh_eta_endcaps)
    fitter.N.setVal(_noise_from_tb/_mean_cosh_eta_endcaps)
    fitter.C.setVal(0.5098)

    fitter.run()
    fitters.append(fitter)
    ebfitter = fitter


    #______________________________________________________________________________
    ## S from TB
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_restrue_EE_lowR9_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCTruth_Endcaps_lowR9_SfromTB',
        title     = 'Endcaps, R9 < 0.95, MC Truth, S from TB',
        systematics = systematics,
        # yrange    = (-1, 5),
        )
    fitter.S.setVal(_stochastic_from_tb/_mean_sqrt_cosh_eta_endcaps)
    fitter.N.setVal(ebfitter.N.getVal())
    fitter.C.setVal(ebfitter.C.getVal())

    fitter.S.setConstant()
    fitter.run()
    fitters.append(fitter)


    #______________________________________________________________________________
    ## N from TB 
    fitter = Fitter(
        filename  = _filename,
        graphname = 'regressions_restrue_EE_lowR9_jan2012rereco',
        name      = 'PhotonResolutionVsEt_MCTruth_Endcaps_lowR9_NfromTB',
        title     = 'Endcaps, R9 < 0.95, MC Truth, N from TB',
        systematics = systematics,
        # yrange    = (-1, 5),
        )
    fitter.S.setVal(ebfitter.S.getVal())
    fitter.N.setVal(_noise_from_tb/_mean_cosh_eta_endcaps)
    fitter.C.setVal(ebfitter.C.getVal())

    fitter.N.setConstant()
    fitter.run()
    fitters.append(fitter)