# reductionConf flag JETM7 in Reco_tf.py #==================================================================== from DerivationFrameworkCore.DerivationFrameworkMaster import * from DerivationFrameworkInDet.InDetCommon import * from DerivationFrameworkJetEtMiss.JetCommon import * from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * from DerivationFrameworkEGamma.EGammaCommon import * from DerivationFrameworkMuons.MuonsCommon import * from DerivationFrameworkJetEtMiss.METCommon import * # # if DerivationFrameworkIsMonteCarlo: from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents addStandardTruthContents() #==================================================================== # SKIMMING TOOL #==================================================================== from DerivationFrameworkJetEtMiss import TriggerLists electronTriggers = TriggerLists.single_el_Trig() muonTriggers = TriggerLists.single_mu_Trig() orstr = ' || ' andstr = ' && ' eltrigsel = '(EventInfo.eventTypeBitmask==1) || ' + orstr.join( electronTriggers) elofflinesel = andstr.join([ 'count((Electrons.pt > 25*GeV) && (Electrons.DFCommonElectronsLHMedium)) >= 1',
### Thinning and augmentation tools lists from DerivationFrameworkCore.ThinningHelper import ThinningHelper PHYSLITEThinningHelper = ThinningHelper( "PHYSLITEThinningHelper" ) PHYSLITEThinningHelper.AppendToStream( PHYSLITEStream ) thinningTools = [] AugmentationTools = [] # Special sequence SeqPHYSLITE = CfgMgr.AthSequencer("SeqPHYSLITE") #==================================================================== # TRUTH CONTENT #==================================================================== if DerivationFrameworkIsMonteCarlo: from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents,addPVCollection addStandardTruthContents(SeqPHYSLITE) addPVCollection(SeqPHYSLITE) from DerivationFrameworkMCTruth.HFHadronsCommon import * # Extra classifiers for the Higgs group import DerivationFrameworkHiggs.TruthCategories # Set appropriate truth jet collection for tau truth matching ToolSvc.DFCommonTauTruthMatchingTool.TruthJetContainerName = "AntiKt4TruthDressedWZJets" # Add sumOfWeights metadata for LHE3 multiweights ======= from DerivationFrameworkCore.LHE3WeightMetadata import * from DerivationFrameworkSUSY.DecorateSUSYProcess import IsSUSYSignal if IsSUSYSignal(): from DerivationFrameworkSUSY.SUSYWeightMetadata import * #============================================================================== # HEAVY FLAVOR DECORATION #==============================================================================
# ========================================================================================================================== # Set up stream # ========================================================================================================================== streamName = derivationFlags.WriteDAOD_TAUP1Stream.StreamName fileName = buildFileName( derivationFlags.WriteDAOD_TAUP1Stream ) TAUP1Stream = MSMgr.NewPoolRootStream( streamName, fileName ) TAUP1Stream.AcceptAlgs(["TAUP1Kernel"]) SeqTAUP1 = CfgMgr.AthSequencer("SeqTAUP1") # ========================================================================================================================== # MC truth # ========================================================================================================================== if DerivationFrameworkIsMonteCarlo: from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents addStandardTruthContents(SeqTAUP1,prefix='TAUP1_') # ========================================================================================================================== # Thinning tool # ========================================================================================================================== from DerivationFrameworkCore.ThinningHelper import ThinningHelper TAUP1ThinningHelper = ThinningHelper( "TAUP1ThinningHelper" ) TAUP1ThinningHelper.TriggerChains = "HLT_e24.*|HLT_e60.*" TAUP1ThinningHelper.AppendToStream( TAUP1Stream ) from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning TAUP1CaloClusterThinning = DerivationFramework__CaloClusterThinning(name = "TAUP1ClusterThinning", StreamName = streamName, SGKey = "TauJets", TopoClCollectionSGKey = "CaloCalTopoClusters") ToolSvc += TAUP1CaloClusterThinning
from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents,addMiniTruthCollectionLinks,addHFAndDownstreamParticles,addPVCollection import DerivationFrameworkHiggs.TruthCategories # Add charm quark collection from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__TruthCollectionMaker PHYS2TruthCharmTool = DerivationFramework__TruthCollectionMaker(name = "PHYS2TruthCharmTool", NewCollectionName = "TruthCharm", KeepNavigationInfo = False, ParticleSelectionString = "(abs(TruthParticles.pdgId) == 4)", Do_Compress = True) ToolSvc += PHYS2TruthCharmTool from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation SeqPHYS2 += CfgMgr.DerivationFramework__CommonAugmentation("PHYS2TruthCharmKernel",AugmentationTools=[PHYS2TruthCharmTool]) # Add HF particles addHFAndDownstreamParticles(SeqPHYS2) # Add standard truth addStandardTruthContents(SeqPHYS2,prefix='PHYS2_') # Update to include charm quarks and HF particles - require a separate instance to be train safe from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__TruthNavigationDecorator PHYS2TruthNavigationDecorator = DerivationFramework__TruthNavigationDecorator( name="PHYS2TruthNavigationDecorator", InputCollections=["TruthElectrons", "TruthMuons", "TruthPhotons", "TruthTaus", "TruthNeutrinos", "TruthBSM", "TruthBottom", "TruthTop", "TruthBoson","TruthCharm","TruthHFWithDecayParticles"]) ToolSvc += PHYS2TruthNavigationDecorator SeqPHYS2.PHYS2_MCTruthNavigationDecoratorKernel.AugmentationTools = [PHYS2TruthNavigationDecorator] # Re-point links on reco objects addMiniTruthCollectionLinks(SeqPHYS2) addPVCollection(SeqPHYS2) # Set appropriate truth jet collection for tau truth matching ToolSvc.DFCommonTauTruthMatchingTool.TruthJetContainerName = "AntiKt4TruthDressedWZJets" # SUSY signal from DerivationFrameworkSUSY.DecorateSUSYProcess import IsSUSYSignal if IsSUSYSignal(): from DerivationFrameworkSUSY.SUSYWeightMetadata import *
TAUP5seq = CfgMgr.AthSequencer("TAUP5Sequence") # ============================================= # Set up stream # ============================================= streamName = derivationFlags.WriteDAOD_TAUP5Stream.StreamName fileName = buildFileName(derivationFlags.WriteDAOD_TAUP5Stream) TAUP5Stream = MSMgr.NewPoolRootStream(streamName, fileName) TAUP5Stream.AcceptAlgs(["TAUP5Kernel"]) # ============================================= # MC truth # ============================================= if DerivationFrameworkIsMonteCarlo: from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents addStandardTruthContents(TAUP5seq, prefix='TAUP5_') # ============================================= # Jet and Ditau reconstruction # ============================================= #b-tag AntiKt4PFlowJets #FlavorTagInit(JetCollections = ['AntiKt4EMPFlowJets'], Sequencer = TAUP5seq) reducedJetList = [ "AntiKt4TruthJets", "AntiKt4TruthWZJets", "AntiKt4PV0TrackJets", "AntiKt2PV0TrackJets" ] replaceAODReducedJets(reducedJetList, TAUP5seq, "TAUP5") from DerivationFrameworkTau.TauCommon import addDiTauLowPt