ATLAS Offline Software
Functions | Variables
IsolationSteeringDerivConfig Namespace Reference

Functions

def IsolationSteeringDerivCfg (flags, name='IsolationSteeringDeriv', inType='EMPFlow')
 
def LRTElectronIsolationSteeringDerivCfg (flags, name='LRTElectronCaloIsolationSteeringDeriv')
 
def LRTMuonIsolationSteeringDerivCfg (flags, name='LRTMuonCaloIsolationSteeringDeriv')
 

Variables

string __doc__
 
 flags = initConfigFlags()
 
 Files
 
 doWriteESD
 
 doWriteAOD
 
 mlog = logging.getLogger("isolationConfigTest")
 
 acc = MainServicesCfg(flags)
 
 withDetails
 
 printDefaults
 
 nestLevel
 

Function Documentation

◆ IsolationSteeringDerivCfg()

def IsolationSteeringDerivConfig.IsolationSteeringDerivCfg (   flags,
  name = 'IsolationSteeringDeriv',
  inType = 'EMPFlow' 
)

Definition at line 11 of file IsolationSteeringDerivConfig.py.

11 def IsolationSteeringDerivCfg(flags, name = 'IsolationSteeringDeriv', inType = 'EMPFlow'):
12 
13  mlog = logging.getLogger(name)
14  mlog.info('Starting Isolation steering')
15 
16  acc = ComponentAccumulator()
17 
18  # Prepare densities
19  from IsolationAlgs.IsoDensityConfig import (
20  NFlowInputAlgCfg, DensityForIsoAlgCfg)
21  acc.merge(NFlowInputAlgCfg(flags,InputType = inType))
22  suff = 'CSSK' if inType.find('CSSK') >= 0 else ''
23  acc.merge(DensityForIsoAlgCfg(flags,name='CentralDensityFor'+suff+'NFlowIso'))
24  acc.merge(DensityForIsoAlgCfg(flags,name='ForwardDensityFor'+suff+'NFlowIso'))
25 
26  # Prepare CaloIsolationTool
27  kwargs = dict()
28  margs = dict()
29  margs['FlowElementsInConeTool'] = CompFactory.xAOD.FlowElementsInConeTool(
30  name=suff+'FlowElementsInConeTool')
31  if len(suff) > 0:
32  kwargs['CustomConfigurationNameEl'] = suff
33  kwargs['CustomConfigurationNamePh'] = suff
34  margs['EFlowEDCentralContainer'] = 'NeutralParticle'+suff+'FlowIsoCentralEventShape'
35  margs['EFlowEDForwardContainer'] = 'NeutralParticle'+suff+'FlowIsoForwardEventShape'
36  margs['FlowElementsInConeTool'].PFlowKey=suff+'NeutralParticleFlowObjects'
37  from IsolationAlgs.IsoToolsConfig import EGammaCaloIsolationToolCfg
38  kwargs['PFlowIsolationTool'] = acc.popToolsAndMerge(EGammaCaloIsolationToolCfg(flags,**margs))
39 
40  # Prepare IsolationBuilder
41  from xAODPrimitives.xAODIso import xAODIso as isoPar
42  isoType = [ [ isoPar.neflowisol20, isoPar.neflowisol30, isoPar.neflowisol40 ] ]
43  isoCor = [ [ isoPar.coreCone, isoPar.pileupCorrection ] ]
44  isoExCor = [ [ isoPar.coreConeSC ] ]
45  kwargs['ElIsoTypes'] = isoType
46  kwargs['ElCorTypes'] = isoCor
47  kwargs['ElCorTypesExtra'] = isoExCor
48  kwargs['PhIsoTypes'] = isoType
49  kwargs['PhCorTypes'] = isoCor
50  kwargs['PhCorTypesExtra'] = isoExCor
51 
52  kwargs['name'] = suff+'PFlowIsolationBuilder'
53 
54  acc.addEventAlgo(CompFactory.IsolationBuilder(**kwargs))
55 
56  mlog.info("PFlow isolation configured")
57 
58  return acc
59 

◆ LRTElectronIsolationSteeringDerivCfg()

def IsolationSteeringDerivConfig.LRTElectronIsolationSteeringDerivCfg (   flags,
  name = 'LRTElectronCaloIsolationSteeringDeriv' 
)

