Skip to content
Snippets Groups Projects
Commit 2f6ea6f9 authored by Tomasz Bold's avatar Tomasz Bold
Browse files

Prepared photon chains (1st step only)

parent bcf65529
No related branches found
No related tags found
No related merge requests found
...@@ -298,9 +298,11 @@ def l2ElectronCaloStep( flags, chains ): ...@@ -298,9 +298,11 @@ def l2ElectronCaloStep( flags, chains ):
def generateElectrons( flags ): def generateElectrons( flags ):
acc = ComponentAccumulator() acc = ComponentAccumulator()
electronChains = [ f.split()[0] for f in flags.get("Trigger.menu.electrons") + flags.get("Trigger.menu.electronsNoID") ]
if not electronChains:
return None,None
# L2 calo # L2 calo
electronChains = [ f.split()[0] for f in flags.get("Trigger.menu.electrons") + flags.get("Trigger.menu.electronsNoID") ]
l2CaloSequence = l2ElectronCaloStep( flags, electronChains ) l2CaloSequence = l2ElectronCaloStep( flags, electronChains )
acc.merge( l2CaloSequence ) acc.merge( l2CaloSequence )
......
#
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
#
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
def l2PhotonCaloStep( flags, chains ):
from AthenaCommon.Constants import DEBUG
acc = ComponentAccumulator()
# setup algorithms
#acc.addSequence( seqAND('L2CaloEgamma'), parentName=parentSeq )
from TrigUpgradeTest.MenuComponents import FilterHypoSequence
fhSeq = FilterHypoSequence( 'PhotonFastCalo' )
fhSeq.addFilter( chains, inKey = 'EMRoIDecisions', outKey='FilteredPhotonRoIDecisions' )
from TrigUpgradeTest.ElectronMenuConfig import l2CaloReco # generator for the L2 Calo EM clustering
from TrigUpgradeTest.MenuComponents import RecoFragmentsPool
# obtain the reconstruction CF fragment
fhSeq.addReco( RecoFragmentsPool.retrieve( l2CaloReco, flags ) )
from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoAlgMT
hypo = TrigL2CaloHypoAlgMT("L2PhotonCaloHypo")
hypo.CaloClusters = 'L2CaloClusters'
hypo.HypoOutputDecisions = 'PhotonFastCaloDecisions'
hypo.OutputLevel = DEBUG
from TrigEgammaHypo.TrigL2CaloHypoTool import TrigL2CaloHypoToolFromName
for chain in chains:
tool = TrigL2CaloHypoToolFromName( chain, chain )
hypo.HypoTools += [ tool ]
fhSeq.addHypo( hypo )
return fhSeq
def generatePhotons( flags ):
acc = ComponentAccumulator()
photonChains = [ f.split()[0] for f in flags.get("Trigger.menu.photons") ]
if not photonChains:
return None,None
l2CaloSequence = l2PhotonCaloStep( flags, photonChains )
acc.merge( l2CaloSequence )
return acc, [l2CaloSequence]
...@@ -65,12 +65,22 @@ def menu( mf ): ...@@ -65,12 +65,22 @@ def menu( mf ):
# here menu generation starts # here menu generation starts
if flags.get("Trigger.menu.electrons"): # maybe it is better if this check is done in generateElectrons
from TrigUpgradeTest.ElectronMenuConfig import generateElectrons from TrigUpgradeTest.ElectronMenuConfig import generateElectrons
accElectrons, electronSteps = generateElectrons( flags ) accElectrons, steps = generateElectrons( flags )
if len( electronSteps ) != 0: if len( steps ) != 0:
menuAcc.setupSteps( electronSteps ) menuAcc.setupSteps( steps )
menuAcc.merge( accElectrons ) menuAcc.merge( accElectrons )
from TrigUpgradeTest.PhotonMenuConfig import generatePhotons
accPhotons, steps = generatePhotons( flags )
if len( steps ) != 0:
menuAcc.setupSteps( steps )
menuAcc.merge( accPhotons )
# here setting of the Summary + top level Monitoring algs should be done # here setting of the Summary + top level Monitoring algs should be done
menuAcc.printConfig() menuAcc.printConfig()
......
...@@ -19,7 +19,7 @@ def createMenuFlags(): ...@@ -19,7 +19,7 @@ def createMenuFlags():
# electrons w/o the ID selection # electrons w/o the ID selection
flags.addFlag('Trigger.menu.electronsNoID', []) flags.addFlag('Trigger.menu.electronsNoID', [])
flags.addFlag('Trigger.menu.photons', ['HLT_g10 L1_EM7', 'HLT_g15 L1_EM12']) flags.addFlag('Trigger.menu.photons', ['HLT_g10_etcut L1_EM7', 'HLT_g15_etcut L1_EM12'])
flags.addFlag('Trigger.menu.muons', []) flags.addFlag('Trigger.menu.muons', [])
flags.addFlag('Trigger.menu.MSMuons', []) flags.addFlag('Trigger.menu.MSMuons', [])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment