diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG5Common.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG5Common.py index 870b396b4956ec5e69c26d86e68def486dcf1353..0c882a5c78ecc398d6247a80175351eeddb1a34e 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG5Common.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG5Common.py @@ -46,7 +46,7 @@ def getHIGG5CommonTruth() : "AntiKt4EMPFlowJets.ConeTruthLabelID", "TruthEvents.PDFID1.PDFID2.PDGID1.PDGID2.Q.X1.X2.XF1.XF2.weights.crossSection.crossSectionError.truthParticleLinks", #"TruthVertices.barcode.x.y.z.t.id.incomingParticleLinks.outgoingParticleLinks", - # "TruthParticles.px.py.pz.e.m.decayVtxLink.prodVtxLink.barcode.pdgId.status.TopHadronOriginFlag.classifierParticleOrigin.classifierParticleType.classifierParticleOutCome.dressedPhoton.polarizationTheta.polarizationPhi", + "TruthParticles.px.py.pz.e.m.decayVtxLink.prodVtxLink.barcode.pdgId.status.TopHadronOriginFlag.classifierParticleOrigin.classifierParticleType.classifierParticleOutCome.dressedPhoton.polarizationTheta.polarizationPhi", "MuonTruthParticles.barcode.decayVtxLink.e.m.pdgId.prodVtxLink.px.py.pz.recoMuonLink.status.truthOrigin.truthParticleLink.truthType" ] @@ -189,11 +189,11 @@ def getTruthThinningTool(tool_prefix, thinning_helper) : 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_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))' + # 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_Top_Quark+')' from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning MCThinningTool = DerivationFramework__GenericTruthThinning( @@ -202,7 +202,7 @@ def getTruthThinningTool(tool_prefix, thinning_helper) : ParticleSelectionString = truth_expression, PreserveDescendants = False, PreserveGeneratorDescendants = False, - PreserveAncestors = True) + PreserveAncestors = False) from AthenaCommon.AppMgr import ToolSvc ToolSvc += MCThinningTool return MCThinningTool diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D4.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D4.py index b48e981f87a879d1965aaeb47b05b92f1e06d92e..9b0392dacdcb14961284feb3c1cac5aeab927e12 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D4.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG2D4.py @@ -69,6 +69,10 @@ thinningTools.append( HIGG5Common.getAntiKt10LCTopoCaloClusterThinning( 'HIGG2D4 #generic object thinning thinningTools.append( HIGG5Common.getAntiKt10LCTopoTrimmedPtFrac5SmallR20Thinning('HIGG2D4',HIGG2D4ThinningHelper) ) +if DerivationFrameworkIsMonteCarlo : + thinningTools.append( HIGG5Common.getTruthThinningTool('HIGG2D4',HIGG2D4ThinningHelper) ) + thinningTools.append( HIGG5Common.getAntiKt10TruthTrimmedPtFrac5SmallR20Thinning('HIGG2D4',HIGG2D4ThinningHelper) ) + thinningTools.append( HIGG5Common.getAntiKt10TruthWZTrimmedPtFrac5SmallR20Thinning('HIGG2D4',HIGG2D4ThinningHelper) ) # Truth particles # if DerivationFrameworkIsMonteCarlo: diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D1.py index b091d3c23be4bec66f644965529d78d4dd9b1a5e..6a7ec87dc55777e9380900ca0498fbe5eb898e81 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D1.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D1.py @@ -62,6 +62,10 @@ thinningTools.append( HIGG5Common.getAntiKt10LCTopoCaloClusterThinning( 'HIGG5D1 #generic object thinning thinningTools.append( HIGG5Common.getAntiKt10LCTopoTrimmedPtFrac5SmallR20Thinning('HIGG5D1',HIGG5D1ThinningHelper) ) +if DerivationFrameworkIsMonteCarlo : + thinningTools.append( HIGG5Common.getTruthThinningTool('HIGG5D1',HIGG5D1ThinningHelper) ) + thinningTools.append( HIGG5Common.getAntiKt10TruthTrimmedPtFrac5SmallR20Thinning('HIGG5D1',HIGG5D1ThinningHelper) ) + thinningTools.append( HIGG5Common.getAntiKt10TruthWZTrimmedPtFrac5SmallR20Thinning('HIGG5D1',HIGG5D1ThinningHelper) ) # MC truth thinning (not for data) # if DerivationFrameworkIsMonteCarlo : diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D2.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D2.py index 1fabd42071b4d721a0226010c622fb6a725ab892..1ca61faa006cf4799c126a8933a36586eab7e1b6 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D2.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/share/HIGG5D2.py @@ -64,6 +64,10 @@ thinningTools.append( HIGG5Common.getAntiKt10LCTopoCaloClusterThinning( 'HIGG5D2 #generic object thinning thinningTools.append( HIGG5Common.getAntiKt10LCTopoTrimmedPtFrac5SmallR20Thinning('HIGG5D2',HIGG5D2ThinningHelper) ) +if DerivationFrameworkIsMonteCarlo : + thinningTools.append( HIGG5Common.getTruthThinningTool('HIGG5D2',HIGG5D2ThinningHelper) ) + thinningTools.append( HIGG5Common.getAntiKt10TruthTrimmedPtFrac5SmallR20Thinning('HIGG5D2',HIGG5D2ThinningHelper) ) + thinningTools.append( HIGG5Common.getAntiKt10TruthWZTrimmedPtFrac5SmallR20Thinning('HIGG5D2',HIGG5D2ThinningHelper) ) #======================================================================== # lepton selection (keep isolation failed leptons for QCD-MJ estimation)