Example #1
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#*")
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()]
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()]
    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#*")
Example #5
0
    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()]
Example #6
0
                                                    acceptFrwdE=jobproperties.HSG2.fourLeptonAcceptFrwdE())

mixedFilterMuid_d3pd_4l=H4lDPDMaker.H4lMixedFilter("HSG2_D3PD_4MixedFilterMuid", nLept=4,\
                                                   pTCuts=[0,0,ptCut_d3pd_4l,ptCut_d3pd_4l],\
                                                   eTCuts=[ptCut_d3pd_4l,ptCut_d3pd_4l,0,0],\
                                                   qualityCuts=[eQual,eQual,muQual,muQual],\
                                                   types=["e","e","mu","mu"],\
                                                   collections=[eCollToUse,eCollToUse,"MuidMuonCollection","MuidMuonCollection"],\
                                                   mass=massCut_d3pd_4l,\
                                                   acceptFrwdE=jobproperties.HSG2.fourLeptonAcceptFrwdE())

theJob += mixedFilterStaco_d3pd_4l

msg.info("Added 2e2mu(staco) filter")

theJob += mixedFilterMuid_d3pd_4l

msg.info("Added 2e2mu(muid) filter")

combination_d3pd_4l = "HSG2_D3PD_4ElectronFilter or " + "HSG2_D3PD_4StacoMuonFilter or " + "HSG2_D3PD_4MuidMuonFilter or " + "HSG2_D3PD_4MixedFilterStaco or " + "HSG2_D3PD_4MixedFilterMuid"

totalDecision_d3pd_4l = LogicalFilterCombiner("HSG2_D3PD_4l_Filter",
                                              cmdstring=combination_d3pd_4l)
theJob += totalDecision_d3pd_4l

from HSG2DPDUtils.HSG2D3PD import HSG2physicsD3PD

stream_d3pd_4l = HSG2physicsD3PD("StreamNTUP_HSG2",
                                 runArgs.outputNTUP_HSG2File)
stream_d3pd_4l.AcceptAlgs = [totalDecision_d3pd_4l.getName()]
Example #7
0
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()]
msg.info("Added 1e1mu (calo) filter")

combination_ntup_2l=""
for iAlg in range(len(algsList)):
    if iAlg==0:
        combination_ntup_2l=algsList[iAlg]
    else:
        combination_ntup_2l+=" or "+algsList[iAlg]

totalDecision_ntup_2l=LogicalFilterCombiner("HSG2_2LNTUPFilter",cmdstring = combination_ntup_2l)
theJob+=totalDecision_ntup_2l

############ NTUPLING ############

from AthenaCommon.JobProperties import jobproperties
prodFlags = jobproperties.D3PDProdFlags
streamName = prodFlags.Write2LHSG2D3PD.StreamName

from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
fileName = buildFileName(prodFlags.Write2LHSG2D3PD)

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_2L=HSG2physicsD3PD(streamName,fileName)
stream_d3pd_2L.AcceptAlgs = [totalDecision_ntup_2l.getName()] 
                                                    acceptFrwdE=jobproperties.HSG2.fourLeptonAcceptFrwdE())

mixedFilterMuid_d3pd_4l=H4lDPDMaker.H4lMixedFilter("HSG2_D3PD_4MixedFilterMuid", nLept=4,\
                                                   pTCuts=[0,0,ptCut_d3pd_4l,ptCut_d3pd_4l],\
                                                   eTCuts=[ptCut_d3pd_4l,ptCut_d3pd_4l,0,0],\
                                                   qualityCuts=[eQual,eQual,muQual,muQual],\
                                                   types=["e","e","mu","mu"],\
                                                   collections=[eCollToUse,eCollToUse,"MuidMuonCollection","MuidMuonCollection"],\
                                                   mass=massCut_d3pd_4l,\
                                                   acceptFrwdE=jobproperties.HSG2.fourLeptonAcceptFrwdE())

theJob+=mixedFilterStaco_d3pd_4l

msg.info("Added 2e2mu(staco) filter")

theJob+=mixedFilterMuid_d3pd_4l

msg.info("Added 2e2mu(muid) filter")

combination_d3pd_4l="HSG2_D3PD_4ElectronFilter or "+"HSG2_D3PD_4StacoMuonFilter or "+"HSG2_D3PD_4MuidMuonFilter or "+"HSG2_D3PD_4MixedFilterStaco or "+"HSG2_D3PD_4MixedFilterMuid"

totalDecision_d3pd_4l=LogicalFilterCombiner("HSG2_D3PD_4l_Filter",cmdstring = combination_d3pd_4l)
theJob+=totalDecision_d3pd_4l


from HSG2DPDUtils.HSG2D3PD import HSG2physicsD3PD


stream_d3pd_4l=HSG2physicsD3PD("StreamNTUP_HSG2",runArgs.outputNTUP_HSG2File)
stream_d3pd_4l.AcceptAlgs = [totalDecision_d3pd_4l.getName()]