ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
AsgAnalysisAlgorithms
python
BootstrapGeneratorConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3
# AnaAlgorithm import(s):
4
from
AnalysisAlgorithmsConfig.ConfigBlock
import
ConfigBlock
5
from
AnalysisAlgorithmsConfig.ConfigAccumulator
import
DataType
6
7
class
BootstrapGeneratorConfig
(ConfigBlock):
8
'''ConfigBlock for the bootstrap generator'''
9
10
def __init__(self):
11
super(BootstrapGeneratorConfig, self).__init__()
12
self.addOption ('nReplicas', 1000, type=int,
13
info="the number of bootstrap replicas to generate.")
14
self.addOption ('decoration', None, type=str,
15
info="the name of the output vector branch containing the "
16
"bootstrapped weights.")
17
self.setOptionValue('skipOnMC', True)
18
19
def instanceName (self) :
20
"""Return the instance name for this block"""
21
return '' # no instance name needed for singleton block
22
23
def makeAlgs(self, config):
24
25
alg = config.createAlgorithm( 'CP::BootstrapGeneratorAlg', 'BootstrapGenerator')
26
alg.nReplicas = self.nReplicas
27
alg.isData = config.dataType() is DataType.Data
28
if self.decoration:
29
alg.decorationName = self.decoration
30
else:
31
alg.decorationName = "bootstrapWeights_%SYS%"
32
33
config.addOutputVar ('EventInfo', alg.decorationName, alg.decorationName.split("_%SYS%")[0], noSys=True)
34
35
return
python.BootstrapGeneratorConfig.BootstrapGeneratorConfig
Definition
BootstrapGeneratorConfig.py:7
Generated on
for ATLAS Offline Software by
1.14.0