ConfigBlock for particle-level truth taus
Definition at line 6 of file ParticleLevelTausConfig.py.
◆ __init__()
def ParticleLevelTausConfig.ParticleLevelTausBlock.__init__ |
( |
|
self | ) |
|
Definition at line 9 of file ParticleLevelTausConfig.py.
10 super(ParticleLevelTausBlock, self).
__init__()
11 self.addOption(
'containerName',
'TruthTaus', type=str,
12 info=
'the name of the input truth taus container')
13 self.addOption(
'selectionName',
'', type=str,
14 info=
'the name of the selection to create. The default is "",'
15 ' which applies the selection to all truth taus.')
16 self.addOption(
'isolated',
True, type=bool,
17 info=
'select only truth taus that are isolated.')
19 self.setOptionValue(
'skipOnData',
True)
◆ instanceName()
def ParticleLevelTausConfig.ParticleLevelTausBlock.instanceName |
( |
|
self | ) |
|
Return the instance name for this block
Definition at line 21 of file ParticleLevelTausConfig.py.
21 def instanceName (self) :
22 """Return the instance name for this block"""
23 return self.containerName +
'_' + self.selectionName
◆ makeAlgs()
def ParticleLevelTausConfig.ParticleLevelTausBlock.makeAlgs |
( |
|
self, |
|
|
|
config |
|
) |
| |
Definition at line 25 of file ParticleLevelTausConfig.py.
25 def makeAlgs(self, config):
26 config.setSourceName (self.containerName, self.containerName)
29 alg = config.createAlgorithm(
'CP::ParticleLevelPtEtaPhiDecoratorAlg',
30 'ParticleLevelPtEtaPhiDecoratorTaus',
32 alg.particles = self.containerName
35 alg = config.createAlgorithm(
'CP::ParticleLevelChargeDecoratorAlg',
36 'ParticleLevelChargeDecoratorTaus',
38 alg.particles = self.containerName
41 alg = config.createAlgorithm(
'CP::ParticleLevelIsolationAlg',
42 'ParticleLevelIsolationTaus',
44 alg.particles = self.containerName
45 alg.isolation =
'isIsolated' + self.selectionName
if self.isolated
else 'isIsolatedButNotRequired' + self.selectionName
46 alg.notTauOrigin =
'notFromTauButNotRequired' + self.selectionName
47 alg.checkType =
'IsoTau'
50 config.addSelection (self.containerName, self.selectionName, alg.isolation+
',as_char')
53 if ParticleLevelTausBlock.get_instance_count() == 1
or 'pt' not in config.getOutputVars(self.containerName):
60 [
'IsHadronicTau',
'IsHadronicTau'],
61 [
'classifierParticleType',
'type'],
62 [
'classifierParticleOrigin',
'origin'],
64 for decoration, branch
in outputVars:
65 config.addOutputVar (self.containerName, decoration, branch, noSys=
True)
The documentation for this class was generated from the following file: