示例#1
0
                    default=None,
                    help="""Draw this TGraph2D as a histogram with
    COLZ""")
parser.add_argument('--z-range',
                    default=None,
                    type=str,
                    help="""z-axis range of the COLZ
    hist""")
parser.add_argument('--z-title',
                    default=None,
                    help="""z-axis title of the COLZ hist""")
args = parser.parse_args()

plot.ModTDRStyle(r=0.06 if args.hist is None else 0.17, l=0.12)
ROOT.gStyle.SetNdivisions(510, 'XYZ')
plot.SetBirdPalette()

file = ROOT.TFile(args.input)
types = args.contours.split(',')
CL = 1 - args.CL

# Object storage
graphs = {c: file.Get(c) for c in types}
hists = {}
contours = {}

h_proto = plot.TH2FromTGraph2D(graphs[types[0]],
                               method=args.bin_method,
                               force_x_width=args.force_x_width,
                               force_y_width=args.force_y_width)
h_axis = h_proto
示例#2
0
 def __init__(self):
     PhysicsModel.__init__(self)
     ROOT.gROOT.SetBatch(ROOT.kTRUE)
     plot.ModTDRStyle(l=0.13, b=0.10, r=0.19)
     ROOT.gStyle.SetNdivisions(510, "Z")
     plot.SetBirdPalette()
     self.filePrefix = ''
     self.modelFiles = {}
     self.h_dict = {}
     self.h_dict[0] = {
         'mH'  : 'h_mH',
         'mh'  : 'h_mh',
         'mHp' : 'h_mHp',
         'br_tHpb'       : 'h_brHpb_t',
         'br_Hptaunu'    : 'h_brtaunu_Hp',
         'br_Hhh'        : 'h_brh0h0_H',
         'br_AZh'        : 'h_brZh0_A'
     }
     self.h_dict[1] = {
         'mH'  : 'm_H',
         'mh'  : 'm_h',
         'mHp' : 'm_Hp',
         'br_tHpb'       : 'br_t_Hpb',
         'br_Hptaunu'    : 'br_Hp_taunu',
         'br_Hhh'        : 'br_H_hh',
         'br_AZh'        : 'br_A_Zh'
     }
     for X in ['h', 'H', 'A']:
         self.h_dict[0].update({
             'xs_gg%s'%X     : 'h_ggF_xsec_%s'%X,
             'xs_bb4f%s'%X   : 'h_bbH4f_xsec_%s'%X,
             'xs_bb5f%s'%X   : 'h_bbH_xsec_%s'%X,
             'br_%stautau'%X : 'h_brtautau_%s'%X,
             'br_%sbb'%X     : 'h_brbb_%s'%X,
             'xs_gg%s_scale_lo'%X    : 'h_ggF_xsec20_%s'%X, # nominal - uncert
             'xs_gg%s_scale_hi'%X    : 'h_ggF_xsec05_%s'%X, # nominal + uncert
             'xs_bb4f%s_scale_lo'%X : 'h_bbH4f_xsec_%s_low'%X,  # nominal + uncert
             'xs_bb4f%s_scale_hi'%X : 'h_bbH4f_xsec_%s_high'%X,    # nominal - uncert
             'xs_bb5f%s_scale_lo'%X : 'h_bbH_mudown_%s'%X,  # nominal + uncert
             'xs_bb5f%s_scale_hi'%X : 'h_bbH_muup_%s'%X,    # nominal - uncert
             'xs_gg%s_pdf_hi'%X      : 'h_ggF_pdfup_%s'%X,   # abs(+uncert)
             'xs_gg%s_pdf_lo'%X      : 'h_ggF_pdfdown_%s'%X, # abs(-uncert)
             'xs_gg%s_alphas_hi'%X   : 'h_ggF_alphasup_%s'%X,   # abs(+uncert)
             'xs_gg%s_alphas_lo'%X   : 'h_ggF_alphasdown_%s'%X, # abs(-uncert)
             'xs_bb5f%s_pdf_hi'%X    : 'h_bbH_pdf68up_%s'%X,   # abs(+uncert)
             'xs_bb5f%s_pdf_lo'%X    : 'h_bbH_pdf68down_%s'%X, # abs(-uncert)
             'xs_bb5f%s_alphas_hi'%X : 'h_bbH_pdfalphas68up_%s'%X,   # abs(+uncert)
             'xs_bb5f%s_alphas_lo'%X : 'h_bbH_pdfalphas68down_%s'%X, # abs(-uncert)
             })
         self.h_dict[1].update({
             'xs_gg%s'%X     : 'xs_gg_%s'%X,
             'xs_bb4f%s'%X   : 'xs_bb4F_%s'%X,
             'xs_bb5f%s'%X   : 'xs_bb5F_%s'%X,
             'br_%stautau'%X : 'br_%s_tautau'%X,
             'br_%sbb'%X     : 'br_%s_bb'%X,
             'xs_gg%s_scale_lo'%X    : 'xs_gg_%s_scaleDown'%X, # nominal - uncert
             'xs_gg%s_scale_hi'%X    : 'xs_gg_%s_scaleUp'%X, # nominal + uncert
             'xs_bb4f%s_scale_lo'%X  : 'xs_bb4F_%s_scaleDown'%X,  # nominal + uncert
             'xs_bb4f%s_scale_hi'%X  : 'xs_bb4F_%s_scaleUp'%X,    # nominal - uncert
             'xs_bb5f%s_scale_lo'%X  : 'xs_bb5F_%s_scaleDown'%X,  # nominal + uncert
             'xs_bb5f%s_scale_hi'%X  : 'xs_bb5F_%s_scaleUp'%X,    # nominal - uncert
             'xs_gg%s_pdf_hi'%X      : 'xs_gg_%s_pdfasUp'%X,   # abs(+uncert)
             'xs_gg%s_pdf_lo'%X      : 'xs_gg_%s_pdfasDown'%X, # abs(-uncert)
             'xs_gg%s_alphas_hi'%X   : '',
             'xs_gg%s_alphas_lo'%X   : '',
             'xs_bb5f%s_pdf_hi'%X    : 'xs_bb5F_%s_pdfasUp'%X,   # abs(+uncert)
             'xs_bb5f%s_pdf_lo'%X    : 'xs_bb5F_%s_pdfasDown'%X, # abs(-uncert)
             'xs_bb5f%s_alphas_hi'%X : '',
             'xs_bb5f%s_alphas_lo'%X : ''
             })
     # Define the known production and decay processes
     # These are strings we will look for in the process names to
     # determine the correct normalisation scaling
     self.ERAS = ['7TeV', '8TeV', '13TeV', '14TeV']
     self.PROC_SETS = []
     self.SYST_DICT = defaultdict(list)
     self.NUISANCES = set()
     self.SMSignal  = "SM125" #SM signal
     self.dbg_file = None
     self.mk_plots = False
     self.ggHatNLO = None