Definition at line 60 of file IsolationSteeringDerivConfig.py.

60 def LRTElectronIsolationSteeringDerivCfg(flags, name = 'LRTElectronCaloIsolationSteeringDeriv'):
61 
62  mlog = logging.getLogger(name)
63  mlog.info('Starting LRT electron calo Isolation steering')
64 
65  acc = ComponentAccumulator()
66 
67  # Need to add density inputs for mc20 (containers present in MC21 AODs)
68  from IsolationAlgs.IsoDensityConfig import (
69  NFlowInputAlgCfg, DensityForIsoAlgCfg)
70  acc.merge(NFlowInputAlgCfg(flags,InputType = "EMPFlow"))
71  acc.merge(DensityForIsoAlgCfg(flags,name='CentralDensityForNFlowIso'))
72  acc.merge(DensityForIsoAlgCfg(flags,name='ForwardDensityForNFlowIso'))
73 
74  # Prepare CaloIsolationTool
75  kwargs = dict()
76  the_pflowElementsTool = CompFactory.xAOD.FlowElementsInConeTool(
77  name='FlowElementsInConeTool')
78 
79  from IsolationAlgs.IsoToolsConfig import EGammaCaloIsolationToolCfg
80  cisoTool = acc.popToolsAndMerge(EGammaCaloIsolationToolCfg(flags,
81  FlowElementsInConeTool = the_pflowElementsTool))
82 
83  # Prepare IsolationBuilder
84  from xAODPrimitives.xAODIso import xAODIso as isoPar
85  isoType = [ [ isoPar.topoetcone20, isoPar.topoetcone30, isoPar.topoetcone40 ],
86  [ isoPar.neflowisol20, isoPar.neflowisol30, isoPar.neflowisol40 ] ]
87  isoCor = [ [ isoPar.core57cells, isoPar.ptCorrection, isoPar.pileupCorrection ],
88  [ isoPar.coreCone, isoPar.pileupCorrection ] ]
89  isoExCor = [ [ ], [ isoPar.coreConeSC ] ]
90 
91  acc.addEventAlgo(CompFactory.IsolationBuilder(**kwargs,
92  name = 'LRTElectronCaloIsolationBuilder',
93  ElectronCollectionContainerName = 'LRT'+flags.Egamma.Keys.Output.Electrons,
94  ElIsoTypes = isoType,
95  ElCorTypes = isoCor,
96  ElCorTypesExtra = isoExCor,
97  CaloTopoIsolationTool = cisoTool,
98  PFlowIsolationTool = cisoTool))
99 
100  mlog.info("LRTElectron calo isolation configured")
101 
102  return acc
103 

◆ LRTMuonIsolationSteeringDerivCfg()

def IsolationSteeringDerivConfig.LRTMuonIsolationSteeringDerivCfg (   flags,
  name = 'LRTMuonCaloIsolationSteeringDeriv' 
)

Definition at line 104 of file IsolationSteeringDerivConfig.py.

104 def LRTMuonIsolationSteeringDerivCfg(flags, name = 'LRTMuonCaloIsolationSteeringDeriv'):
105 
106  mlog = logging.getLogger(name)
107  mlog.info('Starting LRT muon calo Isolation steering')
108 
109  acc = ComponentAccumulator()
110 
111  # Need to add density inputs for mc20 (containers present in MC21 AODs)
112  from IsolationAlgs.IsoDensityConfig import (
113  NFlowInputAlgCfg, DensityForIsoAlgCfg)
114  acc.merge(NFlowInputAlgCfg(flags,InputType = "EMPFlow"))
115  acc.merge(DensityForIsoAlgCfg(flags,name='CentralDensityForNFlowIso'))
116  acc.merge(DensityForIsoAlgCfg(flags,name='ForwardDensityForNFlowIso'))
117 
118  # Prepare CaloIsolationTool
119  the_pflowElementsTool = CompFactory.xAOD.FlowElementsInConeTool(
120  name='FlowElementsInConeTool')
121 
122  from IsolationAlgs.IsoToolsConfig import MuonCaloIsolationToolCfg
123  cisoTool = acc.popToolsAndMerge(MuonCaloIsolationToolCfg(flags,
124  FlowElementsInConeTool = the_pflowElementsTool ))
125  # Prepare IsolationBuilder
126  from xAODPrimitives.xAODIso import xAODIso as isoPar
127  misoType = [ [ isoPar.topoetcone20, isoPar.topoetcone30, isoPar.topoetcone40 ],
128  [ isoPar.neflowisol20, isoPar.neflowisol30, isoPar.neflowisol40 ] ]
129  misoCor = [ [ isoPar.coreCone, isoPar.pileupCorrection ],
130  [ isoPar.coreCone, isoPar.pileupCorrection ] ]
131  misoExCor = [ [ ], [ ] ]
132 
133  acc.addEventAlgo(CompFactory.IsolationBuilder(name= "LRTMuonCaloIsolationBuilder",
134  MuonCollectionContainerName = "MuonsLRT",
135  MuCorTypesExtra = misoExCor,
136  MuCorTypes = misoCor,
137  CaloTopoIsolationTool = cisoTool,
138  PFlowIsolationTool = cisoTool,
139  MuIsoTypes = misoType ))
140 
141  mlog.info("MuonLRT calo isolation configured")
142 
143  return acc
144 

