Commit aae24957 authored by Arantxa Ruiz Martinez's avatar Arantxa Ruiz Martinez Committed by Graeme Stewart
Browse files

XS parameters updated for the W T&P triggers (ATR-10337) (TriggerMenu-00-07-87)

	* XS parameters updated in l1menu/CaloDef.py for the W T&P triggers (ATR-10337)
	* TriggerMenu-00-07-87

	* Fix 2e17_loose1_2j35_bperf -> 2e17_loose_2j35_bperf in MC_pp_v5 (ATR-10348)
	* TriggerMenu-00-07-86

2015-02-28  Arantxa Ruiz Martinez  <aranzazu.ruiz.martinez@cern.ch>
	* Added W T&P triggers using L1Topo and XS thresholds (ATR-9342, ATR-10337)
	* TriggerMenu-00-07-85

	* 'trkcut' included in ElectronDef.py and SignatureDicts.py (ATR-9342)
	* New HLT chains implemented in MC_pp_v5 menu:
	  - e13_etcut_trkcut
	  - e18_etcut_trkcut
	  - e13_etcut_trkcut_xe20
	  - e18_etcut_trkcut_xe35
	* Needs ElectronPhotonSelectorTools-00-02-14 and TrigEgammaHypo-01-01-06
	* TriggerMenu-00-07-84

	* Added e13_etcut_xe20 and e18_etcut_xe35 in MC_pp_v5 menu (ATR-9342)
