ConfigBlock for particle-level truth neutrinos
Definition at line 6 of file ParticleLevelNeutrinosConfig.py.
◆ __init__()
def ParticleLevelNeutrinosConfig.ParticleLevelNeutrinosBlock.__init__ |
( |
|
self | ) |
|
Definition at line 9 of file ParticleLevelNeutrinosConfig.py.
10 super(ParticleLevelNeutrinosBlock, self).
__init__()
11 self.addOption(
'containerName',
'TruthNeutrinos', type=str,
12 info=
'the name of the input truth neutrinos 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 neutrinos.')
16 self.addOption(
'isolated',
True, type=bool,
17 info=
'select only truth neutrinos that are isolated.')
18 self.addOption(
'notFromTau',
True, type=bool,
19 info=
'select only truth neutrinos that did not orginate '
22 self.setOptionValue(
'skipOnData',
True)
◆ instanceName()
def ParticleLevelNeutrinosConfig.ParticleLevelNeutrinosBlock.instanceName |
( |
|
self | ) |
|
Return the instance name for this block
Definition at line 24 of file ParticleLevelNeutrinosConfig.py.
24 def instanceName (self) :
25 """Return the instance name for this block"""
26 return self.containerName +
'_' + self.selectionName
◆ makeAlgs()
def ParticleLevelNeutrinosConfig.ParticleLevelNeutrinosBlock.makeAlgs |
( |
|
self, |
|
|
|
config |
|
) |
| |
Definition at line 28 of file ParticleLevelNeutrinosConfig.py.
28 def makeAlgs(self, config):
29 config.setSourceName (self.containerName, self.containerName)
32 alg = config.createAlgorithm(
'CP::ParticleLevelPtEtaPhiDecoratorAlg',
33 'ParticleLevelPtEtaPhiEDecoratorNeutrinos',
35 alg.particles = self.containerName
38 alg = config.createAlgorithm(
'CP::ParticleLevelIsolationAlg',
39 'ParticleLevelIsolationNeutrinos',
41 alg.particles = self.containerName
42 alg.isolation =
'isIsolated' + self.selectionName
if self.isolated
else 'isIsolatedButNotRequired' + self.selectionName
43 alg.notTauOrigin =
'notFromTau' + self.selectionName
if self.notFromTau
else 'notFromTauButNotRequired' + self.selectionName
44 alg.checkType =
'Neutrino'
47 config.addSelection (self.containerName, self.selectionName, alg.isolation+
',as_char')
49 config.addSelection (self.containerName, self.selectionName, alg.notTauOrigin+
',as_char')
52 if ParticleLevelNeutrinosBlock.get_instance_count() == 1
or 'pt' not in config.getOutputVars(self.containerName):
59 for decoration, branch
in outputVars:
60 config.addOutputVar (self.containerName, decoration, branch, noSys=
True)
The documentation for this class was generated from the following file: