def __init__(self, channel_type): ''' Initialize empty Channel Template with specific type ''' ChannelType.__init__(self, channel_type) ChannelStyle.__init__(self, channel_type) Template.__init__(self) self.__input_templates = [] # track added input templates self.__input_template_types = set() # track added input template types
def __init__(self, input_type, template): ''' Initialize object with input type and histogram. Histogram will be cloned and automatically scaled to x-section, luminosity and number of Monte-Carlo processed events ''' InputType.__init__(self, input_type) # cache scale factor for future fast access self.__scale = (self.xsection * self.luminosity() / self.events) if self.events else 1 # histogram will be scaled upon set and scale factor need to be set Template.__init__(self, template = template)