ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
JetAnalysisAlgorithms
python
JetJvtAnalysisConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3
4
# AnaAlgorithm import(s):
5
from
AnalysisAlgorithmsConfig.ConfigBlock
import
ConfigBlock
6
from
AnalysisAlgorithmsConfig.ConfigAccumulator
import
DataType
7
from
AthenaCommon.Logging
import
logging
8
9
class
JetJvtAnalysisConfig
(ConfigBlock) :
10
"""the ConfigBlock for the JVT sequence"""
11
12
def
__init__
(self) :
13
super (JetJvtAnalysisConfig, self).__init__ ()
14
self.setBlockName(
'JVT'
)
15
self.addDependency(
'OverlapRemoval'
, required=
False
)
16
self.addDependency(
'EventSelection'
, required=
False
)
17
self.addDependency(
'EventSelectionMerger'
, required=
False
)
18
self.addOption (
'containerName'
,
''
, type=str,
19
noneAction=
'error'
,
20
info=
"the name of the input container."
,
21
meta={
'role'
:
'containerRef'
})
22
self.addOption (
'postfix'
,
''
, type=str,
23
info=
"a postfix to apply to decorations and algorithm names. Typically "
24
"not needed here."
)
25
self.addOption (
'enableFJvt'
,
False
, type=bool,
26
info=
"whether to enable forward JVT calculations."
)
27
28
def
instanceName
(self) :
29
"""Return the instance name for this block"""
30
return
self.containerName + self.postfix
31
32
def
makeAlgs
(self, config) :
33
34
log = logging.getLogger(
'JetJvtAnalysisConfig'
)
35
log.warning(
"The JVT block is deprecated and its functionality has been moved to the (F)JVTWorkingPoint blocks."
)
36
37
if
config.dataType()
is
DataType.Data:
return
38
39
postfix = self.postfix
40
if
postfix !=
''
and
postfix[0] !=
'_'
:
41
postfix =
'_'
+ postfix
42
43
# Set up the per-event jet efficiency scale factor calculation algorithm
44
alg = config.createAlgorithm(
'CP::AsgEventScaleFactorAlg'
,
'JvtEventScaleFactorAlg'
)
45
preselection = config.getFullSelection (self.containerName,
''
)
46
alg.preselection = preselection +
'&&no_jvt'
if
preselection
else
'no_jvt'
47
alg.scaleFactorInputDecoration =
'jvt_effSF_%SYS%'
48
alg.scaleFactorOutputDecoration =
'jvt_effSF_%SYS%'
49
alg.particles = config.readName (self.containerName)
50
51
config.addOutputVar(
'EventInfo'
, alg.scaleFactorOutputDecoration,
'weight_jvt_effSF'
+ postfix)
52
53
if
self.
enableFJvt
:
54
alg = config.createAlgorithm(
'CP::AsgEventScaleFactorAlg'
,
'ForwardJvtEventScaleFactorAlg'
)
55
preselection = config.getFullSelection (self.containerName,
''
)
56
alg.preselection = preselection +
'&&no_fjvt'
if
preselection
else
'no_fjvt'
57
alg.scaleFactorInputDecoration =
'fjvt_effSF_%SYS%'
58
alg.scaleFactorOutputDecoration =
'fjvt_effSF_%SYS%'
59
alg.particles = config.readName (self.containerName)
60
61
config.addOutputVar(
'EventInfo'
, alg.scaleFactorOutputDecoration,
'weight_fjvt_effSF'
+ postfix)
62
python.JetJvtAnalysisConfig.JetJvtAnalysisConfig
Definition
JetJvtAnalysisConfig.py:9
python.JetJvtAnalysisConfig.JetJvtAnalysisConfig.enableFJvt
enableFJvt
Definition
JetJvtAnalysisConfig.py:53
python.JetJvtAnalysisConfig.JetJvtAnalysisConfig.makeAlgs
makeAlgs(self, config)
Definition
JetJvtAnalysisConfig.py:32
python.JetJvtAnalysisConfig.JetJvtAnalysisConfig.instanceName
instanceName(self)
Definition
JetJvtAnalysisConfig.py:28
python.JetJvtAnalysisConfig.JetJvtAnalysisConfig.__init__
__init__(self)
Definition
JetJvtAnalysisConfig.py:12
Generated on
for ATLAS Offline Software by
1.17.0