ConfigBlock for particle-level truth electrons
Definition at line 6 of file ParticleLevelElectronsConfig.py.
◆ __init__()
def ParticleLevelElectronsConfig.ParticleLevelElectronsBlock.__init__ |
( |
|
self | ) |
|
Definition at line 9 of file ParticleLevelElectronsConfig.py.
10 super(ParticleLevelElectronsBlock, self).
__init__()
11 self.addOption(
'containerName',
'TruthElectrons', type=str,
12 info=
'the name of the input truth electrons 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 electrons.')
16 self.addOption(
'isolated',
True, type=bool,
17 info=
'select only truth electrons that are isolated.')
18 self.addOption(
'notFromTau',
True, type=bool,
19 info=
'select only truth electrons that did not orginate '
22 self.setOptionValue(
'skipOnData',
True)
◆ makeAlgs()
def ParticleLevelElectronsConfig.ParticleLevelElectronsBlock.makeAlgs |
( |
|
self, |
|
|
|
config |
|
) |
| |
Definition at line 24 of file ParticleLevelElectronsConfig.py.
24 def makeAlgs(self, config):
25 config.setSourceName (self.containerName, self.containerName)
28 alg = config.createAlgorithm(
'CP::ParticleLevelChargeDecoratorAlg',
'ParticleLevelChargeDecoratorElectrons' + self.selectionName)
29 alg.particles = self.containerName
32 alg = config.createAlgorithm(
'CP::ParticleLevelIsolationAlg',
'ParticleLevelIsolationElectrons' + self.selectionName)
33 alg.particles = self.containerName
34 alg.isolation =
'isIsolated' + self.selectionName
if self.isolated
else 'isIsolatedButNotRequired' + self.selectionName
35 alg.notTauOrigin =
'notFromTau' + self.selectionName
if self.notFromTau
else 'notFromTauButNotRequired' + self.selectionName
36 alg.checkType =
'IsoElectron'
39 config.addSelection (self.containerName, self.selectionName, alg.isolation+
',as_char')
41 config.addSelection (self.containerName, self.selectionName, alg.notTauOrigin+
',as_char')
44 if ParticleLevelElectronsBlock.get_instance_count() == 1:
47 [
'eta_dressed',
'eta'],
48 [
'phi_dressed',
'phi'],
51 [
'classifierParticleType',
'type'],
52 [
'classifierParticleOrigin',
'origin'],
54 for decoration, branch
in outputVars:
55 config.addOutputVar (self.containerName, decoration, branch, noSys=
True)
The documentation for this class was generated from the following file: