Commit 6fcf06d5 authored by Jean-Baptiste De Vivie De Regie's avatar Jean-Baptiste De Vivie De Regie
Browse files

try to compute an event density for iso correction. Still need FS topo clusters

parent 3f70c9fc
......@@ -255,7 +255,7 @@ TrigCaloIsolationToolHI = ToolFactory(xAOD__CaloIsolationTool,name = "TrigCaloIs
from AthenaCommon import CfgMgr
""" Configure the HLT CaloIsoTool """
H_ClIT_HI = CfgMgr.xAOD__CaloIsolationTool('TrigCaloIsolationToolHI')
H_ClIT_HI.doEnergyDensityCorrection=True
H_ClIT_HI.doEnergyDensityCorrection=False
H_ClIT_HI.InitializeReadHandles=False
H_ClIT_HI.UseEMScale=True
......@@ -270,14 +270,34 @@ TrigCaloIsolationTool = ToolFactory(xAOD__CaloIsolationTool,name = "TrigCaloIsol
saveOnlyRequestedCorrections = True,
EMCaloNums = [SUBCALO.LAREM],
HadCaloNums = [SUBCALO.LARHEC, SUBCALO.TILE],
OutputLevel = 1
)
from AthenaCommon import CfgMgr
""" Configure the HLT CaloIsoTool """
H_ClIT = CfgMgr.xAOD__CaloIsolationTool('TrigCaloIsolationTool')
H_ClIT.doEnergyDensityCorrection=True
H_ClIT.InitializeReadHandles=False
H_ClIT.UseEMScale=True
H_ClIT.InitializeReadHandles=True
H_ClIT.TopoClusterEDCentralContainer='TrigIsoEventShape'
# Only one density estimate for the time being
H_ClIT.TopoClusterEDForwardContainer='TrigIsoEventShape'
# the last three should not be used in HLT
H_ClIT.TopoClusterEDveryForwardContainer='TrigIsoEventShape'
H_ClIT.EFlowEDCentralContainer='TrigIsoEventShape'
H_ClIT.EFlowEDForwardContainer='TrigIsoEventShape'
def TrigIsoEventShapeAlgCfg(name='TrigIsoEventShapeBuilder'):
from EventShapeTools.EventDensityConfig import configEventDensityTool, EventDensityAthAlg
rhotool = configEventDensityTool("TrigIsoTool",
inputlabel = 'TrigEMTopo',
radius = 0.5,
AbsRapidityMin = 0.0,
AbsRapidityMax = 2.0,
OutputContainer = "TrigIsoEventShape")
TrigIsoEventShapeAlg = AlgFactory(EventDensityAthAlg,
name = name,
doAdd = False,
EventDensityTool = rhotool)
return TrigIsoEventShapeAlg()
def TrigPhotonIsoBuilderCfg(name='TrigPhotonIsolationBuilder'):
TrigPhotonIsolationBuilder = AlgFactory(IsolationBuilder,
......@@ -289,8 +309,9 @@ def TrigPhotonIsoBuilderCfg(name='TrigPhotonIsolationBuilder'):
PFlowIsolationTool = None,
TrackIsolationTool = None,
PhIsoTypes = [[isoPar.topoetcone20, isoPar.topoetcone40]],
PhCorTypes = [[isoPar.core57cells]],
PhCorTypes = [[isoPar.core57cells, isoPar.pileupCorrection]],
PhCorTypesExtra = [[]],
OutputLevel = 1
)
return TrigPhotonIsolationBuilder()
......
......@@ -61,10 +61,21 @@ def precisionPhotonRecoSequence(RoIs, ion=False):
collectionOut = trigTopoEgammaAlgo.PhotonOutputName
# Add CaloIsolationTool
from TriggerMenuMT.HLT.Egamma.TrigEgammaFactories import TrigPhotonIsoBuilderCfg, TrigPhotonIsoBuilderHICfg
isoBuilder = TrigPhotonIsoBuilderCfg('TrigPhotonIsolationBuilder' + tag)
isoBuilderHI = TrigPhotonIsoBuilderHICfg('TrigPhotonIsolationBuilderHI' + tag)
thesequence += isoBuilderHI if ion is True else isoBuilder
from TriggerMenuMT.HLT.Egamma.TrigEgammaFactories import TrigPhotonIsoBuilderCfg, TrigPhotonIsoBuilderHICfg, TrigIsoEventShapeAlgCfg
if ion:
thesequence += TrigPhotonIsoBuilderHICfg('TrigPhotonIsolationBuilderHI' + tag)
else:
from JetRec.JetRecConf import PseudoJetAlgorithm
pjalg = PseudoJetAlgorithm(
name = "emtopopj",
Label = "EMTopo",
InputContainer = "HLT_TopoCaloClustersROI", # I would like to have FS here, not ROI !
OutputContainer = "PseudoJetTrigEMTopo",
SkipNegativeEnergy = True,
OutputLevel = 1)
thesequence += pjalg
thesequence += TrigIsoEventShapeAlgCfg()
thesequence += TrigPhotonIsoBuilderCfg('TrigPhotonIsolationBuilder' + tag)
#online monitoring for topoEgammaBuilder
from TriggerMenuMT.HLT.Photon.TrigPhotonFactories import PrecisionPhotonTopoMonitorCfg
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment