def AppendOutputList(HIAODItemList=[]): """Adds HIJetOutputList to the list passed in as an argument""" if HIJetFlags.WriteClusters(): AddToOutputList(HIJetFlags.HIClusterKey(), "xAOD::CaloClusterContainer") from RecExConfig.RecFlags import rec if not rec.doESD(): for R in HIJetFlags.AntiKtRValues(): AddToOutputList("AntiKt%dHIJets" % int(10 * R)) if jetFlags.useTruth(): AddToOutputList("AntiKt%dTruthJets" % int(10 * R)) AddToOutputList(HIJetFlags.TrackJetContainerName()) HIAODItemList += HIJetFlags.HIJetOutputList()
hi_trk_modifiers=[assoc,max_over_mean,jtm.width] hi_modifiers = [] #helper tool to apply bkgr using cells from HIJetRec.HIJetRecConf import HIJetCellSubtractorTool jtm.add(HIJetCellSubtractorTool("HIJetCellSubtractor")) from HIJetRec.HIJetRecConf import HIJetClusterSubtractorTool cl_subtr_tool=HIJetClusterSubtractorTool("HIJetClusterSubtractor") cl_subtr_tool.ConfigDir='HIEventUtils/' jtm.add(cl_subtr_tool) hi_calib_map={} if HIJetFlags.ApplyEtaJESCalibration() : from JetCalibTools.JetCalibToolsConf import JetCalibrationTool for R in HIJetFlags.AntiKtRValues() : calib_seq='EtaJES' JES_is_data=True if jetFlags.useTruth(): JES_is_data=False elif R is 0.4 : calib_seq='EtaJES_Insitu' #only do in situ for R=0.4 jets in data calib_tool=JetCalibrationTool('HICalibToolR%d' % int(10*R),JetCollection='AntiKt%dHI' % int(10*R), ConfigFile='JES_MC15c_HI_Nov2016.config',CalibSequence=calib_seq,IsData=JES_is_data) jtm.add(calib_tool) hi_calib_map['AntiKt%dHIJets' % int(10*R)]=calib_tool jtm.HICalibMap=hi_calib_map hi_modifiers += [jtm.jetfilHI,jtm.jetsorter] hi_modifiers+=[jtm.width,jtm.jetens,jtm.larhvcorr] if jetFlags.useCaloQualityTool(): hi_modifiers += [jtm.caloqual_cluster]
TWTool.ConfigDir = 'HIJetCorrection/' TWTool.InputFile = HIJetFlags.TWConfigFile() from AthenaCommon.AppMgr import ToolSvc ToolSvc += HITowerWeightTool() ESFiller.TowerWeightTool = TWTool ESFiller.EventShapeMapTool = theMapTool #Add to top sequence ESAlg_W.HIEventShapeFillerTool = ESFiller topSequence += ESAlg_W #------------------------------------------------------------ #truth, track and unsubtracted jet setup: if jetFlags.useTruth(): for R in HIJetFlags.AntiKtRValues(): tname = "AntiKt%dTruthJets" % int(10 * R) 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,