ATLAS Offline Software
Public Member Functions | List of all members
ParticleLevelTausConfig.ParticleLevelTausBlock Class Reference
Inheritance diagram for ParticleLevelTausConfig.ParticleLevelTausBlock:
Collaboration diagram for ParticleLevelTausConfig.ParticleLevelTausBlock:

Public Member Functions

def __init__ (self)
 
def instanceName (self)
 
def makeAlgs (self, config)
 

Detailed Description

ConfigBlock for particle-level truth taus

Definition at line 6 of file ParticleLevelTausConfig.py.

Constructor & Destructor Documentation

◆ __init__()

def ParticleLevelTausConfig.ParticleLevelTausBlock.__init__ (   self)

Definition at line 9 of file ParticleLevelTausConfig.py.

9  def __init__(self):
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.')
18  # Always skip on data
19  self.setOptionValue('skipOnData', True)
20 

Member Function Documentation

◆ 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
24 

◆ 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)
27 
28  # decorate the missing elements of the 4-vector so we can save it later
29  alg = config.createAlgorithm('CP::ParticleLevelPtEtaPhiDecoratorAlg',
30  'ParticleLevelPtEtaPhiDecoratorTaus',
31  reentrant=True)
32  alg.particles = self.containerName
33 
34  # decorate the charge so we can save it later
35  alg = config.createAlgorithm('CP::ParticleLevelChargeDecoratorAlg',
36  'ParticleLevelChargeDecoratorTaus',
37  reentrant=True)
38  alg.particles = self.containerName
39 
40  # check for prompt isolation and possible origin from tau decays
41  alg = config.createAlgorithm('CP::ParticleLevelIsolationAlg',
42  'ParticleLevelIsolationTaus',
43  reentrant=True)
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'
48 
49  if self.isolated:
50  config.addSelection (self.containerName, self.selectionName, alg.isolation+',as_char')
51 
52  # output branches to be scheduled only once
53  if ParticleLevelTausBlock.get_instance_count() == 1 or 'pt' not in config.getOutputVars(self.containerName):
54  outputVars = [
55  ['pt', 'pt'],
56  ['eta', 'eta'],
57  ['phi', 'phi'],
58  ['e', 'e'],
59  ['charge', 'charge'],
60  ['IsHadronicTau', 'IsHadronicTau'],
61  ['classifierParticleType', 'type'],
62  ['classifierParticleOrigin', 'origin'],
63  ]
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:
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18