# Set up a logger: from AthenaCommon.Logging import logging SMWZSOFTD3PDStream_msg = logging.getLogger('SMWZsoftD3PD_prodJobOFragment') # Check if the configuration makes sense: if prodFlags.WriteSMWZSOFTD3PD.isVirtual: SMWZD3PDStream_msg.error("The SMWZ soft D3PD stream can't be virtual! " + "It's a configuration error!") raise NameError("SMWZ soft D3PD set to be a virtual stream") pass # Construct the stream and file names for the SMWZ soft D3PD: streamName = prodFlags.WriteSMWZSOFTD3PD.StreamName fileName = buildFileName(prodFlags.WriteSMWZSOFTD3PD) SMWZSOFTD3PDStream_msg.info( "Configuring SMWZsoftD3PD with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) # disable parton filter from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags D3PDMakerFlags.TruthWriteHadrons = True # add specific truth jets include("PhysicsD3PDMaker/MyJetMake.py") #configure MuonScatteringAngleSignificanceTool include("JetTagD3PDMaker/MuonScatteringSigToolConfig.py") ### Jason
# Set up a logger: from AthenaCommon.Logging import logging ZPrimeEED3PDStream_msg = logging.getLogger('ZPrimeEED3PD_prodJobOFragment') # Check if the configuration makes sense: if prodFlags.WriteZPrimeEED3PD.isVirtual: ZPrimeEED3PDStream_msg.error( "The ZPrimeEE D3PD stream can't be virtual! " + "It's a configuration error!") raise NameError("ZPrimeEE D3PD set to be a virtual stream") pass # Construct the stream and file names for the ZPrimeEE D3PD: streamName = prodFlags.WriteZPrimeEED3PD.StreamName fileName = buildFileName(prodFlags.WriteZPrimeEED3PD) ZPrimeEED3PDStream_msg.info( "Configuring ZPrimeEED3PD with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) # Add specific containers include("PhysicsD3PDMaker/MyJetMake.py") # Trigger information definition from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags #D3PDMakerFlags.egammaL1TrigPattern = 'L1_2EM3.*|L1_2EM5.*|L1_2EM7.*|L1_EM3.*|L1_EM5.*|L1_EM7|L1_EM12|L1_EM16VH|L1_EM18VH' #D3PDMakerFlags.ElectronL2TrigPattern = 'L2_2e.*|L2_e10.*|L2_e5.*|L2_e60.*|L2_eb.*|L2_em3_empty.*' #D3PDMakerFlags.ElectronEFTrigPattern = 'EF_2e.*|EF_e10.*|EF_e5.*|EF_e60.*|EF_eb.*|EF_e22vh_medium|EF_e22vh_medium1' D3PDMakerFlags.egammaL1TrigPattern = 'L1_2EM10VH|L1_2EM12|L1_EM10VH|L1_EM12|L1_EM14VH|L1_EM16V|L1_EM16VH|L1_EM18VH|L1_EM30' D3PDMakerFlags.ElectronL2TrigPattern = 'L2_22vh_loose*|L2_e24vh_loose*|L2_2e12Tvh_loose*|L2_e22vh_medium*|L2_e22vhi_medium1|L2_e24vh_medium1|L2_e24vhi_medium1|L2_e45_medium1|L2_e60_medium1|L2_e18_medium1_g25_loose|L2_g*_etcut|L2_2g40_loose|L2_g*_loose_g*_loose|L2_2g20_loose|L2_e18_loose1_g25_medium|L2_e18_loose1_g35_loose|L2_e18_loose1_g35_medium|L2_g*_loose|L2_g30_medium_g20_medium|L2_2g20vh_medium|L2_g*_medium|L2_e18_loose1|L2_e18_medium1|L2_e18vh_medium1' D3PDMakerFlags.ElectronEFTrigPattern = 'EF_22vh_loose*|EF_e24vh_loose*|EF_2e12Tvh_loose*|EF_e22vh_medium*|EF_e22vhi_medium1|EF_e24vh_medium1|EF_e24vhi_medium1|EF_e45_medium1|EF_e60_medium1|EF_e18_medium1_g25_loose|EF_g*_etcut|EF_2g40_loose|EF_g*_loose_g*_loose|EF_2g20_loose|EF_e18_loose1_g25_medium|EF_e18_loose1_g35_loose|EF_e18_loose1_g35_medium|EF_g*_loose|EF_g30_medium_g20_medium|EF_2g20vh_medium|EF_g*_medium|EF_e18_loose1|EF_e18_medium1|EF_e18vh_medium1'
from AthenaCommon.Logging import logging EgammaD3PDStream_msg = logging.getLogger( 'EgammaD3PD_prodJobOFragment' ) # Check if the configuration makes sense: if prodFlags.WriteEgammaD3PD.isVirtual: EgammaD3PDStream_msg.error( "The Egamma D3PD stream can't be virtual! " + "It's a configuration error!" ) raise NameError( "Egamma D3PD set to be a virtual stream" ) pass #configure MuonScatteringAngleSignificanceTool include("JetTagD3PDMaker/MuonScatteringSigToolConfig.py") # Construct the stream and file names for the SUSY D3PD: streamName = prodFlags.WriteEgammaD3PD.StreamName fileName = buildFileName( prodFlags.WriteEgammaD3PD ) EgammaD3PDStream_msg.info( "Configuring EgammaD3PD with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) # Create the D3PD streams: from OutputStreamAthenaPool.MultipleStreamManager import MSMgr EgammaD3PDStream = MSMgr.NewRootStream( streamName, fileName, "egamma", asAlg=True ) EgammaTriggerD3PDStream = MSMgr.NewRootStream( streamName + ":" + streamName + "D3PDTrigDec", fileName, "egammaTrigDec", asAlg=True) # Now add all the content to this stream: from D3PDMakerConfig.egammaD3PD import egammaD3PD egammaD3PD_args = globals().get('egammaD3PD_args', {}) egammaD3PD( EgammaD3PDStream, EgammaTriggerD3PDStream, **egammaD3PD_args )
combination="" for iAlg in range(len(algsList)): if iAlg==0: combination=algsList[iAlg] else: combination+=" or "+algsList[iAlg] from PrimaryDPDMaker.LogicalFilterCombiner import LogicalFilterCombiner totalDecision_2L2Q=LogicalFilterCombiner("NTUP_2L2QHSG2_Filter",cmdstring = combination) theJob+=totalDecision_2L2Q ############ NTUPLING ############ from AthenaCommon.JobProperties import jobproperties prodFlags = jobproperties.D3PDProdFlags streamName = prodFlags.Write2L2QHSG2D3PD.StreamName from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName fileName = buildFileName(prodFlags.Write2L2QHSG2D3PD) from HSG2DPDUtils.HSG2D3PD import HSG2physicsD3PD # Perform MV3 b-tagging when creating D3PD for 2013 Moriond analysis if jobproperties.HSG2.doMV3BTagInD3PD(): include("BTagging/BTagging_LoadTools.py") include("BTagging/BTagging_jobOptions.py") stream_d3pd_2L2Q=HSG2physicsD3PD(streamName,fileName) stream_d3pd_2L2Q.AcceptAlgs = [totalDecision_2L2Q.getName()]
else: combination_tp += " or " + mu_trigsList[iTrig] combination_tp += "))" algsList = el_algsList + el_trigsList + mu_algsList + mu_trigsList totalDecision_tp = LogicalFilterCombiner("HSG2_TPFilter", cmdstring=combination_tp) theJob += totalDecision_tp ############ NTUPLING ############ from AthenaCommon.JobProperties import jobproperties prodFlags = jobproperties.D3PDProdFlags streamName = prodFlags.WriteTPHSG2D3PD.StreamName from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName fileName = buildFileName(prodFlags.WriteTPHSG2D3PD) from HSG2DPDUtils.HSG2D3PD import HSG2physicsD3PD # Perform MV3 b-tagging when creating D3PD for 2013 Moriond analysis if jobproperties.HSG2.doMV3BTagInD3PD(): include("BTagging/BTagging_LoadTools.py") include("BTagging/BTagging_jobOptions.py") stream_d3pd_tp = HSG2physicsD3PD(streamName, fileName) stream_d3pd_tp.AcceptAlgs = [totalDecision_tp.getName()]
## Description: Separating out the HIPs filters from the DESDM_RPVLL to their own stream. ## ##----------------------------------------------------------------------------- # ########################################################################################## # Imports and initial setup # ########################################################################################## from OutputStreamAthenaPool.MultipleStreamManager import MSMgr from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName from PrimaryDPDMaker.PrimaryDPDFlags import primDPD from LongLivedParticleDPDMaker.HipsFlags import primHIPsDESD streamName = primDPD.WriteDESDM_EXOTHIPStream.StreamName fileName = buildFileName( primDPD.WriteDESDM_EXOTHIPStream ) HIPsStream = MSMgr.NewPoolStream( streamName,fileName ) from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool as skimtool from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel as kernel HIPsFilterNames = [] # Filters should append their final selection algo names to this list filtersToBookkeep = [] # Not sure what this does? def HipTriggerSelectionString(flags): cutString="" if flags.triggers.__len__() >=1: cutString+=flags.triggers[0] if flags.triggers.__len__() >1:
from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName # Set up a logger: from AthenaCommon.Logging import logging SMBKGMUD3PDStream_msg = logging.getLogger('SMBKGMUD3PD_prodJobOFragment') # Check if the configuration makes sense: if prodFlags.WriteSMBKGMUD3PD.isVirtual: SMBKGMUD3PDStream_msg.error("The SMBKGMU D3PD stream can't be virtual! " + "It's a configuration error!") raise NameError("SMBKGMU D3PD set to be a virtual stream") pass # Construct the stream and file names for the SMBKGMU D3PD: streamName = prodFlags.WriteSMBKGMUD3PD.StreamName fileName = buildFileName(prodFlags.WriteSMBKGMUD3PD) SMBKGMUD3PDStream_msg.info( "Configuring SMBKGMUD3PD with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) # add specific truth jets include("PhysicsD3PDMaker/MyJetMake.py") #configure MuonScatteringAngleSignificanceTool include("JetTagD3PDMaker/MuonScatteringSigToolConfig.py") # Create the D3PD streams: from OutputStreamAthenaPool.MultipleStreamManager import MSMgr SMBKGMUD3PDStream = MSMgr.NewRootStream(streamName, fileName, "physics") # Now add all the content to this stream: from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD
from AthenaCommon.Logging import logging HSG5D3PD_msg = logging.getLogger( 'HSG5_WHlnubb_unboosted_D3PD_prodJobOFragment' ) # Check if the configuration makes sense: if prodFlags.WriteHSG5WHUD3PD.isVirtual: HSG5D3PD_msg.error( "The HSG5 WH unboosted D3PD stream can't be virtual! " + "It's a configuration error!" ) raise NameError( "HSG5 D3PD set to be a virtual stream" ) pass # Create the D3PD streams: from OutputStreamAthenaPool.MultipleStreamManager import MSMgr # Construct the stream and file names for the SMWZ D3PD: streamName = prodFlags.WriteHSG5WHUD3PD.StreamName fileName = buildFileName( prodFlags.WriteHSG5WHUD3PD ) HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" ) # create stream #from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD #SMWZD3PD( HSG5D3PD_Stream ) if 'IS_SIMULATION' in inputFileSummary['evt_type']: from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True)
from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName # Set up a logger: from AthenaCommon.Logging import logging PhysicsD3PDStream_msg = logging.getLogger('PhysicsD3PD_prodJobOFragment') # Check if the configuration makes sense: if prodFlags.WritePhysicsD3PD.isVirtual: PhysicsD3PDStream_msg.error("The Physics D3PD stream can't be virtual! " + "It's a configuration error!") raise NameError("Physics D3PD set to be a virtual stream") pass # Construct the stream and file names for the SUSY D3PD: streamName = prodFlags.WritePhysicsD3PD.StreamName fileName = buildFileName(prodFlags.WritePhysicsD3PD) PhysicsD3PDStream_msg.info( "Configuring PhysicsD3PD with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) # Create the D3PD streams: from OutputStreamAthenaPool.MultipleStreamManager import MSMgr PhysicsD3PDStream = MSMgr.NewRootStream(streamName, fileName, "physics", asAlg=True) PhysicsTriggerD3PDStream = MSMgr.NewRootStream(streamName + ":" + streamName + "TrigDec", fileName, "physicsTrigDec", asAlg=True)
def SMTrilepD3PD( alg=None, #fileName = 'smtrilep.root', tuplename='physics', #streamname = 'NTUP_SMTRILEP', stdElectronContainer='None', gsfElectronContainer='None', stacoMuonContainer='None', muidMuonContainer='None', caloMuonContainer='None', thirdMuonContainer='None', photonContainer='None', jetContainer='None', jetLC4Container='None', clusterContainer='None', tauContainer='None', trackContainer='None', addHadronicRecoil=False, **kw): preseq = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName()) # perform recoil calculation if addHadronicRecoil: import HadronicRecoil.Configurables as hrc preseq = hrc.add_hadronic_recoil_filters(preseq) # configure the D3PD if not alg: from AthenaCommon.JobProperties import jobproperties prodFlags = jobproperties.D3PDProdFlags from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName fileName = buildFileName(prodFlags.WriteSMTRILEPD3PD) streamName = prodFlags.WriteSMTRILEPD3PD.StreamName alg = MSMgr.NewRootStream(StreamName=streamname, FileName=fileName, TreeName=tuplename) alg += EventInfoD3PDObject(**_args(10, 'EventInfo', kw)) alg += LArCollisionTimeD3PDObject(**_args(10, 'LArCollisionTime', kw)) from TriggerD3PDMaker.BunchStructureMetadata import addBunchStructureMetadata addBunchStructureMetadata(alg) # Electron/Photon blocks electron_excludes = [ #'EMTrackFit', #'EMTrackFitDetailsBrem', #'EMTrackFitDetailsRefit', 'EMTrackFitDetailsRefitCov', #'TopoClusterIsolationCones', 'UDTopoCones', 'Rings', 'TrackIsoIP', 'ElecDiscrim', 'TraversedMaterial', 'TrkCovDiag', 'TrkCovOffDiag', 'TrackSummaryPID', 'UnrefitTrk', 'ElectronPointingVariables', 'MVAIso', 'IsIso', 'ElectronClusterQuantities' ] if stdElectronContainer != 'None': alg += ElectronD3PDObject(**_args(10, 'Electron', kw, sgkey=stdElectronContainer, prefix='el_', exclude=electron_excludes, allowMissing=True)) if (gsfElectronContainer != 'None') and testSGKey('ElectronContainer', gsfElectronContainer): alg += GSFElectronD3PDObject(**_args(1, 'GSFElectron', kw, sgkey=gsfElectronContainer, prefix='el_gsf_', exclude=electron_excludes, allowMissing=True)) D3PDMakerFlags.DoPAU = False if photonContainer != 'None': alg += PhotonD3PDObject(**_args(0, 'Photon', kw, sgkey=photonContainer, prefix='ph_', exclude=['OQRecalc'], allowMissing=True)) # Muon blocks # ... add the scattering significance filler - to be removed when added in the MuonD3PDMaker if not MuonD3PDObject.allBlocknames().has_key( "MuonScatteringAngleSignificance"): from AthenaCommon.AppMgr import ToolSvc muonScatteringSigTool = None if hasattr(ToolSvc, "MuonScatteringSigTool"): muonScatteringSigTool = ToolSvc.MuonScatteringSigTool from JetTagD3PDMaker import MuonScatteringAngleSignificanceFillerTool MuonD3PDObject.defineBlock(100, "MuonScatteringAngleSignificance", MuonScatteringAngleSignificanceFillerTool, ScatteringSigTool=muonScatteringSigTool) std_muon_excludes = [ 'EFCBInfo', 'EFMGInfo', 'EFMEInfo', 'L2CBInfo', 'L1Info', 'MuonTimingFillerTool', 'Likelihood', 'MuonTimingFillerTool', 'PrimaryTrackDiagonalCovarianceAtPV', 'PrimaryTrackOffDiagonalCovarianceAtPV', 'IDTrackDiagonalCovarianceAtPV', 'IDTrackOffDiagonalCovarianceAtPV', 'METrackDiagonalCovarianceAtPV', 'METrackOffDiagonalCovarianceAtPV', 'TrkCovDiag', 'TrkCovOffDiag' ] calo_muon_excludes = [ 'EFCBInfo', 'EFMGInfo', 'EFMEInfo', 'L2CBInfo', 'L1Info', 'MuonTimingFillerTool', 'Likelihood', 'MuonTimingFillerTool', 'PrimaryTrackDiagonalCovarianceAtPV', 'PrimaryTrackOffDiagonalCovarianceAtPV', 'IDTrackDiagonalCovarianceAtPV', 'IDTrackOffDiagonalCovarianceAtPV', 'METrackDiagonalCovarianceAtPV', 'METrackOffDiagonalCovarianceAtPV', 'TrkCovDiag', 'TrkCovOffDiag', 'MGTrackDetails', 'MuGirlTrackBasics', 'CBTrackDetails', 'CombinedTrackBasics', 'MuonSpectrometerHitSummary' ] if stacoMuonContainer != 'None': alg += MuonD3PDObject(**_args( 10, 'StacoMuon', kw, sgkey=stacoMuonContainer, prefix='mu_staco_', #include = ['EFCBInfoIndex', 'EFMGInfoIndex', 'EFMEInfoIndex', #'MuonScatteringAngleSignificance'], exclude=std_muon_excludes, allowMissing=True)) if muidMuonContainer != 'None': alg += MuonD3PDObject(**_args(10, 'MuidMuon', kw, sgkey=muidMuonContainer, prefix='mu_muid_', exclude=std_muon_excludes, allowMissing=True)) if thirdMuonContainer != 'None': alg += MuonD3PDObject(**_args(10, 'ThirdMuon', kw, sgkey=thirdMuonContainer, prefix='mu_', exclude=std_muon_excludes, allowMissing=True)) if caloMuonContainer != 'None': alg += MuonD3PDObject(**_args(10, 'CaloMuon', kw, sgkey=caloMuonContainer, prefix='mu_calo_', exclude=calo_muon_excludes, allowMissing=True)) # Jet block from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys if jetContainer != 'None': alg += JetD3PDObject(**_args(3, 'AK4TopoEMJet', kw, sgkey=jetContainer, allowMissing=True, prefix='jet_AntiKt4TopoEM_', JetVertexFraction_FromUD=True, JetVertexFraction_FillFullJVF=True, include=[ JetTagD3PDKeys.BTagWeightsBlockName(), JetTagD3PDKeys.TruthInfoBlockName() ])) if jetLC4Container != 'None': alg += JetD3PDObject(**_args(3, 'AK4LCJet', kw, sgkey=jetContainer, allowMissing=True, prefix='jet_AntiKt4LCTopo_', JetVertexFraction_FromUD=True, JetVertexFraction_FillFullJVF=True, include=[ JetTagD3PDKeys.BTagWeightsBlockName(), JetTagD3PDKeys.TruthInfoBlockName() ])) # Tau block if tauContainer != 'None': alg += TauD3PDObject( **_args(0, 'Tau', kw, allowMissing=True, sgkey=tauContainer)) # HF overlap removal (ALPGEN) from TopInputsD3PDMaker.HforD3PDObject import HforD3PDObject alg += HforD3PDObject(**_args(0, 'HforInfo', kw)) # MET blocks # a whole mess to remove x,y components separately for all flavours alg += MissingETD3PDObject(**_args( 10, 'MissingET', kw, exclude=[ 'MET_Base', 'MET_Base0', 'MET_Truth', 'MET_RefFinal_Comps', 'MET_RefFinal_Regions', 'MET_LocHadTopo_Comps', 'MET_LocHadTopo_Regions', 'MET_CellOut_Comps', 'MET_CellOut_Regions', 'MET_Calib', 'MET_CorrTopo', 'MET_Cryo', 'MET_CryoCone', 'MET_Final', 'MET_LocHadTopoObj', 'MET_Muid', 'MET_Muid_Spectro', 'MET_Muid_Track', 'MET_MuonBoy', 'MET_MuonBoy_Spectro', 'MET_MuonBoy_Track', 'MET_MuonMuid', 'MET_Muon', 'MET_Muon_Isol_Muid', 'MET_Muon_Isol_Staco', 'MET_Muon_NonIsol_Muid', 'MET_Muon_NonIsol_Staco', 'MET_Muon_Total_Muid', 'MET_Muon_Total_Staco', 'MET_RefEle_Comps', 'MET_RefEle_Regions', 'MET_RefEle_em_Comps', 'MET_RefEle_em_Regions', 'MET_RefGamma_Comps', 'MET_RefGamma_Regions', 'MET_RefGamma_em_Comps', 'MET_RefGamma_em_Regions', 'MET_RefJet_Comps', 'MET_RefJet_Regions', 'MET_RefJet_em_Comps', 'MET_RefJet_em_Regions', 'MET_RefMuon_Comps', 'MET_RefMuon_Regions', 'MET_RefMuon_Muid_Comps', 'MET_RefMuon_Muid_Regions', 'MET_RefMuon_Staco_Comps', 'MET_RefMuon_Staco_Regions', 'MET_RefMuon_Track_Muid_Comps', 'MET_RefMuon_Track_Muid_Regions', 'MET_RefMuon_Track_Staco_Comps', 'MET_RefMuon_Track_Staco_Regions', 'MET_RefMuon_Track_em_Comps', 'MET_RefMuon_Track_em_Regions', 'MET_RefMuon_Track_Comps', 'MET_RefMuon_Track_Regions', 'MET_RefMuon_em_Comps', 'MET_RefMuon_em_Regions', 'MET_RefTau_Comps', 'MET_RefTau_Regions', 'MET_RefTau_em_Comps', 'MET_RefTau_em_Regions', 'MET_SoftJets_Comps', 'MET_SoftJets_Regions', 'MET_SoftJets_em_Comps', 'MET_SoftJets_em_Regions', 'MET_Topo', 'MET_TopoObj_Comps', 'MET_TopoObj_Regions', 'MET_Track_Comps', 'MET_Track_Regions', 'MET_Comps', 'MET_Track_Weights', 'MET_Cluster_Weights', 'MET_Regions', 'MET_Composition' ], allowMissing=True)) # HadronicRecoil blocks if addHadronicRecoil: alg += ElectronD3PDObject(0, sgkey='HR_selectedElectrons', prefix='hr_el_', allowMissing=True) alg += MuonD3PDObject(0, sgkey='HR_selectedMuons', prefix='hr_mu_', allowMissing=True) # ... DR = 0.15 alg += MissingETD3PDObject(0, sgkey='RoughRecoil_15', prefix='hr_roughRecoil_15', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='ueCorrection_15', prefix='hr_ueCorrection_15', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='RefinedRecoil_15', prefix='hr_corrRecoil_15', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='MET_HR_15', prefix='hr_MET_15', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='RoughRecoil_Eflow_15', prefix='hr_roughRecoil_Eflow_15', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='ueCorrection_Eflow_15', prefix='hr_ueCorrection_Eflow_15', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='RefinedRecoil_Eflow_15', prefix='hr_corrRecoil_Eflow_15', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='MET_HR_Eflow_15', prefix='hr_MET_Eflow_15', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey="RoughRecoil_track_15", prefix="hr_roughRecoil_track_15", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="ueCorrection_track_15", prefix="hr_ueCorrection_track_15", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_track_15", prefix="hr_corrRecoil_track_15", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="MET_HR_track_15", prefix="hr_MET_track_15", exclude=['MET_Regions', 'MET_Comps']) # ... DR = 0.20 alg += MissingETD3PDObject(0, sgkey='RoughRecoil_20', prefix='hr_roughRecoil_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='ueCorrection_20', prefix='hr_ueCorrection_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='RefinedRecoil_20', prefix='hr_corrRecoil_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='MET_HR_20', prefix='hr_MET_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='RoughRecoil_track_20', prefix='hr_roughRecoil_track_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='ueCorrection_track_20', prefix='hr_ueCorrection_track_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='RefinedRecoil_track_20', prefix='hr_corrRecoil_track_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='MET_HR_track_20', prefix='hr_MET_track_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='RoughRecoil_clusNoTrack_20', prefix='hr_roughRecoil_clusNoTrack_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='ueCorrection_clusNoTrack_20', prefix='hr_ueCorrection_clusNoTrack_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='RefinedRecoil_clusNoTrack_20', prefix='hr_corrRecoil_clusNoTrack_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='MET_HR_clusNoTrack_20', prefix='hr_MET_clusNoTrack_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='RoughRecoil_Eflow_20', prefix='hr_roughRecoil_Eflow_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='ueCorrection_Eflow_20', prefix='hr_ueCorrection_Eflow_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='RefinedRecoil_Eflow_20', prefix='hr_corrRecoil_Eflow_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='MET_HR_Eflow_20', prefix='hr_MET_Eflow_20', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) # ... DR = 0.25 alg += MissingETD3PDObject(0, sgkey='RoughRecoil_25', prefix='hr_roughRecoil_25', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='ueCorrection_25', prefix='hr_ueCorrection_25', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='RefinedRecoil_25', prefix='hr_corrRecoil_25', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='MET_HR_25', prefix='hr_MET_25', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='RoughRecoil_Eflow_25', prefix='hr_roughRecoil_Eflow_25', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='ueCorrection_Eflow_25', prefix='hr_ueCorrection_Eflow_25', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='RefinedRecoil_Eflow_25', prefix='hr_corrRecoil_Eflow_25', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey='MET_HR_Eflow_25', prefix='hr_MET_Eflow_25', exclude=['MET_Regions', 'MET_Comps'], allowMissing=True) alg += MissingETD3PDObject(0, sgkey="RoughRecoil_track_25", prefix="hr_roughRecoil_track_25", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="ueCorrection_track_25", prefix="hr_ueCorrection_track_25", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_track_25", prefix="hr_corrRecoil_track_25", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="MET_HR_track_25", prefix="hr_MET_track_25", exclude=['MET_Regions', 'MET_Comps']) # HR using truth leptons if rec.doTruth(): ## ... DR = 0.15 alg += MissingETD3PDObject(0, sgkey="RoughRecoil_TruthLep_15", prefix="hr_roughRecoil_trLep_15", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="ueCorrection_TruthLep_15", prefix="hr_ueCorrection_trLep_15", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_15", prefix="hr_corrRecoil_trLep_15", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_15", prefix="hr_MET_trLep_15", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RoughRecoil_TruthLep_Eflow_15", prefix="hr_roughRecoil_trLep_Eflow_15", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="ueCorrection_TruthLep_Eflow_15", prefix="hr_ueCorrection_trLep_Eflow_15", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_Eflow_15", prefix="hr_corrRecoil_trLep_Eflow_15", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_Eflow_15", prefix="hr_MET_trLep_Eflow_15", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RoughRecoil_TruthLep_track_15", prefix="hr_roughRecoil_trLep_track_15", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="ueCorrection_TruthLep_track_15", prefix="hr_ueCorrection_trLep_track_15", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_track_15", prefix="hr_corrRecoil_trLep_track_15", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_track_15", prefix="hr_MET_trLep_track_15", exclude=['MET_Regions', 'MET_Comps']) ## ... DR = 0.20 alg += MissingETD3PDObject(0, sgkey="RoughRecoil_TruthLep_20", prefix="hr_roughRecoil_trLep_20", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="ueCorrection_TruthLep_20", prefix="hr_ueCorrection_trLep_20", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_20", prefix="hr_corrRecoil_trLep_20", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_20", prefix="hr_MET_trLep_20", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RoughRecoil_TruthLep_Eflow_20", prefix="hr_roughRecoil_trLep_Eflow_20", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="ueCorrection_TruthLep_Eflow_20", prefix="hr_ueCorrection_trLep_Eflow_20", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_Eflow_20", prefix="hr_corrRecoil_trLep_Eflow_20", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_Eflow_20", prefix="hr_MET_trLep_Eflow_20", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RoughRecoil_TruthLep_track_20", prefix="hr_roughRecoil_trLep_track_20", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="ueCorrection_TruthLep_track_20", prefix="hr_ueCorrection_trLep_track_20", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_track_20", prefix="hr_corrRecoil_trLep_track_20", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_track_20", prefix="hr_MET_trLep_track_20", exclude=['MET_Regions', 'MET_Comps']) ## ... DR = 0.25 alg += MissingETD3PDObject(0, sgkey="RoughRecoil_TruthLep_25", prefix="hr_roughRecoil_trLep_25", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="ueCorrection_TruthLep_25", prefix="hr_ueCorrection_trLep_25", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_25", prefix="hr_corrRecoil_trLep_25", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_25", prefix="hr_MET_trLep_25", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RoughRecoil_TruthLep_Eflow_25", prefix="hr_roughRecoil_trLep_Eflow_25", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="ueCorrection_TruthLep_Eflow_25", prefix="hr_ueCorrection_trLep_Eflow_25", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_Eflow_25", prefix="hr_corrRecoil_trLep_Eflow_25", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_Eflow_25", prefix="hr_MET_trLep_Eflow_25", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RoughRecoil_TruthLep_track_25", prefix="hr_roughRecoil_trLep_track_25", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="ueCorrection_TruthLep_track_25", prefix="hr_ueCorrection_trLep_track_25", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_track_25", prefix="hr_corrRecoil_trLep_track_25", exclude=['MET_Regions', 'MET_Comps']) alg += MissingETD3PDObject(0, sgkey="RefinedRecoil_TruthLep_track_25", prefix="hr_MET_trLep_track_25", exclude=['MET_Regions', 'MET_Comps']) # Cluster block # ... all clusters, very low LOD if clusterContainer != 'None': alg += ClusterD3PDObject(**_args(0, 'Clusters', kw, sgkey=clusterContainer, exclude='SamplingBasics', allowMissing=True)) # Track block # ... good tracks only (nSCT>=6; no pt cut) if trackContainer != 'None': alg += TrackParticleD3PDObject(**_args(3, 'Tracks', kw, sgkey=trackContainer, label='trk', prefix='trk_', allowMissing=True)) # Primary vertex block - May be missing in single-beam data. alg += PrimaryVertexD3PDObject(**_args(1, 'PrimaryVertex', kw, sgkey=D3PDMakerFlags.VertexSGKey(), prefix='vxp_', allowMissing=True)) # Truth if rec.doTruth(): from TruthD3PDMaker.TruthParticleD3PDObject import TruthParticleD3PDObject from MuonD3PDMaker.TruthMuonD3PDObject import TruthMuonD3PDObject alg += TruthMuonD3PDObject(**_args(2, 'TruthMuon', kw)) from AthenaCommon.AppMgr import ToolSvc from TruthD3PDAnalysis.TruthD3PDAnalysisConf import D3PD__GenObjectsFilterTool # ... remove empty GenEvents smlightGenEvtFilterTool = D3PD__GenObjectsFilterTool( "smlightGenEvtFilterTool") ToolSvc += smlightGenEvtFilterTool smlightGenEvtFilterTool.RemoveDummyEvents = True smlightGenEvtFilterTool.RemoveInTimePileUp = True smlightGenEvtFilterTool.Remove2BCPileUp = True smlightGenEvtFilterTool.Remove800nsPileUp = True smlightGenEvtFilterTool.RemoveCavernBkg = True smlightGenEvtFilterTool.RemoveEmptyEvents = True from TruthD3PDMaker.GenEventD3PDObject import GenEventD3PDObject alg += GenEventD3PDObject( **_args(0, 'GenEvent', kw, filter=smlightGenEvtFilterTool)) # ... leptonic W/Z truth information smlightLepWZFilterTool = D3PD__GenObjectsFilterTool( "smlightLepWZFilterTool") ToolSvc += smlightLepWZFilterTool smlightLepWZFilterTool.RemoveInTimePileUp = True smlightLepWZFilterTool.Remove2BCPileUp = True smlightLepWZFilterTool.Remove800nsPileUp = True smlightLepWZFilterTool.RemoveCavernBkg = True smlightLepWZFilterTool.RemoveEmptyEvents = True smlightLepWZFilterTool.RemoveDummyEvents = True smlightLepWZFilterTool.RemoveUnrequestedParticles = True smlightLepWZFilterTool.KeepLeptonicWZBosons = True smlightLepWZFilterTool.KeepLeptonicWZBosonDecayChains = True smlightLepWZFilterTool.KeepLeptonicWZBosonsParents = True from TruthD3PDMaker.GenParticleD3PDObject import GenParticleD3PDObject alg += GenParticleD3PDObject(**_args( 10, "lepwzgenparticle", kw, prefix='mclepwzpart_', filter=smlightLepWZFilterTool, label="LepWZTruthD3PDObject", exclude=["GenPartProdVertexAssoc", "GenPartDecayVertexAssoc"], GenParticle_WriteMotherType=False, GenParticle_WriteMotherBarcode=False, GenPartMotherAssoc_target="LepWZTruthD3PDObject", GenPartChildAssoc_target="LepWZTruthD3PDObject")) if not rec.doTruth(): alg += BeamSpotD3PDObject(10) # Trigger if D3PDMakerFlags.DoTrigger(): # RedefineTriggerBits(alg, 'EF*') # alg += SMTrilepTriggerBitsD3PDObject (**_args (10, 'SMTrilepTriggerBits', kw)) alg += TrigDecisionD3PDObject(**_args(10, 'TrigDecision', kw)) addTrigConfMetadata(alg) # Bunch group info alg += BGCodeD3PDObject(**_args(2, 'BGCode', kw)) # Egamma and Mu TrigEgammaD3PDObjects(alg, 1) TrigMuonD3PDObjects(alg, 1) # Event metadata alg.MetadataTools += [LBMetadataConfig()] if D3PDMakerFlags.FilterCollCand(): from CaloD3PDMaker.CollisionFilterAlg import CollisionFilterAlg alg.filterSeq += CollisionFilterAlg(tuplename + '_CollCandFilter') return alg
# Check if the configuration makes sense: if prodFlags.WriteQcdD3PD.isVirtual: QcdD3PDStream_msg.error("The Qcd D3PD stream can't be virtual! " + "It's a configuration error!") raise NameError("Qcd D3PD set to be a virtual stream") pass # Adding specific containers include('QcdD3PDMaker/ElectronSelector.py') include('QcdD3PDMaker/PhotonSelector.py') include('QcdD3PDMaker/TrackParticleSelector.py') include('QcdD3PDMaker/TruthParticleSelector.py') # Construct the stream and file names for the Qcd D3PD: streamName = prodFlags.WriteQcdD3PD.StreamName fileName = buildFileName(prodFlags.WriteQcdD3PD) QcdD3PDStream_msg.info( "Configuring QcdD3PD with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) # Create the D3PD stream itself: from OutputStreamAthenaPool.MultipleStreamManager import MSMgr QcdD3PDStream = MSMgr.NewRootStream(streamName, fileName, "qcd") # Now add all the content to this stream: from QcdD3PDMaker.QcdD3PD import QcdD3PD QcdD3PD(QcdD3PDStream, stdElectronContainer='GoodElectrons', stdPhotonContainer='GoodPhotons', stdTrackParticleContainer='GoodTracks', stdTruthParticleContainer='GoodTruthParticles')
# Set up a logger: from AthenaCommon.Logging import logging SMWMUNUJJD3PDStream_msg = logging.getLogger('SMWMUNUJJD3PD_prodJobOFragment') # Check if the configuration makes sense: if prodFlags.WriteSMWMUNUJJD3PD.isVirtual: SMWMUNUJJD3PDStream_msg.error( "The SMWMUNUJJ D3PD stream can't be virtual! " + "It's a configuration error!") raise NameError("SMWMUNUJJ D3PD set to be a virtual stream") pass # Construct the stream and file names for the SMWMUNUJJ D3PD: streamName = prodFlags.WriteSMWMUNUJJD3PD.StreamName fileName = buildFileName(prodFlags.WriteSMWMUNUJJD3PD) SMWMUNUJJD3PDStream_msg.info( "Configuring SMWMUNUJJD3PD with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) # add specific truth jets include("PhysicsD3PDMaker/MyJetMake.py") #### add specific containers include("PhysicsD3PDMaker/ElectronSelector.py") #include ("PhysicsD3PDMaker/PhotonSelector.py") include("PhysicsD3PDMaker/MuonSelector.py") include("PhysicsD3PDMaker/JetSelector.py") #include ("PhysicsD3PDMaker/TauSelector.py") #configure MuonScatteringAngleSignificanceTool include("JetTagD3PDMaker/MuonScatteringSigToolConfig.py")
include.block("egammaD3PDMaker/ClusterCorrectionD3PD_prodJobOFragment.py") # Common import(s): from D3PDMakerConfig import D3PDProdFlags from AthenaCommon.JobProperties import jobproperties prodFlags = jobproperties.D3PDProdFlags from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName # Set up a logger: from AthenaCommon.Logging import logging ClusterCorrectionD3PDStream_msg = \ logging.getLogger( 'ClusterCorrectionD3PD_prodJobOFragment' ) # Construct the stream and file names for the D3PD: streamName = prodFlags.WriteClusterCorrectionD3PD.StreamName fileName = buildFileName(prodFlags.WriteClusterCorrectionD3PD) ClusterCorrectionD3PDStream_msg.info( "Configuring D3PD with streamName '%s' and fileName '%s'" % (streamName, fileName)) # Create the D3PD stream: from OutputStreamAthenaPool.MultipleStreamManager import MSMgr ClusterCorrectionD3PDStream = MSMgr.NewRootStream(streamName, fileName, 'clusters') # Now add all the content to this stream: from egammaD3PDMaker.ClusterCorrectionD3PD import ClusterCorrectionD3PD ClusterCorrectionD3PD_args = globals().get('ClusterCorrectionD3PD_args', {}) ClusterCorrectionD3PD(ClusterCorrectionD3PDStream, **ClusterCorrectionD3PD_args)
for iTrig in range(len(mu_trigsList)): if iTrig==0: combination_tp+=mu_trigsList[iTrig] else: combination_tp+=" or "+mu_trigsList[iTrig] combination_tp+="))" algsList = el_algsList + el_trigsList + mu_algsList + mu_trigsList totalDecision_tp=LogicalFilterCombiner("HSG2_TPFilter",cmdstring = combination_tp) theJob+=totalDecision_tp ############ NTUPLING ############ from AthenaCommon.JobProperties import jobproperties prodFlags = jobproperties.D3PDProdFlags streamName = prodFlags.WriteTPHSG2D3PD.StreamName from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName fileName = buildFileName(prodFlags.WriteTPHSG2D3PD) from HSG2DPDUtils.HSG2D3PD import HSG2physicsD3PD # Perform MV3 b-tagging when creating D3PD for 2013 Moriond analysis if jobproperties.HSG2.doMV3BTagInD3PD(): include("BTagging/BTagging_LoadTools.py") include("BTagging/BTagging_jobOptions.py") stream_d3pd_tp=HSG2physicsD3PD(streamName,fileName) stream_d3pd_tp.AcceptAlgs = [totalDecision_tp.getName()]
VertexD3PDAnalysisFlags.useJets = False VertexD3PDAnalysisFlags.useTaus = False include("TrackD3PDMaker/VertexGroupD3PD_loadConfig.py") ### Semi-automatic configuration steps ## The following needs to be given as preExec ## (it has to be set before including RecExCommon) #if VertexD3PDAnalysisFlags.useAllVertexCollections: # #Need to enable algorithms in IDRE # from InDetRecExample.InDetJobProperties import InDetFlags # InDetFlags.doVertexFindingForMonitoring.set_Value_and_Lock(True) ### Setup algorithm if vtxprodFlags.WriteIDVTXLUMID3PD.isVirtual: raise NameError("IDVTXLUMID set to be a virtual stream") pass streamName = vtxprodFlags.WriteIDVTXLUMID3PD.StreamName fileName = buildFileName(vtxprodFlags.WriteIDVTXLUMID3PD) from OutputStreamAthenaPool.MultipleStreamManager import MSMgr VertexLumiD3PDMaker = MSMgr.NewRootStream( vtxprodFlags.WriteIDVTXLUMID3PD.StreamName, fileName, VertexD3PDAnalysisKeys.D3PDTreeName()) ### Add objects to the algorithm from TrackD3PDMaker.VertexGroupD3PD import VertexGroupD3PD VertexGroupD3PD(VertexLumiD3PDMaker, **(VertexD3PDAnalysisFlags.D3PDMakerExtraDict()))
InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += TileMuMuonTPThinningTool ##====================================================================== ## CREATE THE DERIVATION KERNEL ALGORITHM AND PASS THE ABOVE TOOLS ##====================================================================== desdTileMuonSequence += CfgMgr.DerivationFramework__DerivationKernel("TileMuKernel", SkimmingTools = [TileMuEventFilterTool], ThinningTools = [TileMuCaloCellThinningTool, TileMuMuonTPThinningTool]) ##====================================================================== ## Define this Muon DPD output stream ##====================================================================== streamName = primDPD.WriteDESDM_TILEMUStream.StreamName fileName = buildFileName( primDPD.WriteDESDM_TILEMUStream ) algsToBookkeep = [] if primDPD.WriteDESDM_TILEMUStream.isVirtual or primDPD.isVirtual() : TileMuStream = MSMgr.NewVirtualStream( streamName, fileName ) pass else: TileMuStream = MSMgr.NewPoolStream( streamName, fileName ) # Add the per-event bookkeeping TileMuStream.AddOtherAlgsToBookkeep( algsToBookkeep ) pass if primDESDMTileMu.ApplySkimming(): TileMuStream.AcceptAlgs(["TileMuKernel"]) pass
from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName # Set up a logger: from AthenaCommon.Logging import logging SMZMUMUD3PDStream_msg = logging.getLogger('SMZMUMUD3PD_prodJobOFragment') # Check if the configuration makes sense: if prodFlags.WriteSMZMUMUD3PD.isVirtual: SMZMUMUD3PDStream_msg.error("The SMZMUMU D3PD stream can't be virtual! " + "It's a configuration error!") raise NameError("SMZMUMU D3PD set to be a virtual stream") pass # Construct the stream and file names for the SMZMUMU D3PD: streamName = prodFlags.WriteSMZMUMUD3PD.StreamName fileName = buildFileName(prodFlags.WriteSMZMUMUD3PD) SMZMUMUD3PDStream_msg.info( "Configuring SMZMUMUD3PD with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) #### add specific containers include("PhysicsD3PDMaker/ElectronSelector.py") include("PhysicsD3PDMaker/PhotonSelector.py") include("PhysicsD3PDMaker/LowPtMuonPairSelector.py") include("PhysicsD3PDMaker/JetSelector.py") include("PhysicsD3PDMaker/TauSelector.py") # Configure branches from AthenaCommon.AppMgr import ServiceMgr from D3PDMakerRoot.D3PDMakerRootConf import D3PD__RootD3PDSvc ServiceMgr += D3PD__RootD3PDSvc("SMZMUMU_D3PDSvc") ServiceMgr.SMZMUMU_D3PDSvc.VetoedNames = [
from RecExConfig.RecFlags import rec from QcdD3PDMaker.QcdD3PDMakerFlags import * QcdD3PDMakerFlagsSetWZ() include('QcdD3PDMaker/QcdD3PD_preSetup.py') include('QcdD3PDMaker/QcdD3PDMakerPreSetup.common.py') # Check if the configuration makes sense: if prodFlags.WriteJetMetWZD3PD.isVirtual: JetMetWZD3PDStream_msg.error( "The Qcd D3PD stream can't be virtual! " + "It's a configuration error!" ) raise NameError( "Qcd D3PD set to be a virtual stream" ) pass # Construct the stream and file names for the Qcd D3PD: streamName = prodFlags.WriteJetMetWZD3PD.StreamName fileName = buildFileName( prodFlags.WriteJetMetWZD3PD ) JetMetWZD3PDStream_msg.info( "Configuring JetMetWZD3PD with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) # Create the D3PD stream itself: from OutputStreamAthenaPool.MultipleStreamManager import MSMgr JetMetWZD3PDStream = MSMgr.NewRootStream( streamName, fileName, "qcd" ) # Now add all the content to this stream: from QcdD3PDMaker.QcdD3PD import QcdD3PD QcdD3PD( JetMetWZD3PDStream ) ### large-R jets from RecExConfig.ObjKeyStore import objKeyStore if objKeyStore.isInInput("CaloClusterContainer","CaloCalTopoCluster"): preseq = AlgSequence (D3PDMakerFlags.PreD3PDAlgSeqName()) from QcdD3PDMaker.JSjets import createJSJets
# Set up a logger: from AthenaCommon.Logging import logging SlimSMQCDStream_msg = logging.getLogger('SlimSMQCD_prodJobOFragment') # Check if the configuration makes sense: if JetN2N.isVirtual: SlimSMQCDStream_msg.error("NTUP stream can't be virtual! " + "It's a configuration error!") raise NameError("NTUP set to be a virtual stream") pass ## Construct the stream and file names: streamName = JetN2N.StreamName if JetN2N.FileName == '': fileName = buildFileName(JetN2N) else: fileName = JetN2N.FileName SlimSMQCDStream_msg.info( "Configuring SlimSMQCDNTUP with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) ## set input tree: from AthenaCommon.JobProperties import jobproperties ntupFlags = jobproperties.SkimNTUP_ProdFlags tree_name = ntupFlags.TreeName() #do skim from JetN2N.SlimSMQCD import doSlimSMQCD from JetN2N.JetN2NFlags import JetN2NFlags doSlimSMQCD(tree_name, fileName, athenaCommonFlags.FilesInput(), JetN2NFlags.JetN2NYear())
filAlg_MS = muonTrkTrackThinTool( "muonTrkTrackThinTool_MS", TrackCollectionKey="MuonSpectrometerTracks") desdAlignmentTriggerMuonSequence += filAlg_MS filAlg_CT = muonTrkTrackThinTool("muonTrkTrackThinTool_CT", TrackCollectionKey="CombinedMuonTracks") desdAlignmentTriggerMuonSequence += filAlg_CT pass print topSequence ##==================================================================== ## Define this Muon DPD output stream ##==================================================================== #WriteMuonAlignmentTriggerStream streamName = primDPD.WriteDESDM_MSPerfStream.StreamName fileName = buildFileName(primDPD.WriteDESDM_MSPerfStream) if primDPD.WriteDESDM_MSPerfStream.isVirtual or primDPD.isVirtual(): AlignmentTriggerMuonStream = MSMgr.NewVirtualStream(streamName, fileName) pass else: AlignmentTriggerMuonStream = MSMgr.NewPoolStream(streamName, fileName) pass if primDPDAlignTrigMu.ApplyThinning(): AlignmentTriggerMuonStream.AcceptAlgs(["muonTrkTrackThinTool_MS"]) AlignmentTriggerMuonStream.AcceptAlgs(["muonTrkTrackThinTool_CT"]) pass if primDPDAlignTrigMu.ApplySkimming(): AlignmentTriggerMuonStream.AcceptAlgs(["EventSkimmingKernel"]) pass
pass # Exotics displaced hadronic jets =search (contact: Heather Russell) if primRPVLLDESDM.doHV(): include("LongLivedParticleDPDMaker/PhysDESDM_HV.py") pass ### output stream from OutputStreamAthenaPool.MultipleStreamManager import MSMgr from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName from PrimaryDPDMaker.PrimaryDPDFlags import primDPD streamName = primDPD.WriteRAWPhysDPD_RPVLL.StreamName fileName = buildFileName(primDPD.WriteRAWPhysDPD_RPVLL) if fileName.endswith(".pool.root"): fileName = fileName.rstrip(".pool.root") fileName += ".dat" pass if fileName.endswith("root"): fileName = fileName.rstrip(".root") fileName += ".dat" pass RPVLL = MSMgr.NewByteStream(streamName, fileName) RPVLL.bsOutputSvc.WriteEventlessFiles = primDPD.WriteEventlessFiles() RPVLL.AddAcceptAlgs(RPVLLfilterNames) #########################################
from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName # Set up a logger: from AthenaCommon.Logging import logging SMDILEPD3PDStream_msg = logging.getLogger('SMDILEPD3PD_prodJobOFragment') # Check if the configuration makes sense: if prodFlags.WriteSMDILEPD3PD.isVirtual: SMDILEPD3PDStream_msg.error("The SMDILEP D3PD stream can't be virtual! " + "It's a configuration error!") raise NameError("SMDILEP D3PD set to be a virtual stream") pass # Construct the stream and file names for the SMDILEP D3PD: streamName = prodFlags.WriteSMDILEPD3PD.StreamName fileName = buildFileName(prodFlags.WriteSMDILEPD3PD) SMDILEPD3PDStream_msg.info( "Configuring SMDILEPD3PD with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) # add specific truth jets include("PhysicsD3PDMaker/MyJetMake.py") #configure MuonScatteringAngleSignificanceTool include("JetTagD3PDMaker/MuonScatteringSigToolConfig.py") # Create the D3PD streams: from OutputStreamAthenaPool.MultipleStreamManager import MSMgr SMDILEPD3PDStream = MSMgr.NewRootStream(streamName, fileName, "physics") # Now add all the content to this stream: from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD
# Set up a logger: from AthenaCommon.Logging import logging EXMJStream_msg = logging.getLogger('EXMJNTUP_prodJobOFragment') # Check if the configuration makes sense: if exmjntup.isVirtual: EXMJStream_msg.error("NTUP stream can't be virtual! " + "It's a configuration error!") raise NameError("NTUP set to be a virtual stream") pass ## Construct the stream and file names: streamName = exmjntup.StreamName if exmjntup.FileName == '': fileName = buildFileName(exmjntup) else: fileName = exmjntup.FileName EXMJStream_msg.info( "Configuring NTUP_EXMJ with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) ## set command from ExoticsN2N.ExoticsN2NFlags import ExoticsN2NFlags import subprocess def boolToStr(flag): if flag: return "1" else: return "0"
from RecExConfig.RecFlags import rec from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags # Set up a logger: from AthenaCommon.Logging import logging TriggerD3PDStream_msg = logging.getLogger('TriggerD3PD_prodJobOFragment') # Check if the configuration makes sense: if prodFlags.WriteTriggerD3PD.isVirtual: TriggerD3PDStream_msg.error("The Trigger D3PD stream can't be virtual! " + "It's a configuration error!") raise NameError("Trigger D3PD set to be a virtual stream") # Construct the stream and file names for the Trigger D3PD: streamName = prodFlags.WriteTriggerD3PD.StreamName fileName = buildFileName(prodFlags.WriteTriggerD3PD) TriggerD3PDStream_msg.info( "Configuring Trigger D3PD with streamName '%s' and " \ "fileName '%s'" % ( streamName, fileName ) ) # Check if we will get trigger information: triggerAvailable = (rec.doTrigger() and (not rec.noESDTrigger())) # Print a warning if the trigger is not used: if not triggerAvailable: TriggerD3PDStream_msg.warning( "Running without trigger information on the input. " "Most information will not be available/saved.") pass # Set global D3PDMaker flags: from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
JetTagD3PD_JetFitterCharm = True if not 'JetTagD3PD_MV3' in dir(): JetTagD3PD_MV3 = True #from DBReplicaSvc.DBReplicaSvcConf import DBReplicaSvc #DBReplicaSvc = DBReplicaSvc(UseCOOLSQLite=False) #svcMgr += DBReplicaSvc include("JetTagD3PDMaker/JetTagD3PD_prodFragmentCore.py") from AthenaCommon.JobProperties import jobproperties btagprodFlags = jobproperties.D3PDProdFlags from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName if btagprodFlags.WriteBTAGSLIMD3PD.isVirtual: raise NameError("BTAGD3PD set to be a virtual stream") pass streamName = btagprodFlags.WriteBTAGSLIMD3PD.StreamName fileName = buildFileName(btagprodFlags.WriteBTAGSLIMD3PD) from OutputStreamAthenaPool.MultipleStreamManager import MSMgr alg = MSMgr.NewRootStream(btagprodFlags.WriteBTAGSLIMD3PD.StreamName, fileName, JetTagD3PDKeys.D3PDTupleName()) from JetTagD3PDMaker.BTaggingD3PD import BTaggingD3PD BTaggingD3PD(alg, **(JetTagD3PDFlags.D3PDPropDict())) include("JetTagD3PDMaker/JetTagD3PD_prodFragmentPostStream.py")
if iAlg==0: combination_daod_2l=algsList[iAlg] else: combination_daod_2l+=" or "+algsList[iAlg] totalDecision_daod_2l=LogicalFilterCombiner("HSG2_2LDAODFilter",cmdstring = combination_daod_2l) theJob+=totalDecision_daod_2l ## This handles multiple output streams from OutputStreamAthenaPool.MultipleStreamManager import MSMgr from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutHelper # define streams from AthenaCommon.JobProperties import jobproperties prodFlags = jobproperties.D2PDFlags from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName # Construct the stream and file names for the jp: streamName = prodFlags.WriteDAOD_2LHSG2Stream.StreamName fileName = buildFileName( prodFlags.WriteDAOD_2LHSG2Stream ) #streamOut = MSMgr.NewPoolStream("StreamDAOD_2LHSG2",runArgs.outputDAOD_2LHSG2File) streamOut_daod_2l = MSMgr.NewPoolStream(streamName,fileName) streamOut_daod_2l.AcceptAlgs([totalDecision_daod_2l.getName()]) streamOut_daod_2l.AddOtherAlgsToBookkeep(algsList) dpdOutHelper.addAllItemsFromInputExceptExcludeList(streamName,[]) streamOut_daod_2l.AddMetaDataItem("EventBookkeeperCollection#*")
from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel DESDM_PHOJET_Seq += CfgMgr.DerivationFramework__DerivationKernel("DESDM_PHOJETKernel", SkimmingTools = [DESDM_PHOJET_SkimmingTool] ) topSequence += DESDM_PHOJET_Seq ################## ### Output stream ################## from OutputStreamAthenaPool.MultipleStreamManager import MSMgr from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName from PrimaryDPDMaker.PrimaryDPDFlags import primDPD streamName = primDPD.WriteDESDM_PHOJETStream.StreamName fileName = buildFileName( primDPD.WriteDESDM_PHOJETStream ) if primDPD.WriteDESDM_PHOJETStream.isVirtual or primDPD.isVirtual() : StreamDESDM_PHOJET=MSMgr.NewVirtualStream( streamName, fileName ) pass else: StreamDESDM_PHOJET=MSMgr.NewPoolStream( streamName, fileName ) pass StreamDESDM_PHOJET.AddRequireAlgs(["DESDM_PHOJETKernel"]) from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput # Take all items from the input, except for the ones listed in the excludeList, # list should be copied from AllCells but add back the thinned tracking info for egamma
combination_daod_2l = algsList[iAlg] else: combination_daod_2l += " or " + algsList[iAlg] totalDecision_daod_2l = LogicalFilterCombiner("HSG2_2LDAODFilter", cmdstring=combination_daod_2l) theJob += totalDecision_daod_2l ## This handles multiple output streams from OutputStreamAthenaPool.MultipleStreamManager import MSMgr from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutHelper # define streams from AthenaCommon.JobProperties import jobproperties prodFlags = jobproperties.D2PDFlags from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName # Construct the stream and file names for the jp: streamName = prodFlags.WriteDAOD_2LHSG2Stream.StreamName fileName = buildFileName(prodFlags.WriteDAOD_2LHSG2Stream) #streamOut = MSMgr.NewPoolStream("StreamDAOD_2LHSG2",runArgs.outputDAOD_2LHSG2File) streamOut_daod_2l = MSMgr.NewPoolStream(streamName, fileName) streamOut_daod_2l.AcceptAlgs([totalDecision_daod_2l.getName()]) streamOut_daod_2l.AddOtherAlgsToBookkeep(algsList) dpdOutHelper.addAllItemsFromInputExceptExcludeList(streamName, []) streamOut_daod_2l.AddMetaDataItem("EventBookkeeperCollection#*")
from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName # Set up a logger: from AthenaCommon.Logging import logging MinBiasD3PDStream_msg = logging.getLogger("MinBiasD3PD_prodJobOFragment") # Check if the configuration makes sense: if prodFlags.WriteMinBiasD3PD.isVirtual: MinBiasD3PDStream_msg.error("The MinBias D3PD stream can't be virtual! " + "It's a configuration error!") raise NameError("MinBias D3PD set to be a virtual stream") # Construct the stream and file names: streamName = prodFlags.WriteMinBiasD3PD.StreamName fileName = buildFileName(prodFlags.WriteMinBiasD3PD) MinBiasD3PDStream_msg.info( "Configuring MinBias D3PD with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) # Create the D3PD stream: from OutputStreamAthenaPool.MultipleStreamManager import MSMgr MinBiasD3PDStream = MSMgr.NewRootStream(streamName, fileName, "MinBiasTree") def MinBiasD3PD(d3pdalg=None, file='minbias.root', tuplename='MinBiasD3PD', streamname='d3pdstream', **kw):
from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName # Set up a logger: from AthenaCommon.Logging import logging SMDYEED3PDStream_msg = logging.getLogger('SMDYEED3PD_prodJobOFragment') # Check if the configuration makes sense: if prodFlags.WriteSMDYEED3PD.isVirtual: SMDYEED3PDStream_msg.error("The SMDYEE D3PD stream can't be virtual! " + "It's a configuration error!") raise NameError("SMDYEE D3PD set to be a virtual stream") pass # Construct the stream and file names for the SMDYEE D3PD: streamName = prodFlags.WriteSMDYEED3PD.StreamName fileName = buildFileName(prodFlags.WriteSMDYEED3PD) SMDYEED3PDStream_msg.info( "Configuring SMDYEED3PD with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) #### add specific containers include("PhysicsD3PDMaker/LowPtElectronPairSelector.py") include("PhysicsD3PDMaker/PhotonSelector.py") include("PhysicsD3PDMaker/MuonSelector.py") include("PhysicsD3PDMaker/JetSelector.py") include("PhysicsD3PDMaker/TauSelector.py") # Configure branches from AthenaCommon.AppMgr import ServiceMgr from D3PDMakerRoot.D3PDMakerRootConf import D3PD__RootD3PDSvc ServiceMgr += D3PD__RootD3PDSvc("SMDYEE_D3PDSvc") ServiceMgr.SMDYEE_D3PDSvc.VetoedNames = [
from AthenaCommon.Logging import logging HSG5D3PD_msg = logging.getLogger('HSG5_ZHllbb_boosted_D3PD_prodJobOFragment') # Check if the configuration makes sense: if prodFlags.WriteHSG5ZHLLD3PD.isVirtual: HSG5D3PD_msg.error("The HSG5 ZHLL D3PD stream can't be virtual! " + "It's a configuration error!") raise NameError("HSG5 ZHLL D3PD set to be a virtual stream") pass # Create the D3PD streams: from OutputStreamAthenaPool.MultipleStreamManager import MSMgr # Construct the stream and file names for the HSG5 D3PD: streamName = prodFlags.WriteHSG5ZHLLD3PD.StreamName fileName = buildFileName(prodFlags.WriteHSG5ZHLLD3PD) HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \ ( streamName, fileName ) ) HSG5D3PD_Stream = MSMgr.NewRootStream(streamName, fileName, "physics") # create stream #from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD #SMWZD3PD( HSG5D3PD_Stream ) if 'IS_SIMULATION' in inputFileSummary['evt_type']: from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True) # set flags
if not 'JetTagD3PD_redoTagging' in dir(): JetTagD3PD_redoTagging = True if not 'JetTagD3PD_JetFitterCharm' in dir(): JetTagD3PD_JetFitterCharm = True if not 'JetTagD3PD_MV3' in dir(): JetTagD3PD_MV3 = True include("JetTagD3PDMaker/JetTagD3PD_prodFragmentCore.py") from AthenaCommon.JobProperties import jobproperties btagprodFlags = jobproperties.D3PDProdFlags from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName if btagprodFlags.WriteBTAGEFFD3PD.isVirtual: raise NameError("BTAGD3PD set to be a virtual stream") pass streamName = btagprodFlags.WriteBTAGEFFD3PD.StreamName fileName = buildFileName(btagprodFlags.WriteBTAGEFFD3PD) from OutputStreamAthenaPool.MultipleStreamManager import MSMgr alg = MSMgr.NewRootStream(btagprodFlags.WriteBTAGEFFD3PD.StreamName, fileName, JetTagD3PDKeys.D3PDTupleName()) from JetTagD3PDMaker.BTaggingD3PD import BTaggingD3PD BTaggingD3PD(alg, **(JetTagD3PDFlags.D3PDPropDict())) include("JetTagD3PDMaker/JetTagD3PD_prodFragmentPostStream.py")
combination="" for iAlg in range(len(algsList)): if iAlg==0: combination=algsList[iAlg] else: combination+=" or "+algsList[iAlg] from PrimaryDPDMaker.LogicalFilterCombiner import LogicalFilterCombiner totalDecision_2L2Q=LogicalFilterCombiner("NTUP_2L2QHSG2_Filter",cmdstring = combination) theJob+=totalDecision_2L2Q ############ NTUPLING ############ from AthenaCommon.JobProperties import jobproperties prodFlags = jobproperties.D3PDProdFlags streamName = prodFlags.Write2L2QHSG2D3PD.StreamName from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName fileName = buildFileName(prodFlags.Write2L2QHSG2D3PD) from HSG2DPDUtils.HSG2D3PD import HSG2physicsD3PD # Perform MV3 b-tagging when creating D3PD for 2013 Moriond analysis if jobproperties.HSG2.doMV3BTagInD3PD(): include("BTagging/BTagging_LoadTools.py") include("BTagging/BTagging_jobOptions.py") stream_d3pd_2L2Q=HSG2physicsD3PD(streamName,fileName) stream_d3pd_2L2Q.AcceptAlgs = [totalDecision_2L2Q.getName()]