def AddToOutputList(tname, objType='xAOD::JetContainer'): #filter container based on package flags if HIJetFlags.UnsubtractedSuffix( ) in tname and not HIJetFlags.WriteUnsubtracted(): return if HIJetFlags.SeedSuffix() in tname and not HIJetFlags.WriteSeeds(): return has_key = False for k in HIJetFlags.HIJetOutputList(): if tname == k.split('#')[1]: has_key = True break if not has_key: aux_suffix = 'Aux.' if 'CaloCluster' in objType: HIJetFlags.HIJetOutputList += [ objType.replace("Container", "CellLinkContainer") + "#" + tname + "_links" ] if not HIJetFlags.WriteClusterMoments(): aux_suffix += '-' else: for k in HIJetFlags.MomentsSkipped(): if 'ScaleMomentum' in k: for var in ['pt', 'eta', 'phi', 'm']: aux_suffix += '-%s_%s.' % (k, var) else: aux_suffix += '-%s.' % k HIJetFlags.HIJetOutputList += [objType + "#" + tname] HIJetFlags.HIJetOutputList += [ objType.replace("Container", "AuxContainer") + "#" + tname + aux_suffix ]
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()