diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG5Common.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG5Common.py index be64f96fb3dba4394c5f731c09cd2370c6064a42..f9af52aa189e3dd4357e16aab22b2dc0cefce692 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG5Common.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG5Common.py @@ -1,3 +1,4 @@ + # Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # commont content for Hbb DAODs @@ -24,7 +25,7 @@ def getHIGG5Common() : ] def getHIGG5CommonTruthContainers() : - return ["TruthElectrons", "TruthMuons", "TruthTaus", "TruthPhotons", "TruthNeutrinos", "TruthTop", "TruthBSM", "TruthBoson"] + return ["TruthElectrons", "TruthMuons", "TruthTaus"]#decided not to keep "TruthPhotons", "TruthNeutrinos", "TruthTop", "TruthBSM", "TruthBoson" def getHIGG5CommonTruth() : return [ @@ -53,24 +54,24 @@ def filterContentList(pattern, content_list) : # --- common thinning tools def getTruthThinningTool(tool_prefix, thinning_helper) : from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkIsMonteCarlo - from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning if not DerivationFrameworkIsMonteCarlo : return None # 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) == 5))||((abs(TruthParticles.pdgId) == 4))" # C quark and Bottom quark - truth_cond_Hadrons = "((abs(TruthParticles.pdgId) >= 400)&&(abs(TruthParticles.pdgId)<500))||((abs(TruthParticles.pdgId) >= 5000)&&(abs(TruthParticles.pdgId)<6000))" -# 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+')' - truth_expression = '('+truth_cond_Quark+' || '+ truth_cond_Hadrons+')&&(sqrt(TruthParticles.px*TruthParticles.px+TruthParticles.py*TruthParticles.py)>5000)' + 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_Top_Quark = "((abs(TruthParticles.pdgId) == 6))" + truth_cond_BC_Quark = "((abs(TruthParticles.pdgId) == 5))||((abs(TruthParticles.pdgId) == 4))" # C quark and Bottom quark + truth_cond_Hadrons = "((abs(TruthParticles.pdgId) >= 400)&&(abs(TruthParticles.pdgId)<600))||((abs(TruthParticles.pdgId) >= 4000)&&(abs(TruthParticles.pdgId)<6000))||((abs(TruthParticles.pdgId) >= 10400)&&(abs(TruthParticles.pdgId)<10600))||((abs(TruthParticles.pdgId) >= 20400)&&(abs(TruthParticles.pdgId)<20600))" + truth_expression = '('+truth_cond_WZH+' || '+truth_cond_Lepton +' || '+truth_cond_Top_Quark+') || (('+ truth_cond_BC_Quark + " || " + truth_cond_Hadrons+')&&(sqrt(TruthParticles.px*TruthParticles.px+TruthParticles.py*TruthParticles.py)>5000))' + + from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning MCThinningTool = DerivationFramework__GenericTruthThinning( name = tool_prefix + "MCThinningTool", ThinningService = thinning_helper.ThinningSvc(), ParticleSelectionString = truth_expression, PreserveDescendants = False, PreserveGeneratorDescendants = False, - PreserveAncestors = False) + PreserveAncestors = True) from AthenaCommon.AppMgr import ToolSvc ToolSvc += MCThinningTool return MCThinningTool