Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Elemer Nagy
athena
Commits
7cb7c390
Commit
7cb7c390
authored
7 years ago
by
Giacinto Piacquadio
Committed by
Goetz Gaycken
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
change truth handling to alternative option suggested at HIGG5 meeting
Former-commit-id: 6e531e92979de8a691ba1ff3b25bf81a532cdf97
parent
6ff8fa77
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG5Common.py
+11
-10
11 additions, 10 deletions
...nFramework/DerivationFrameworkHiggs/python/HIGG5Common.py
with
11 additions
and
10 deletions
PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG5Common.py
+
11
−
10
View file @
7cb7c390
# 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
=
Fals
e
)
PreserveAncestors
=
Tru
e
)
from
AthenaCommon.AppMgr
import
ToolSvc
ToolSvc
+=
MCThinningTool
return
MCThinningTool
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment