Commit 2eb5e9e3 authored by Yu Nakahama Higuchi's avatar Yu Nakahama Higuchi Committed by Graeme Stewart
Browse files

Renamed three e26_medium chains with _L1EM22VHI (ATR-10849) (TriggerMenu-00-09-41-11)

	* Renamed three e26_medium chains with _L1EM22VHI (ATR-10849)
	* TriggerMenu-00-09-41-11

2015-04-29 Viviana Cavaliere
	* Added mu14_iloose (ATR-10952)
	* TriggerMenu-00-09-41-10

2015-04-29 Catrin Bernius
	* Added egamma triggers (ATR-10849)
	* TriggerMenu-00-09-41-09

2015-04-16  Viviana Cavaliere
	* Fixing narrow scan chain with 0 counts (ATR-10822)
	* TriggerMenu-00-09-41-08

2015-04-16  Elisabetta Pianori
	* Fix for Deta default value (ATR-10828)
	* Needs TrigJetHypo-03-00-23
	* TriggerMenu-00-09-41-07

...
(Long ChangeLog diff - truncated)
parent fed89c94
......@@ -13,12 +13,15 @@ class TriggerConfigL1Topo:
current = None
def __init__(self, outputFile = None , inputFile = None , menuName = None ):
"""
inputFile: if set the topo menu will be read from this xml file (not yet implemented)
outputFile: if no input file is specified the topo menu will be generated and written to outputFile
menuName: ignored now
"""
current = self
from TriggerJobOpts.TriggerFlags import TriggerFlags
if menuName:
TriggerFlags.triggerMenuSetup = menuName
self.menuName = TriggerFlags.triggerMenuSetup()
self.menuName = TriggerConfigL1Topo.getMenuBaseName(TriggerFlags.triggerMenuSetup())
self.inputFile = inputFile
self.outputFile = outputFile
......@@ -42,7 +45,6 @@ class TriggerConfigL1Topo:
self.registerMenu()
# remove prescale suffixes
@staticmethod
def getMenuBaseName(menuName):
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
from sys import settrace
import re
from collections import defaultdict
from .TriggerConfigL1Topo import TriggerConfigL1Topo
from l1.Lvl1Menu import Lvl1Menu
......@@ -15,19 +17,18 @@ class TriggerConfigLVL1:
current = None
def __init__(self, outputFile = None , inputFile = None , menuName = None , topoMenu = "MATCH" ):
"""
menuName: ignored now, will be taken from TF.triggerMenuSetup
topoMenu: MATCH means that the L1Topo menu matches the L1 menu
"""
TriggerConfigLVL1.current = self
from TriggerJobOpts.TriggerFlags import TriggerFlags
if menuName:
TriggerFlags.triggerMenuSetup = menuName
self.menuName = TriggerFlags.triggerMenuSetup()
self.inputFile = inputFile
self.outputFile = outputFile
self.l1menuFromXML = None # flag if l1menu is read from XML file
self.menuName = menuName
# all registered items
self.registeredItems = {}
......@@ -40,14 +41,14 @@ class TriggerConfigLVL1:
self.topotriggers = self.getL1TopoTriggerLines(topoMenu)
self.registerAllTopoTriggersAsThresholds()
# menu
self.menu = Lvl1Menu(self.menuName)
if self.inputFile != None:
"""Read menu from XML"""
self.l1menuFromXML = True
self.menu.readMenuFromXML(self.inputFile)
else:
"""Build menu from menu name"""
......@@ -69,15 +70,14 @@ class TriggerConfigLVL1:
else:
triggerLines = None
try:
tpcl1 = TriggerConfigL1Topo( menuName = TriggerConfigL1Topo.getMenuBaseName(menu) )
from TriggerJobOpts.TriggerFlags import TriggerFlags
tpcl1 = TriggerConfigL1Topo()
tpcl1.generateMenu()
triggerLines = tpcl1.menu.getTriggerLines()
except Exception, ex:
print "Topo menu generation inside L1 menu failed, but will be ignored for the time being",ex
# restore the triggerMenuSetup for the LVL1 generation
from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.triggerMenuSetup = self.menuName
return triggerLines
......@@ -115,11 +115,29 @@ class TriggerConfigLVL1:
"""
if not self.topotriggers:
return
from l1.Lvl1Thresholds import LVL1Threshold, LVL1TopoInput
multibitTopoTriggers = defaultdict(list)
multibitPattern = re.compile("(?P<line>.*)\[(?P<bit>\d+)\]")
for triggerline in self.topotriggers:
thr = LVL1TopoInput( triggerline )
m = multibitPattern.match(triggerline.trigger) # tries to match "trigger[bit]"
if m:
multibitTopoTriggers[m.groupdict()['line']] += [triggerline] # multibit triggerlines are temporarilty stored in multibitTopoTriggers
else:
thr = LVL1TopoInput( triggerline )
thr.setCableInput()
self.registeredThresholds[thr.name] = thr
# create thresholds from topo-multibit
for multibitTriggerlines in multibitTopoTriggers.values():
thr = LVL1TopoInput( multibitTriggerlines )
thr.setCableInput()
self.registeredThresholds[thr.name] = thr
def getRegisteredThreshold(self, name):
if name in self.registeredThresholds:
......@@ -151,7 +169,10 @@ class TriggerConfigLVL1:
def writeXML(self):
""" Writes L1 XML file"""
"""
Writes L1 XML file
returns the file name
"""
log = logging.getLogger("TriggerConfigLVL1")
if self.outputFile is None:
log.warning("Can't write xml file since no name was provided")
......@@ -190,6 +211,7 @@ class TriggerConfigLVL1:
log.info("menu %s contains %i items and %i thresholds" % ( menuName, len(Lvl1Flags.items()), len(Lvl1Flags.thresholds()) ) )
def registerMenu(self):
"""
Registers the list if items and thresholds that could be used in the menu of Run1
......@@ -204,16 +226,12 @@ class TriggerConfigLVL1:
itemdefmodule = __import__('l1menu.ItemDef%s' % ('Run1' if run1 else ''), globals(), locals(), ['ItemDef'], -1)
#if (self.menuName == 'DC14'):
# itemdefmodule = __import__('l1menu.ItemDefDC14', globals(), locals(), ['ItemDef'], -1)
#else:
# itemdefmodule = __import__('l1menu.ItemDef%s' % ('Run1' if run1 else ''), globals(), locals(), ['ItemDef'], -1)
log = logging.getLogger('TriggerConfigLVL1.registerMenu')
itemdefmodule.ItemDef.registerItems(self)
log.info("registered %i items and %i thresholds (%s)" % ( len(self.registeredItems), len(self.registeredThresholds), ('Run 1' if run1 else 'Run 2') ) )
def generateMenu(self):
"""
Generates the menu structure from the list of item and threshold names in the Lvl1Flags
......@@ -230,15 +248,15 @@ class TriggerConfigLVL1:
# build list of items for the menu from the list of requested names
itemsForMenu = []
for item_index, itemName in enumerate(Lvl1Flags.items()):
for itemName in Lvl1Flags.items():
registeredItem = self.getRegisteredItem(itemName)
if registeredItem == None:
log.fatal("LVL1 item '%s' has not been registered" % itemName)
raise RuntimeError("LVL1 item %s has not been registered" % itemName)
log.fatal("LVL1 item '%s' has not been registered in l1menu/ItemDef.py" % itemName)
raise RuntimeError("LVL1 item %s has not been registered in l1menu/ItemDef.py" % itemName)
if registeredItem.name in Lvl1Flags.CtpIdMap():
newCTPID = Lvl1Flags.CtpIdMap()[registeredItem.name]
if itemName in Lvl1Flags.CtpIdMap():
newCTPID = Lvl1Flags.CtpIdMap()[itemName]
registeredItem.setCtpid(newCTPID)
itemsForMenu += [ registeredItem ]
......@@ -269,7 +287,7 @@ class TriggerConfigLVL1:
# add the thresholds to the menu
undefined_thr = False
list_of_undefined_thresholds = []
for index, thresholdName in enumerate(Lvl1Flags.thresholds()):
if thresholdName in self.menu.thresholds:
......@@ -278,10 +296,11 @@ class TriggerConfigLVL1:
if threshold is None and not thresholdName=="":
log.error('Threshold %s is listed in menu but not defined' % thresholdName )
undefined_thr = True
list_of_undefined_thresholds += [ thresholdName ]
else:
self.menu.addThreshold( threshold )
if undefined_thr:
raise RuntimeError("Found undefined threshold in menu %s, must be fixed" % self.menu.menuName )
raise RuntimeError("Found undefined threshold in menu %s, please add these thresholds to l1menu/ThresholdDef.py: %s" % (self.menu.menuName, ', '.join(list_of_undefined_thresholds)) )
# threshold mapping
self.mapThresholds()
......
......@@ -228,6 +228,9 @@ def myBjetConfig_split(theChainDef, chainDict, inputTEsEF,numberOfSubChainDicts=
comboPrmVtxTE = prmVertexTE+"Combo"
secVtxTE = jetTrackTE+"__"+"superVtx"
lastTEout = "HLT_bjet_"+chainParts['chainPartName'] if numberOfSubChainDicts>1 else EFChainName
topoStartFrom = chainDict['topoThreshold']
if topoStartFrom:
lastTEout = lastTEout+'_tsf'
#-----------------------------------------------------------------------------------
# sequence assembling
......@@ -244,7 +247,7 @@ def myBjetConfig_split(theChainDef, chainDict, inputTEsEF,numberOfSubChainDicts=
theChainDef.addSequence(theBjetEtHypo, jetSplitTE, jetEtHypoTE) # new
theChainDef.addSequence(theBjetTracks, jetEtHypoTE, jetTrackTE) # new
theChainDef.addSequence(theVxSecondary, [jetTrackTE, comboPrmVtxTE], secVtxTE)
theChainDef.addSequence([theBjetFex, theBtagReq], secVtxTE, lastTEout)
theChainDef.addSequence([theBjetFex, theBtagReq], secVtxTE, lastTEout, topo_start_from = topoStartFrom)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, [lastTEout]*int(btagmult))
return theChainDef
......@@ -270,19 +273,10 @@ def myBjetConfig1(theChainDef, chainDict, inputTEsEF,numberOfSubChainDicts=1):
from TrigBjetHypo.TrigBjetEtHypoConfig import getBjetEtHypoInstance
ef_ethypo_startseq = getBjetEtHypoInstance("EF","StartSequence","35GeV")
from InDetTrigRecExample.EFInDetConfig import TrigEFIDSequence
if 'EFID' in btracking:
ef_bjet_tracks = TrigEFIDSequence("Bjet","bjet","InsideOut").getSequence()
else:
from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_Jet
theTrigFastTrackFinder_Jet = [TrigFastTrackFinder_Jet()]
from TrigInDetConf.TrigInDetSequence import TrigInDetSequence
[theFastTrackFinderxAOD] = TrigInDetSequence("Bjet","bjet","FastxAOD").getSequence()
ef_bjet_tracks = TrigEFIDSequence("Bjet","bjet","DataPrep").getSequence()
ef_bjet_tracks += theTrigFastTrackFinder_Jet
ef_bjet_tracks += theFastTrackFinderxAOD
ef_bjet_tracks += TrigEFIDSequence("Bjet","bjet","InsideOutMerged").getSequence()
# tracking
from TrigInDetConf.TrigInDetSequence import TrigInDetSequence # new
[trkvtx, trkftf, trkprec] = TrigInDetSequence("Bjet", "bjet", "IDTrig", "2step").getSequence()
ef_bjet_tracks = trkftf+trkprec
from TrigT2HistoPrmVtx.TrigT2HistoPrmVtxAllTEConfig import EFHistoPrmVtxAllTE_Jet
from TrigT2HistoPrmVtx.TrigT2HistoPrmVtxComboConfig import EFHistoPrmVtxCombo_Jet
......@@ -333,7 +327,10 @@ def myBjetConfig1(theChainDef, chainDict, inputTEsEF,numberOfSubChainDicts=1):
#theChainDef.addSequence([ef_EtHypo_Btagging], ef6, ef7)
theChainDef.addSequence([ef_VxSecondary_EF,ef_EtHypo_Btagging], ef6, ef7)
lastTEout = "EF_bj_"+chainParts['chainPartName'] if numberOfSubChainDicts>1 else EFChainName
theChainDef.addSequence([ef_bjet, ef_hypo], ef7, lastTEout)
topoStartFrom = chainDict['topoThreshold']
if topoStartFrom:
lastTEout = lastTEout+'_tsf'
theChainDef.addSequence([ef_bjet, ef_hypo], ef7, lastTEout, topo_start_from = topoStartFrom)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, [lastTEout]*int(btagmult))
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
###########################################################################
# SliceDef file for Muon chains
# SliceDef file for Bphysics chains
###########################################################################
__author__ = 'M.Backes, C.Bernius, J.Walder'
__doc__="Definition of bphysics chains"
......@@ -52,26 +52,15 @@ def _addTopoInfo(theChainDef,chainDict,doAtL2AndEF=True):
SameConfigTopos = ['bJpsi', 'bDimu', 'bTau', 'bBmumu', 'bJpsimumu', 'bUpsimumu', 'Zmumu','bUpsi']
ntopos = len(topoAlgs)
# check if L1 item is L1Topo => then enable topo_start_from
useTopoStartFrom = chainDict['topoStartFrom']
topoStartFrom = None
if useTopoStartFrom:
L1item = chainDict['L1item']
L1item = L1item.replace("L1_", "")
if ("-" in L1item):
topoStartFrom = L1item
else: logBphysDef.error("L1Topo item can't be identified")
else:
logBphysDef.debug("topoStartFrom set to False in chain properties in the menu.")
if ('bBmumux' in topoAlgs) | ('bBmumuxv2' in topoAlgs):
theChainDef = bBmumuxTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStartFrom)
if ('bBmumux' in topoAlgs) | ('bBmumuxv2' in topoAlgs) | ('bBmumuxv3' in topoAlgs):
theChainDef = bBmumuxTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, chainDict['topoThreshold'])
elif ('Trkloose' in topoAlgs):
theChainDef = bMuTrack(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStartFrom)
theChainDef = bMuTrack(theChainDef, chainDict, inputTEsL2, inputTEsEF, chainDict['topoThreshold'])
elif (ntopos ==1) & (topoAlgs[0] in SameConfigTopos):
theChainDef = bSingleOptionTopos(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartFrom)
theChainDef = bSingleOptionTopos(theChainDef,chainDict, inputTEsL2, inputTEsEF, chainDict['topoThreshold'])
else:
theChainDef = bMultipleOptionTopos(theChainDef,chainDict,inputTEsL2, inputTEsEF, topoStartFrom)
theChainDef = bMultipleOptionTopos(theChainDef,chainDict,inputTEsL2, inputTEsEF, chainDict['topoThreshold'])
return theChainDef
......@@ -88,7 +77,7 @@ def bSingleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStart
EFTEname = "EF_" + chainDict['chainName']
topo2StartFrom = None
if topoStartFrom:
L2TEname = L2TEname+'_tsf_'+topoStartFrom
L2TEname = "L2_" + TEname+'_'+mtopo+'_tsf_'+chainDict['L1item']
topo2StartFrom = L2TEname
if (mtopo == 'bJpsi'):
......@@ -210,16 +199,25 @@ def bMultipleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoSta
topo2StartFrom = None
if topoStartFrom:
L2TEname = L2TEname+'_tsf_'+topoStartFrom
L2TEname = "L2_" + TEname+myTopoString+'_tsf_'+chainDict['L1item']
topo2StartFrom = L2TEname
if ('7invm9' in topoAlgs) & ('noos' in topoAlgs):
if ('7invm9' in topoAlgs) & ('noos' in topoAlgs) & ('novtx' not in topoAlgs):
from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_DiMu_7invm9_noOS
from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_DiMu_7invm9
from TrigBphysHypo.TrigEFBMuMuFexConfig import EFBMuMuFex_DiMu_7invm9_noOS
from TrigBphysHypo.TrigEFBMuMuHypoConfig import EFBMuMuHypo_DiMu_7invm9
L2Fex = L2BMuMuFex_DiMu_7invm9_noOS()
L2Hypo = L2BMuMuHypo_DiMu_7invm9()
EFFex = EFBMuMuFex_DiMu_7invm9_noOS()
EFHypo = EFBMuMuHypo_DiMu_7invm9()
elif ('7invm9' in topoAlgs) & ('noos' in topoAlgs) & ('novtx' in topoAlgs):
from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_DiMu_7invm9_noOS
from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_DiMu_7invm9_noVtx
from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_DiMu_7invm9_noVtx
from TrigBphysHypo.TrigEFBMuMuFexConfig import EFBMuMuFex_DiMu_7invm9_noOS
from TrigBphysHypo.TrigEFBMuMuHypoConfig import EFBMuMuHypo_DiMu_7invm9_noVtx
from TrigBphysHypo.TrigEFBMuMuHypoConfig import EFBMuMuHypo_DiMu_7invm9_noVtx
L2Fex = L2BMuMuFex_DiMu_7invm9_noOS()
L2Hypo = L2BMuMuHypo_DiMu_7invm9_noVtx()
EFFex = EFBMuMuFex_DiMu_7invm9_noOS()
......@@ -233,7 +231,34 @@ def bMultipleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoSta
L2Hypo = L2BMuMuHypo_DiMu_18invm60_noVtx()
EFFex = EFBMuMuFex_DiMu_18invm60_noOS()
EFHypo = EFBMuMuHypo_DiMu_18invm60_noVtx()
elif ('11invm60' in topoAlgs) & ('noos' in topoAlgs):
elif ('11invm60' in topoAlgs) & ('noos' in topoAlgs) & ('novtx' not in topoAlgs):
from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_DiMu_11invm60_noOS
from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_DiMu_11invm60
from TrigBphysHypo.TrigEFBMuMuFexConfig import EFBMuMuFex_DiMu_11invm60_noOS
from TrigBphysHypo.TrigEFBMuMuHypoConfig import EFBMuMuHypo_DiMu_11invm60
L2Fex = L2BMuMuFex_DiMu_11invm60_noOS()
L2Hypo = L2BMuMuHypo_DiMu_11invm60()
EFFex = EFBMuMuFex_DiMu_11invm60_noOS()
EFHypo = EFBMuMuHypo_DiMu_11invm60()
elif ('11invm24' in topoAlgs) & ('noos' in topoAlgs) & ('novtx' not in topoAlgs):
from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_DiMu_11invm24_noOS
from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_DiMu_11invm24
from TrigBphysHypo.TrigEFBMuMuFexConfig import EFBMuMuFex_DiMu_11invm24_noOS
from TrigBphysHypo.TrigEFBMuMuHypoConfig import EFBMuMuHypo_DiMu_11invm24
L2Fex = L2BMuMuFex_DiMu_11invm24_noOS()
L2Hypo = L2BMuMuHypo_DiMu_11invm24()
EFFex = EFBMuMuFex_DiMu_11invm24_noOS()
EFHypo = EFBMuMuHypo_DiMu_11invm24()
elif ('24invm60' in topoAlgs) & ('noos' in topoAlgs) & ('novtx' not in topoAlgs):
from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_DiMu_24invm60_noOS
from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_DiMu_24invm60
from TrigBphysHypo.TrigEFBMuMuFexConfig import EFBMuMuFex_DiMu_24invm60_noOS
from TrigBphysHypo.TrigEFBMuMuHypoConfig import EFBMuMuHypo_DiMu_24invm60
L2Fex = L2BMuMuFex_DiMu_24invm60_noOS()
L2Hypo = L2BMuMuHypo_DiMu_24invm60()
EFFex = EFBMuMuFex_DiMu_24invm60_noOS()
EFHypo = EFBMuMuHypo_DiMu_24invm60()
elif ('11invm60' in topoAlgs) & ('noos' in topoAlgs) & ('novtx' in topoAlgs):
from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_DiMu_11invm60_noOS
from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_DiMu_11invm60_noVtx
from TrigBphysHypo.TrigEFBMuMuFexConfig import EFBMuMuFex_DiMu_11invm60_noOS
......@@ -242,6 +267,25 @@ def bMultipleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoSta
L2Hypo = L2BMuMuHypo_DiMu_11invm60_noVtx()
EFFex = EFBMuMuFex_DiMu_11invm60_noOS()
EFHypo = EFBMuMuHypo_DiMu_11invm60_noVtx()
elif ('11invm24' in topoAlgs) & ('noos' in topoAlgs) & ('novtx' in topoAlgs):
from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_DiMu_11invm24_noOS
from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_DiMu_11invm24_noVtx
from TrigBphysHypo.TrigEFBMuMuFexConfig import EFBMuMuFex_DiMu_11invm24_noOS
from TrigBphysHypo.TrigEFBMuMuHypoConfig import EFBMuMuHypo_DiMu_11invm24_noVtx
L2Fex = L2BMuMuFex_DiMu_11invm24_noOS()
L2Hypo = L2BMuMuHypo_DiMu_11invm24_noVtx()
EFFex = EFBMuMuFex_DiMu_11invm24_noOS()
EFHypo = EFBMuMuHypo_DiMu_11invm24_noVtx()
elif ('24invm60' in topoAlgs) & ('noos' in topoAlgs) & ('novtx' in topoAlgs):
from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_DiMu_24invm60_noOS
from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_DiMu_24invm60_noVtx
from TrigBphysHypo.TrigEFBMuMuFexConfig import EFBMuMuFex_DiMu_24invm60_noOS
from TrigBphysHypo.TrigEFBMuMuHypoConfig import EFBMuMuHypo_DiMu_24invm60_noVtx
L2Fex = L2BMuMuFex_DiMu_24invm60_noOS()
L2Hypo = L2BMuMuHypo_DiMu_24invm60_noVtx()
EFFex = EFBMuMuFex_DiMu_24invm60_noOS()
EFHypo = EFBMuMuHypo_DiMu_24invm60_noVtx()
elif ('bDimu' in topoAlgs) & ('novtx' in topoAlgs) & ('noos' in topoAlgs):
from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_DiMu_noOS
from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_DiMu_noVtx
......@@ -380,13 +424,16 @@ def bBmumuxTopos(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartFrom):
topo2StartFrom = None
if topoStartFrom:
L2TEname = L2TEname+'_tsf_'+topoStartFrom
L2TEname = "L2_" + TEname+myTopoString+'_tsf_'+chainDict['L1item']
topo2StartFrom = L2TEname
from TrigInDetConf.TrigInDetSequence import TrigInDetSequence
[trkfast, trkprec] = TrigInDetSequence("Bphysics", "bphysics", "IDTrig").getSequence()
# from InDetTrigRecExample.EFInDetConfig import *
# theTrigEFIDInsideOut = TrigEFIDInsideOut_Bphysics().getSequence()
#JWW: Remove Bmumux L2 Fex and Hypo. Use a simple BMuMu Fex and Hypo instead
#from TrigBphysHypo.TrigL2BMuMuXHypoConfig import L2BMuMuXHypo_1
#L2Hypo = L2BMuMuXHypo_1()
......@@ -417,6 +464,13 @@ def bBmumuxTopos(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartFrom):
EFFex = EFBMuMuXFex_1()
EFHypo = EFBMuMuXHypo_1()
elif 'bBmumuxv3' in topoAlgs:
print 'MOOOO in bBmumuxv3'
from TrigBphysHypo.TrigL2BMuMuXHypoConfig import L2BMuMuXHypo_EF
from TrigBphysHypo.TrigL2BMuMuXFexConfig import L2BMuMuXFex_EF
EFFex = L2BMuMuXFex_EF()
EFHypo = L2BMuMuXHypo_EF()
else:
#from TrigBphysHypo.TrigL2BMuMuXFexConfig import L2BMuMuXFex_1
from TrigBphysHypo.TrigEFBMuMuFexConfig import EFBMuMuFex_Jpsi
......@@ -425,39 +479,65 @@ def bBmumuxTopos(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartFrom):
EFFex = EFBMuMuFex_Jpsi()
EFHypo = EFBMuMuHypo_Jpsi()
# Use simple di-muon fex/hypo for L2
# Note - may need to change oppsign and vtx requirements
from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_1
from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_1
L2Fex = L2BMuMuFex_1()
L2Hypo = L2BMuMuHypo_1()
if 'bBmumuxv3' in topoAlgs:
print 'MOOOO2 in bBmumuxv3'
from TrigBphysHypo.TrigL2BMuMuXHypoConfig import L2BMuMuXHypo_1
from TrigBphysHypo.TrigL2BMuMuXFexConfig import L2BMuMuXFex_1
L2Fex = L2BMuMuXFex_1()
L2Hypo = L2BMuMuXHypo_1()
else:
from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_1
from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_1
L2Fex = L2BMuMuFex_1()
L2Hypo = L2BMuMuHypo_1()
if 'bBmumuxv3' in topoAlgs:
L2TEcount = 0; L2outTEs = []
for L2inputTE in inputTEsL2:
L2TEcount = L2TEcount+1
L2outputTE = L2inputTE+'_id_'+str(L2TEcount)
L2outTEs.append(L2outputTE)
theChainDef.addSequence(trkfast,L2inputTE, L2outputTE)
theChainDef.addSignatureL2(L2outTEs)
theChainDef.addSequence( [L2Fex, L2Hypo], L2outTEs, L2ChainName)
theChainDef.addSignatureL2([L2ChainName])
#------- EF Sequences -------
EFTEcount = 0; EFoutTEs = []
for EFinputTE in inputTEsEF:
EFTEcount = EFTEcount + 1
EFoutputTE = EFinputTE+'_id_'+str(EFTEcount)
EFoutTEs.append(EFoutputTE)
theChainDef.addSequence(trkprec,L2outputTE, EFoutputTE)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, EFoutTEs)
theChainDef.addSequence([EFFex, EFHypo], EFoutTEs, EFChainName)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, [EFChainName])
else:
#------- L2 Sequences -------
# create the individual outputTEs together with the first sequences that are run
theChainDef.addSequence([L2Fex, L2Hypo],inputTEsL2,L2TEname, topo_start_from = topoStartFrom)
theChainDef.addSignatureL2([L2TEname])
theChainDef.addSequence([L2Fex, L2Hypo],inputTEsL2,L2TEname, topo_start_from = topoStartFrom)
theChainDef.addSignatureL2([L2TEname])
#------- EF Sequences -------
EFTEcount = 0; EFoutTEsfast = [];
for EFinputTE in inputTEsEF:
EFTEcount = EFTEcount + 1
EFoutputTEfast = EFinputTE+'_idfast_'+str(EFTEcount)
EFoutTEsfast.append(EFoutputTEfast)
theChainDef.addSequence(trkfast,EFinputTE, EFoutputTEfast)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, EFoutTEsfast)
EFTEcount = 0; EFoutTEsprec = [];
for EFinputTE in inputTEsEF:
EFTEcount = EFTEcount + 1
EFinputTEprec = EFinputTE+'_idfast_'+str(EFTEcount)
EFoutputTEprec = EFinputTE+'_idprec_'+str(EFTEcount)
EFoutTEsprec.append(EFoutputTEprec)
theChainDef.addSequence(trkprec,EFinputTEprec, EFoutputTEprec)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, EFoutTEsprec)
theChainDef.addSequence([EFFex, EFHypo], EFoutTEsprec, EFTEname, topo_start_from = topo2StartFrom)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, [EFTEname])
EFTEcount = 0; EFoutTEsfast = [];
for EFinputTE in inputTEsEF:
EFTEcount = EFTEcount + 1
EFoutputTEfast = EFinputTE+'_idfast_'+str(EFTEcount)
EFoutTEsfast.append(EFoutputTEfast)
theChainDef.addSequence(trkfast,EFinputTE, EFoutputTEfast)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, EFoutTEsfast)
EFTEcount = 0; EFoutTEsprec = [];
for EFinputTE in inputTEsEF:
EFTEcount = EFTEcount + 1
EFinputTEprec = EFinputTE+'_idfast_'+str(EFTEcount)
EFoutputTEprec = EFinputTE+'_idprec_'+str(EFTEcount)
EFoutTEsprec.append(EFoutputTEprec)
theChainDef.addSequence(trkprec,EFinputTEprec, EFoutputTEprec)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, EFoutTEsprec)
theChainDef.addSequence([EFFex, EFHypo], EFoutTEsprec, EFTEname, topo_start_from = topo2StartFrom)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, [EFTEname])
return theChainDef
......
......@@ -74,6 +74,7 @@ class L2EFChain_CalibTemplate(L2EFChainDef):
self.EFsignatureList = []
self.TErenamingDict = []
self.chainDict = chainDict
self.chainPart = chainDict['chainParts']
self.chainL1Item = chainDict['L1item']
self.chainPartL1Item = self.chainPart['L1item']
......@@ -273,7 +274,13 @@ class L2EFChain_CalibTemplate(L2EFChainDef):
theTrigCaloCellMaker_jet_fullcalo = TrigCaloCellMaker_jet_fullcalo("CellMakerFullCalo_topo", doNoise=0, AbsE=True, doPers=True)
from TrigJetHypo.TrigJetHypoConfig import EFJetHypoNoiseConfig
theJetHypo = EFJetHypoNoiseConfig()
if "loose" in self.chainPart['addInfo']:
theJetHypo = EFJetHypoNoiseConfig("EFJetHypoNoiseConfigLoose")
theJetHypo.NoiseTool.BadChanPerFEB=1
theJetHypo.NoiseTool.CellQualityCut=100
else:
theJetHypo = EFJetHypoNoiseConfig()
self.L2sequenceList += [['', [theDummyRoiCreator], 'EF_full']]
......@@ -285,7 +292,10 @@ class L2EFChain_CalibTemplate(L2EFChainDef):
self.EFsignatureList += [ [['jet_hypo']] ]
antiktsize = 0
suffix = "_loose" if "loose" in self.chainPart['addInfo'] else ""
self.TErenamingDict = {
'EF_full_noise' : mergeRemovingOverlap('HLT_full__cluster__', 'jr_antikt'+str(antiktsize)+'tc_had' ),
'jet_hypo' : mergeRemovingOverlap('HLT_full__cluster__', 'jr_antikt'+str(antiktsize)+'tc_had_noiseHypo' ),
'jet_hypo' : mergeRemovingOverlap('HLT_full__cluster__', 'jr_antikt'+str(antiktsize)+'tc_had_noiseHypo'+suffix ),
}
......@@ -33,8 +33,8 @@ theTrigFastTrackFinder_Electron = TrigFastTrackFinder_Electron()
# EF Electron FEX
from TrigEgammaRec.TrigEgammaRecConfig import TrigEgammaRec
theTrigEgammaRec_eGamma = TrigEgammaRec(name = "TrigEgammaRec_eGamma")
theTrigEgammaRec_Conv_eGamma = TrigEgammaRec(name = "TrigEgammaRec_Conv_eGamma", doConversions = True)
TrigEgammaRec_eGamma = TrigEgammaRec.copy(name = "TrigEgammaRec_eGamma",doPrint=False)
TrigEgammaRec_Conv_eGamma = TrigEgammaRec.copy(name = "TrigEgammaRec_Conv_eGamma", doConversions = True,doPrint=False)
from TrigGenericAlgs.TrigGenericAlgsConf import PrescaleAlgo