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

Public Member Functions

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

Detailed Description

ConfigBlock for particle-level truth muons

Definition at line 6 of file ParticleLevelMuonsConfig.py.

Constructor & Destructor Documentation

◆ __init__()

def ParticleLevelMuonsConfig.ParticleLevelMuonsBlock.__init__ (   self)

Definition at line 9 of file ParticleLevelMuonsConfig.py.

9  def __init__(self):
10  super(ParticleLevelMuonsBlock, self).__init__()
11  self.addOption('containerName', 'TruthMuons', type=str,
12  info='the name of the input truth muons 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 muons.')
16  self.addOption('isolated', True, type=bool,
17  info='select only truth muons that are isolated.')
18  self.addOption('notFromTau', True, type=bool,
19  info='select only truth muons that did not orginate '
20  'from a tau decay.')
21  # Always skip on data
22  self.setOptionValue('skipOnData', True)
23 

Member Function Documentation

◆ instanceName()

def ParticleLevelMuonsConfig.ParticleLevelMuonsBlock.instanceName (   self)
Return the instance name for this block

Definition at line 24 of file ParticleLevelMuonsConfig.py.

24  def instanceName (self) :
25  """Return the instance name for this block"""
26  return self.containerName + '_' + self.selectionName
27 

◆ makeAlgs()

def ParticleLevelMuonsConfig.ParticleLevelMuonsBlock.makeAlgs (   self,
  config 
)

Definition at line 28 of file ParticleLevelMuonsConfig.py.

28  def makeAlgs(self, config):
29  config.setSourceName (self.containerName, self.containerName)
30 
31  # decorate the charge so we can save it later
32  alg = config.createAlgorithm('CP::ParticleLevelChargeDecoratorAlg',
33  'ParticleLevelChargeDecoratorMuons',
34  reentrant=True)
35  alg.particles = self.containerName
36 
37  # check for prompt isolation and possible origin from tau decays
38  alg = config.createAlgorithm('CP::ParticleLevelIsolationAlg',
39  'ParticleLevelIsolationMuons',
40  reentrant=True)
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 = 'IsoMuon'
45 
46  if self.isolated:
47  config.addSelection (self.containerName, self.selectionName, alg.isolation+',as_char')
48  if self.notFromTau:
49  config.addSelection (self.containerName, self.selectionName, alg.notTauOrigin+',as_char')
50 
51  # output branches to be scheduled only once
52  if ParticleLevelMuonsBlock.get_instance_count() == 1 or 'pt' not in config.getOutputVars(self.containerName):
53  outputVars = [
54  ['pt_dressed', 'pt'],
55  ['eta_dressed', 'eta'],
56  ['phi_dressed', 'phi'],
57  ['e_dressed', 'e'],
58  ['charge', 'charge'],
59  ['classifierParticleType', 'type'],
60  ['classifierParticleOrigin', 'origin'],
61  ]
62  for decoration, branch in outputVars:
63  config.addOutputVar (self.containerName, decoration, branch, noSys=True)
64 
65 

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