'mcNominal'   : sampleToFit.mcRef.histFile,
        'mcAlt'       : None,
        'tagSel'      : None
        }

    if not tnpConf.samplesDef['mcAlt' ] is None:
        info['mcAlt'    ] = tnpConf.samplesDef['mcAlt' ].histFile
    if not tnpConf.samplesDef['tagSel'] is None:
        info['tagSel'   ] = tnpConf.samplesDef['tagSel'].histFile

    effis = None
    effFileName ='%s/egammaEffi.txt' % outputDirectory 
    fOut = open( effFileName,'w')
    
    for ib in range(len(tnpBins['bins'])):
        effis = tnpRoot.getAllEffi( info, tnpBins['bins'][ib] )

        ### formatting assuming 2D bining -- to be fixed        
        v1Range = tnpBins['bins'][ib]['title'].split(';')[1].split('<')
        v2Range = tnpBins['bins'][ib]['title'].split(';')[2].split('<')
        if ib == 0 :
            astr = '### var1 : %s' % v1Range[1]
            print astr
            fOut.write( astr + '\n' )
            astr = '### var2 : %s' % v2Range[1]
            print astr
            fOut.write( astr + '\n' )
            
        astr =  '%+8.3f\t%+8.3f\t%+8.3f\t%+8.3f\t%5.3f\t%5.3f\t%5.3f\t%5.3f\t%5.3f\t%5.3f\t%5.3f\t%5.3f' % (
            float(v1Range[0]), float(v1Range[2]),
            float(v2Range[0]), float(v2Range[2]),
Beispiel #2
0
        'mcNominal': sampleToFit.mcRef.histFile,
        'mcAlt': None,
        'tagSel': None
    }

    if not tnpConf.samplesDef['mcAlt'] is None:
        info['mcAlt'] = tnpConf.samplesDef['mcAlt'].histFile
    if not tnpConf.samplesDef['tagSel'] is None:
        info['tagSel'] = tnpConf.samplesDef['tagSel'].histFile

    effis = None
    effFileName = '%s/egammaEffi.txt' % outputDirectory
    fOut = open(effFileName, 'w')

    for ib in range(len(tnpBins['bins'])):
        effis = tnpRoot.getAllEffi(info, tnpBins['bins'][ib])

        ### formatting assuming 2D bining -- to be fixed
        v1Range = tnpBins['bins'][ib]['title'].split(';')[1].split('<')
        v2Range = tnpBins['bins'][ib]['title'].split(';')[2].split('<')
        if ib == 0:
            astr = '### var1 : %s' % v1Range[1]
            print astr
            fOut.write(astr + '\n')
            astr = '### var2 : %s' % v2Range[1]
            print astr
            fOut.write(astr + '\n')

        astr = '%+8.3f\t%+8.3f\t%+8.3f\t%+8.3f\t%5.3f\t%5.3f\t%5.3f\t%5.3f\t%5.3f\t%5.3f\t%5.3f\t%5.3f' % (
            float(v1Range[0]),
            float(v1Range[2]),