from DerivationFrameworkCore.ThinningHelper import ThinningHelper HIGG5D2ThinningHelper = ThinningHelper("HIGG5D2ThinningHelper") #trigger navigation content HIGG5D2ThinningHelper.TriggerChains = 'HLT_e.*|HLT_mu.*|HLT_xe.*|HLT_j.*' HIGG5D2ThinningHelper.AppendToStream(HIGG5D2Stream) # MC truth thinning (not for data) truth_cond_WZH = "((abs(TruthParticles.pdgId) >= 23) && (abs(TruthParticles.pdgId) <= 25))" # W, Z and Higgs truth_cond_Lepton = "((abs(TruthParticles.pdgId) >= 11) && (abs(TruthParticles.pdgId) <= 16))" # Leptons truth_cond_Quark = "((abs(TruthParticles.pdgId) == 6) || (abs(TruthParticles.pdgId) == 5))" # Top quark and Bottom quark truth_cond_Photon = "((abs(TruthParticles.pdgId) == 22) && (TruthParticles.pt > 1*GeV))" # Photon truth_expression = '(' + truth_cond_WZH + ' || ' + truth_cond_Lepton + ' || ' + truth_cond_Quark + ' || ' + truth_cond_Photon + ')' from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning HIGG5D2MCThinningTool = DerivationFramework__GenericTruthThinning( name="HIGG5D2MCThinningTool", ThinningService=HIGG5D2ThinningHelper.ThinningSvc(), ParticleSelectionString=truth_expression, PreserveDescendants=False, PreserveGeneratorDescendants=True, PreserveAncestors=True) if globalflags.DataSource() == 'geant4': ToolSvc += HIGG5D2MCThinningTool thinningTools.append(HIGG5D2MCThinningTool) # MET/Jet tracks # thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" # from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning # HIGG5D2TPThinningTool = DerivationFramework__TrackParticleThinning( name = "HIGG5D2TPThinningTool", # ThinningService = HIGG5D2ThinningHelper.ThinningSvc(), # SelectionString = thinning_expression,
from DerivationFrameworkCore.ThinningHelper import ThinningHelper JETM7ThinningHelper = ThinningHelper("JETM7ThinningHelper") JETM7ThinningHelper.TriggerChains = orstr.join(electronTriggers + muonTriggers) JETM7ThinningHelper.AppendToStream(JETM7Stream) #==================================================================== # THINNING TOOLS #==================================================================== thinningTools = [] # TrackParticles associated with Muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning JETM7MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name="JETM7MuonTPThinningTool", ThinningService=JETM7ThinningHelper.ThinningSvc(), MuonKey="Muons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += JETM7MuonTPThinningTool thinningTools.append(JETM7MuonTPThinningTool) # TrackParticles associated with electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning JETM7ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="JETM7ElectronTPThinningTool", ThinningService=JETM7ThinningHelper.ThinningSvc(), SGKey="Electrons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += JETM7ElectronTPThinningTool thinningTools.append(JETM7ElectronTPThinningTool)
SUSY2ThinningHelper.TriggerChains = '|'.join(triggersNavThin) SUSY2ThinningHelper.AppendToStream(SUSY2Stream) #==================================================================== # THINNING TOOLS #==================================================================== # MET/Jet tracks -> no longer needed, 11.05.2015 from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning # TrackParticles directly SUSY2TPThinningTool = DerivationFramework__TrackParticleThinning( name="SUSY2TPThinningTool", ThinningService=SUSY2ThinningHelper.ThinningSvc(), SelectionString="InDetTrackParticles.pt > 10*GeV", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += SUSY2TPThinningTool thinningTools.append(SUSY2TPThinningTool) # TrackParticles associated with Muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning SUSY2MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name="SUSY2MuonTPThinningTool", ThinningService=SUSY2ThinningHelper.ThinningSvc(), MuonKey="Muons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += SUSY2MuonTPThinningTool thinningTools.append(SUSY2MuonTPThinningTool)
TAUP1Stream.AcceptAlgs(["TAUP1Kernel"]) # ========================================================================================================================== # Thinning tool # ========================================================================================================================== from DerivationFrameworkCore.ThinningHelper import ThinningHelper TAUP1ThinningHelper = ThinningHelper("TAUP1ThinningHelper") TAUP1ThinningHelper.TriggerChains = "HLT_e24.*|HLT_e60.*" TAUP1ThinningHelper.AppendToStream(TAUP1Stream) # MET/Jet tracks thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning TAUP1MetTPThinningTool = DerivationFramework__TrackParticleThinning( name="TAUP1MetTPThinningTool", ThinningService=TAUP1ThinningHelper.ThinningSvc(), SelectionString=thinning_expression, InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=True) ToolSvc += TAUP1MetTPThinningTool from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning TAUP1JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name="TAUP1JetTPThinningTool", ThinningService=TAUP1ThinningHelper.ThinningSvc(), JetKey="AntiKt4LCTopoJets", InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=True) ToolSvc += TAUP1JetTPThinningTool from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning
PHYSLITETopHFFilterAugmentation.BBFilterTool = PHYSLITEttbarBBfiltertool PHYSLITETopHFFilterAugmentation.CFilterTool = PHYSLITEttbarCfiltertool ToolSvc += PHYSLITETopHFFilterAugmentation AugmentationTools.append(PHYSLITETopHFFilterAugmentation) nanolog.info("PHYSLITETopHFFilterAugmentationTool: {!s}".format(PHYSLITETopHFFilterAugmentation)) #==================================================================== # THINNING #==================================================================== # Cluster thinning from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning # Caloclusters associated to electrons PHYSLITEElectronClusterThinningTool = DerivationFramework__CaloClusterThinning( name = "PHYSLITEElectronClusterThinningTool", ThinningService = PHYSLITEThinningHelper.ThinningSvc(), SGKey = "AnalysisElectrons", CaloClCollectionSGKey = "egammaClusters", TopoClCollectionSGKey = "CaloCalTopoClusters", #SelectionString = "Electrons.pt > 7*GeV", ConeSize = 0.4) ToolSvc += PHYSLITEElectronClusterThinningTool thinningTools.append(PHYSLITEElectronClusterThinningTool) # Caloclusters associated to photons PHYSLITEPhotonClusterThinningTool = DerivationFramework__CaloClusterThinning( name = "PHYSLITEPhotonClusterThinningTool", ThinningService = PHYSLITEThinningHelper.ThinningSvc(), SGKey = "AnalysisPhotons", CaloClCollectionSGKey = "egammaClusters", TopoClCollectionSGKey = "CaloCalTopoClusters", #SelectionString = ""Photons.pt > 10*GeV"",
# THINNING #==================================================================== # Establish the thinning helper (which will set up the services behind the scenes) from DerivationFrameworkCore.ThinningHelper import ThinningHelper TEST8ThinningHelper = ThinningHelper("TEST8ThinningHelper") TEST8ThinningHelper.AppendToStream(TEST8Stream) # Set up your thinning tools (you can have as many as you need). # Note how the thinning service (which must be passed to the tools) is accessed from DerivationFrameworkExamples.DerivationFrameworkExamplesConf import DerivationFramework__ThinningToolExample TEST8ThinningTool = DerivationFramework__ThinningToolExample( name="TEST8ThinningTool", ThinningService=TEST8ThinningHelper.ThinningSvc(), TrackPtCut=20000.0) ToolSvc += TEST8ThinningTool #==================================================================== # CREATE THE DERIVATION KERNEL ALGORITHM AND PASS THE ABOVE TOOLS #==================================================================== from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel( "TEST8Kernel", ThinningTools=[TEST8ThinningTool]) #==================================================================== # CONTENT LIST #====================================================================
from DerivationFrameworkCore.ThinningHelper import ThinningHelper EXOT10ThinningHelper = ThinningHelper( "EXOT10ThinningHelper" ) beamEnergy = jobproperties.Beam.energy() if (beamEnergy < 4.1e+06): EXOT10ThinningHelper.TriggerChains = 'EF_2g20_tight1 | EF_2g50_loose | HLT_g35_medium_g25_medium' if (beamEnergy > 6.0e+06): EXOT10ThinningHelper.TriggerChains = 'HLT_2g20_loose | HLT_2g50_loose | HLT_g35_medium_g25_medium' EXOT10ThinningHelper.AppendToStream( EXOT10Stream ) #==================================================================== # THINNING TOOLS #==================================================================== from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning EXOT10TPThinningTool = DerivationFramework__TrackParticleThinning(name = "EXOT10TPThinningTool", ThinningService = EXOT10ThinningHelper.ThinningSvc(), SelectionString = "InDetTrackParticles.pt > 10*GeV", InDetTrackParticlesKey = "InDetTrackParticles") #ToolSvc += EXOT10TPThinningTool # Tracks associated with Muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning EXOT10MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name = "EXOT10MuonTPThinningTool", ThinningService = EXOT10ThinningHelper.ThinningSvc(), MuonKey = "Muons", InDetTrackParticlesKey = "InDetTrackParticles" ) #ToolSvc += EXOT10MuonTPThinningTool # Tracks associated with Electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
from DerivationFrameworkCore.ThinningHelper import ThinningHelper HIGG3D1ThinningHelper = ThinningHelper("HIGG3D1ThinningHelper") HIGG3D1ThinningHelper.TriggerChains = "HLT_mu.* | HLT_e.* | HLT_2e.* | HLT_2mu.*" HIGG3D1ThinningHelper.AppendToStream(HIGG3D1Stream) #================ # THINNING #================ thinningTools = [] # MET/Jet tracks thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning HIGG3D1MetTPThinningTool = DerivationFramework__TrackParticleThinning( name="HIGG3D1MetTPThinningTool", ThinningService=HIGG3D1ThinningHelper.ThinningSvc(), SelectionString=thinning_expression, InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=True) ToolSvc += HIGG3D1MetTPThinningTool thinningTools.append(HIGG3D1MetTPThinningTool) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG3D1JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name="HIGG3D1JetTPThinningTool", ThinningService=HIGG3D1ThinningHelper.ThinningSvc(), JetKey="AntiKt4EMTopoJets", InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=True) ToolSvc += HIGG3D1JetTPThinningTool thinningTools.append(HIGG3D1JetTPThinningTool)
# SKIMMING TOOLS #==================================================================== import DerivationFrameworkTop.TOPQCommonSelection skimmingTools_lep = DerivationFrameworkTop.TOPQCommonSelection.setup_lep( 'TOPQ3', ToolSvc) skimmingTools_jet = DerivationFrameworkTop.TOPQCommonSelection.setup_jet( 'TOPQ3', ToolSvc) #==================================================================== # THINNING TOOLS #==================================================================== import DerivationFrameworkTop.TOPQCommonThinning thinningTools = DerivationFrameworkTop.TOPQCommonThinning.setup( 'TOPQ3', TOPQ3ThinningHelper.ThinningSvc(), ToolSvc) #==================================================================== # CREATE THE KERNEL(S) #==================================================================== from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel # Create the private sequence TOPQ3Sequence = CfgMgr.AthSequencer("TOPQ3Sequence") # Retagging to get BTagging_AntiKt4EMPFlow Collection (not present in primary AOD) from DerivationFrameworkFlavourTag.FlavourTagCommon import * BTaggingFlags.CalibrationChannelAliases += ["AntiKt4EMPFlow->AntiKt4EMTopo"] ReTag([ 'IP2D', 'IP3D', 'SV0', 'MultiSVbb1', 'MultiSVbb2', 'SV1', 'JetFitterNN',
#============ # Setup tools #============ # Establish the thinning helper from DerivationFrameworkCore.ThinningHelper import ThinningHelper HIGG4D4ThinningHelper = ThinningHelper(DAOD_StreamID + "ThinningHelper") #trigger navigation thinning import DerivationFrameworkHiggs.HIGG4DxThinning HIGG4D4ThinningHelper.TriggerChains = DerivationFrameworkHiggs.HIGG4DxThinning.TriggerChains( DAOD_StreamID) HIGG4D4ThinningHelper.AppendToStream(HIGG4D4Stream) # thinning tools thinningTools = DerivationFrameworkHiggs.HIGG4DxThinning.setup( DAOD_StreamID, HIGG4D4ThinningHelper.ThinningSvc(), ToolSvc) # skimming tools import DerivationFrameworkHiggs.HIGG4DxSkimming skimmingTools = DerivationFrameworkHiggs.HIGG4DxSkimming.setup( DAOD_StreamID, ToolSvc) #augmentation tools from DerivationFrameworkHiggs.HIGG4DxAugmentation import * augmentationTools = DerivationFrameworkHiggs.HIGG4DxAugmentation.setup( DAOD_StreamID, ToolSvc) #slimming tools import DerivationFrameworkHiggs.HIGG4DxSlimming #slimming helper
# Create trigger matching decorations trigmatching_helper = TriggerMatchingHelper( trigger_list = trigger_names, add_to_df_job=True) #==================================================================== # INNER DETECTOR TRACK THINNING #==================================================================== # See recommedations here: # https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/DaodRecommendations # Inner detector group recommendations for indet tracks in analysis PHYS2_thinning_expression = "InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta) < 3.0*mm && InDetTrackParticles.pt > 10*GeV" from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning PHYS2TrackParticleThinningTool = DerivationFramework__TrackParticleThinning(name = "PHYS2TrackParticleThinningTool", ThinningService = PHYS2ThinningHelper.ThinningSvc(), SelectionString = PHYS2_thinning_expression, InDetTrackParticlesKey = "InDetTrackParticles", ApplyAnd = False) ToolSvc += PHYS2TrackParticleThinningTool thinningTools.append(PHYS2TrackParticleThinningTool) # Include inner detector tracks associated with muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning PHYS2MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "PHYS2MuonTPThinningTool", ThinningService = PHYS2ThinningHelper.ThinningSvc(), MuonKey = "Muons", InDetTrackParticlesKey = "InDetTrackParticles", ApplyAnd = False) ToolSvc += PHYS2MuonTPThinningTool
#================ thinningTools = [] # Establish the thinning helper (which will set up the services behind the scenes) from DerivationFrameworkCore.ThinningHelper import ThinningHelper HIGG2D3ThinningHelper = ThinningHelper("HIGG2D3ThinningHelper") #trigger navigation content HIGG2D3ThinningHelper.TriggerChains = 'HLT_e.*|HLT_2e.*|HLT_mu.*|HLT_2mu.*' HIGG2D3ThinningHelper.AppendToStream(HIGG2D3Stream) # MET/Jet tracks thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning HIGG2D3TPThinningTool = DerivationFramework__TrackParticleThinning( name="HIGG2D3TPThinningTool", ThinningService=HIGG2D3ThinningHelper.ThinningSvc(), SelectionString=thinning_expression, InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=True) ToolSvc += HIGG2D3TPThinningTool thinningTools.append(HIGG2D3TPThinningTool) from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG2D3JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name="HIGG2D3JetTPThinningTool", ThinningService=HIGG2D3ThinningHelper.ThinningSvc(), JetKey="AntiKt4LCTopoJets", InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=True) ToolSvc += HIGG2D3JetTPThinningTool thinningTools.append(HIGG2D3JetTPThinningTool)
#==================================================================== # SKIMMING TOOLS #==================================================================== import DerivationFrameworkTop.TOPQCommonSelection skimmingTools_lep = DerivationFrameworkTop.TOPQCommonSelection.setup_lep( 'TOPQ1', ToolSvc) skimmingTools_jet = DerivationFrameworkTop.TOPQCommonSelection.setup_jet( 'TOPQ1', ToolSvc) #==================================================================== # THINNING TOOLS #==================================================================== import DerivationFrameworkTop.TOPQCommonThinning thinningTools = DerivationFrameworkTop.TOPQCommonThinning.setup( 'TOPQ1', TOPQ1ThinningHelper.ThinningSvc(), ToolSvc) #==================================================================== # CREATE THE KERNEL(S) #==================================================================== from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel # Create the private sequence TOPQ1Sequence = CfgMgr.AthSequencer("TOPQ1Sequence") # Retagging to get BTagging_AntiKt4EMPFlow Collection (not present in primary AOD) from DerivationFrameworkFlavourTag.FlavourTagCommon import * BTaggingFlags.CalibrationChannelAliases += ["AntiKt4EMPFlow->AntiKt4EMTopo"] ReTag([ 'IP2D', 'IP3D', 'SV0', 'MultiSVbb1', 'MultiSVbb2', 'SV1', 'JetFitterNN', 'MV2c00', 'MV2c10', 'MV2c20', 'MV2c100', 'MV2m'
TOPQ4ThinningHelper = ThinningHelper("TOPQ4ThinningHelper") TOPQ4ThinningHelper.TriggerChains = DerivationFrameworkTop.TOPQCommonThinning.TOPQTriggerChains() TOPQ4ThinningHelper.AppendToStream(TOPQ4Stream) #==================================================================== # SKIMMING TOOLS #==================================================================== import DerivationFrameworkTop.TOPQCommonSelection skimmingTools_lep = DerivationFrameworkTop.TOPQCommonSelection.setup_lep('TOPQ4', ToolSvc) skimmingTools_jet = DerivationFrameworkTop.TOPQCommonSelection.setup_jet('TOPQ4', ToolSvc) #==================================================================== # THINNING TOOLS #==================================================================== import DerivationFrameworkTop.TOPQCommonThinning thinningTools = DerivationFrameworkTop.TOPQCommonThinning.setup('TOPQ4',TOPQ4ThinningHelper.ThinningSvc(), ToolSvc) #==================================================================== # CREATE THE KERNEL(S) #==================================================================== from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel # Create the private sequence TOPQ4Sequence = CfgMgr.AthSequencer("TOPQ4Sequence") # Retagging to get BTagging_AntiKt4EMPFlow Collection (not present in primary AOD) from DerivationFrameworkFlavourTag.FlavourTagCommon import * BTaggingFlags.CalibrationChannelAliases += [ "AntiKt4EMPFlow->AntiKt4EMTopo" ] ReTag(['IP2D', 'IP3D', 'SV0', 'MultiSVbb1', 'MultiSVbb2', 'SV1', 'JetFitterNN', 'MV2c00', 'MV2c10', 'MV2c20', 'MV2c100', 'MV2m'],['AntiKt4EMPFlowJets'], DerivationFrameworkJob) # First skim on leptons
from DerivationFrameworkCore.ThinningHelper import ThinningHelper STDM5ThinningHelper = ThinningHelper( "STDM5ThinningHelper" ) #trigger navigation content STDM5ThinningHelper.TriggerChains = 'HLT_e.*|HLT_2e.*|HLT_mu.*|HLT_2mu.*' STDM5ThinningHelper.AppendToStream( STDM5Stream ) #===================== # TRACK THINNING #===================== from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning STDM5JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "STDM5JetTPThinningTool", ThinningService = STDM5ThinningHelper.ThinningSvc(), JetKey = "AntiKt4EMTopoJets", SelectionString = "AntiKt4EMTopoJets.pt > 15*GeV", InDetTrackParticlesKey = "InDetTrackParticles", ApplyAnd = True) ToolSvc += STDM5JetTPThinningTool # Tracks associated with Muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning STDM5MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "STDM5MuonTPThinningTool", ThinningService = STDM5ThinningHelper.ThinningSvc(), MuonKey = "Muons", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += STDM5MuonTPThinningTool
#==================================================================== # SKIMMING TOOLS #==================================================================== import DerivationFrameworkTop.TOPQCommonSelection skimmingTools_lep = DerivationFrameworkTop.TOPQCommonSelection.setup_lep( 'TOPQ2', ToolSvc) skimmingTools_jet = DerivationFrameworkTop.TOPQCommonSelection.setup_jet( 'TOPQ2', ToolSvc) #==================================================================== # THINNING TOOLS #==================================================================== import DerivationFrameworkTop.TOPQCommonThinning thinningTools = DerivationFrameworkTop.TOPQCommonThinning.setup( 'TOPQ2', TOPQ2ThinningHelper.ThinningSvc(), ToolSvc) #==================================================================== # CREATE THE KERNEL(S) #==================================================================== from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel # Create the private sequence TOPQ2Sequence = CfgMgr.AthSequencer("TOPQ2Sequence") # Retagging to get BTagging_AntiKt4EMPFlow Collection (not present in primary AOD) from DerivationFrameworkFlavourTag.FlavourTagCommon import * BTaggingFlags.CalibrationChannelAliases += ["AntiKt4EMPFlow->AntiKt4EMTopo"] ReTag([ 'IP2D', 'IP3D', 'SV0', 'MultiSVbb1', 'MultiSVbb2', 'SV1', 'JetFitterNN', 'MV2c00', 'MV2c10', 'MV2c20', 'MV2c100', 'MV2m'
HIGG4D3Stream.AcceptAlgs([DAOD_StreamID+"Kernel"]) #============ # Setup tools #============ # Establish the thinning helper from DerivationFrameworkCore.ThinningHelper import ThinningHelper HIGG4D3ThinningHelper = ThinningHelper( DAOD_StreamID+"ThinningHelper" ) #trigger navigation thinning import DerivationFrameworkHiggs.HIGG4DxThinning HIGG4D3ThinningHelper.TriggerChains = DerivationFrameworkHiggs.HIGG4DxThinning.TriggerChains(DAOD_StreamID) HIGG4D3ThinningHelper.AppendToStream( HIGG4D3Stream ) # thinning tools thinningTools = DerivationFrameworkHiggs.HIGG4DxThinning.setup(DAOD_StreamID, HIGG4D3ThinningHelper.ThinningSvc(), ToolSvc) # skimming tools import DerivationFrameworkHiggs.HIGG4DxSkimming skimmingTools = DerivationFrameworkHiggs.HIGG4DxSkimming.setup(DAOD_StreamID, ToolSvc) #augmentation tools from DerivationFrameworkHiggs.HIGG4DxAugmentation import * augmentationTools = DerivationFrameworkHiggs.HIGG4DxAugmentation.setup(DAOD_StreamID, ToolSvc) #slimming tools import DerivationFrameworkHiggs.HIGG4DxSlimming #slimming helper from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper HIGG4D3SlimmingHelper = SlimmingHelper(DAOD_StreamID+"SlimmingHelper")
# THINNING #==================================================================== # Establish the thinning helper (which will set up the services behind the scenes) from DerivationFrameworkCore.ThinningHelper import ThinningHelper IDPIXLUMIThinningHelper = ThinningHelper("IDPIXLUMIThinningHelper") IDPIXLUMIThinningHelper.AppendToStream(IDPIXLUMIStream) thinningTools = [] if dumpPixInfo: from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackMeasurementThinning thinning_expression = "(PixelClusters.layer == 0) && ((PixelClusters.eta_module >= -10 && PixelClusters.eta_module <= -6) || (PixelClusters.eta_module >= 5 && PixelClusters.eta_module <= 9)) && (((PixelClusters.eta_module <= -7||PixelClusters.eta_module >= 6) && (PixelClusters.eta_pixel_index > 0 && (PixelClusters.eta_pixel_index + PixelClusters.sizeZ-1) < 79)) || ((PixelClusters.eta_module > -7 && PixelClusters.eta_module < 6) && (PixelClusters.eta_pixel_index > 0 && (PixelClusters.eta_pixel_index + PixelClusters.sizeZ - 1) < 159))) && (PixelClusters.phi_pixel_index > 0 && (PixelClusters.phi_pixel_index + PixelClusters.sizePhi-1) < 335)" IDPIXLUMIThinningTool = DerivationFramework__TrackMeasurementThinning( name="IDPIXLUMIThinningTool", ThinningService=IDPIXLUMIThinningHelper.ThinningSvc(), SelectionString=thinning_expression, TrackMeasurementValidationKey="PixelClusters", ApplyAnd=False) ToolSvc += IDPIXLUMIThinningTool thinningTools.append(IDPIXLUMIThinningTool) #==================================================================== # Create the derivation Kernel and setup output stream #==================================================================== from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel( "DFTSOS_KERN", AugmentationTools=augmentationTools, ThinningTools=thinningTools,