예제 #1
0
 def __init__(self,m_cfg_parser):
     """Initialize the inherited class and pass the config parser object around"""
     DataMCPlotter.__init__(self,m_cfg_parser)
     
     # initialize some variables that the user can modify
     self.p_cfg_name  = 'configuration'
     self._leading    = False
     self.alpha       = 0.5
     self.hist_type   = 'stepfilled'
     self.leg_labels  = {'ttbar_inclu':r't$\bar{\text{t}}$',\
                         'TTS_M1000':r'T$\bar{\text{T}}$S (1000)'}
     self.colors      = ''           # scatter / errorbar plots (str or [str1,str2])
     self.format      = 'png'
     self.dpi         = 300
     self.y_label     = ''           # efficiency: r'$\epsilon$'
     self.x_label     = ''
     self.y_err       = False
     self.x_err       = False
     self.maxpred     = 0.           # maximum prediction to scale the y-axis
     self.capsize     = 0
     self.plt_cmap    = ''           # colormap for histogram
     self.lumi        = info.LUMI()  # define luminosity (user can set different one)
     self.plt_marker  = 'o'
     self.plt_size    = 20
     self.edgecolor   = 'none'
     self.h_rebin     = 50           # for ROOT histograms, rebin using this parameter
     self.obj2ttree   = info.obj2ttree()
     self.key2attr    = info.key2attr()
     self.add_labels  = {}
예제 #2
0
 def __init__(self,cfg_filename):
     """
     Init
     
     @param cfg_filename     Filename of the config file ("PyUser.ini")
     """
     self.p_settings = info.getConfigSettings(cfg_filename)
     self.p_cfg_name = 'configuration'
     
     self.ops        = config.logicOperators()
     self.key2attr   = info.key2attr()
     self.obj2ttree  = info.obj2ttree()
     self.truthObj   = info.truthObject()
     self.nonGeVvars = info.nonGeVvariables()  # variables that aren't in GeV (for scaling plots)
     self.GeV        = 1000.
예제 #3
0
    def __init__(self,parser,cuts):
        """Initialize the class by loading the config file."""
        self.cuts      = cuts   # same for all events
        self.parser    = parser # same for all events
        self.lvl       = ''
        self.ops       = config.logicOperators()

        self.name2attr = {'dr':'DeltaR',\
                          'dp':'DeltaPhi',\
                          'dm':'DeltaM'}

        self.op_keys        = self.name2attr.keys()+['min','max']
        self.key2attr       = info.key2attr()       # dictionary of object attributes and text file keys
        self.vector_objects = info.listed_objects() # list of objects that are stored as lists in event
        self.unique_objects = ['ht','met+mtw','nbtags','mass_lb','vlq_evtype',\
                               'A_mass','A_dr','A_distance'] # simple definitions

        return