ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleLevelOverlapRemovalConfig.ParticleLevelOverlapRemovalBlock Class Reference
Inheritance diagram for ParticleLevelOverlapRemovalConfig.ParticleLevelOverlapRemovalBlock:
Collaboration diagram for ParticleLevelOverlapRemovalConfig.ParticleLevelOverlapRemovalBlock:

Public Member Functions

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

Public Attributes

 electrons
 muons
 photons
 jets

Detailed Description

ConfigBlock for particle-level overlap removal

Definition at line 6 of file ParticleLevelOverlapRemovalConfig.py.

Constructor & Destructor Documentation

◆ __init__()

ParticleLevelOverlapRemovalConfig.ParticleLevelOverlapRemovalBlock.__init__ ( self)

Definition at line 9 of file ParticleLevelOverlapRemovalConfig.py.

9 def __init__(self):
10 super(ParticleLevelOverlapRemovalBlock, self).__init__()
11 self.addOption('jets', '', type=str,
12 info ='the name of the input truth jets container, in the format "container" or "container.selection".')
13 self.addOption('electrons', '', type=str,
14 info='the name of the input truth electrons container, in the format "container" or "container.selection".')
15 self.addOption('muons', '', type=str,
16 info='the name of the input truth muons container, in the format "container" or "container.selection".')
17 self.addOption('photons', '', type=str,
18 info='the name of the input truth photons container, in the format "container" or "container.selection".')
19 self.addOption('label', 'passesOR', type=str,
20 info='the name of the decoration to apply to all particles passing OR')
21 self.addOption('useDressedProperties', True, type=bool,
22 info='whether to use dressed electron and muon kinematics rather than simple P4 kinematics')
23 self.addOption('useRapidityForDeltaR', True, type=bool,
24 info='whether to use rapidity instead of pseudo-rapidity for the calculation of DeltaR')
25 # Always skip on data
26 self.setOptionValue('skipOnData', True)
27

Member Function Documentation

◆ instanceName()

ParticleLevelOverlapRemovalConfig.ParticleLevelOverlapRemovalBlock.instanceName ( self)
Return the instance name for this block

Definition at line 28 of file ParticleLevelOverlapRemovalConfig.py.

28 def instanceName (self) :
29 """Return the instance name for this block"""
30 return self.label
31

◆ makeAlgs()

ParticleLevelOverlapRemovalConfig.ParticleLevelOverlapRemovalBlock.makeAlgs ( self,
config )

Definition at line 32 of file ParticleLevelOverlapRemovalConfig.py.

32 def makeAlgs(self, config):
33 alg = config.createAlgorithm('CP::ParticleLevelOverlapRemovalAlg',
34 'ParticleLevelOverlapRemoval',
35 reentrant=True)
36 alg.useDressedProperties = self.useDressedProperties
37 alg.useRapidityForDeltaR = self.useRapidityForDeltaR
38 alg.labelOR = self.label
39 if self.electrons:
40 alg.electrons, alg.electronSelection = config.readNameAndSelection (self.electrons)
41 alg.doJetElectronOR = True
42 selection = self.electrons.split(".")[1] if len(self.electrons.split(".")) == 2 else ''
43 config.addSelection (self.electrons.split(".")[0], selection, alg.labelOR + ',as_char')
44 if self.muons:
45 alg.muons, alg.muonSelection = config.readNameAndSelection (self.muons)
46 alg.doJetMuonOR = True
47 selection = self.muons.split(".")[1] if len(self.muons.split(".")) == 2 else ''
48 config.addSelection (self.muons.split(".")[0], selection, alg.labelOR + ',as_char')
49 if self.photons:
50 alg.photons, alg.photonSelection = config.readNameAndSelection (self.photons)
51 alg.doJetPhotonOR = True
52 selection = self.photons.split(".")[1] if len(self.photons.split(".")) == 2 else ''
53 config.addSelection (self.photons.split(".")[0], selection, alg.labelOR + ',as_char')
54 if self.jets:
55 alg.jets, alg.jetSelection = config.readNameAndSelection (self.jets)
56 selection = self.jets.split(".")[1] if len(self.jets.split(".")) == 2 else ''
57 config.addSelection (self.jets.split(".")[0], selection, alg.labelOR + ',as_char')
58 else:
59 raise ValueError('Particle-level overlap removal needs the jet container to be run!')
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:177

Member Data Documentation

◆ electrons

ParticleLevelOverlapRemovalConfig.ParticleLevelOverlapRemovalBlock.electrons

Definition at line 39 of file ParticleLevelOverlapRemovalConfig.py.

◆ jets

ParticleLevelOverlapRemovalConfig.ParticleLevelOverlapRemovalBlock.jets

Definition at line 54 of file ParticleLevelOverlapRemovalConfig.py.

◆ muons

ParticleLevelOverlapRemovalConfig.ParticleLevelOverlapRemovalBlock.muons

Definition at line 44 of file ParticleLevelOverlapRemovalConfig.py.

◆ photons

ParticleLevelOverlapRemovalConfig.ParticleLevelOverlapRemovalBlock.photons

Definition at line 49 of file ParticleLevelOverlapRemovalConfig.py.


The documentation for this class was generated from the following file: