def addJetReclusterer(self, output, alg, radius, input, modifiersin =None, consumers =None, ivtx =None, ghostArea =0.0, ptmin =0.0, ptminFilter =0.0, rndseed =1, isTrigger =False, useTriggerStore =False, variableRMinRadius =-1.0, variableRMassScale =-1.0, calibOpt ="", jetPseudojetCopier =""): self.msg(2, "Adding reclusterer") from JetRec.JetRecConf import JetRecTool from JetRec.JetRecConf import JetReclusterer # Retrieve/build the jet finder. lofinder,hifinder = self.addJetFinderTool(output+"Finder", alg, radius, ivtx, ghostArea, ptmin, rndseed, variableRMinRadius, variableRMassScale) reclname = output + "Reclusterer" groomer = JetReclusterer( reclname, JetConstituentsRetriever = self.tools["jconretriever"], JetFinder = hifinder ) self += groomer jetrec = JetRecTool(output) jetrec.InputContainer = input jetrec.OutputContainer = output jetrec.JetGroomer = groomer jetrec.JetModifiers = self.getModifiers(modifiersin) if consumers != None: jetrec.JetConsumers = consumers jetrec.Trigger = isTrigger or useTriggerStore jetrec.Timer = jetFlags.timeJetRecTool() self += jetrec if isTrigger: self.trigjetrecs += [jetrec] else: self.jetrecs += [jetrec] self.jetcons += [output] return jetrec
def addJetReclusterer(self, output, alg, radius, input, modifiersin =None, consumers =None, ivtx =None, ghostArea =0.0, ptmin =0.0, ptminFilter =0.0, rndseed =1, isTrigger =False, useTriggerStore =False, variableRMinRadius =-1.0, variableRMassScale =-1.0, calibOpt ="", jetPseudojetCopier =""): self.msg(2, "Adding reclusterer") from JetRec.JetRecConf import JetRecTool from JetRec.JetRecConf import JetReclusterer # Retrieve/build the jet finder. lofinder,hifinder = self.addJetFinderTool(output+"Finder", alg, radius, ivtx, ghostArea, ptmin, rndseed, variableRMinRadius, variableRMassScale) reclname = output + "Reclusterer" groomer = JetReclusterer( reclname, JetConstituentsRetriever = self.tools["jconretriever"], JetFinder = hifinder ) self += groomer jetrec = JetRecTool(output) jetrec.InputContainer = input jetrec.OutputContainer = output jetrec.JetGroomer = groomer jetrec.JetModifiers = self.getModifiers(modifiersin) if consumers != None: jetrec.JetConsumers = consumers jetrec.Trigger = isTrigger or useTriggerStore jetrec.Timer = jetFlags.timeJetRecTool() self += jetrec if isTrigger: self.trigjetrecs += [jetrec] else: self.jetrecs += [jetrec] self.jetcons += [output] return jetrec
def addJetFinder(self, output, alg, radius, gettersin, modifiersin =None, consumers =None, ivtxin =None, ghostArea =0.0, ptmin =0.0, ptminFilter =0.0, rndseed =1, isTrigger =False, useTriggerStore =False, variableRMinRadius =-1.0, variableRMassScale =-1.0, calibOpt ="", jetPseudojetCopier ="", warnIfDuplicate=True, overwrite=False): self.msg(2, "Adding finder") from JetRec.JetRecConf import JetRecTool if type(gettersin) == str: getters = self.gettersMap[gettersin] else: getters = gettersin # If jet finding by vertex is not specified, check for special input type names ivtx = ivtxin if ivtx == None: if gettersin == "ztrack": ivtx = -1 # Find tracs separatesly for each vertex elif gettersin == "pv0track": ivtx = 0 # Find tracks only for 1st vertex # Retrieve/build the jet finder. lofinder,hifinder = self.addJetFinderTool(output+"Finder", alg, radius, ivtx, ghostArea, ptmin, rndseed, variableRMinRadius, variableRMassScale) jetrec = JetRecTool(output) jetrec.PseudoJetGetters = getters jetrec.JetFinder = hifinder jetrec.OutputContainer = output ptminSave = self.ptminFilter if ptminFilter > 0.0: self.ptminFilter = ptminFilter jetrec.JetModifiers = self.buildModifiers(modifiersin, lofinder, getters, gettersin, output, calibOpt) if consumers != None: jetrec.JetConsumers = consumers self.ptminFilter = ptminSave jetrec.Trigger = isTrigger or useTriggerStore jetrec.Timer = jetFlags.timeJetRecTool() jetrec.WarnIfDuplicate = warnIfDuplicate jetrec.Overwrite = overwrite self += jetrec if isTrigger: self.trigjetrecs += [jetrec] else: self.jetrecs += [jetrec] self.jetcons += [output] return jetrec
def addJetFinder(self, output, alg, radius, gettersin, modifiersin =None, consumers =None, ivtxin =None, ghostArea =0.0, ptmin =0.0, ptminFilter =0.0, rndseed =1, isTrigger =False, useTriggerStore =False, variableRMinRadius =-1.0, variableRMassScale =-1.0, calibOpt ="", jetPseudojetCopier ="", warnIfDuplicate=True, overwrite=False): self.msg(2, "Adding finder") from JetRec.JetRecConf import JetRecTool if type(gettersin) == str: getters = self.gettersMap[gettersin] else: getters = gettersin # If jet finding by vertex is not specified, check for special input type names ivtx = ivtxin if ivtx == None: if gettersin == "ztrack": ivtx = -1 # Find tracs separatesly for each vertex elif gettersin == "pv0track": ivtx = 0 # Find tracks only for 1st vertex # Retrieve/build the jet finder. lofinder,hifinder = self.addJetFinderTool(output+"Finder", alg, radius, ivtx, ghostArea, ptmin, rndseed, variableRMinRadius, variableRMassScale) jetrec = JetRecTool(output) jetrec.PseudoJetGetters = getters jetrec.JetFinder = hifinder jetrec.OutputContainer = output ptminSave = self.ptminFilter if ptminFilter > 0.0: self.ptminFilter = ptminFilter jetrec.JetModifiers = self.buildModifiers(modifiersin, lofinder, getters, gettersin, output, calibOpt) if consumers != None: jetrec.JetConsumers = consumers self.ptminFilter = ptminSave jetrec.Trigger = isTrigger or useTriggerStore jetrec.Timer = jetFlags.timeJetRecTool() jetrec.WarnIfDuplicate = warnIfDuplicate jetrec.Overwrite = overwrite self += jetrec if isTrigger: self.trigjetrecs += [jetrec] else: self.jetrecs += [jetrec] self.jetcons += [output] return jetrec
def addJetFinder(self, output, alg, radius, gettersin, modifiersin=None, consumers=None, ivtxin=None, ghostArea=0.0, ptmin=0.0, ptminFilter=0.0, rndseed=1, isTrigger=False, useTriggerStore=False, variableRMinRadius=-1.0, variableRMassScale=-1.0, calibOpt="", jetPseudojetCopier="", constmods=[]): self.msg(2, "Adding finder") from JetRec.JetRecConf import JetRecTool if type(gettersin) == str: getters = self.gettersMap[gettersin] else: getters = gettersin # Accumulate all PseudoJetGetters such that we can schedule all # needed PseudoJetAlgorithms before jet building self.allGetters += [ getter for getter in getters if not getter in self.allGetters ] # If jet finding by vertex is not specified, check for special input type names ivtx = ivtxin if ivtx == None: if gettersin == "ztrack": ivtx = -1 # Find tracs separatesly for each vertex elif gettersin == "pv0track": ivtx = 0 # Find tracks only for 1st vertex # Retrieve/build the jet finder. lofinder, hifinder = self.addJetFinderTool(output + "Finder", alg, radius, ivtx, ghostArea, ptmin, rndseed, variableRMinRadius, variableRMassScale, constmods=constmods) jetrec = JetRecTool(output) jetrec.InputPseudoJets = [getter.OutputContainer for getter in getters] jetrec.JetFinder = hifinder jetrec.OutputContainer = output ptminSave = self.ptminFilter if ptminFilter > 0.0: self.ptminFilter = ptminFilter jetrec.JetModifiers = self.buildModifiers(modifiersin, lofinder, getters, gettersin, output, calibOpt, constmods=constmods) self.autoconfigureModifiers(jetrec.JetModifiers, output) if consumers != None: jetrec.JetConsumers = consumers self.ptminFilter = ptminSave jetrec.Trigger = isTrigger or useTriggerStore jetrec.Timer = jetFlags.timeJetRecTool() #jetrec.WarnIfDuplicate = warnIfDuplicate #jetrec.Overwrite = overwrite # JetRecTool.OutputLevel = VERBOSE self += jetrec if isTrigger: self.trigjetrecs += [jetrec] else: self.jetrecs += [jetrec] self.jetcons += [output] return jetrec