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
self.addOption (
'postfix'
,
''
, type=str,
22
info=
"a postfix to apply to decorations and algorithm names. Typically "
23
"not needed here."
)
24
self.addOption (
'enableFJvt'
,
False
, type=bool,
25
info=
"whether to enable forward JVT calculations."
)
26
27
def
instanceName
(self) :
28
"""Return the instance name for this block"""
29
return
self.containerName + self.postfix
30
31
def
makeAlgs
(self, config) :
32
33
log = logging.getLogger(
'JetJvtAnalysisConfig'
)
34
log.warning(
"The JVT block is deprecated and its functionality has been moved to the (F)JVTWorkingPoint blocks."
)
35
36
if
config.dataType()
is
DataType.Data:
return
37
38
postfix = self.postfix
39
if
postfix !=
''
and
postfix[0] !=
'_'
:
40
postfix =
'_'
+ postfix
41
42
# Set up the per-event jet efficiency scale factor calculation algorithm
43
alg = config.createAlgorithm(
'CP::AsgEventScaleFactorAlg'
,
'JvtEventScaleFactorAlg'
)
44
preselection = config.getFullSelection (self.containerName,
''
)
45
alg.preselection = preselection +
'&&no_jvt'
if
preselection
else
'no_jvt'
46
alg.scaleFactorInputDecoration =
'jvt_effSF_%SYS%'
47
alg.scaleFactorOutputDecoration =
'jvt_effSF_%SYS%'
48
alg.particles = config.readName (self.containerName)
49
50
config.addOutputVar(
'EventInfo'
, alg.scaleFactorOutputDecoration,
'weight_jvt_effSF'
+ postfix)
51
52
if
self.
enableFJvt
:
53
alg = config.createAlgorithm(
'CP::AsgEventScaleFactorAlg'
,
'ForwardJvtEventScaleFactorAlg'
)
54
preselection = config.getFullSelection (self.containerName,
''
)
55
alg.preselection = preselection +
'&&no_fjvt'
if
preselection
else
'no_fjvt'
56
alg.scaleFactorInputDecoration =
'fjvt_effSF_%SYS%'
57
alg.scaleFactorOutputDecoration =
'fjvt_effSF_%SYS%'
58
alg.particles = config.readName (self.containerName)
59
60
config.addOutputVar(
'EventInfo'
, alg.scaleFactorOutputDecoration,
'weight_fjvt_effSF'
+ postfix)
61
python.JetJvtAnalysisConfig.JetJvtAnalysisConfig
Definition
JetJvtAnalysisConfig.py:9
python.JetJvtAnalysisConfig.JetJvtAnalysisConfig.enableFJvt
enableFJvt
Definition
JetJvtAnalysisConfig.py:52
python.JetJvtAnalysisConfig.JetJvtAnalysisConfig.makeAlgs
makeAlgs(self, config)
Definition
JetJvtAnalysisConfig.py:31
python.JetJvtAnalysisConfig.JetJvtAnalysisConfig.instanceName
instanceName(self)
Definition
JetJvtAnalysisConfig.py:27
python.JetJvtAnalysisConfig.JetJvtAnalysisConfig.__init__
__init__(self)
Definition
JetJvtAnalysisConfig.py:12
Generated on
for ATLAS Offline Software by
1.17.0