mutrigsel = '(EventInfo.eventTypeBitmask==1) || '+orstr.join(muonTriggers) muofflinesel = andstr.join(['count((Muons.pt > 20*GeV) && (Muons.DFCommonMuonsPreselection)) >= 1', '(count(AntiKt10LCTopoJets.pt > 150*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5) >=1 || count(AntiKt10UFOCSSKJets.pt > 150*GeV && abs(AntiKt10UFOCSSKJets.eta) < 2.5) >=1 )']) muonSelection = ' ( (' + mutrigsel + ') && (' + muofflinesel + ') ) ' gammatrigsel = '(EventInfo.eventTypeBitmask==1) || '+orstr.join(photonTriggers) gammaofflinesel = '(count(Photons.pt > 150*GeV) >= 1 && (count(AntiKt10LCTopoJets.pt > 150*GeV && abs(AntiKt10LCTopoJets.eta) < 2.5) >=1 || count(AntiKt10UFOCSSKJets.pt > 150*GeV && abs(AntiKt10UFOCSSKJets.eta) < 2.5) >=1 ))' photonSelection = ' ( (' + gammatrigsel + ') && (' + gammaofflinesel + ') ) ' lepSelection = '( ' + electronSelection + ' || ' + muonSelection + ' || ' + photonSelection + ' )' expression = jetSelection + ' || '+ lepSelection from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool JETM6TrigSkimmingTool = DerivationFramework__TriggerSkimmingTool( name = "JETM6TrigSkimmingTool", TriggerListOR = jetTriggers+electronTriggers+muonTriggers+photonTriggers ) #TriggerListOR = triggers ) ToolSvc += JETM6TrigSkimmingTool from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool JETM6OfflineSkimmingTool = DerivationFramework__xAODStringSkimmingTool( name = "JETM6OfflineSkimmingTool", expression = expression) ToolSvc += JETM6OfflineSkimmingTool #==================================================================== # CREATE PRIVATE SEQUENCE #==================================================================== jetm6Seq = CfgMgr.AthSequencer("JETM6Sequence") DerivationFrameworkJob += jetm6Seq
def KinkTrkTriggerFilterString(flags): selectionString = '' if flags.triggerNames: triggers = list(set(flags.triggerNames)) selectionString += '(' + ' || '.join(triggers) + ')' return selectionString #==================================================================== # JetMetFilter #==================================================================== #KinkTrkJetTriggerFilterTool = DerivationFramework__xAODStringSkimmingTool(name = "KinkTrkJetTriggerFilterTool", # expression = KinkTrkTriggerFilterString(primRPVLLDESDM.KinkedTrack_singleJetMetFilterFlags)) KinkTrkJetTriggerFilterTool = DerivationFramework__TriggerSkimmingTool( name="KinkTrkJetTriggerFilterTool", TriggerListOR=primRPVLLDESDM.KinkedTrack_singleJetMetFilterFlags. triggerNames) #print KinkTrkJetTriggerFilter ToolSvc += KinkTrkJetTriggerFilterTool from LongLivedParticleDPDMaker.LongLivedParticleDPDMakerConf import DerivationFramework__KinkTrkSingleJetMetFilterTool KinkTrkSingleJetMetFilterTool = DerivationFramework__KinkTrkSingleJetMetFilterTool( name="KinkTrkSingleJetMetFilterTool", LeptonVeto=primRPVLLDESDM.KinkedTrack_singleJetMetFilterFlags.doLeptonVeto, IsolatedTrack=primRPVLLDESDM.KinkedTrack_singleJetMetFilterFlags. requireIsolatedTrack, JetContainerKey=jetContainer, ElectronContainerKey=electronContainer, ElectronIDKey=primRPVLLDESDM.KinkedTrack_singleJetMetFilterFlags. electronIDKey, MuonContainerKey=muonContainer,
# String based reduction # ------------------------------------------------ from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationOR from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationAND from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__PrescaleTool # ------------------------------------------------ # All 'noalg' muon triggers # ------------------------------------------------ from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool MuonNoAlgTrig_TriggerSkimmingTool = DerivationFramework__TriggerSkimmingTool( name="MuonNoAlgTrig_TriggerSkimmingTool", TriggerListOR=[ "HLT_noalg_L1MU4", "HLT_noalg_L1MU6", "HLT_noalg_L1MU10", "HLT_noalg_L1MU11", "HLT_noalg_L1MU15", "HLT_noalg_L1MU20", "HLT_noalg_L12MU4", "HLT_noalg_L12MU6", "HLT_noalg_L12MU10" ]) ToolSvc += MuonNoAlgTrig_TriggerSkimmingTool print MuonNoAlgTrig_TriggerSkimmingTool MuonNoAlgTrig_PrescaleSkimmingTool = DerivationFramework__PrescaleTool( name="MuonNoAlgTrig_PrescaleSkimmingTool", Prescale=1) ToolSvc += MuonNoAlgTrig_PrescaleSkimmingTool print MuonNoAlgTrig_PrescaleSkimmingTool MuonNoAlgTrig_EventSkimmingTool = DerivationFramework__FilterCombinationAND( name="MuonNoAlgTrig_EventSkimmingTool", FilterList=[
"HLT_mu24", "HLT_mu40", "HLT_mu20_iloose_L1MU15", "HLT_e5_etcut", "HLT_e10_etcut_L1EM7", "HLT_e13_etcut_trkcut_L1EM10", "HLT_e15_etcut_L1EM7", "HLT_e18_etcut_trkcut_L1EM15", "HLT_e20_etcut_L1EM12", "HLT_e25_etcut_L1EM15", "HLT_e30_etcut_L1EM15", "HLT_e40_etcut_L1EM15", "HLT_e50_etcut_L1EM15", "HLT_e60_etcut", "HLT_e5_lhvloose", "HLT_e5_lhvloose_nod0", "HLT_e10_lhvloose_L1EM7", "HLT_e12_lhvloose_L1EM10VH", "HLT_e12_lhvloose_nod0_L1EM10VH", "HLT_e15_lhvloose_L1EM7", "HLT_e15_lhvloose_L1EM13VH", "HLT_e15_lhvloose_nod0_L1EM13VH", "HLT_e17_lhvloose", "HLT_e17_lhvloose_nod0", "HLT_e20_lhvloose_L1EM12", "HLT_e20_lhvloose", "HLT_e20_lhvloose_nod0", "HLT_e24_lhvloose_nod0_L1EM18VH", "HLT_e24_lhvloose_nod0_L1EM20VH" ] from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool HIGG3D3TrigSkimmingTool = DerivationFramework__TriggerSkimmingTool( name="HIGG3D3TrigSkimmingTool", TriggerListOR=TriggerChains) ToolSvc += HIGG3D3TrigSkimmingTool from DerivationFrameworkCore.ThinningHelper import ThinningHelper HIGG3D3ThinningHelper = ThinningHelper("HIGG3D3ThinningHelper") HIGG3D3ThinningHelper.TriggerChains = " | ".join(TriggerChains) HIGG3D3ThinningHelper.AppendToStream(HIGG3D3Stream) #================ # THINNING #================ thinningTools = [] # MET/Jet tracks from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG3D3JetTPThinningTool = DerivationFramework__JetTrackParticleThinning(
#==================================================================== # JETM10.py # reductionConf flag JETM10 in Reco_tf.py #==================================================================== from DerivationFrameworkCore.DerivationFrameworkMaster import * from DerivationFrameworkJetEtMiss.JetCommon import * from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * from DerivationFrameworkJetEtMiss.METCommon import * from DerivationFrameworkJetEtMiss.METTriggerDerivationContent import METTriggerDerivationContentManager #====================================================================================================================== # SKIMMING TOOL #====================================================================================================================== from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool JETM10SkimmingTool = DerivationFramework__TriggerSkimmingTool( name="JETM10SkimmingTool", TriggerListOR=["HLT_noalg_L1XE.*"]) ToolSvc += JETM10SkimmingTool #====================================================================================================================== # SET UP STREAM #====================================================================================================================== streamName = derivationFlags.WriteDAOD_JETM10Stream.StreamName fileName = buildFileName(derivationFlags.WriteDAOD_JETM10Stream) JETM10Stream = MSMgr.NewPoolRootStream(streamName, fileName) JETM10Stream.AcceptAlgs(['JETM10Kernel']) content_manager = METTriggerDerivationContentManager.make_loose_manager( "JETM10", JETM10Stream) #====================================================================================================================== # CREATE PRIVATE SEQUENCE
fileName = buildFileName(derivationFlags.WriteDAOD_JETM11Stream) JETM11Stream = MSMgr.NewPoolRootStream(streamName, fileName) JETM11Stream.AcceptAlgs(['JETM11Kernel']) #====================================================================================================================== # SKIMMING TOOL #====================================================================================================================== from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool singleElTriggers = TriggerLists.single_el_Trig() singleMuTriggers = TriggerLists.single_mu_Trig() cutExpression = "(count(Electrons.DFCommonElectronsLHLoose && Electrons.pt > (24 * GeV) && abs(Electrons.eta) < 2.47) + count(Muons.DFCommonMuonsPreselection && Muons.pt > (24*GeV) && abs(Muons.eta) < 2.47) ) >= 1" JETM11StringSkimmingTool = DerivationFramework__xAODStringSkimmingTool( name="JETM11StringSkimmingTool", expression=cutExpression) JETM11TriggerSkimmingTool = DerivationFramework__TriggerSkimmingTool( name="JETM11TriggerSkimmingTool", TriggerListOR=singleElTriggers + singleMuTriggers) ToolSvc += JETM11StringSkimmingTool ToolSvc += JETM11TriggerSkimmingTool content_manager = METTriggerDerivationContentManager.make_tight_manager( "JETM11", JETM11Stream) #====================================================================================================================== # CREATE PRIVATE SEQUENCE #====================================================================================================================== jetm11Seq = CfgMgr.AthSequencer("jetm11Seq") DerivationFrameworkJob += jetm11Seq #======================================= # CREATE THE DERIVATION KERNEL ALGORITHM
(count( AntiKt10UFOCHSJets.pt > 300.*GeV && abs(AntiKt10UFOCHSJets.eta) < 2.5 ) >=1) || \ (count( AntiKt10UFOCSSKJets.pt > 300.*GeV && abs(AntiKt10UFOCSSKJets.eta) < 2.5 ) >=1) \ )' orstr = ' || ' andstr = ' && ' mutrigsel = '(EventInfo.eventTypeBitmask==1) || ' + orstr.join(muonTriggers) muofflinesel = andstr.join([ 'count((Muons.pt > 20*GeV) && (Muons.DFCommonMuonsPreselection)) >= 1', jetSelection ]) muonSelection = ' ( (' + mutrigsel + ') && (' + muofflinesel + ') ) ' from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool JETM15TrigSkimmingTool = DerivationFramework__TriggerSkimmingTool( name="JETM15TrigSkimmingTool", TriggerListOR=jetTriggers + muonTriggers) ToolSvc += JETM15TrigSkimmingTool from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool JETM15OfflineSkimmingTool = DerivationFramework__xAODStringSkimmingTool( name="JETM15OfflineSkimmingTool", expression=jetSelection + ' || ' + muonSelection) ToolSvc += JETM15OfflineSkimmingTool #Trigger matching decorations from DerivationFrameworkCore.TriggerMatchingAugmentation import applyTriggerMatching TrigMatchAug, NewTrigVars = applyTriggerMatching(ToolNamePrefix="JETM15", ElectronTriggers=[], MuonTriggers=muonTriggers, PhotonTriggers=[])
#==================================================================== # SKIMMING TOOL #==================================================================== from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool HIGG5D2JetSkimmingTool = DerivationFramework__xAODStringSkimmingTool( name="HIGG5D2JetSkimmingTool", expression=jetSel) ToolSvc += HIGG5D2JetSkimmingTool from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool HIGG5D2LepSkimmingTool = DerivationFramework__xAODStringSkimmingTool( name="HIGG5D2LepSkimmingTool", expression=lepSel) ToolSvc += HIGG5D2LepSkimmingTool from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool HIGG5D2TriggerSkimmingTool = DerivationFramework__TriggerSkimmingTool( name="HIGG5D2TriggerSkimmingTool", TriggerListOR=triglist) ToolSvc += HIGG5D2TriggerSkimmingTool #======================================= # CREATE PRIVATE SEQUENCE #======================================= higg5d2Seq = CfgMgr.AthSequencer("HIGG5D2Sequence") #======================================= # CREATE THE DERIVATION KERNEL ALGORITHM #======================================= from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel higg5d2Seq += CfgMgr.DerivationFramework__DerivationKernel( "HIGG5D2Kernel_trig", SkimmingTools=[HIGG5D2TriggerSkimmingTool])
muonDPDStream_msg.debug("Items in objKeyStore[transient]: %s" % objKeyStore['transient'].list() ) # ---------------------------------------------------------------------- # String based reduction # ---------------------------------------------------------------------- from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationOR from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationAND from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel # ---------------------------------------------------------------------- # Muon HLT triggers: # ---------------------------------------------------------------------- from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool TileMuTriggerSkimmingTool = DerivationFramework__TriggerSkimmingTool(name = "TileMuTriggerSkimmingTool", TriggerListOR = ["HLT_mu.*"] ) ToolSvc += TileMuTriggerSkimmingTool print TileMuTriggerSkimmingTool # ---------------------------------------------------------------------- # Muon selection # ---------------------------------------------------------------------- muon_type = '(Muons.muonType == 0)' muon_pt = '(Muons.pt > 13*GeV)' muon_eta = '((abs(Muons.eta) < 1.5) && (abs(Muons.eta) > 0.8))' muon_expression = '(count('+muon_type+' && '+muon_pt+' && '+muon_eta+') > 0)' TileMuEventSkimmingTool = DerivationFramework__xAODStringSkimmingTool(name = "TileMuEventSkimmingTool", expression = muon_expression)
from DerivationFrameworkCore.DerivationFrameworkMaster import * from DerivationFrameworkMuons.MuonsCommon import * # from DerivationFrameworkJetEtMiss.METCommon import * #==================================================================== # AUGMENTATION TOOLS #==================================================================== #==================================================================== # STRING BASED SKIMMING TOOL #==================================================================== MUON0_skimming_tools = [] ### trigger seleciton triggerList = ['HLT_.*mu.*', 'L1_.*MU.*', 'HLT_noalg_L1.*MU.*'] from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool MUON0SkimmingTool0a = DerivationFramework__TriggerSkimmingTool( name="MUON0SkimmingTool0a", TriggerListOR=triggerList, TriggerListAND=[]) ToolSvc += MUON0SkimmingTool0a ### muon selection expression = 'count(Muons.pt>30*GeV)>0' from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool MUON0SkimmingTool0b = DerivationFramework__xAODStringSkimmingTool( name="MUON0SkimmingTool0b", expression=expression) ToolSvc += MUON0SkimmingTool0b ### OR combination from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationOR MUON0SkimmingTool0 = DerivationFramework__FilterCombinationOR( name="MUON0SkimmingTool0", FilterList=[MUON0SkimmingTool0a, MUON0SkimmingTool0b]) ToolSvc += MUON0SkimmingTool0
from DerivationFrameworkJetEtMiss.ExtendedJetCommon import * #from DerivationFrameworkEGamma.EGammaCommon import * from DerivationFrameworkJetEtMiss.METCommon import * # if globalflags.DataSource() == 'geant4': from DerivationFrameworkMCTruth.MCTruthCommon import * from DerivationFrameworkTau.TauTruthCommon import * #==================================================================== # SKIMMING TOOL #==================================================================== from DerivationFrameworkJetEtMiss.TriggerLists import * triggers = jetTriggers from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool JETM8TrigSkimmingTool = DerivationFramework__TriggerSkimmingTool( name="JETM8TrigSkimmingTool", TriggerListOR=triggers) ToolSvc += JETM8TrigSkimmingTool # For first data jetSelection = '(count( AntiKt10LCTopoJets.pt > 100.*GeV ) >=1)' #jetSelection = '(count( CamKt12LCTopoJets.pt > 150.*GeV ) >=1)' expression = jetSelection from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool JETM8OfflineSkimmingTool = DerivationFramework__xAODStringSkimmingTool( name="JETM8OfflineSkimmingTool", expression=expression) ToolSvc += JETM8OfflineSkimmingTool from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationAND JETM8SkimmingTool = DerivationFramework__FilterCombinationAND( name="JETM8SkimmingTool",
# ########################################################################################## from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool as skimtool from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel as kernel from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__PrescaleTool ## needs package PhysicsAnalysis/DerivationFramework/DerivationFrameworkTools-00-00-20 or later.. from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationAND from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationOR ########################################################################################### # HV Muvtx Filter ########################################################################################### HVMuvtxTriggerTool = DerivationFramework__TriggerSkimmingTool( name="HVMuvtxTriggerTool", TriggerListOR=primRPVLLDESDM.HV_MuvtxTriggerFlags.TriggerNames) ToolSvc += HVMuvtxTriggerTool ########################################################################################### # HV Prescaled Muvtx Trigger Filter ########################################################################################### HVMuvtxPrescaledTriggerTool = DerivationFramework__TriggerSkimmingTool( name="HVMuvtxPrescaledTriggerTool", TriggerListOR=primRPVLLDESDM.HV_prescaledMuvtxTriggerFlags.TriggerNames) ToolSvc += HVMuvtxPrescaledTriggerTool HVMuvtxPrescaleTool = DerivationFramework__PrescaleTool( name="HVPrescaleMuvtxTool", Prescale=primRPVLLDESDM.HV_prescaledMuvtxTriggerFlags.Prescale)
#==================================================================== # DEFAULT IS NO TRUTH - NEED TO ADD IT EXPLICITLY THEN THIN IT BELOW #==================================================================== #if DerivationFrameworkIsMonteCarlo: # from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents # addStandardTruthContents() #==================================================================== # TRIGGER SKIMMING TOOL - REQUIRE A JET TRIGGER TO HAVE BEEN PASSED #==================================================================== from DerivationFrameworkJetEtMiss import TriggerLists jetTriggers = TriggerLists.jetTrig() from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool TRIG7TrigSkimmingTool = DerivationFramework__TriggerSkimmingTool( name="TRIG7TrigSkimmingTool", TriggerListOR=jetTriggers) ToolSvc += TRIG7TrigSkimmingTool #==================================================================== # OFFLINE SKIMMING TOOL - REQUIRE A HIGH PT CENTRAL FAT JET #==================================================================== from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool jetSelection = '(count( AntiKt10LCTopoJets.pt > ' + jetptmin + '*GeV && abs(AntiKt10LCTopoJets.eta) < ' + jetetamax + ' ) >=1)' TRIG7OfflineSkimmingTool = DerivationFramework__xAODStringSkimmingTool( name="TRIG7OfflineSkimmingTool", expression=jetSelection) ToolSvc += TRIG7OfflineSkimmingTool #======================================= # CREATE PRIVATE SEQUENCE
#2018 additional mu-jet triggers triggers.append("HLT_mu4_j15_boffperf_split_dr05_dz02") triggers.append("HLT_mu4_j15_gsc35_boffperf_split_dr05_dz02") triggers.append("HLT_mu4_j25_boffperf_split_dr05_dz02") triggers.append("HLT_mu4_j35_boffperf_split_dr05_dz02") triggers.append("HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02") triggers.append("HLT_mu6_j60_gsc110_boffperf_split_dr05_dz02") triggers.append("HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02") triggers.append("HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02") triggers.append("HLT_mu6_j110_gsc150_bperf_split_dr05_dz02") triggers.append("HLT_mu6_j150_gsc175_boffperf_split_dr05_dz02") triggers.append("HLT_mu6_j175_gsc260_boffperf_split_dr05_dz02") if globalflags.DataSource() == 'data': # muon-in-jet triggers are buggy in MC, so only apply them in data FTAG3TriggerSkimmingTool = DerivationFramework__TriggerSkimmingTool( name="FTAG3TriggerSkimmingTool", TriggerListOR=triggers) ToolSvc += FTAG3TriggerSkimmingTool printfunc(FTAG3TriggerSkimmingTool) FTAG3Seq += CfgMgr.DerivationFramework__DerivationKernel( "FTAG3SkimKernel", SkimmingTools=[FTAG3TriggerSkimmingTool]) if globalflags.DataSource() != 'data': # since we aren't using a trigger skim, apply a muon pT cut to avoid gigantic dijet samples FTAG3StringSkimmingTool = DerivationFramework__xAODStringSkimmingTool( name="FTAG3StringSkimmingTool", expression= 'count( (Muons.pt > 4*GeV) && (Muons.DFCommonGoodMuon) ) >= 1') ToolSvc += FTAG3StringSkimmingTool printfunc(FTAG3StringSkimmingTool) FTAG3Seq += CfgMgr.DerivationFramework__DerivationKernel( "FTAG3SkimKernel", SkimmingTools=[FTAG3StringSkimmingTool])
from PrimaryDPDMaker.PrimaryDPDMakerConf import DerivationFramework__DRAW_ZMUMUSkimmingTool goodMuonSkimmingTool = DerivationFramework__DRAW_ZMUMUSkimmingTool( name="DRAW_ZMUMU_GoodMuon_SkimmingTool", MuonContainerKey="Muons", MuonSelectorTool=goodMuonTool, MinimumNumberOfMuons=1, MuonPtCut=20.0) ToolSvc += goodMuonSkimmingTool periods = TriggerPeriod.future | TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 allUnprescaledTriggers = TriggerAPI.getLowestUnprescaledAnyPeriod( periods, TriggerType.mu) print "DRAW_ZMUMU: will skim on an OR of the following muon triggers (list provided at run-time by the TriggerAPI):" print allUnprescaledTriggers from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool triggerSkimmingTool = DerivationFramework__TriggerSkimmingTool( name="DRAWZMUMUTriggerSkimmingTool", TriggerListOR=allUnprescaledTriggers) ToolSvc += triggerSkimmingTool # Event selection tool from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationAND DRAW_ZMUMU_SkimmingTool = DerivationFramework__FilterCombinationAND( name="DRAW_ZMUMU_FinalFilter", FilterList=[ dimuonMassSkimmingTool, goodMuonSkimmingTool, triggerSkimmingTool ]) ToolSvc += DRAW_ZMUMU_SkimmingTool print DRAW_ZMUMU_SkimmingTool # Kernel algorithm from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel DRAW_ZMUMU_Seq += CfgMgr.DerivationFramework__DerivationKernel(
beamEnergy = jobproperties.Beam.energy() expression = '' if (beamEnergy < 4.1e+06): trigger = '( (EventInfo.eventTypeBitmask==1) || (EF_j170_a4tchad_ht700 || EF_j15_a4tchad || EF_j25_a4tchad || EF_j35_a4tchad || EF_j45_a4tchad || EF_j55_a4tchad || EF_j80_a4tchad || EF_j110_a4tchad || EF_j145_a4tchad || EF_j180_a4tchad || EF_j220_a4tchad || EF_j280_a4tchad || EF_j360_a4tchad || EF_j460_a4tchad) )' if (beamEnergy > 6.0e+06): #trigger = '((EventInfo.eventTypeBitmask==1) || HLT_ht1000_L1J100 || HLT_ht400 || HLT_ht550 || HLT_ht700 || HLT_ht850 || HLT_ht1000 || HLT_j260 || HLT_j330 || HLT_j400)' #trigger = '((EventInfo.eventTypeBitmask==1) || HLT_ht1000_L1J100 || HLT_ht400 || HLT_ht550 || HLT_ht700 || HLT_ht850 || HLT_ht1000 || HLT_j260 || HLT_j330 || HLT_j400 || HLT_j15 || HLT_j25 || HLT_j35 || HLT_j55 || HLT_j60 || HLT_j85 || HLT_j100 || HLT_j110 || HLT_j150 || HLT_j175 || HLT_j200 || HLT_j300 || HLT_j320 || HLT_j360 || HLT_j380 || HLT_j400 || HLT_j420 || HLT_j440 || HLT_j460 || HLT_noalg_L1J50)' trigger = '(EventInfo.eventTypeBitmask==1)' EXOT1TriggerSkimmingTool = DerivationFramework__TriggerSkimmingTool( name="EXOT1TriggerSkimmingTool", TriggerListAND=[], TriggerListOR=[ "HLT_ht1000_L1J100", "HLT_ht850_L1J75", "HLT_ht700_L1J75", "HLT_ht850_L1J100", "HLT_ht700_L1J100", "HLT_ht400", "HLT_ht400_L1HT150-J20.ETA30", "HLT_ht550", "HLT_ht550_L1HT150-J20.ETA30", "HLT_ht700", "HLT_ht700_L1HT190-J15.ETA20", "HLT_ht850", "HLT_ht850_L1HT190-J15.ETA20", "HLT_ht1000", "HLT_ht1000_L1HT190-J15.ETA20", "HLT_j200", "HLT_j175", "HLT_j150", "HLT_7j45", "HLT_6j45", "HLT_5j45", "HLT_4j45" ]) ToolSvc += EXOT1TriggerSkimmingTool skimmingTools.append(EXOT1TriggerSkimmingTool) expression = trigger thinningTools = [] from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning EXOT1Ak4CCThinningTool_LC = DerivationFramework__JetCaloClusterThinning(
skimmingTools.append(EXOT15SkimmingTool) from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool if (beamEnergy > 6.0e+06): #SkipTriggerRequirement=(globalflags.DataSource()=='geant4') #apply triggers only to data, not to MC if SkipTriggerRequirement: printfunc("trigger disabled") else: printfunc("trigger enabled") EXOT15TriggerSkimmingTool = DerivationFramework__TriggerSkimmingTool( name="EXOT15TriggerSkimmingTool", TriggerListAND=[], TriggerListOR=[ "HLT_j30_jes_PS_llp_L1TAU30", "HLT_j30_jes_PS_llp_L1TAU60", "HLT_j30_jes_PS_llp_noiso_L1TAU60", "HLT_j30_muvtx", "HLT_j30_muvtx_noiso", "HLT_j100", "HLT_j400", "HLT_j30_jes_PS_llp_L1LLP-NOMATCH", "HLT_j30_jes_PS_llp_noiso_L1LLP-NOMATCH", "HLT_j30_jes_PS_llp_L1TAU40", "HLT_j30_jes_PS_llp_L1TAU8_EMPTY", "HLT_j30_jes_PS_llp_L1TAU8_UNPAIRED_ISO", "HLT_j30_muvtx_L1MU4_EMPTY", "HLT_j30_muvtx_L1MU4_UNPAIRED_ISO" ]) ToolSvc += EXOT15TriggerSkimmingTool skimmingTools.append(EXOT15TriggerSkimmingTool) if not SkipTriggerRequirement: from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationOR EXOT15ORSkimmingTool = DerivationFramework__FilterCombinationOR( name="EXOT15ORSkimmingTool", FilterList=skimmingTools) ToolSvc += EXOT15ORSkimmingTool
## ) ## ToolSvc += EXOT8DeltaRTool #======================================================================================================================================== # Triggers (https://indico.cern.ch/event/403233/contribution/4/material/slides/0.pdf) # # Not yet known: 25ns menu, L1_HT menu #======================================================================================================================================== triggers = [ "L1_J50", "L1_J75", "L1_J100", "L1_J120", "L1_3J40", "L1_3J50", "L1_3J75", "L1_4J15", "L1_4J20", "L1_3J25.0ETA23", "L1_4J15.0ETA25", "L1_J75_3J20" ] #trigger = " || ".join(triggers) from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool EXOT8TriggerSkimmingTool = DerivationFramework__TriggerSkimmingTool( name="EXOT8TriggerSkimmingTool", TriggerListAND=[], TriggerListOR=triggers) ToolSvc += EXOT8TriggerSkimmingTool #======================================================================================================================================== # Event Skimming # # https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/BTaggingBenchmarks #======================================================================================================================================== mv2calo = -10.0 beamEnergy = jobproperties.Beam.energy() if (beamEnergy < 4.1e+06): resolved_4jetsLCTopo = "count((AntiKt4LCTopoJets.pt > 25*GeV) && (abs(AntiKt4LCTopoJets.eta) < 2.8)) >= 4" resolved_4jetsEMTopo = "count((AntiKt4EMTopoJets.DFCommonJets_Calib_pt > 25*GeV) && (abs(AntiKt4EMTopoJets.DFCommonJets_Calib_eta) < 2.8)) >= 4" else: resolved_4jetsLCTopo = "count((AntiKt4LCTopoJets.pt > 25*GeV) && (abs(AntiKt4LCTopoJets.eta) < 2.8)) >= 4 && count(BTagging_AntiKt4LCTopo.MV2c20_discriminant > %s) >= 2" % mv2calo
SUSY3ThinningHelper = ThinningHelper("SUSY3ThinningHelper") thinningTools = [] AugmentationTools = [] # stream-specific sequence for on-the-fly jet building SeqSUSY3 = CfgMgr.AthSequencer("SeqSUSY3") DerivationFrameworkJob += SeqSUSY3 #==================================================================== # Trigger navigation thinning #==================================================================== from DerivationFrameworkSUSY.SUSY3TriggerList import triggerRegEx, triggerRegExThinning SUSY3ThinningHelper.TriggerChains = '|'.join(triggerRegExThinning) from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool SUSY3TriggerSkimmingTool = DerivationFramework__TriggerSkimmingTool( name="SUSY3TriggerSkimmingTool", TriggerListOR=triggerRegEx) ToolSvc += SUSY3TriggerSkimmingTool SUSY3ThinningHelper.AppendToStream( SUSY3Stream ) # needs to go after SUSY3ThinningHelper.TriggerChains = ... but before accesses to SUSY3ThinningHelper.ThinningSvc() #==================================================================== # THINNING TOOLS #==================================================================== # MET/Jet tracks -> no longer needed, 11.05.2015 from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning # TrackParticles directly