...
(Long ChangeLog diff - truncated)
parent 154df0ce
......@@ -20,8 +20,6 @@ class TriggerConfigL1Topo:
TriggerFlags.triggerMenuSetup = menuName
self.menuName = TriggerFlags.triggerMenuSetup()
print self.menuName
self.inputFile = inputFile
self.outputFile = outputFile
......
......@@ -72,8 +72,6 @@ class TriggerConfigLVL1:
tpcl1 = TriggerConfigL1Topo( menuName = TriggerConfigL1Topo.getMenuBaseName(menu) )
tpcl1.generateMenu()
triggerLines = tpcl1.menu.getTriggerLines()
#for tr in triggerLines:
# print " ",tr
except Exception, ex:
print "Topo menu generation inside L1 menu failed, but will be ignored for the time being",ex
......@@ -232,7 +230,25 @@ class TriggerConfigLVL1:
# build list of items for the menu from the list of requested names
itemsForMenu = []
for itemName in Lvl1Flags.items():
itemsToRemove =[]
for index, itemName in enumerate(Lvl1Flags.items()):
for olditem in Lvl1Flags.ItemMap():
if (olditem == itemName) and (Lvl1Flags.ItemMap()[olditem] == ''):
itemsToRemove.append(index)
for i in reversed(itemsToRemove):
del Lvl1Flags.items()[i]
for item_index, itemName in enumerate(Lvl1Flags.items()):
#Beam splash: add here the remapping list!
for olditem in Lvl1Flags.ItemMap():
if (olditem == itemName) and (Lvl1Flags.ItemMap()[olditem] != ''):
#log.info("Remapping item %s as defined in the menu" %(itemName, str(Lvl1Flags.ItemMap()[olditem])))
Lvl1Flags.items()[item_index] = Lvl1Flags.ItemMap()[olditem]
itemName = Lvl1Flags.ItemMap()[olditem]
registeredItem = self.getRegisteredItem(itemName)
if registeredItem == None:
log.fatal("LVL1 item '%s' has not been registered" % itemName)
......@@ -252,7 +268,6 @@ class TriggerConfigLVL1:
available_ctpids = sorted( list( set(range(Limits.MaxTrigItems)) - set(assigned_ctpids) ) )
available_ctpids.reverse()
# add the items to the menu
from TriggerMenu.l1.TriggerTypeDef import TT
for item in itemsForMenu:
......@@ -271,11 +286,20 @@ class TriggerConfigLVL1:
# add the thresholds to the menu
undefined_thr = False
for thresholdName in Lvl1Flags.thresholds():
for index, thresholdName in enumerate(Lvl1Flags.thresholds()):
#Beam splash: add here the remapping list!
if (Lvl1Flags.ThresholdMap() != {}):
for olditem in (Lvl1Flags.ThresholdMap()):
if olditem == thresholdName:
#log.info("Remapping thresholds as defined in the menu")
Lvl1Flags.thresholds()[index] = Lvl1Flags.ThresholdMap()[olditem]
thresholdName = Lvl1Flags.ThresholdMap()[olditem]
if thresholdName in self.menu.thresholds:
continue
threshold = self.getRegisteredThreshold(thresholdName)
if threshold is None:
if threshold is None and not thresholdName=="":
log.error('Threshold %s is listed in menu but not defined' % thresholdName )
undefined_thr = True
else:
......@@ -328,7 +352,6 @@ class TriggerConfigLVL1:
thr.mapping = nextFreeMapping[thr.ttype]
nextFreeMapping[thr.ttype] += 1
#print thr, thr.ttype, thr.mapping
thr.setCableInput()
......
......@@ -56,6 +56,8 @@ def generateChainDefs(chainDict):
#----------------------------------------------------------------------------
print 'MEOW getMultThreshBtagInfo(cDict):', getMultThreshBtagInfo(chainDict)
#----------------------------------------------------------------------------
# --- build the jet chain, then pass JetChainDef and bjetchainDictionaries to build bjet chains ---
theAllJetChainDef = genJetChainDefs(jetchainDict)
......@@ -112,11 +114,9 @@ def generateChainDefs(chainDict):
###########################################################################
def buildBjetChains(jchaindef,bjetdict,doAtL2AndEF=True,numberOfSubChainDicts=1):
inputTEsEF = jchaindef.signatureList[-1]['listOfTriggerElements'][0]
print 'MEOW inputTEsEF', inputTEsEF
print 'MEOW all inpTEs', jchaindef.signatureList
L2ChainName = "L2_" + bjetdict['chainName']
EFChainName = "EF_" + bjetdict['chainName']
EFChainName = "EF_bjet_" + bjetdict['chainName']
HLTChainName = "HLT_" + bjetdict['chainName']
topoAlgs = bjetdict["topo"]
......@@ -138,7 +138,7 @@ def buildBjetChains(jchaindef,bjetdict,doAtL2AndEF=True,numberOfSubChainDicts=1)
def myBjetConfig_split(theChainDef, chainDict, inputTEsEF,numberOfSubChainDicts=1):
L2ChainName = "L2_" + chainDict['chainName']
EFChainName = "EF_" + chainDict['chainName']
EFChainName = "EF_bjet_" + chainDict['chainName']
HLTChainName = "HLT_" + chainDict['chainName']
chainParts = chainDict['chainParts']
......@@ -220,7 +220,6 @@ def myBjetConfig_split(theChainDef, chainDict, inputTEsEF,numberOfSubChainDicts=
#-----------------------------------------------------------------------------------
tracking = "IDTrig"
jetEtHypoTE = "HLT_j"+btagthresh
jetHypoTE = "HLT_j"+btagthresh+"_eta"
jetSplitTE = jetHypoTE+"_jsplit"
......@@ -230,7 +229,7 @@ def myBjetConfig_split(theChainDef, chainDict, inputTEsEF,numberOfSubChainDicts=
prmVertexTE = superTrackingTE+"_prmVtx"
comboPrmVtxTE = prmVertexTE+"Combo"
secVtxTE = jetTrackTE+"__"+"superVtx"
lastTEout = "HLT_"+chainParts['chainPartName'] if numberOfSubChainDicts>1 else EFChainName
lastTEout = "HLT_bjet_"+chainParts['chainPartName'] if numberOfSubChainDicts>1 else EFChainName
#-----------------------------------------------------------------------------------
# sequence assembling
......@@ -256,7 +255,7 @@ def myBjetConfig_split(theChainDef, chainDict, inputTEsEF,numberOfSubChainDicts=
def myBjetConfig1(theChainDef, chainDict, inputTEsEF,numberOfSubChainDicts=1):
L2ChainName = "L2_" + chainDict['chainName']
EFChainName = "EF_" + chainDict['chainName']
EFChainName = "EF_bjet_" + chainDict['chainName']
HLTChainName = "HLT_" + chainDict['chainName']
chainParts = chainDict['chainParts']
......@@ -335,7 +334,7 @@ def myBjetConfig1(theChainDef, chainDict, inputTEsEF,numberOfSubChainDicts=1):
theChainDef.addSequence([EFHistoPrmVtxCombo_Jet()], [ef4, ef5], ef6)
#theChainDef.addSequence([ef_EtHypo_Btagging], ef6, ef7)
theChainDef.addSequence([ef_VxSecondary_EF,ef_EtHypo_Btagging], ef6, ef7)
lastTEout = "EF_"+chainParts['chainPartName'] if numberOfSubChainDicts>1 else EFChainName
lastTEout = "EF_bjet_"+chainParts['chainPartName'] if numberOfSubChainDicts>1 else EFChainName
theChainDef.addSequence([ef_bjet, ef_hypo], ef7, lastTEout)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, [lastTEout]*int(btagmult))
......@@ -468,5 +467,15 @@ def get_lastTE_j35(ChainDef):
inputTEsEF = ChainDef.signatureList[-1]['listOfTriggerElements']
return inputTEsEF
###########################################################################
def getMultThreshBtagInfo(cDict):
allInfo = []
chainPartInfo = []
for cpart in cDict['chainParts']:
if cpart['signature'] == 'Jet':
chainPartInfo.append(cpart['multiplicity'])
chainPartInfo.append(cpart['threshold'])
chainPartInfo.append(cpart['bTag'])
allInfo.append(chainPartInfo)
return allInfo
###########################################################################
......@@ -4,18 +4,13 @@
# SliceDef file for Muon chains
###########################################################################
__author__ = 'M.Backes, C.Bernius, J.Walder'
__doc__="Definition of bphysics chains as used in v4 menu"
__doc__="Definition of bphysics chains"
from AthenaCommon.Logging import logging
logging.getLogger().info("Importing %s",__name__)
logBphysDef = logging.getLogger("TriggerMenu.bphysics.BphysicsDef")
#from TriggerMenu.muon.MuonDefv3 import *
from TriggerMenu.menu.MenuUtils import *
#BPhysics = []
###########################################################################
###########################################################################
......@@ -28,14 +23,6 @@ def generateChainDefs(chainDict):
from TriggerMenu.muon.generateMuonChainDefs import generateChainDefs as genMuonChainDefs
theChainDef = genMuonChainDefs(chainDict)
# for subChainDict in listOfChainDicts:
# BPhysics = L2EFChain_mu(subChainDict)
# listOfChainDefs += [BPhysics.generateHLTChainDef()]
# if len(listOfChainDefs)>1:
# theChainDef = mergeChainDefs(listOfChainDefs)
# else:
# theChainDef = listOfChainDefs[0]
if not chainDict["topo"]:
logBphysDef.error( "No topo given -> not a bphysics chain...")
else:
......@@ -65,21 +52,26 @@ 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_starts_from
topoStartsFrom = None
L1item = chainDict['L1item']
L1item = L1item.replace("L1_", "")
if ("-" in L1item):
topoStartsFrom = L1item
# 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, topoStartsFrom)
theChainDef = bBmumuxTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStartFrom)
elif ('Trkloose' in topoAlgs):
theChainDef = bMuTrack(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStartsFrom)
theChainDef = bMuTrack(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStartFrom)
elif (ntopos ==1) & (topoAlgs[0] in SameConfigTopos):
theChainDef = bSingleOptionTopos(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartsFrom)
theChainDef = bSingleOptionTopos(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartFrom)
else:
theChainDef = bMultipleOptionTopos(theChainDef,chainDict,inputTEsL2, inputTEsEF, topoStartsFrom)
theChainDef = bMultipleOptionTopos(theChainDef,chainDict,inputTEsL2, inputTEsEF, topoStartFrom)
return theChainDef
......@@ -87,12 +79,17 @@ def _addTopoInfo(theChainDef,chainDict,doAtL2AndEF=True):
###################################################################################
###################################################################################
def bSingleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStartsFrom):
def bSingleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStartFrom):
topoAlgs = chainDict["topo"]
mtopo = topoAlgs[0]
TEname = chainDict['chainName'].split('_')[0]
L2TEname = "L2_" + TEname+'_'+mtopo
EFTEname = "EF_" +chainDict['chainName']
# TE naming deifnition
TEname = findL2teBaseName(chainDict['chainName'],topoAlgs)
L2TEname = "L2_" + TEname+'_'+mtopo+'_'+chainDict['L1item']
EFTEname = "EF_" + chainDict['chainName']
topo2StartFrom = None
if topoStartFrom:
L2TEname = L2TEname+'_tsf_'+topoStartFrom
topo2StartFrom = L2TEname
if (mtopo == 'bJpsi'):
from TrigBphysHypo.TrigL2MultiMuFexConfig import L2MultiMuFex_Jpsi
......@@ -105,11 +102,7 @@ def bSingleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStart
EFHypo = EFMultiMuHypo_Jpsi()
elif (mtopo =='bDimu'):
##print "JWW"
##print chainDict
if ('3mu' in chainDict['chainName']):
## print "JWW: using mutlimuons for", chainDict['chainName']
#This is a multi-muon chain
from TrigBphysHypo.TrigL2MultiMuFexConfig import L2MultiMuFex_DiMu
from TrigBphysHypo.TrigL2MultiMuHypoConfig import L2MultiMuHypo_DiMu
from TrigBphysHypo.TrigEFMultiMuFexConfig import EFMultiMuFex_DiMu
......@@ -120,7 +113,6 @@ def bSingleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStart
EFHypo = EFMultiMuHypo_DiMu()
else:
#This is a di-muon chain
##print "JWW: using di-muons for", chainDict['chainName']
from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_DiMu
from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_DiMu
from TrigBphysHypo.TrigEFBMuMuFexConfig import EFBMuMuFex_DiMu
......@@ -193,35 +185,35 @@ def bSingleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStart
else:
logBphysDef.error('Bphysics Chain %s can not be constructed, the given topo algs are not known: %s ' %(chainDict['chainName'], mtopo ))
theChainDef.addSequence([L2Fex, L2Hypo], inputTEsL2, L2TEname, topo_starts_from = topoStartsFrom)
theChainDef.addSequence([L2Fex, L2Hypo], inputTEsL2, L2TEname, topo_start_from = topoStartFrom)
theChainDef.addSignatureL2([L2TEname])
topo2StartsFrom = None
if topoStartsFrom:
topo2StartsFrom = L2TEname
theChainDef.addSequence([EFFex, EFHypo],inputTEsEF, EFTEname, topo_starts_from=topo2StartsFrom)
theChainDef.addSequence([EFFex, EFHypo],inputTEsEF, EFTEname, topo_start_from=topo2StartFrom)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, [EFTEname])
return theChainDef
###################################################################################
###################################################################################
def bMultipleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStartsFrom):
def bMultipleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoStartFrom):
L2ChainName = "L2_" + chainDict['chainName']
EFChainName = "EF_" + chainDict['chainName']
HLTChainName = "HLT_" + chainDict['chainName']
topoAlgs = chainDict["topo"]
TEname = chainDict['chainName'].split('_')[0]
TEname = findL2teBaseName(chainDict['chainName'],topoAlgs)
myTopoString = ''
for mtopo in topoAlgs:
myTopoString =myTopoString+'_'+mtopo
L2TEname = "L2_" + TEname+myTopoString
L2TEname = "L2_" + TEname+myTopoString+'_'+chainDict['L1item']
EFTEname = "EF_" + chainDict['chainName']
topo2StartFrom = None
if topoStartFrom:
L2TEname = L2TEname+'_tsf_'+topoStartFrom
topo2StartFrom = L2TEname
if ('7invm9' in topoAlgs) & ('noos' in topoAlgs):
from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_DiMu_7invm9_noOS
......@@ -281,23 +273,18 @@ def bMultipleOptionTopos(theChainDef, chainDict, inputTEsL2, inputTEsEF, topoSta
logBphysDef.error('Bphysics Chain %s can not be constructed, the given topo algs are not known: %s ' %(chainDict['chainName'], topoAlgs ))
theChainDef.addSequence([L2Fex, L2Hypo],inputTEsL2,L2TEname, topo_starts_from = topoStartsFrom)
theChainDef.addSequence([L2Fex, L2Hypo],inputTEsL2,L2TEname, topo_start_from = topoStartFrom)
theChainDef.addSignatureL2([L2TEname])
topo2StartsFrom = None
if topoStartsFrom:
topo2StartsFrom = L2TEname
theChainDef.addSequence([EFFex, EFHypo],inputTEsEF, EFTEname, topo_starts_from = topo2StartsFrom)
theChainDef.addSequence([EFFex, EFHypo],inputTEsEF, EFTEname, topo_start_from = topo2StartFrom)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, [EFTEname])
return theChainDef
return theChainDef
###################################################################################
###################################################################################
def bMuTrack(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartsFrom):
def bMuTrack(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartFrom):
L2ChainName = "L2_" + chainDict['chainName']
EFChainName = "EF_" + chainDict['chainName']
HLTChainName = "HLT_" + chainDict['chainName']
......@@ -320,34 +307,33 @@ def bMuTrack(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartsFrom):
else:
logBphysDef.error('Bphysics Chain %s can not be constructed, the given topo algs are not known: %s ' %(chainDict['chainName'], topoAlgs ))
# Commented out section for L2 and EF sequence - not working with current FTF and prec tracking
# L2TEcount = 0; L2outTEs = []
# for L2inputTE in inputTEsL2:
# L2TEcount = L2TEcount+1
# L2outputTE = L2inputTE+'_idl2fast_'+str(L2TEcount)
# L2outTEs.append(L2outputTE)
# #theChainDef.addSequence([theTrigIdscan],L2inputTE, L2outputTE)
# theChainDef.addSequence(trkfast,L2inputTE, L2outputTE)
# theChainDef.addSignatureL2(L2outTEs)
#
# theChainDef.addSequence( [L2Fex, L2Hypo], L2outTEs, L2ChainName)
### theChainDef.addSequence( [L2Fex, L2Hypo], inputTEsL2, L2ChainName)
# theChainDef.addSignatureL2([L2ChainName])
#
#
#
# EFTEcount = 0; EFoutTEsprec = [];
# for EFinputTE in inputTEsEF:
# EFTEcount = EFTEcount + 1
# EFoutputTEprec = EFinputTE+'_idefprec_'+str(EFTEcount)
# EFoutTEsprec.append(EFoutputTEprec)
# theChainDef.addSequence(trkprec,EFinputTE, EFoutputTEprec)
# theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, EFoutTEsprec)
#
#
# theChainDef.addSequence([EFFex, EFHypo],EFoutTEsprec,EFChainName)
# theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, [EFChainName])
#
# Commented out section for L2 and EF sequence - not working with current FTF and prec tracking
# L2TEcount = 0; L2outTEs = []
# for L2inputTE in inputTEsL2:
# L2TEcount = L2TEcount+1
# L2outputTE = L2inputTE+'_idl2fast_'+str(L2TEcount)
# L2outTEs.append(L2outputTE)
# #theChainDef.addSequence([theTrigIdscan],L2inputTE, L2outputTE)
# theChainDef.addSequence(trkfast,L2inputTE, L2outputTE)
# theChainDef.addSignatureL2(L2outTEs)
#
# theChainDef.addSequence( [L2Fex, L2Hypo], L2outTEs, L2ChainName)
## theChainDef.addSequence( [L2Fex, L2Hypo], inputTEsL2, L2ChainName)
# theChainDef.addSignatureL2([L2ChainName])
#
#
#
# EFTEcount = 0; EFoutTEsprec = [];
# for EFinputTE in inputTEsEF:
# EFTEcount = EFTEcount + 1
# EFoutputTEprec = EFinputTE+'_idefprec_'+str(EFTEcount)
# EFoutTEsprec.append(EFoutputTEprec)
# theChainDef.addSequence(trkprec,EFinputTE, EFoutputTEprec)
# theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, EFoutTEsprec)
#
# theChainDef.addSequence([EFFex, EFHypo],EFoutTEsprec,EFChainName)
# theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, [EFChainName])
# Sequence where only the EF mu+track stage is run. FTF+prec tracking run first
#------- EF Sequences -------
......@@ -369,7 +355,7 @@ def bMuTrack(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartsFrom):
theChainDef.addSequence(trkprec,EFinputTEprec, EFoutputTEprec)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, EFoutTEsprec)
theChainDef.addSequence([EFFex, EFHypo], EFoutTEsprec, EFChainName, topo_starts_from = topoStartsFrom)
theChainDef.addSequence([EFFex, EFHypo], EFoutTEsprec, EFChainName, topo_start_from = topoStartFrom)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, [EFChainName])
......@@ -379,61 +365,67 @@ def bMuTrack(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartsFrom):
###################################################################################
###################################################################################
def bBmumuxTopos(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartsFrom):
def bBmumuxTopos(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartFrom):
L2ChainName = "L2_" + chainDict['chainName']
EFChainName = "EF_" + chainDict['chainName']
HLTChainName = "HLT_" + chainDict['chainName']
topoAlgs = chainDict["topo"]
TEname = findL2teBaseName(chainDict['chainName'],topoAlgs)
#from TrigIDSCAN.TrigIDSCAN_Config import TrigIDSCAN_Bphysics
#theTrigIdscan = TrigIDSCAN_Bphysics()
#from InDetTrigRecExample.EFInDetConfig import *
#theTrigEFIDInsideOut = TrigEFIDInsideOut_Bphysics().getSequence()
myTopoString = ''
for mtopo in topoAlgs:
myTopoString =myTopoString+'_'+mtopo
L2TEname = "L2_" + TEname+myTopoString+'_'+chainDict['L1item']
EFTEname = "EF_" + chainDict['chainName']
topo2StartFrom = None
if topoStartFrom:
L2TEname = L2TEname+'_tsf_'+topoStartFrom
topo2StartFrom = L2TEname
from TrigInDetConf.TrigInDetSequence import TrigInDetSequence
[trkfast, trkprec] = TrigInDetSequence("Bphysics", "bphysics", "IDTrig").getSequence()
from TrigBphysHypo.TrigL2BMuMuXHypoConfig import L2BMuMuXHypo_1
L2Hypo = L2BMuMuXHypo_1()
#JWW: Remove Bmumux L2 Fex and Hypo. Use a simple BMuMu Fex and Hypo instead
#from TrigBphysHypo.TrigL2BMuMuXHypoConfig import L2BMuMuXHypo_1
#L2Hypo = L2BMuMuXHypo_1()
if 'BcmumuDsloose' in topoAlgs:
from TrigBphysHypo.TrigL2BMuMuXFexConfig import L2BMuMuXFex_BcMuMuDs
#from TrigBphysHypo.TrigL2BMuMuXFexConfig import L2BMuMuXFex_BcMuMuDs
from TrigBphysHypo.TrigEFBMuMuXFexConfig import EFBMuMuXFex_BcMuMuDs
from TrigBphysHypo.TrigEFBMuMuXHypoConfig import EFBMuMuXHypo_BcMuMuDs
L2Fex = L2BMuMuXFex_BcMuMuDs()
#L2Fex = L2BMuMuXFex_BcMuMuDs()
EFFex = EFBMuMuXFex_BcMuMuDs()
EFHypo = EFBMuMuXHypo_BcMuMuDs()
elif 'BpmumuKp' in topoAlgs:
from TrigBphysHypo.TrigL2BMuMuXFexConfig import L2BMuMuXFex_BplusMuMuKplus
#from TrigBphysHypo.TrigL2BMuMuXFexConfig import L2BMuMuXFex_BplusMuMuKplus
from TrigBphysHypo.TrigEFBMuMuXFexConfig import EFBMuMuXFex_BplusMuMuKplus
from TrigBphysHypo.TrigEFBMuMuXHypoConfig import EFBMuMuXHypo_BplusMuMuKplus
L2Fex = L2BMuMuXFex_BplusMuMuKplus()
#L2Fex = L2BMuMuXFex_BplusMuMuKplus()
EFFex = EFBMuMuXFex_BplusMuMuKplus()
EFHypo = EFBMuMuXHypo_BplusMuMuKplus()
elif 'bBmumuxv2' in topoAlgs:
### from TrigBphysHypo.TrigL2BMuMuXFexConfig import L2BMuMuXFex_1
from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_1
from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_1
#from TrigBphysHypo.TrigL2BMuMuFexConfig import L2BMuMuFex_1
#from TrigBphysHypo.TrigL2BMuMuHypoConfig import L2BMuMuHypo_1
from TrigBphysHypo.TrigEFBMuMuXFexConfig import EFBMuMuXFex_1
from TrigBphysHypo.TrigEFBMuMuXHypoConfig import EFBMuMuXHypo_1
### L2Fex = L2BMuMuXFex_1()
L2Fex = L2BMuMuFex_1()
L2Hypo = L2BMuMuHypo_1()
#L2Fex = L2BMuMuFex_1()
#L2Hypo = L2BMuMuHypo_1()
EFFex = EFBMuMuXFex_1()
EFHypo = EFBMuMuXHypo_1()
else:
from TrigBphysHypo.TrigL2BMuMuXFexConfig import L2BMuMuXFex_1
#from TrigBphysHypo.TrigL2BMuMuXFexConfig import L2BMuMuXFex_1
from TrigBphysHypo.TrigEFBMuMuFexConfig import EFBMuMuFex_Jpsi
from TrigBphysHypo.TrigEFBMuMuHypoConfig import EFBMuMuHypo_Jpsi
L2Fex = L2BMuMuXFex_1()
#L2Fex = L2BMuMuXFex_1()
EFFex = EFBMuMuFex_Jpsi()
EFHypo = EFBMuMuHypo_Jpsi()
# JWW Use simple di-muon fex/hypo for L2
# 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
......@@ -442,23 +434,8 @@ def bBmumuxTopos(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartsFrom):
#------- L2 Sequences -------
# create the individual outputTEs together with the first sequences that are run
theChainDef.addSequence([L2Fex, L2Hypo],inputTEsL2,L2ChainName)
theChainDef.addSignatureL2([L2ChainName])
# L2TEcount = 0; L2outTEs = []
# for L2inputTE in inputTEsL2:
# L2TEcount = L2TEcount+1
# L2outputTE = L2inputTE+'_id_'+str(L2TEcount)
# L2outTEs.append(L2outputTE)
# theChainDef.addSequence([theTrigIdscan],L2inputTE, L2outputTE)
### theChainDef.addSequence(trkfast,L2inputTE, L2outputTE)
#
# theChainDef.addSignatureL2(L2outTEs)
#
# theChainDef.addSequence( [L2Fex, L2Hypo], L2outTEs, L2ChainName)
### theChainDef.addSequence( [L2Fex, L2Hypo], inputTEsL2, L2ChainName)
# theChainDef.addSignatureL2([L2ChainName])
theChainDef.addSequence([L2Fex, L2Hypo],inputTEsL2,L2TEname, topo_start_from = topoStartFrom)
theChainDef.addSignatureL2([L2TEname])
#------- EF Sequences -------
EFTEcount = 0; EFoutTEsfast = [];
......@@ -479,9 +456,23 @@ def bBmumuxTopos(theChainDef,chainDict, inputTEsL2, inputTEsEF, topoStartsFrom):
theChainDef.addSequence(trkprec,EFinputTEprec, EFoutputTEprec)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, EFoutTEsprec)
theChainDef.addSequence([EFFex, EFHypo], EFoutTEsprec, EFChainName, topo_starts_from = topoStartsFrom)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, [EFChainName])
theChainDef.addSequence([EFFex, EFHypo], EFoutTEsprec, EFTEname, topo_start_from = topo2StartFrom)
theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, [EFTEname])
return theChainDef
###################################################################################
###################################################################################
def findL2teBaseName(cName,topos):
indices = []
for topo in topos:
indices.append(cName.find(topo))
firstTopoOccurance = sorted(indices,key=int)[0]
return cName[:firstTopoOccurance-1]
###################################################################################
......@@ -224,24 +224,87 @@ def _addMatching(theChainDef,chainDicts,listOfChainDefs):
for cD in listOfChainDefs:
allInputTEsEF +=[deepcopy(cD.signatureList[-1]['listOfTriggerElements'][0])]
#print 'WOOF all input TEs', allInputTEsEF
inputTEsEF = theChainDef.signatureList[-1]['listOfTriggerElements']
secondlastTEsEF = theChainDef.signatureList[-2]['listOfTriggerElements']
muonTE = theChainDef.signatureList[3]['listOfTriggerElements']
from TrigBjetHypo.TrigLeptonJetMatchAllTEConfig import getLeptonJetMatchAllTEInstance