def initialize(self,config_name): """ Initialize this inherited instance of SelectionBase @param config_name Name of the configuration to use (e.g., 'miniSL') """ SelectionBase.initialize(self,config_name) self.build_custom_objects = False # don't build custom objects for this selection self.energy = info.energy() self.Weights = info.Weights() # samples[energy][sample] self.ttbar_truth_file = 'share/truth_entry.txt' self.init_prev_entry = False # keeping track of previous entry ## If doing systematics, this is accessed many times ## to protect against crashes from loading and re-loading ## Neutrino.cxx, use try/except statement try: getattr(ROOT,'Neutrino') except AttributeError: ROOT.gROOT.LoadMacro('PyMiniAna/Neutrino.cxx') ## Get the sum of weights for each DSID (before any looping!) self.eventWeight = vlq.getSumOfWeights() # dictionary of sum of weights for each dsid self.eventWeight[0] = 1. # for data return