Example #1
0
#!/usr/bin/env python

import os
from functools import partial
import JMTucker.Tools.Samples as Samples
import JMTucker.MFVNeutralino.AnalysisConstants as ac
from JMTucker.Tools.ROOTTools import ROOT, data_mc_comparison, set_style, plot_saver, plot_dir

year = '2017p8'
version = 'V23m'
root_file_dir = '/uscms_data/d2/tucker/crab_dirs/Histos%s' % version

set_style()
ps = plot_saver(plot_dir('dbv_%s_%s' % (year, version)), pdf_log=True)

int_lumi = ac.int_lumi_2017p8 * ac.scale_factor_2017p8
int_lumi_nice = ac.int_lumi_nice_2017p8

qcd_samples = Samples.qcd_samples_2017[1:] + Samples.qcd_samples_2018
ttbar_samples = Samples.ttbar_samples_2017
signal_sample = Samples.mfv_neu_tau001000um_M0800_2017
data_samples = Samples.data_samples_2017

background_samples = ttbar_samples + qcd_samples
for s in qcd_samples:
    s.join_info = True, 'Multijet events', ROOT.kBlue - 9
for s in ttbar_samples:
    s.join_info = True, 't#bar{t}', ROOT.kBlue - 7

signal_samples = [signal_sample]
signal_sample.nice_name = 'Multijet signal: #sigma = 1 fb,\\c#tau = 1 mm, M = 800 GeV'
Example #2
0
#!/usr/bin/env python

import os
from functools import partial
import JMTucker.Tools.Samples as Samples
import JMTucker.MFVNeutralino.AnalysisConstants as ac
from JMTucker.Tools.ROOTTools import ROOT, data_mc_comparison, set_style, plot_saver

root_file_dir = '/uscms_data/d3/jchu/crab_dirs/mfv_763p2/HistosV6p1_76x_nstlays3_26'
plot_dir = 'plots/AN-16-394/data_mc_comp'

set_style()
ps = plot_saver(plot_dir)

ac.int_lumi = 36200.
ac.int_lumi_nice = '36.2 fb^{-1} (13 TeV)'
scale_factor = 1. #245750.0 / 264843.310478

data_samples = [] #Samples.data_samples
background_samples = Samples.ttbar_samples + Samples.qcd_samples

signal_samples = [Samples.mfv_neu_tau00100um_M0800, Samples.mfv_neu_tau00300um_M0800, Samples.mfv_neu_tau01000um_M0800, Samples.mfv_neu_tau10000um_M0800]
y = ['100 #mum', '300 #mum', '1 mm', '10 mm']
c = [7, 4, 6, 8]
for i, signal_sample in enumerate(signal_samples):
    signal_sample.xsec = 0.001
    signal_sample.nice_name = 'Signal: #sigma = 1 fb, c#tau = %s, M = 800 GeV' % y[i]
    signal_sample.color = c[i]
Samples.mfv_neu_tau01000um_M0800.color = 8
signal_samples = [Samples.mfv_neu_tau01000um_M0800]
from array import array
from JMTucker.Tools.ROOTTools import ROOT, plot_saver, set_style, differentiate_stat_box, sort_histogram_pair
set_style()
ROOT.gStyle.SetOptStat(100)
ps = plot_saver('plots/btag_counting', size=(600,600))

btags = 'CSVpt30bd0p244 CSVpt30bd0p679 CSVpt30bd0p898 JPpt30bd0p275 JPpt30bd0p545 JPpt30bd0p79 JBPpt30bd1p33 JBPpt30bd2p55 JBPpt30bd3p74 SSVHEpt30bd1p74 SSVHEpt30bd3p05 SSVHPpt30bd2p0 TCHEpt30bd1p7 TCHEpt30bd3p3 TCHEpt30bd10p2 TCHPpt30bd1p19 TCHPpt30bd1p93 TCHPpt30bd3p41'.split()
taus = '0000 0010 0100 1000 4000 9900'.split()
taus = [(tau, ROOT.TFile('mfv_reco_counting_gluino_tau%sum_M400.root' % tau)) for tau in taus]
tau_nice = {'0000': '0', '0010': '10 #mum', '0100': '100 #mum', '1000': '1 mm', '4000': '4 mm', '9900': '9.9 mm'}
colors = [1,2,3,4,6,46]
def btag_color(btag):
    if 'CSV' in btag:
        return ROOT.kRed
    elif 'JP' in btag:
        return ROOT.kBlue
    elif 'JBP' in btag:
        return ROOT.kGreen
    elif 'SSV' in btag:
        return ROOT.kCyan
    elif 'TCHE' in btag:
        return ROOT.kOrange
    elif 'TCHP' in btag:
        return ROOT.kMagenta
    
xs = [1e-3, 10e-3, 100e-3, 1, 9.9]
yys = []
for btag in btags:
    print btag
    hs = [(tau, tau_file.Get('%s/h_ndisc' % btag)) for tau, tau_file in taus]
    opt = ''
Example #4
0
event_histo_path = 'mfvEventHistosOnlyOneVtx'
vertex_histo_path = 'mfvVertexHistosOnlyOneVtx'
hist_path_for_nevents_check = None # 'mfvEventHistosNoCuts/h_npu',
plot_size = (600,600)
int_lumi = 18200. # /pb
int_lumi_nice = '18.2 fb^{-1}'
scale_factor = 253433.0/174559.114014#54685200.8472/45484519.0

################################################################################

from functools import partial
from JMTucker.Tools.ROOTTools import ROOT, data_mc_comparison, set_style, plot_saver
import JMTucker.Tools.Samples as Samples

set_style()
ps = plot_saver(plot_dir, size=plot_size)

data_samples = Samples.data_samples

