ATLAS Offline Software
Functions | Variables
IsoDensityConfig Namespace Reference

Functions

def EMTopoInputAlgCfg (flags, name='EMTopoInputAlg', **kwargs)
 
def NFlowInputAlgCfg (flags, name='NFlowInputAlg', **kwargs)
 
def DensityForIsoAlgCfg (flags, name="CentralDensityForTopoIso", **kwargs)
 

Variables

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

Function Documentation

◆ DensityForIsoAlgCfg()

def IsoDensityConfig.DensityForIsoAlgCfg (   flags,
  name = "CentralDensityForTopoIso",
**  kwargs 
)

Definition at line 63 of file IsoDensityConfig.py.

63 def DensityForIsoAlgCfg(flags, name = "CentralDensityForTopoIso", **kwargs):
64 
65  mlog = logging.getLogger(name)
66  mlog.info('Starting density alg for isolation configuration')
67 
68  acc = ComponentAccumulator()
69 
70  # And then the density tool and algs. By default the central one
71  if name.find('Topo') >= 0:
72  inputO = 'PseudoJetEMTopoClusters'
73  outputS = 'TopoCluster'
74  elif name.find('NFlow') >= 0:
75  suff = 'CSSK' if name.find('CSSK') >= 0 else ''
76  inputO = 'PseudoJet'+suff+'NFlow'
77  outputS = 'NeutralParticle'+suff+'Flow'
78  kwargs['InputContainer'] = inputO
79  kwargs['JetRadius'] = 0.5
80  kwargs['UseFourMomArea'] = True
81  kwargs['VoronoiRfact'] = 0.9
82  kwargs['JetAlgorithm'] = 'Kt'
83  if name.find('Central') >= 0:
84  kwargs['OutputContainer'] = outputS+'IsoCentralEventShape'
85  kwargs['AbsRapidityMin'] = 0.0
86  kwargs['AbsRapidityMax'] = 1.5
87  elif name.find('Forward') >= 0:
88  kwargs['OutputContainer'] = outputS+'IsoForwardEventShape'
89  kwargs['AbsRapidityMin'] = 1.5
90  kwargs['AbsRapidityMax'] = 3.0
91  densityTool = CompFactory.EventDensityTool(
92  name = name+'Tool',**kwargs)
93 
94  densityAlg = CompFactory.EventDensityAthAlg(
95  name = name+'Alg',
96  EventDensityTool = densityTool)
97  acc.addEventAlgo(densityAlg)
98 
99  return acc
100 
101 

◆ EMTopoInputAlgCfg()

def IsoDensityConfig.EMTopoInputAlgCfg (   flags,
  name = 'EMTopoInputAlg',
**  kwargs 
)

Definition at line 11 of file IsoDensityConfig.py.

11 def EMTopoInputAlgCfg(flags, name='EMTopoInputAlg', **kwargs):
12 
13  mlog = logging.getLogger(name)
14  mlog.info('Starting input building for isolation density configuration')
15 
16  acc = ComponentAccumulator()
17 
18  from JetRecConfig.StandardJetConstits import stdConstitDic as cst
19  from JetRecConfig.JetRecConfig import JetInputCfg, getConstitPJGAlg
20 
21  # Get the input (from CaloCal to EM scale, no origin correction)
22  acc.merge(JetInputCfg(flags, cst.EMTopo))
23 
24  # Get the pseudo jets for this input
25  acc.addEventAlgo(getConstitPJGAlg(cst.EMTopo))
26 
27  return acc
28 

◆ NFlowInputAlgCfg()

def IsoDensityConfig.NFlowInputAlgCfg (   flags,
  name = 'NFlowInputAlg',
**  kwargs 
)

Definition at line 29 of file IsoDensityConfig.py.

29 def NFlowInputAlgCfg(flags, name='NFlowInputAlg', **kwargs):
30 
31  mlog = logging.getLogger(name)
32  mlog.info('Starting input building for neutral eflow isolation density configuration')
33 
34  acc = ComponentAccumulator()
35 
36  from JetRecConfig.StandardJetConstits import stdConstitDic as cst
37  from JetRecConfig.JetRecConfig import JetInputCfg
38 
39  # Get the input (FlowObject, with CHS and origin (for neutral) and weight (for charged) correction)
40  if 'InputType' not in kwargs:
41  kwargs['InputType'] = 'EMPFlow'
42  cstI = cst[kwargs['InputType']]
43  acc.merge(JetInputCfg(flags, cstI))
44 
45  cstO = cstI.containername[0:cstI.containername.find('ParticleFlowObjects')]
46  mlog.info('Configuring density for type '+cstO)
47  cstOs = cstO if cstO != 'CHS' else ''
48 
49  # Then transform into pseudo-jets for the neutral only
50  constitpjalg = CompFactory.PseudoJetAlgorithm(
51  name = "PseudoJetAlgForIso"+cstOs+"NFlow",
52  InputContainer = cstO+"NeutralParticleFlowObjects",
53  OutputContainer = "PseudoJet"+cstOs+"NFlow",
54  Label = "EM"+cstOs+"NPFlow",
55  SkipNegativeEnergy=True)
56 
57  # Add the algs to the sequence in the ComponentAccumulator
58  acc.addEventAlgo(constitpjalg)
59 
60  return acc
61 
62 

Variable Documentation

◆ __doc__

string IsoDensityConfig.__doc__
private
Initial value:
1 = """
2  Instantiate the electron, photon and muon isolation
3  """

Definition at line 3 of file IsoDensityConfig.py.

◆ acc

IsoDensityConfig.acc = MainServicesCfg(flags)

Definition at line 116 of file IsoDensityConfig.py.

◆ doWriteAOD

IsoDensityConfig.doWriteAOD

Definition at line 110 of file IsoDensityConfig.py.

◆ doWriteESD

IsoDensityConfig.doWriteESD

Definition at line 109 of file IsoDensityConfig.py.

◆ Files

IsoDensityConfig.Files

Definition at line 108 of file IsoDensityConfig.py.

◆ flags

IsoDensityConfig.flags = initConfigFlags()

Definition at line 107 of file IsoDensityConfig.py.

◆ mlog

IsoDensityConfig.mlog = logging.getLogger("densityForIsolationConfigTest")

Definition at line 113 of file IsoDensityConfig.py.

◆ nestLevel

IsoDensityConfig.nestLevel

Definition at line 124 of file IsoDensityConfig.py.

◆ printDefaults

IsoDensityConfig.printDefaults

Definition at line 125 of file IsoDensityConfig.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
IsoDensityConfig.NFlowInputAlgCfg
def NFlowInputAlgCfg(flags, name='NFlowInputAlg', **kwargs)
Definition: IsoDensityConfig.py:29
IsoDensityConfig.DensityForIsoAlgCfg
def DensityForIsoAlgCfg(flags, name="CentralDensityForTopoIso", **kwargs)
Definition: IsoDensityConfig.py:63
IsoDensityConfig.EMTopoInputAlgCfg
def EMTopoInputAlgCfg(flags, name='EMTopoInputAlg', **kwargs)
Definition: IsoDensityConfig.py:11
python.JetRecConfig.getConstitPJGAlg
def getConstitPJGAlg(constitdef, suffix=None, flags=None, parent_jetdef=None)
Definition: JetRecConfig.py:350
JetRecAlgTestCfg.JetInputCfg
def JetInputCfg(flags)
Definition: JetRecAlgTestCfg.py:44