def AddHIJetFinder(R=0.4): unsubtr_suffix = HIJetFlags.UnsubtractedSuffix() cname = "AntiKt%dHIJets_%s" % (int(10 * R), unsubtr_suffix) #'HI' is not allowed 'Label' #Name parsing for JetPtAssociationTool in JetToolSupport.buildModifiers will break #when building PtAssociations, build and add them manually myMods = jtm.modifiersMap["HI_Unsubtr"] #myMods += AddPtAssociationTools(R) finder = jtm.addJetFinder(cname, "AntiKt", R, "HI", myMods, consumers=None, ivtxin=None, ghostArea=0.0, ptmin=0., ptminFilter=5000) jtm.HIJetRecs += [finder]
collExists = False if tname in jtm.tools: continue if rec.readESD(): from RecExConfig.ObjKeyStore import objKeyStore inputcontent = objKeyStore['inputFile'].list() for t in inputcontent: if tname in t: print( "Truth collection %s already exists, no need to rebuild it" % tname) collExists = True break if collExists: continue f = jtm.addJetFinder(tname, "AntiKt", R, "truth", ptmin=HIJetFlags.TruthJetPtMin()) print("Adding %s" % tname) AddToOutputList(tname) #jtm.HIJetRecs+=[f] #track jets if jetFlags.useTracks(): tname = "AntiKt4HITrackJets" hi_trk_modifiers = jtm.modifiersMap["HITrack"] hi_trk_modifiers += AddPtAssociationTools(0.4, False) f = jtm.addJetFinder(tname, "AntiKt", 0.4, "HITrack",
jtm.add(cluster_update) jtm.jetrecs += [cluster_update] jtm.HIJetRecs+=[cluster_update] #subtraction BEFORE iteration for moment subtr2=MakeSubtractionTool(HIJetFlags.IteratedEventShapeKey(),modulator=modulator1) ### #subtracted algorithms #make main jets from unsubtr collections w/ same R, add modifiers for subtraction unsubtr_suffix=HIJetFlags.UnsubtractedSuffix() for R in HIJetFlags.AntiKtRValues() : in_name="AntiKt%sHIJets" % int(10*R) copier=jtm.addJetCopier("DF"+in_name,in_name,GetHIModifierList(in_name,[subtr2],[jtm.jetfilHI,jtm.jetsorter]),shallow=False) jtm.HIJetRecs+=[copier] ### from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import KtDeltaRTool jtm += KtDeltaRTool('ktdr10',JetRadius =1.0) #use calibration for R=0.4 jets for R=1 jets... largeRmodifiers=GetHIModifierList('AntiKt4HIJets',[subtr2],[jtm.ktdr10, jtm.ktsplitter, jtm.pull, jtm.angularity, jtm.planarflow,jtm.ktmassdrop]) a10hi=jtm.addJetFinder('DFAntiKt10HIJets', 'AntiKt', 1.0, 'HI',largeRmodifiers) jtm.HIJetRecs+=[a10hi] if is_mc_or_overlay and not is_pp_mc: #AntiKt10TruthJets are present in pp MC a10truth=jtm.addJetFinder('AntiKt10TruthJets','AntiKt',1.0,'truth') jtm.HIJetRecs+=[a10truth] ### JetAlgFromTools(jtm.HIJetRecs,suffix="HI",persistify=True) for t in jtm.HIJetRecs : jtm.jetrecs.remove(t)