#==================================================================== #======================================= # RESTORE AOD-REDUCED JET COLLECTIONS #======================================= reducedJetList = [ "AntiKt2PV0TrackJets", "AntiKt4PV0TrackJets", "AntiKt4TruthJets", "AntiKt4TruthWZJets" ] replaceAODReducedJets(reducedJetList, jetm7Seq, "JETM7") #======================================= # BTAGGING INFO FOR PFLOW JET #======================================= from DerivationFrameworkFlavourTag.FlavourTagCommon import FlavorTagInit FlavorTagInit(JetCollections=['AntiKt4EMPFlowJets'], Sequencer=jetm7Seq) #============================================================================== # background generator filters #============================================================================== augmentationTools = [TrigMatchAug] if globalflags.DataSource() == 'geant4': from DerivationFrameworkMCTruth.GenFilterToolSetup import * augmentationTools.append(ToolSvc.DFCommonTruthGenFilt) from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel jetm7Seq += CfgMgr.DerivationFramework__DerivationKernel( name="JETM7Kernel", SkimmingTools=[], ThinningTools=thinningTools, AugmentationTools=augmentationTools)
getPFlowfJVT(jetalg='AntiKt4EMPFlow',sequence=SeqPHYSLITE, algname='PHYSLITEJetForwardPFlowJvtToolAlg') #==================================================================== # Flavour tagging #==================================================================== # Create variable-R trackjets and dress AntiKt10LCTopo with ghost VR-trkjet addVRJets(SeqPHYSLITE) #addVRJetsTCC(DerivationFrameworkJob, "AntiKtVR30Rmax4Rmin02Track", "GhostVR30Rmax4Rmin02TrackJet", # VRJetAlg="AntiKt", VRJetRadius=0.4, VRJetInputs="pv0track", # ghostArea = 0 , ptmin = 2000, ptminFilter = 2000, # variableRMinRadius = 0.02, variableRMassScale = 30000, calibOpt = "none") # add xbb taggers from DerivationFrameworkFlavourTag.HbbCommon import addRecommendedXbbTaggers addRecommendedXbbTaggers(SeqPHYSLITE, ToolSvc) FlavorTagInit(JetCollections = [ 'AntiKt4EMPFlowJets'], Sequencer = SeqPHYSLITE) #============================================================================== # Systematics #============================================================================== # Set up the systematics loader/handler algorithm: sysLoader = CfgMgr.CP__SysListLoaderAlg( 'SysLoaderAlg' ) #sysLoader.sigmaRecommended = 1 sysLoader.systematicsList= [''] SeqPHYSLITE += sysLoader dataType = "data" if DerivationFrameworkIsMonteCarlo: dataType = "mc"
reducedJetList = [ "AntiKt2PV0TrackJets", "AntiKt4PV0TrackJets", "AntiKt10TruthWZJets", "AntiKt4TruthJets" ] extendedFlag = 0 # --- = 0 for Standard Taggers & =1 for ExpertTaggers replaceAODReducedJets(reducedJetList, FTAG3Seq, "FTAG3", extendedFlag) addDefaultTrimmedJets(FTAG3Seq, "FTAG3", dotruth=True) #=================================================================== # Tag custom or pre-built jet collections #=================================================================== FlavorTagInit(JetCollections=['AntiKt4EMTopoJets'], Sequencer=FTAG3Seq) #==================================================================== # Add sequence (with all kernels needed) to DerivationFrameworkJob #==================================================================== DerivationFrameworkJob += FTAG3Seq #==================================================================== # SET UP STREAM #==================================================================== # The base name (DAOD_FTAG3 here) must match the string in streamName = derivationFlags.WriteDAOD_FTAG3Stream.StreamName fileName = buildFileName(derivationFlags.WriteDAOD_FTAG3Stream) FTAG3Stream = MSMgr.NewPoolRootStream(streamName, fileName)
] BTaggingFlags.CalibrationChannelAliases += [ "AntiKtVR60Rmax4Rmin0Track->AntiKt4EMTopo" ] BTaggingFlags.CalibrationChannelAliases += [ "AntiKtVR60Rmax4Rmin2LCTopo->AntiKt4EMTopo" ] # run retagging from DerivationFrameworkFlavourTag.FlavourTagCommon import FlavorTagInit FlavorTagInit( JetCollections=[ "AntiKt4PV0TrackJets", "AntiKt4LCTopoJets", "AntiKtVR60Rmax4Rmin2LCTopoJets", "AntiKtVR20Rmax4Rmin0TrackJets", "AntiKtVR40Rmax4Rmin0TrackJets", "AntiKtVR60Rmax4Rmin0TrackJets", ], Sequencer=exot16Seq ) ## Must re-tag Akt4LCTopo and Akt4Trk to make JetFitterNN work with corresponding VR jets (JZ) #==================================================================== # SET UP STREAM #==================================================================== streamName = derivationFlags.WriteDAOD_EXOT16Stream.StreamName fileName = buildFileName(derivationFlags.WriteDAOD_EXOT16Stream) EXOT16Stream = MSMgr.NewPoolRootStream(streamName, fileName) EXOT16Stream.AcceptAlgs(["EXOT16Kernel"]) augStream = MSMgr.GetStream(streamName)
# alias for VR BTaggingFlags.CalibrationChannelAliases += ["AntiKtVR50Rmax4Rmin0Track->AntiKt4EMTopo"] # alias for ExKt BTaggingFlags.CalibrationChannelAliases += [ "AntiKt10LCTopoTrimmedPtFrac5SmallR20->AntiKt10LCTopo,AntiKt6LCTopo,AntiKt6TopoEM,AntiKt4LCTopo,AntiKt4TopoEM,AntiKt4EMTopo", "AntiKt10LCTopoTrimmedPtFrac5SmallR20ExKt2Sub->AntiKt4LCTopo,AntiKt4TopoEM,AntiKt4EMTopo", "AntiKt10Track->AntiKt4EMTopo", "AntiKt10TrackExKt2Sub->AntiKt4EMTopo", ] from DerivationFrameworkFlavourTag.FlavourTagCommon import FlavorTagInit # must re-tag AntiKt4LCTopoJets and AntiKt4PV0TrackJets to make JetFitterNN work with corresponding VR jets (nikola: why?) # also, re-tag R=0.2 track jets FlavorTagInit( myTaggers = defaultTaggers, JetCollections = ["AntiKt4PV0TrackJets", "AntiKtVR50Rmax4Rmin0TrackJets", "AntiKt2PV0TrackJets"] + ExKtJetCollection__SubJet, Sequencer = FTAG5Seq ) FlavorTagInit( myTaggers = defaultTaggers + specialTaggers, JetCollections = ExKtJetCollection__FatJet, Sequencer = FTAG5Seq ) #==================================================================== # Schedule k-means clustering #==================================================================== def buildKmeansSubjets(JetCollectionName, nsubjet, recordNameAppendix = "", ToolSvc = ToolSvc): RecordSubjetContainerName = "%sKmeans%i%sSubJets" % (JetCollectionName.replace("Jets", ""), nsubjet, recordNameAppendix) RecordSubjetLabel = "Kmeans%i%sSubJets" % (nsubjet, recordNameAppendix) from JetTagTools.JetTagToolsConf import Analysis__KmeansbbTagTool KmeansbbTagToolInstance = Analysis__KmeansbbTagTool( name = "KmeansbbTagTool%i%s_%s" % (nsubjet, recordNameAppendix, JetCollectionName), Debug = False, PrimaryVertexContainerName = "PrimaryVertices",
nn_file_name= "BoostedJetTaggers/HbbTagger/Summer2018/MulticlassNetwork.json", nn_config_file= "BoostedJetTaggers/HbbTaggerDNN/MulticlassConfigJune2018.json") # alias for VR BTaggingFlags.CalibrationChannelAliases += [ "AntiKtVR30Rmax4Rmin02Track->AntiKtVR30Rmax4Rmin02Track,AntiKt4EMTopo" ] #=================================================================== # Tag custom or pre-built jet collections #=================================================================== FlavorTagInit(scheduleFlipped=True, JetCollections=['AntiKt4EMPFlowJets', 'AntiKt4EMTopoJets'], Sequencer=FTAG4Seq) #==================================================================== # Add sequence (with all kernels needed) to DerivationFrameworkJob #==================================================================== DerivationFrameworkJob += FTAG4Seq #==================================================================== # SET UP STREAM #==================================================================== # The base name (DAOD_FTAG4 here) must match the string in streamName = derivationFlags.WriteDAOD_FTAG4Stream.StreamName fileName = buildFileName(derivationFlags.WriteDAOD_FTAG4Stream) FTAG4Stream = MSMgr.NewPoolRootStream(streamName, fileName)
"AntiKtVR40Rmax4Rmin2Track->AntiKt4Track,AntiKt4TopoEM,AntiKt4EMTopo", ] # specify tagger list: BtaggerList = [ 'IP2D', 'IP3D', 'SV0', 'MultiSVbb1', 'MultiSVbb2', 'SV1', 'JetFitterNN', 'MV2c00', 'MV2c10', 'MV2c20', 'MV2c100', 'MV2m' ] # special tagger list SpecialBtaggerList = ['ExKtbb'] # initialize all b-tagging tool # normal b-tagging from DerivationFrameworkFlavourTag.FlavourTagCommon import FlavorTagInit FlavorTagInit(myTaggers=BtaggerList, JetCollections=JetCollectionToRetag + JetCollectionToBtag, Sequencer=DerivationFrameworkJob) # special b-tagging for post b-tagging FlavorTagInit(myTaggers=BtaggerList + SpecialBtaggerList, JetCollections=JetCollectionToPostBtag, Sequencer=DerivationFrameworkJob) #==================================================================== # SET UP STREAM #==================================================================== streamName = derivationFlags.WriteDAOD_JETM8Stream.StreamName fileName = buildFileName(derivationFlags.WriteDAOD_JETM8Stream) JETM8Stream = MSMgr.NewPoolRootStream(streamName, fileName) JETM8Stream.AcceptAlgs(["JETM8Kernel"]) # for thinning from AthenaServices.Configurables import ThinningSvc, createThinningSvc
#==================================================================== # FTAG1.py # It requires the reductionConf flag FTAG1 in Reco_tf.py #==================================================================== # Set up common services and job object. # This should appear in ALL derivation job options from DerivationFrameworkCore.DerivationFrameworkMaster import * from DerivationFrameworkInDet.InDetCommon import * from DerivationFrameworkJetEtMiss.JetCommon import * #from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * from DerivationFrameworkJetEtMiss.METCommon import * from DerivationFrameworkEGamma.EGammaCommon import * from DerivationFrameworkMuons.MuonsCommon import * from DerivationFrameworkFlavourTag.FlavourTagCommon import FlavorTagInit FlavorTagInit(isFTAG1=True) #==================================================================== # SKIMMING TOOLS #==================================================================== from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool if globalflags.DataSource() == 'data': triggers = [ #single jet triggers with online b-tagging information (online taggers) "HLT_j15_bperf", "HLT_j25_bperf", "HLT_j35_bperf", "HLT_j45_bperf", "HLT_j55_bperf", "HLT_j85_bperf",