background_samples = Samples.ttbar_samples + Samples.qcd_samples
for sample in background_samples:
    sample.total_events = sample.nevents_orig/2

signal_samples = [Samples.mfv_neutralino_tau0300um_M0400, Samples.mfv_neutralino_tau1000um_M0400, Samples.mfv_neutralino_tau9900um_M0400]
#signal_samples = [Samples.mfv_neutralino_tau1000um_M0400]
Samples.mfv_neutralino_tau0300um_M0400.nice_name = '#tau = 300 #mum, M = 400 GeV signal'
Samples.mfv_neutralino_tau1000um_M0400.nice_name = '#tau = 1 mm, M = 400 GeV signal'
Samples.mfv_neutralino_tau9900um_M0400.nice_name = '#tau = 10 mm, M = 400 GeV signal'
Samples.mfv_neutralino_tau0300um_M0400.color = 6
Samples.mfv_neutralino_tau1000um_M0400.color = 8
Samples.mfv_neutralino_tau9900um_M0400.color = 2
#!/usr/bin/env python

import os
from functools import partial
import JMTucker.Tools.Samples as Samples
import JMTucker.MFVNeutralino.AnalysisConstants as ac
from JMTucker.Tools.ROOTTools import ROOT, data_mc_comparison, set_style, plot_saver

root_file_dir = '/uscms_data/d2/tucker/crab_dirs/HistosV15_v2'
plot_dir = 'plots/EXO-17-018/dbv'

set_style()
ps = plot_saver(plot_dir, pdf_log=True)

int_lumi_2015 = ac.int_lumi_2015 * ac.scale_factor_2015
int_lumi_2016 = ac.int_lumi_2016 * ac.scale_factor_2016
int_lumi = ac.int_lumi_2015p6 * ac.scale_factor_2015p6
int_lumi_nice = ac.int_lumi_nice_2015p6

qcd_samples = Samples.qcd_samples_sum_2015 + Samples.qcd_samples_sum
ttbar_samples = Samples.ttbar_samples_2015 + Samples.ttbar_samples
signal_sample = Samples.mfv_neu_tau01000um_M0800
data_samples = Samples.data_samples_2015 + Samples.data_samples

background_samples = ttbar_samples + qcd_samples
for s in qcd_samples:
    s.join_info = True, 'Multijet events', ROOT.kBlue-9
for s in ttbar_samples:
    s.join_info = True, 't#bar{t}', ROOT.kBlue-7

signal_samples = [signal_sample]
Example #6
0
#!/usr/bin/env python

from array import array
from math import atan2, pi
from JMTucker.Tools.ROOTTools import ROOT, set_style, plot_saver

set_style()
ps = plot_saver('plots/svdist2d', size=(600,600), root=False)

events = [ #JMTBAD
('ttbarhadronic', 11, 0.038701, (0.261774, 0.408543, 5.461642), (0.227344, 0.390869, 5.455204)),
('ttbarhadronic', 13, 0.052628, (0.256565, 0.375338, 6.423751), (0.216289, 0.409213, 6.422791)),
('ttbarhadronic', 13, 0.035594, (0.242142, 0.408818, 9.065842), (0.242830, 0.373231, 9.031754)),
('ttbarhadronic', 22, 0.035238, (0.256337, 0.386669, 12.382702), (0.221108, 0.385888, 12.389077)),
('ttbarhadronic', 14, 0.047271, (0.265458, 0.405046, -2.695619), (0.241287, 0.364422, -2.724167)),
('ttbarhadronic', 16, 0.035710, (0.234981, 0.383859, 3.376724), (0.270516, 0.387383, 3.372786)),
('ttbarhadronic', 15, 0.043497, (0.266564, 0.379380, 2.645792), (0.230433, 0.403599, 2.642178)),
('ttbarhadronic', 13, 0.005584, (0.255890, 0.389789, -5.614880), (0.261179, 0.391579, -5.632700)),
('ttbarhadronic', 14, 0.045643, (0.227548, 0.410070, -3.065305), (0.270651, 0.395057, -3.077112)),
('ttbarhadronic', 11, 0.026877, (0.253156, 0.376443, 5.128539), (0.255399, 0.403226, 5.124454)),
('ttbarhadronic', 14, 0.032884, (0.255983, 0.405007, -8.209767), (0.237292, 0.377952, -8.198071)),
('ttbarhadronic', 10, 0.031105, (0.231817, 0.387824, 3.532544), (0.259541, 0.401928, 3.530664)),
('ttbarhadronic', 10, 0.029926, (0.257093, 0.400376, -5.239875), (0.228456, 0.391689, -5.243913)),
('ttbarhadronic', 16, 0.053752, (0.269075, 0.394132, -7.130037), (0.217579, 0.409540, -7.126348)),
('ttbarhadronic', 14, 0.029036, (0.248531, 0.403836, -5.928278), (0.251489, 0.374951, -5.968768)),
('ttbarhadronic', 12, 0.038412, (0.277733, 0.400785, -4.486256), (0.245794, 0.422124, -4.502941)),
('ttbarhadronic', 12, 0.022547, (0.234883, 0.381776, 3.450872), (0.245009, 0.361631, 3.413937)),
('ttbarhadronic', 12, 0.035867, (0.231730, 0.393902, -4.327154), (0.263719, 0.410125, -4.301592)),
('ttbarhadronic', 15, 0.032213, (0.239994, 0.372933, -14.086270), (0.260160, 0.398052, -14.074339)),
('ttbarhadronic', 11, 0.048556, (0.233032, 0.419259, -8.775222), (0.244513, 0.372079, -8.765034)),
('ttbarhadronic', 16, 0.035112, (0.261019, 0.388552, -3.532264), (0.225916, 0.389328, -3.552430)),