Skip to content
Snippets Groups Projects
Commit 65409587 authored by John Kenneth Anders's avatar John Kenneth Anders
Browse files

Merge branch '21.0-drawrpvll-rpvlltrigger-switch-fix' into '21.0'

Adding DRAW_RPVLL flag for turning TriggerAPI implementation on/off from reco transform

See merge request atlas/athena!23956
parents e48bd3f2 45885909
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ primRPVLLDESDM=jobproperties.PrimaryDPDFlags_RPVLLStream
## TriggerAPI ##
from LongLivedParticleDPDMaker.RPVLLTriggers import RPVLLTriggers
apitriggers = RPVLLTriggers()
from LongLivedParticleDPDMaker.RPVLLTriggers import rpvllTrig
class DV_containerFlags(JobProperty):
......@@ -37,7 +38,7 @@ class DV_MultiJetTriggerFlags(JobProperty):
"HLT_7j25_gsc50_boffperf_split_L14J20" ]#gsc
triggers += ["HLT_2j275_j140","HLT_2j250_j120","HLT_2j220_j120"]#3jet
triggers += ["HLT_5j85_L14J15"] # 2018 5 jet
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
triggers += apitriggers.getDVMultiJetTriggers() ## TriggerAPI
pass
primRPVLLDESDM.add_JobProperty(DV_MultiJetTriggerFlags)
......@@ -164,7 +165,7 @@ class DV_MuonBarrelFilterFlags(JobProperty):
cutEtMin=60.0*Units.GeV
cutEtaMax=1.1
triggers=["HLT_mu60_0eta105_msonly"]
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
triggers += apitriggers.getDVMuonBarrelTriggers() ## TriggerAPI
nPassed=1
pass
......@@ -177,7 +178,7 @@ class DV_MuonFullMSFilterFlags(JobProperty):
cutEtMin=80.0*Units.GeV
cutEtaMax=2.5
triggers=["HLT_mu80_msonly_3layersEC"]
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
triggers += apitriggers.getDVMuonFullMSTriggers() ## TriggerAPI
nPassed=1
pass
......@@ -192,7 +193,7 @@ class DV_PhotonFilterFlags(JobProperty):
cutIsEM="Loose"
triggers=["HLT_g140_loose"]
triggers+=["HLT_g140_tight","HLT_g200_loose"]#2017
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
triggers += apitriggers.getDVPhotonTriggers() ## TriggerAPI
prescale=20
nPassed=1
......@@ -225,7 +226,7 @@ class DV_METFilterFlags(JobProperty):
triggers+=[ "HLT_xe110_pufit_xe70_L1XE50" ] #2018 primary
triggers+=[ "HLT_xe110_pufit_xe65_L1XE55","HLT_xe100_pufit_xe75_L1XE60",
"HLT_xe110_pufit_xe65_L1XE60" ] #2018 backup
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
triggers += apitriggers.getDVMETTriggers() ## TriggerAPI
pass
primRPVLLDESDM.add_JobProperty(DV_METFilterFlags)
......
......@@ -10,6 +10,8 @@ primRPVLLDESDM = jobproperties.PrimaryDPDFlags_RPVLLStream
## TriggerAPI ##
from LongLivedParticleDPDMaker.RPVLLTriggers import RPVLLTriggers
apitriggers = RPVLLTriggers()
from LongLivedParticleDPDMaker.RPVLLTriggers import rpvllTrig
class DiLep_FilterFlags(JobProperty):
statusOn = True
......@@ -17,16 +19,16 @@ class DiLep_FilterFlags(JobProperty):
StoredValue = True
SiPhTriggers = ["HLT_g140_loose", "HLT_g200_loose", "HLT_g200_loose_L1EM24VHIM"]
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
SiPhTriggers += apitriggers.getDiLepSiPhTriggers() ## TriggerAPI
DiPhTriggers = ["HLT_2g50_loose_L12EM20VH", "HLT_2g60_loose_L12EM20VH"]
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
DiPhTriggers += apitriggers.getDiLepDiPhTriggers() ## TriggerAPI
SiMuTriggers = ["HLT_mu80_msonly_3layersEC"]
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
SiMuTriggers += apitriggers.getDiLepSiMuTriggers() ## TriggerAPI
SiMuBaTriggers = ["HLT_mu60_0eta105_msonly"]
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
SiMuBaTriggers += apitriggers.getDiLepSiMuBaTriggers() ## TriggerAPI
ElEtaMax = 2.5
......
......@@ -10,6 +10,7 @@ primRPVLLDESDM = jobproperties.PrimaryDPDFlags_RPVLLStream
## TriggerAPI ##
from LongLivedParticleDPDMaker.RPVLLTriggers import RPVLLTriggers
apitriggers = RPVLLTriggers()
from LongLivedParticleDPDMaker.RPVLLTriggers import rpvllTrig
class Emerging_FilterFlags(JobProperty):
statusOn = True
......@@ -26,7 +27,7 @@ class Emerging_FilterFlags(JobProperty):
"HLT_4j140",
"HLT_4j150"
]
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
Triggers += apitriggers.getEmergingTriggers() ## TriggerAPI
primRPVLLDESDM.add_JobProperty(Emerging_FilterFlags)
......
......@@ -10,6 +10,8 @@ primRPVLLDESDM=jobproperties.PrimaryDPDFlags_RPVLLStream
## TriggerAPI ##
from LongLivedParticleDPDMaker.RPVLLTriggers import RPVLLTriggers
apitriggers = RPVLLTriggers()
from LongLivedParticleDPDMaker.RPVLLTriggers import rpvllTrig
class HV_MuvtxTriggerFlags(JobProperty):
statusOn = True
......@@ -22,7 +24,7 @@ class HV_MuvtxTriggerFlags(JobProperty):
#"HLT_j30_muvtx_L1MU4_UNPAIRED_ISO",
#EMPTY and UNPAIRED_ISO triggers are currently in physics_Late, and thus not part of DRAW_RPVLL
]
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
TriggerNames += apitriggers.getHVMuvtxTriggers() ## TriggerAPI
pass
primRPVLLDESDM.add_JobProperty(HV_MuvtxTriggerFlags)
......@@ -34,7 +36,7 @@ class HV_prescaledMuvtxTriggerFlags(JobProperty):
TriggerNames = [
"HLT_j30_muvtx_noiso",
]
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
TriggerNames += apitriggers.getHVprescaledMuvtxTriggers() ## TriggerAPI
Prescale = 1
pass
......@@ -71,7 +73,7 @@ class HV_CalRatioTriggerFlags(JobProperty):
#"HLT_j30_jes_cleanLLP_PS_llp_noiso_L1TAU8_UNPAIRED_ISO"
#EMPTY and UNPAIRED_ISO triggers are currently in physics_Late, and thus not part of DRAW_RPVLL
]
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
TriggerNames += apitriggers.getHVCalRatioTriggers() ## TriggerAPI
pass
......
......@@ -15,13 +15,15 @@ primHIPsDESD=jobproperties.PrimaryDPDFlags_HIPsStream
## TriggerAPI ##
from LongLivedParticleDPDMaker.RPVLLTriggers import RPVLLTriggers
apitriggers = RPVLLTriggers()
from LongLivedParticleDPDMaker.RPVLLTriggers import rpvllTrig
class HipsTriggerFilterExpression(JobProperty):
statusOn = True
allowedTypes = ['bool']
StoredValue = True
triggers = ['HLT_g0_hiptrt_L1EM18VH', 'HLT_g0_hiptrt_L1EM20VH', 'HLT_g0_hiptrt_L1EM20VHI', 'HLT_g0_hiptrt_L1EM22VHI', 'HLT_g0_hiptrt_L1EM24VHI', 'HLT_g0_hiptrt_L1EM24VHIM']
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
triggers += apitriggers.getHIPsTriggers() # TriggerAPI
pass
primHIPsDESD.add_JobProperty(HipsTriggerFilterExpression)
......@@ -24,6 +24,8 @@ primRPVLLDESDM=jobproperties.PrimaryDPDFlags_RPVLLStream
## TriggerAPI ##
from LongLivedParticleDPDMaker.RPVLLTriggers import RPVLLTriggers
apitriggers = RPVLLTriggers()
from LongLivedParticleDPDMaker.RPVLLTriggers import rpvllTrig
class KinkedTrack_containerFlags(JobProperty):
statusOn = True
......@@ -175,7 +177,7 @@ class KinkedTrack_singleJetMetFilterFlags(JobProperty):
'HLT_xe120_pufit_L1XE60',
'HLT_xe130_mht_L1XE50'
]
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
triggerNames += apitriggers.getKinkedTrackJetMetTriggers() ## TriggerAPI
cutsEtMin = [80.0*Units.GeV, 40.0*Units.GeV]
cutsEtMinForStublet = [90.0*Units.GeV, 40.0*Units.GeV]
......@@ -239,7 +241,7 @@ class KinkedTrack_ZeeFilterFlags(JobProperty):
'HLT_e60_lhmedium_nod0',
'HLT_e140_lhloose_nod0'
]
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
triggerNames += apitriggers.getKinkedTrackZeeTriggers() ## TriggerAPI
doTriggerMatch = False
electronPtMin = 40*Units.GeV
......@@ -273,7 +275,7 @@ class KinkedTrack_ZmumuFilterFlags(JobProperty):
'HLT_mu26_imedium',
'HLT_mu26_ivarmedium',
]
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
triggerNames += apitriggers.getKinkedTrackZmumuTriggers() ## TriggerAPI
doTriggerMatch = False
muonPtMin = 40*Units.GeV
......
from TriggerMenu.api.TriggerAPI import TriggerAPI
from TriggerMenu.api.TriggerEnums import TriggerPeriod, TriggerType
from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
from AthenaCommon.JobProperties import jobproperties
import AthenaCommon.SystemOfUnits as Units
# general function to get current menu unprescaled triggers for given trigger type
#def getTriggerList( trigger_type, matching_pattern="", rejection_pattern="", test=[] ):
......@@ -155,5 +160,19 @@ class RPVLLTriggers:
HIPsList = getTriggerList( TriggerType.exotics, "hiptrt" )
return HIPsList
# on / off switch
doTriggerAPI = True
# Flags to turn RPVLL TriggerAPI implementation on/off
class RPVLLTriggerAPIFlags(JobPropertyContainer):
""" RPV/LL TriggerAPI flag container """
jobproperties.add_Container(RPVLLTriggerAPIFlags)
rpvllTrig=jobproperties.RPVLLTriggerAPIFlags
class doRPVLLTriggerAPI(JobProperty):
statusOn = True
allowedTypes = ["bool"]
StoredValue = True
pass
rpvllTrig.add_JobProperty(doRPVLLTriggerAPI)
......@@ -6,8 +6,9 @@ from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramew
## TriggerAPI ##
from LongLivedParticleDPDMaker.RPVLLTriggers import RPVLLTriggers
apitriggers = RPVLLTriggers()
from LongLivedParticleDPDMaker.RPVLLTriggers import rpvllTrig
apitriggerlist = []
if apitriggers.doTriggerAPI:
if rpvllTrig.doRPVLLTriggerAPI:
apitriggerlist = apitriggers.getHNLTriggers()
HnlFilterTool = skimtool( name = "HnlFilterTool",
......
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