Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas
athena
Commits
993209e6
Commit
993209e6
authored
Oct 30, 2019
by
Johannes Junggeburth
Browse files
Merge branch '21.2' of
ssh://gitlab.cern.ch:7999/atlas/athena
into anatool_fix
parents
6ac0bb4a
b34eb95b
Changes
114
Hide whitespace changes
Inline
Side-by-side
Event/EventTPCnv/src/EventTypeCnv_p3.cxx
View file @
993209e6
...
...
@@ -13,7 +13,7 @@
void
EventTypeCnv_p3
::
transToPers
(
const
EventType
*
trans
,
EventType_p3
*
pers
,
MsgStream
&
)
{
pers
->
m_bit_mask
=
trans
->
m_bit_mask
;
pers
->
m_user_type
=
trans
->
m_user_type
;
pers
->
m_mc_event_weights
=
trans
->
m_mc_
event
_
weights
;
pers
->
m_mc_event_weights
=
std
::
vector
<
float
>
(
0
);
// Wipe
event
weights
, as they've been set in the xAOD::EventInfo
pers
->
m_mc_channel_number
=
trans
->
m_mc_channel_number
;
pers
->
m_mc_event_number
=
trans
->
m_mc_event_number
;
}
...
...
PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/AsgAnalysisAlgorithms/SysListLoaderAlg.h
View file @
993209e6
...
...
@@ -58,6 +58,10 @@ namespace CP
private:
std
::
vector
<
std
::
string
>
m_systematicsList
;
/// \brief the regular expression for filterinf systematics
private:
std
::
string
m_systematicsRegex
{
"(.*)"
};
/// \brief load all recommended systematics at the given number of
/// sigmas
///
...
...
PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/CMakeLists.txt
View file @
993209e6
...
...
@@ -91,6 +91,10 @@ else()
SCRIPT athena.py
AsgAnalysisAlgorithms/EventAlgorithmsTest_jobOptions.py - --data-type afii
PROPERTIES TIMEOUT 600
)
atlas_add_test
(
GeneratorAlgsTestJob
SCRIPT athena.py
AsgAnalysisAlgorithms/GeneratorAlgorithmsTest_jobOptions.py - --data-type mc
PROPERTIES TIMEOUT 600
)
if
(
NOT
"
${
CMAKE_PROJECT_NAME
}
"
STREQUAL
"AthDerivation"
)
atlas_add_test
(
OverlapRemovalTestJobData
...
...
@@ -105,9 +109,5 @@ else()
SCRIPT athena.py
AsgAnalysisAlgorithms/OverlapAlgorithmsTest_jobOptions.py - --data-type afii
PROPERTIES TIMEOUT 600
)
atlas_add_test
(
GeneratorAlgsTestJob
SCRIPT athena.py
AsgAnalysisAlgorithms/GeneratorAlgorithmsTest_jobOptions.py - --data-type mc
PROPERTIES TIMEOUT 600
)
endif
()
endif
()
PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/Root/SysListLoaderAlg.cxx
View file @
993209e6
...
...
@@ -9,6 +9,8 @@
// includes
//
#include
<regex>
#include
<AsgAnalysisAlgorithms/SysListLoaderAlg.h>
#include
<AsgTools/MessageCheck.h>
...
...
@@ -28,6 +30,7 @@ namespace CP
{
declareProperty
(
"systematicsName"
,
m_systematicsName
,
"the name of the systematics in the event store"
);
declareProperty
(
"systematicsList"
,
m_systematicsList
,
"the list of systematics to run"
);
declareProperty
(
"systematicsRegex"
,
m_systematicsRegex
,
"systematics filter regex"
);
declareProperty
(
"sigmaRecommended"
,
m_sigmaRecommended
,
"the sigma with which to run recommended systematics"
);
}
...
...
@@ -112,10 +115,17 @@ namespace CP
CP
::
MakeSystematicsVector
sys
;
sys
.
setSigma
(
m_sigmaRecommended
);
sys
.
calc
(
recommended
);
std
::
regex
expr
(
m_systematicsRegex
);
for
(
const
CP
::
SystematicSet
&
mysys
:
sys
.
result
(
""
))
{
ANA_MSG_INFO
(
"configuring systematic: "
<<
mysys
.
name
());
m_systematicsVector
.
push_back
(
mysys
);
if
(
!
regex_match
(
mysys
.
name
(),
expr
))
{
ANA_MSG_INFO
(
"skipping systematic: "
<<
mysys
.
name
());
}
else
{
ANA_MSG_INFO
(
"configuring systematic: "
<<
mysys
.
name
());
m_systematicsVector
.
push_back
(
mysys
);
}
}
}
}
...
...
PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/python/AsgAnalysisAlgorithmsTest.py
View file @
993209e6
...
...
@@ -51,7 +51,7 @@ def makeOverlapSequence (dataType) :
algSeq
+=
muonSequence
# Include, and then set up the jet analysis algorithm sequence:
jetContainer
=
'AntiKt4EM
Topo
Jets'
jetContainer
=
'AntiKt4EM
PFlow
Jets'
from
JetAnalysisAlgorithms.JetAnalysisSequence
import
makeJetAnalysisSequence
jetSequence
=
makeJetAnalysisSequence
(
dataType
,
jetContainer
)
jetSequence
.
configure
(
inputName
=
jetContainer
,
...
...
@@ -68,7 +68,7 @@ def makeOverlapSequence (dataType) :
# Include, and then set up the overlap analysis algorithm sequence:
from
AsgAnalysisAlgorithms.OverlapAnalysisSequence
import
\
makeOverlapAnalysisSequence
overlapSequence
=
makeOverlapAnalysisSequence
(
dataType
)
overlapSequence
=
makeOverlapAnalysisSequence
(
dataType
,
doMuPFJetOR
=
True
)
overlapSequence
.
configure
(
inputName
=
{
'electrons'
:
'AnalysisElectrons_%SYS%'
,
...
...
PhysicsAnalysis/Algorithms/FTagAnalysisAlgorithms/python/FTagAnalysisAlgorithmsTest.py
View file @
993209e6
...
...
@@ -5,10 +5,7 @@
from
AnaAlgorithm.AlgSequence
import
AlgSequence
from
AnaAlgorithm.DualUseConfig
import
createAlgorithm
def
makeSequence
(
dataType
)
:
# config parameters
jetContainer
=
"AntiKt4EMTopoJets"
def
makeSequence
(
dataType
,
jetContainer
=
"AntiKt4EMPFlowJets"
)
:
algSeq
=
AlgSequence
()
...
...
PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/CMakeLists.txt
View file @
993209e6
...
...
@@ -42,26 +42,47 @@ atlas_install_joboptions( share/*_jobOptions.py )
atlas_install_scripts
(
share/*_eljob.py
)
if
(
XAOD_STANDALONE
)
atlas_add_test
(
testJobData
SCRIPT JetAnalysisAlgorithmsTest_eljob.py --data-type data --unit-test
atlas_add_test
(
testJobData
EMTopo
SCRIPT JetAnalysisAlgorithmsTest_
EMTopo_
eljob.py --data-type data --unit-test
PROPERTIES TIMEOUT 600
)
atlas_add_test
(
testJob
FullSim
SCRIPT JetAnalysisAlgorithmsTest_eljob.py --data-type
mc
--unit-test
atlas_add_test
(
testJob
DataPFlow
SCRIPT JetAnalysisAlgorithmsTest_
PFlow_
eljob.py --data-type
data
--unit-test
PROPERTIES TIMEOUT 600
)
atlas_add_test
(
testJobF
astSim
SCRIPT JetAnalysisAlgorithmsTest_eljob.py --data-type
afii
--unit-test
atlas_add_test
(
testJobF
ullSimEMTopo
SCRIPT JetAnalysisAlgorithmsTest_
EMTopo_
eljob.py --data-type
mc
--unit-test
PROPERTIES TIMEOUT 600
)
elseif
(
NOT
"
${
CMAKE_PROJECT_NAME
}
"
STREQUAL
"AthDerivation"
)
atlas_add_test
(
testJobData
atlas_add_test
(
testJobFullSimPFlow
SCRIPT JetAnalysisAlgorithmsTest_PFlow_eljob.py --data-type mc --unit-test
PROPERTIES TIMEOUT 600
)
atlas_add_test
(
testJobFastSimEMTopo
SCRIPT JetAnalysisAlgorithmsTest_EMTopo_eljob.py --data-type afii --unit-test
PROPERTIES TIMEOUT 600
)
atlas_add_test
(
testJobFastSimPFlow
SCRIPT JetAnalysisAlgorithmsTest_PFlow_eljob.py --data-type afii --unit-test
PROPERTIES TIMEOUT 600
)
else
()
atlas_add_test
(
testJobDataEMTopo
SCRIPT athena.py
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_EMTopo_jobOptions.py - --data-type data
PROPERTIES TIMEOUT 600
)
atlas_add_test
(
testJobDataPFlow
SCRIPT athena.py
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_PFlow_jobOptions.py - --data-type data
PROPERTIES TIMEOUT 600
)
atlas_add_test
(
testJobFullSimEMTopo
SCRIPT athena.py
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_EMTopo_jobOptions.py - --data-type mc
PROPERTIES TIMEOUT 600
)
atlas_add_test
(
testJobFullSimPFlow
SCRIPT athena.py
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_jobOptions.py - --data-type
data
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_
PFlow_
jobOptions.py - --data-type
mc
PROPERTIES TIMEOUT 600
)
atlas_add_test
(
testJobF
ullSim
atlas_add_test
(
testJobF
astSimEMTopo
SCRIPT athena.py
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_jobOptions.py - --data-type
mc
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_
EMTopo_
jobOptions.py - --data-type
afii
PROPERTIES TIMEOUT 600
)
atlas_add_test
(
testJobFastSim
atlas_add_test
(
testJobFastSim
PFlow
SCRIPT athena.py
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_jobOptions.py - --data-type afii
JetAnalysisAlgorithms/JetAnalysisAlgorithmsTest_
PFlow_
jobOptions.py - --data-type afii
PROPERTIES TIMEOUT 600
)
endif
()
PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetAnalysisAlgorithmsTest.py
View file @
993209e6
...
...
@@ -5,10 +5,10 @@
from
AnaAlgorithm.AlgSequence
import
AlgSequence
from
AnaAlgorithm.DualUseConfig
import
createAlgorithm
def
makeSequence
(
dataType
)
:
def
makeSequence
(
dataType
,
jetContainer
=
"AntiKt4EMPFlowJets"
)
:
# config
jetContainer
=
"AntiKt4EMTopoJets"
algSeq
=
AlgSequence
()
...
...
@@ -60,7 +60,7 @@ def makeSequence (dataType) :
# 'EventInfo.jvt_effSF_%SYS% -> jvtSF_%SYS%',
# 'EventInfo.fjvt_effSF_%SYS% -> fjvtSF_%SYS%',
'AnalysisJets_%SYS%.jvt_effSF_NOSYS -> jet_%SYS%_jvtEfficiency'
,
'AnalysisJets_%SYS%.fjvt_effSF_NOSYS -> jet_%SYS%_fjvtEfficiency'
,
#
'AnalysisJets_%SYS%.fjvt_effSF_NOSYS -> jet_%SYS%_fjvtEfficiency',
]
ntupleMaker
.
systematicsRegex
=
'(^$)|(^JET_.*)'
algSeq
+=
ntupleMaker
...
...
PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetAnalysisSequence.py
View file @
993209e6
...
...
@@ -149,8 +149,10 @@ def makeJetAnalysisSequence( dataType, jetCollection, postfix = '', deepCopyOutp
return
seq
def
makeSmallRJetAnalysisSequence
(
seq
,
cutlist
,
cutlength
,
dataType
,
jetCollection
,
jetInput
,
postfix
=
''
,
runJvtUpdate
=
True
,
runJvtEfficiency
=
True
,
jetInput
,
postfix
=
''
,
runJvtUpdate
=
True
,
runFJvtUpdate
=
True
,
runJvtSelection
=
True
,
runFJvtSelection
=
True
,
runJvtEfficiency
=
True
,
runFJvtEfficiency
=
True
,
reduction
=
"Global"
,
JEROption
=
"Simple"
):
"""Add algorithms for the R=0.4 jets.
...
...
@@ -163,8 +165,11 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
jetInput -- The type of input used, read from the collection name.
postfix -- String to be added to the end of all public names.
runJvtUpdate -- Determines whether or not to update JVT on the jets
runJvtEfficiency -- Determines whether or not to recalculate the JVT
efficiency
runFJvtUpdate -- Determines whether or not to update forward JVT on the jets
runJvtSelection -- Determines whether or not to run JVT selection on the jets
runFJvtSelection -- Determines whether or not to run forward JVT selection on the jets
runJvtEfficiency -- Determines whether or not to calculate the JVT efficiency
runFJvtEfficiency -- Determines whether or not to calculate the forward JVT efficiency
reduction -- Which NP reduction scheme should be used (All, Global, Category, Scenario)
JEROption -- Which variant of the reduction should be used (All, Full, Simple). Note that not all combinations of reduction and JEROption are valid!
"""
...
...
@@ -226,6 +231,7 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
addPrivateTool
(
alg
,
'jvtTool'
,
'JetVertexTaggerTool'
)
seq
.
append
(
alg
,
inputPropName
=
'jets'
,
outputPropName
=
'jetsOut'
,
stageName
=
'selection'
)
if
runFJvtUpdate
:
alg
=
createAlgorithm
(
'CP::JetModifierAlg'
,
'JetModifierAlg'
+
postfix
)
addPrivateTool
(
alg
,
'modifierTool'
,
'JetForwardJvtTool'
)
alg
.
modifierTool
.
OutputDec
=
"passFJVT"
#Output decoration
...
...
@@ -239,17 +245,22 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
# Set up the jet efficiency scale factor calculation algorithm
# Change the truthJetCollection property to AntiKt4TruthWZJets if preferred
if
runJvt
Efficiency
:
if
runJvt
Selection
:
alg
=
createAlgorithm
(
'CP::JvtEfficiencyAlg'
,
'JvtEfficiencyAlg'
+
postfix
)
addPrivateTool
(
alg
,
'efficiencyTool'
,
'CP::JetJvtEfficiency'
)
alg
.
efficiencyTool
.
SFFile
=
'JetJvtEfficiency/Moriond2018/JvtSFFile_EMTopoJets.root'
alg
.
efficiencyTool
.
WorkingPoint
=
'Medium'
if
jetInput
==
'EMPFlow'
:
alg
.
efficiencyTool
.
SFFile
=
'JetJvtEfficiency/Moriond2018/JvtSFFile_EMPFlow.root'
alg
.
efficiencyTool
.
MaxPtForJvt
=
60e3
else
:
alg
.
efficiencyTool
.
SFFile
=
'JetJvtEfficiency/Moriond2018/JvtSFFile_EMTopoJets.root'
alg
.
efficiencyTool
.
MaxPtForJvt
=
120e3
alg
.
efficiencyTool
.
WorkingPoint
=
'Tight'
if
jetInput
==
'EMPFlow'
else
'Medium'
alg
.
selection
=
'jvt_selection'
alg
.
scaleFactorDecoration
=
'jvt_effSF_%SYS%'
alg
.
scaleFactorDecorationRegex
=
jvtSysts
# Disable scale factor decorations if running on data
# We still want to run the JVT selection
if
dataType
==
'data'
:
if
not
runJvtEfficiency
or
dataType
==
'data'
:
alg
.
scaleFactorDecoration
=
''
alg
.
truthJetCollection
=
''
alg
.
outOfValidity
=
2
...
...
@@ -257,7 +268,8 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
alg
.
skipBadEfficiency
=
0
seq
.
append
(
alg
,
inputPropName
=
'jets'
,
affectingSystematics
=
jvtSysts
,
stageName
=
'selection'
)
if
runFJvtSelection
:
alg
=
createAlgorithm
(
'CP::JvtEfficiencyAlg'
,
'ForwardJvtEfficiencyAlg'
)
addPrivateTool
(
alg
,
'efficiencyTool'
,
'CP::JetJvtEfficiency'
)
alg
.
efficiencyTool
.
SFFile
=
'JetJvtEfficiency/Moriond2018/fJvtSFFile.root'
...
...
@@ -269,7 +281,7 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
alg
.
scaleFactorDecorationRegex
=
fjvtSysts
# Disable scale factor decorations if running on data
# We still want to run the JVT selection
if
dataType
==
'data'
:
if
not
runFJvtEfficiency
or
dataType
==
'data'
:
alg
.
scaleFactorDecoration
=
''
alg
.
truthJetCollection
=
''
alg
.
outOfValidity
=
2
...
...
@@ -277,7 +289,6 @@ def makeSmallRJetAnalysisSequence( seq, cutlist, cutlength, dataType, jetCollect
alg
.
skipBadEfficiency
=
0
seq
.
append
(
alg
,
inputPropName
=
'jets'
,
affectingSystematics
=
fjvtSysts
,
stageName
=
'selection'
)
pass
# Return the sequence:
return
seq
,
cutlist
,
cutlength
...
...
PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/python/JetJvtAnalysisSequence.py
View file @
993209e6
...
...
@@ -6,6 +6,7 @@ from AnaAlgorithm.DualUseConfig import createAlgorithm, addPrivateTool
def
makeJetJvtAnalysisSequence
(
dataType
,
jetCollection
,
preselection
=
''
,
disableFJvt
=
False
,
globalSF
=
True
,
runSelection
=
True
):
"""Create a jet JVT analysis algorithm sequence
...
...
@@ -13,6 +14,7 @@ def makeJetJvtAnalysisSequence( dataType, jetCollection,
Keyword arguments:
dataType -- The data type to run on ("data", "mc" or "afii")
jetCollection -- The jet container to run on
disableFJvt -- Wether to disable forward JVT calculations
globalSF -- Wether to calculate per event scale factors
runSelection -- Wether to run selection
"""
...
...
@@ -46,24 +48,25 @@ def makeJetJvtAnalysisSequence( dataType, jetCollection,
inputPropName
=
{
'jets'
:
'particles'
,
'eventInfo'
:
'eventInfo'
}
)
alg
=
createAlgorithm
(
'CP::AsgEventScaleFactorAlg'
,
'ForwardJvtEventScaleFactorAlg'
)
alg
.
preselection
=
preselection
+
'&&no_fjvt'
if
preselection
else
'no_fjvt'
alg
.
scaleFactorInputDecoration
=
'fjvt_effSF_%SYS%'
alg
.
scaleFactorInputDecorationRegex
=
fjvtSysts
alg
.
scaleFactorOutputDecoration
=
'fjvt_effSF_%SYS%'
seq
.
append
(
alg
,
affectingSystematics
=
fjvtSysts
,
inputPropName
=
{
'jets'
:
'particles'
,
'eventInfo'
:
'eventInfo'
}
)
if
not
disableFJvt
:
alg
=
createAlgorithm
(
'CP::AsgEventScaleFactorAlg'
,
'ForwardJvtEventScaleFactorAlg'
)
alg
.
preselection
=
preselection
+
'&&no_fjvt'
if
preselection
else
'no_fjvt'
alg
.
scaleFactorInputDecoration
=
'fjvt_effSF_%SYS%'
alg
.
scaleFactorInputDecorationRegex
=
fjvtSysts
alg
.
scaleFactorOutputDecoration
=
'fjvt_effSF_%SYS%'
seq
.
append
(
alg
,
affectingSystematics
=
fjvtSysts
,
inputPropName
=
{
'jets'
:
'particles'
,
'eventInfo'
:
'eventInfo'
}
)
if
runSelection
:
cutlist
.
append
(
'jvt_selection'
)
cutlength
.
append
(
1
)
cutlist
.
append
(
'fjvt_selection'
)
cutlength
.
append
(
1
)
if
not
disableFJvt
:
cutlist
.
append
(
'fjvt_selection'
)
cutlength
.
append
(
1
)
# Set up an algorithm used for debugging the jet selection:
alg
=
createAlgorithm
(
'CP::ObjectCutFlowHistAlg'
,
'JetJvtCutFlowDumperAlg'
)
...
...
PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_EMTopo_eljob.py
0 → 100755
View file @
993209e6
#!/usr/bin/env python
#
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
#
# @author Nils Krumnack
# Read the submission directory as a command line argument. You can
# extend the list of arguments with your private ones later on.
import
optparse
parser
=
optparse
.
OptionParser
()
parser
.
add_option
(
'-d'
,
'--data-type'
,
dest
=
'data_type'
,
action
=
'store'
,
type
=
'string'
,
default
=
'data'
,
help
=
'Type of data to run over. Valid options are data, mc, afii'
)
parser
.
add_option
(
'-s'
,
'--submission-dir'
,
dest
=
'submission_dir'
,
action
=
'store'
,
type
=
'string'
,
default
=
'submitDir'
,
help
=
'Submission directory for EventLoop'
)
parser
.
add_option
(
'-u'
,
'--unit-test'
,
dest
=
'unit_test'
,
action
=
'store_true'
,
default
=
False
,
help
=
'Run the job in "unit test mode"'
)
(
options
,
args
)
=
parser
.
parse_args
()
# Set up (Py)ROOT.
import
ROOT
import
os
ROOT
.
xAOD
.
Init
().
ignore
()
# this forces the jet algorithms dictionary to be loaded before
# anything else, which works around some strange dictionary issues I
# don't understand.
ROOT
.
CP
.
JetCalibrationAlg
(
"dummy"
,
None
)
# ideally we'd run over all of them, but we don't have a mechanism to
# configure per-sample right now
dataType
=
options
.
data_type
inputfile
=
{
"data"
:
'ASG_TEST_FILE_DATA'
,
"mc"
:
'ASG_TEST_FILE_MC'
,
"afii"
:
'ASG_TEST_FILE_MC_AFII'
}
jetContainer
=
"AntiKt4EMTopoJets"
if
not
dataType
in
[
"data"
,
"mc"
,
"afii"
]
:
raise
ValueError
(
"invalid data type: "
+
dataType
)
# Set up the sample handler object. See comments from the C++ macro
# for the details about these lines.
import
os
sh
=
ROOT
.
SH
.
SampleHandler
()
sh
.
setMetaString
(
'nc_tree'
,
'CollectionTree'
)
sample
=
ROOT
.
SH
.
SampleLocal
(
dataType
)
sample
.
add
(
os
.
getenv
(
inputfile
[
dataType
]))
sh
.
add
(
sample
)
sh
.
printContent
()
# Create an EventLoop job.
job
=
ROOT
.
EL
.
Job
()
job
.
sampleHandler
(
sh
)
job
.
options
().
setDouble
(
ROOT
.
EL
.
Job
.
optMaxEvents
,
500
)
from
JetAnalysisAlgorithms.JetAnalysisAlgorithmsTest
import
makeSequence
algSeq
=
makeSequence
(
dataType
,
jetContainer
)
print
algSeq
# For debugging
for
alg
in
algSeq
:
job
.
algsAdd
(
alg
)
pass
# Set up an output file for the job:
job
.
outputAdd
(
ROOT
.
EL
.
OutputStream
(
'ANALYSIS'
)
)
# Find the right output directory:
submitDir
=
options
.
submission_dir
if
options
.
unit_test
:
import
os
import
tempfile
submitDir
=
tempfile
.
mkdtemp
(
prefix
=
'jetTest_'
+
dataType
+
'_EMTopo_'
,
dir
=
os
.
getcwd
()
)
os
.
rmdir
(
submitDir
)
pass
# Run the job using the direct driver.
driver
=
ROOT
.
EL
.
DirectDriver
()
driver
.
submit
(
job
,
submitDir
)
PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_EMTopo_jobOptions.py
0 → 100644
View file @
993209e6
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
#
# @author Nils Krumnack
# User options, which can be set from command line after a "-" character
# athena EgammaAlgorithmsTest_jobOptions.py - --myOption ...
from
AthenaCommon.AthArgumentParser
import
AthArgumentParser
athArgsParser
=
AthArgumentParser
()
athArgsParser
.
add_argument
(
"--data-type"
,
action
=
"store"
,
dest
=
"data_type"
,
default
=
"data"
,
help
=
"Type of input to run over. Valid options are 'data', 'mc', 'afii'"
)
athArgs
=
athArgsParser
.
parse_args
()
dataType
=
athArgs
.
data_type
if
not
dataType
in
[
"data"
,
"mc"
,
"afii"
]
:
raise
Exception
(
"invalid data type: "
+
dataType
)
print
(
"Running on data type: "
+
dataType
)
inputfile
=
{
"data"
:
'ASG_TEST_FILE_DATA'
,
"mc"
:
'ASG_TEST_FILE_MC'
,
"afii"
:
'ASG_TEST_FILE_MC_AFII'
}
jetContainer
=
"AntiKt4EMTopoJets"
# Set up the reading of the input file:
import
AthenaRootComps.ReadAthenaxAODHybrid
theApp
.
EvtMax
=
500
testFile
=
os
.
getenv
(
inputfile
[
dataType
]
)
svcMgr
.
EventSelector
.
InputCollections
=
[
testFile
]
from
JetAnalysisAlgorithms.JetAnalysisAlgorithmsTest
import
makeSequence
algSeq
=
makeSequence
(
dataType
,
jetContainer
)
print
algSeq
# For debugging
# Add all algorithms from the sequence to the job.
athAlgSeq
+=
algSeq
# Set up a histogram output file for the job:
ServiceMgr
+=
CfgMgr
.
THistSvc
()
ServiceMgr
.
THistSvc
.
Output
+=
[
"ANALYSIS DATAFILE='JetAnalysisAlgorithmsTestEMTopo."
+
dataType
+
".hist.root' OPT='RECREATE'"
]
# Reduce the printout from Athena:
include
(
"AthAnalysisBaseComps/SuppressLogging.py"
)
PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_eljob.py
→
PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_
PFlow_
eljob.py
View file @
993209e6
...
...
@@ -60,7 +60,7 @@ job.sampleHandler( sh )
job
.
options
().
setDouble
(
ROOT
.
EL
.
Job
.
optMaxEvents
,
500
)
from
JetAnalysisAlgorithms.JetAnalysisAlgorithmsTest
import
makeSequence
algSeq
=
makeSequence
(
dataType
)
algSeq
=
makeSequence
(
dataType
,
jetContainer
)
print
algSeq
# For debugging
for
alg
in
algSeq
:
job
.
algsAdd
(
alg
)
...
...
@@ -74,7 +74,7 @@ submitDir = options.submission_dir
if
options
.
unit_test
:
import
os
import
tempfile
submitDir
=
tempfile
.
mkdtemp
(
prefix
=
'jetTest_'
+
dataType
+
'_'
,
dir
=
os
.
getcwd
()
)
submitDir
=
tempfile
.
mkdtemp
(
prefix
=
'jetTest_'
+
dataType
+
'_
PFlow_
'
,
dir
=
os
.
getcwd
()
)
os
.
rmdir
(
submitDir
)
pass
...
...
PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_jobOptions.py
→
PhysicsAnalysis/Algorithms/JetAnalysisAlgorithms/share/JetAnalysisAlgorithmsTest_
PFlow_
jobOptions.py
View file @
993209e6
...
...
@@ -21,6 +21,8 @@ inputfile = {"data": 'ASG_TEST_FILE_DATA',
"mc"
:
'ASG_TEST_FILE_MC'
,
"afii"
:
'ASG_TEST_FILE_MC_AFII'
}
jetContainer
=
"AntiKt4EMTopoJets"
# Set up the reading of the input file:
import
AthenaRootComps.ReadAthenaxAODHybrid
theApp
.
EvtMax
=
500
...
...
@@ -28,7 +30,7 @@ testFile = os.getenv ( inputfile[dataType] )
svcMgr
.
EventSelector
.
InputCollections
=
[
testFile
]
from
JetAnalysisAlgorithms.JetAnalysisAlgorithmsTest
import
makeSequence
algSeq
=
makeSequence
(
dataType
)
algSeq
=
makeSequence
(
dataType
,
jetContainer
)
print
algSeq
# For debugging
# Add all algorithms from the sequence to the job.
...
...
@@ -37,7 +39,7 @@ athAlgSeq += algSeq
# Set up a histogram output file for the job:
ServiceMgr
+=
CfgMgr
.
THistSvc
()
ServiceMgr
.
THistSvc
.
Output
+=
[
"ANALYSIS DATAFILE='JetAnalysisAlgorithmsTest."
+
dataType
+
".hist.root' OPT='RECREATE'"
"ANALYSIS DATAFILE='JetAnalysisAlgorithmsTest
PFlow
."
+
dataType
+
".hist.root' OPT='RECREATE'"
]
# Reduce the printout from Athena:
...
...
PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/python/MetAnalysisAlgorithmsTest.py
View file @
993209e6
...
...
@@ -15,7 +15,7 @@ def makeSequence (dataType) :
# Include, and then set up the jet analysis algorithm sequence:
from
JetAnalysisAlgorithms.JetAnalysisSequence
import
makeJetAnalysisSequence
jetContainer
=
'AntiKt4EM
Topo
Jets'
jetContainer
=
'AntiKt4EM
PFlow
Jets'
jetSequence
=
makeJetAnalysisSequence
(
dataType
,
jetContainer
)
jetSequence
.
configure
(
inputName
=
jetContainer
,
outputName
=
'AnalysisJets'
)
...
...
PhysicsAnalysis/Algorithms/MetAnalysisAlgorithms/python/MetAnalysisSequence.py
View file @
993209e6
...
...
@@ -11,7 +11,7 @@ def makeMetAnalysisSequence( dataType, metSuffix, useFJVT = True, postfix = '' )
like:
metSequence.configure( inputName = {
'jets' : 'AntiKt4EM
Topo
Jets_%SYS%',
'jets' : 'AntiKt4EM
PFlow
Jets_%SYS%',
'electrons' : 'AnalysisElectrons_%SYS%',
'photons' : 'AnalysisPhotons_%SYS%',
'muons' : 'AnalysisMuons_%SYS%',
...
...
@@ -77,12 +77,13 @@ def makeMetAnalysisSequence( dataType, metSuffix, useFJVT = True, postfix = '' )
seq
.
append
(
alg
,
inputPropName
=
'met'
)
# Set up the met significance algorithm:
alg
=
createAlgorithm
(
'CP::MetSignificanceAlg'
,
'MetSignificanceAlg'
+
postfix
)
addPrivateTool
(
alg
,
'significanceTool'
,
'met::METSignificance'
)
alg
.
significanceTool
.
SoftTermParam
=
0
alg
.
significanceTool
.
TreatPUJets
=
True
alg
.
significanceTool
.
IsAFII
=
dataType
==
"afii"
seq
.
append
(
alg
,
inputPropName
=
'met'
)
if
useFJVT
:
alg
=
createAlgorithm
(
'CP::MetSignificanceAlg'
,
'MetSignificanceAlg'
+
postfix
)
addPrivateTool
(
alg
,
'significanceTool'
,
'met::METSignificance'
)
alg
.
significanceTool
.
SoftTermParam
=
0
alg
.
significanceTool
.
TreatPUJets
=
True
alg
.
significanceTool
.
IsAFII
=
dataType
==
"afii"
seq
.
append
(
alg
,
inputPropName
=
'met'
)
# Return the sequence:
return
seq
PhysicsAnalysis/Algorithms/TauAnalysisAlgorithms/Root/TauEfficiencyCorrectionsAlg.cxx
View file @
993209e6
...
...
@@ -25,7 +25,6 @@ namespace CP
,
m_efficiencyCorrectionsTool
(
"TauAnalysisTools::TauEfficiencyCorrectionsTool"
,
this
)
{
declareProperty
(
"efficiencyCorrectionsTool"
,
m_efficiencyCorrectionsTool
,
"the calibration and smearing tool we apply"
);
declareProperty
(
"scaleFactorDecoration"
,
m_scaleFactorDecoration
,
"the decoration for the tau scale factor"
);
}
...
...
@@ -38,7 +37,6 @@ namespace CP
ANA_MSG_ERROR
(
"no scale factor decoration name set"
);
return
StatusCode
::
FAILURE
;
}
m_scaleFactorAccessor
=
std
::
make_unique
<
SG
::
AuxElement
::
Accessor
<
float
>
>
(
m_scaleFactorDecoration
);
ANA_CHECK
(
m_efficiencyCorrectionsTool
.
retrieve
());
m_systematicsList
.
addHandle
(
m_tauHandle
);
...
...
@@ -54,6 +52,8 @@ namespace CP
StatusCode
TauEfficiencyCorrectionsAlg
::
execute
()
{
ANA_CHECK
(
m_scaleFactorDecoration
.
preExecute
(
m_systematicsList
));