Esempio n. 1
0
    my_analysis = Analysis(datasets,
                           analysis_label='test_analysis',
                           force_rebuild=False,
                           log_level=10,
                           log_out='both',
                           timedatelog=False,
                           separate_loggers=False)
    my_analysis.print_latex_table(['wminmunu', 'wmintaunu'])

    # my_analysis.apply_cuts()
    # my_analysis.merge_datasets('wminmunu', 'wmintaunu', apply_cuts=r'Muon $|#eta|$')

    my_analysis.plot_hist(['wminmunu', 'wmintaunu'],
                          'MC_WZmu_el_eta_born',
                          bins=(30, -5, 5),
                          weight='truth_weight',
                          normalise='lumi',
                          lepton='muon',
                          yerr='rsumw2',
                          ratio_plot=True)
    my_analysis.plot_hist(['wminmunu', 'wmintaunu'],
                          'MC_WZ_dilep_m_born',
                          bins=(50, 120, 5000),
                          weight='truth_weight',
                          lepton='muon',
                          title='test plot',
                          normalise=True,
                          yerr='rsumw2',
                          ratio_plot=True)
    my_analysis.plot_hist(['wminmunu', 'wmintaunu'],
                          'mu_pt',
                          bins=(50, 1, 5000),
                        year='2015+2016',
                        force_rebuild=False,
                        TTree_name='nominal_Loose')

    analysis.merge_datasets("wminmunu", "wminmunu_hm", verify=True)
    analysis.merge_datasets("wmintaunu", "wmintaunu_hm", verify=True)
    analysis.merge_datasets("wplusmunu", "wplusmunu_hm", verify=True)
    analysis.merge_datasets("wplustaunu", "wplustaunu_hm", verify=True)

    # normalised
    analysis.plot_hist(['wminmunu', 'wmintaunu'],
                       'met_met',
                       weight='reco_weight',
                       title='reco 139fb$^{-1}$',
                       bins=(30, 150, 5000),
                       logbins=True,
                       logx=True,
                       lepton='muon',
                       normalise='lumi',
                       yerr='rsumw2',
                       scale_by_bin_width=True)

    analysis.plot_hist(['wplusmunu', 'wplustaunu'],
                       'met_met',
                       weight='reco_weight',
                       title='reco 139fb$^{-1}$',
                       bins=(30, 150, 5000),
                       logbins=True,
                       logx=True,
                       lepton='muon',
                       normalise='lumi',
Esempio n. 3
0
    analysis.merge_datasets("wminmunu", "wminmunu_hm")
    analysis.merge_datasets("wmintaunu", "wmintaunu_hm")
    analysis.merge_datasets("wplusmunu", "wplusmunu_hm")
    analysis.merge_datasets("wplustaunu", "wplustaunu_hm")

    # =========================
    # ===== TRUTH - UNCUT =====
    # =========================
    # normalised
    analysis.plot_hist(['wminmunu', 'wmintaunu'],
                       'MC_WZ_dilep_m_born',
                       weight='truth_weight',
                       title='truth - 139fb$^{-1}$',
                       bins=(30, 50, 5000),
                       logbins=True,
                       logx=True,
                       lepton='muon',
                       normalise='lumi',
                       yerr='rsumw2',
                       scale_by_bin_width=True)

    analysis.plot_hist(['wplusmunu', 'wplustaunu'],
                       'MC_WZ_dilep_m_born',
                       weight='truth_weight',
                       title='truth - 139fb$^{-1}$',
                       bins=(30, 50, 5000),
                       logbins=True,
                       logx=True,
                       lepton='muon',
                       normalise='lumi',