Beispiel #1
0
        histos = [ h_background_mc + [h_ttz_mc], [templates['p']], [templates['m']], [templates['L']], [h_fitresults], [h_data]]

        plot = Plot.fromHisto(name = "fit_plot_pseudoData_%s_%s_%s"%( self.usePseudoData,  channel, region), histos =  histos , texX = "cos#theta^{*}", texY = "Events" )  
        plotting.draw(plot, 
            plot_directory = os.path.join( plot_directory,  'polFits'), 
            logX = False, logY = False, sorting = True,
            legend      = ([0.15,0.7,0.90,0.90], 2)
            )

        templates['p'].legendText  = 'pol(+) %3.1f #pm %3.1f'%( y_p.val, y_p.sigma ) 
        templates['m'].legendText  = 'pol(-) %3.1f #pm %3.1f'%( y_m.val, y_m.sigma ) 
        templates['L'].legendText  = 'pol(L) %3.1f #pm %3.1f'%( y_L.val, y_L.sigma )

        histos = [ [h_ttz_mc], [templates['p']], [templates['m']], [templates['L']], [h_fitresults], [h_data_subtracted]]

        plot = Plot.fromHisto(name = "fit_plot_subtracted_pseudoData_%s_%s_%s"%( self.usePseudoData,  channel, region), histos =  histos , texX = "cos#theta^{*}", texY = "Events" )  
        plotting.draw(plot, 
            plot_directory = os.path.join( plot_directory,  'polFits'), 
            logX = False, logY = False, sorting = False,
            legend      = ([0.15,0.7,0.90,0.90], 2),
            yRange = (0, 30),
            )

if __name__=='__main__':

    setup = Setup()
    estimator_mc = PolarisationEstimate( "polarisation_data", usePseudoData = True)
    estimator_mc._estimate( Region("Z_pt", (0, 100)), 'all', setup )
    estimator_data = PolarisationEstimate( "polarisation_data" )
    estimator_data._estimate( Region("Z_pt", (0, 100)), 'all', setup )
Beispiel #2
0
    regions_varOne  = getRegionsFromThresholds(varOne,  varOneThresholds)
    regions_varTwo  = getRegionsFromThresholds(varTwo, varTwoThresholds)

    regions2D = []
    for r1 in regions_varOne:
        for r2 in regions_varTwo:
            regions2D.append(r1+r2)

    return regions2D



#Put all sets of regions that are used in the analysis, closure, tables, etc.

## 3l signal regions
regionsA = [ Region("Z_pt", (0, 200)), Region("Z_pt", (200, 400)), Region("Z_pt", (400, -1)) ] # first sensitivity study
regionsB = getRegions2D("Z_pt", [0,100,200,-1], "cosThetaStar", [-1,-0.6, 0.6, 1])
regionsC = getRegions2D("Z_pt", [0,100,200,-1], "abs(cosThetaStar)", [0, 0.6, 1])
regionsD = [ Region("Z_pt", (0, 100)), Region("Z_pt", (100, 200)), Region("Z_pt", (200, -1)) ]
regionsE = getRegions2D("Z_pt", [0,100,200,400,-1], "cosThetaStar", [-1,-0.6, 0.6, 1]) # best results
regionsF = getRegions2D("Z_pt", [0,100,200,400], "cosThetaStar", [-1,-0.6, 0.6, 1]) + [Region("Z_pt", (400, -1))]
regionsG = getRegions2D("Z_pt", [0,100,200,400,-1], "lep_pt[2]", [0,30, 60, -1])
regionsH = getRegions2D("Z_pt", [0,100,200,400,-1], "lep_pt[Z_l2_index]", [0, 30, 60, -1])

regionsXSec = getRegions2D("nBTag", [1, 2, -1], "nJetSelected", [2,3,4,5,-1])
regionsXSecB = getRegions2D("nBTag", [1, 2, -1], "nJetSelected", [1,2,3,-1])
regionsXSecC = getRegions2D("nBTag", [1, -1], "nJetSelected", [3,4,5,-1])

## 4l signal regions
regions4l = getRegions2D("Z1_pt_4l", [0,-1], "Z1_cosThetaStar_4l", [-1,-0.6, 0.6, 1])
regions4lB = getRegions2D("Z1_pt_4l", [0,100,200,-1], "Z1_cosThetaStar_4l", [-1, 1])
Beispiel #3
0
def getRegionsFromThresholds(var, vals, gtLastThreshold = True):
    return [Region(var, (vals[i], vals[i+1])) for i in range(len(vals)-1)]
Beispiel #4
0
def getRegions2D(varOne, varOneThresholds, varTwo, varTwoThresholds):
    regions_varOne = getRegionsFromThresholds(varOne, varOneThresholds)
    regions_varTwo = getRegionsFromThresholds(varTwo, varTwoThresholds)

    regions2D = []
    for r1 in regions_varOne:
        for r2 in regions_varTwo:
            regions2D.append(r1 + r2)

    return regions2D


#Put all sets of regions that are used in the analysis, closure, tables, etc.
regionsA = [
    Region("Z_pt", (0, 200)),
    Region("Z_pt", (200, 400)),
    Region("Z_pt", (400, -1))
]  # first sensitivity study
regionsB = getRegions2D("Z_pt", [0, 100, 200, -1], "cosThetaStar",
                        [-1, -0.6, 0.6, 1])
regionsC = getRegions2D("Z_pt", [0, 100, 200, -1], "abs(cosThetaStar)",
                        [0, 0.6, 1])
regionsD = [
    Region("Z_pt", (0, 100)),
    Region("Z_pt", (100, 200)),
    Region("Z_pt", (200, -1))
]
regionsE = getRegions2D("Z_pt", [0, 100, 200, 400, -1], "cosThetaStar",
                        [-1, -0.6, 0.6, 1])  # best results
regionsF = getRegions2D("Z_pt", [0, 100, 200, 400], "cosThetaStar",