Variable Documentation

◆ __doc__

string IsolationSteeringDerivConfig.__doc__
private
Initial value:
1 = """
2  Instantiate the pflow isolation for egamma in derivation
3  """

Definition at line 3 of file IsolationSteeringDerivConfig.py.

◆ acc

IsolationSteeringDerivConfig.acc = MainServicesCfg(flags)

Definition at line 159 of file IsolationSteeringDerivConfig.py.

◆ doWriteAOD

IsolationSteeringDerivConfig.doWriteAOD

Definition at line 153 of file IsolationSteeringDerivConfig.py.

◆ doWriteESD

IsolationSteeringDerivConfig.doWriteESD

Definition at line 152 of file IsolationSteeringDerivConfig.py.

◆ Files

IsolationSteeringDerivConfig.Files

Definition at line 151 of file IsolationSteeringDerivConfig.py.

◆ flags

IsolationSteeringDerivConfig.flags = initConfigFlags()

Definition at line 150 of file IsolationSteeringDerivConfig.py.

◆ mlog

IsolationSteeringDerivConfig.mlog = logging.getLogger("isolationConfigTest")

Definition at line 156 of file IsolationSteeringDerivConfig.py.

◆ nestLevel

IsolationSteeringDerivConfig.nestLevel

Definition at line 167 of file IsolationSteeringDerivConfig.py.

◆ printDefaults

IsolationSteeringDerivConfig.printDefaults

Definition at line 164 of file IsolationSteeringDerivConfig.py.

◆ withDetails

IsolationSteeringDerivConfig.withDetails

Definition at line 163 of file IsolationSteeringDerivConfig.py.

IsolationSteeringDerivConfig.LRTMuonIsolationSteeringDerivCfg
def LRTMuonIsolationSteeringDerivCfg(flags, name='LRTMuonCaloIsolationSteeringDeriv')
Definition: IsolationSteeringDerivConfig.py:104
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
IsolationSteeringDerivConfig.IsolationSteeringDerivCfg
def IsolationSteeringDerivCfg(flags, name='IsolationSteeringDeriv', inType='EMPFlow')
Definition: IsolationSteeringDerivConfig.py:11
IsoDensityConfig.NFlowInputAlgCfg
def NFlowInputAlgCfg(flags, name='NFlowInputAlg', **kwargs)
Definition: IsoDensityConfig.py:29
IsoDensityConfig.DensityForIsoAlgCfg
def DensityForIsoAlgCfg(flags, name="CentralDensityForTopoIso", **kwargs)
Definition: IsoDensityConfig.py:63
IsoToolsConfig.MuonCaloIsolationToolCfg
def MuonCaloIsolationToolCfg(flags, **kwargs)
Definition: IsoToolsConfig.py:88
IsolationSteeringDerivConfig.LRTElectronIsolationSteeringDerivCfg
def LRTElectronIsolationSteeringDerivCfg(flags, name='LRTElectronCaloIsolationSteeringDeriv')
Definition: IsolationSteeringDerivConfig.py:60
IsoToolsConfig.EGammaCaloIsolationToolCfg
def EGammaCaloIsolationToolCfg(flags, **kwargs)
Definition: IsoToolsConfig.py:55