types=["e","mu"],\
                                     collections=['ElectronAODCollection',"UniqueCaloMuonCollection"],\
                                     mass=massCut_daod_2l,\
                                     acceptFrwdE=jobproperties.HSG2.diLeptonAcceptFrwdE(),\
                                     checkLArError=jobproperties.HSG2.diLeptonCheckLArError())
algsList.append(theJob.HSG2_DAOD_2MixedFilterCalo.name())
msg.info("Added 1e1mu (calo) filter")

combination_daod_2l=""
for iAlg in range(len(algsList)):
    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
    if iAlg==0:
        combination_tp+=mu_algsList[iAlg]
    else:
        combination_tp+=" or "+mu_algsList[iAlg]
combination_tp+=") and ("

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():
                                     types=["e","mu"],\
                                     collections=['ElectronAODCollection',"UniqueCaloMuonCollection"],\
                                     mass=massCut_ntup_2l,\
                                     acceptFrwdE=jobproperties.HSG2.diLeptonAcceptFrwdE(),\
                                     checkLArError=jobproperties.HSG2.diLeptonCheckLArError())
algsList.append(theJob.HSG2_NTUP_2MixedFilterCalo.name())
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():
                                               pTCuts=[mu_ptCut, mu_ptCut, mergedJet_ptCut],\
                                               qualityCuts=[mu_qual, calo_qual, mergedJet_qual],\
                                               collections=[muons_coll, calo_coll, jet_coll],\
                                               diLeptonMassCut=diLeptonMassCut)
algsList.append(theJob.NTUP_2MU1QHSG2_MuonsCalo_Filter.name())
msg.info("Added mumuq (muons/calo) filter")

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():
Exemple #5
0
theJob += mixedFilterStaco_d3pd_2l

msg.info("Added 1e1mu(staco) filter")

theJob += mixedFilterMuid_d3pd_2l

msg.info("Added 1e1mu(muid) filter")

theJob += mixedFilterCalo_d3pd_2l

msg.info("Added 1e1mu(calo) filter")

theJob += mixedFilterStacoCalo_d3pd_2l
msg.info("Added 1mu(staco)1mu(calo) filter")

theJob += mixedFilterMuidCalo_d3pd_2l
msg.info("Added 1mu(muid)1mu(calo) filter")

combination_d3pd_2l = "HSG2_D3PD_2ElectronFilter or " + "HSG2_D3PD_2StacoMuonFilter or " + "HSG2_D3PD_2MuidMuonFilter or " + "HSG2_D3PD_2MixedFilterStaco or " + "HSG2_D3PD_2MixedFilterMuid or " + "HSG2_D3PD_2MixedFilterCalo or " + "HSG2_D3PD_2MixedFilterMuidCalo or " + "HSG2_D3PD_2MixedFilterStacoCalo"

totalDecision_d3pd_2l = LogicalFilterCombiner("HSG2_2LD3PDFilter",
                                              cmdstring=combination_d3pd_2l)
theJob += totalDecision_d3pd_2l

from HSG2DPDUtils.HSG2D3PD import HSG2physicsD3PD

stream_d3pd_2l = HSG2physicsD3PD("StreamNTUP_2LHSG2",
                                 runArgs.outputNTUP_2LHSG2File)

stream_d3pd_2l.AcceptAlgs = [totalDecision_d3pd_2l.getName()]
Exemple #6
0
# Do the PrimaryVertex selection
#====================================================================
from D2PDMaker.D2PDMakerConf import D2PDVertexSelector
topSequence += D2PDVertexSelector( "VertexSelectorInElLoose18Stream",
                                   OutputLevel          = INFO,
                                   inputCollection      = 'VxPrimaryCandidate',
                                   minNumberVxTracks    = 3
                                   )
algsToBookkeep.append( "VertexSelectorInElLoose18Stream" )

#--------------------------------------------------------------------
# Set up the cumulative cut-flow for the standard pre-selection.
# This will use the Logical Filter Combiners to add individual cuts.
#--------------------------------------------------------------------
cmdString_GRL_PrimVtx = cmdString_GRL + "VertexSelectorInElLoose18Stream"
topSequence += LogicalFilterCombiner( "StreamElLoose18FilterCombiner_GRL_PrimVtx",
                                      cmdstring = cmdString_GRL_PrimVtx )
algsToBookkeep.append( "StreamElLoose18FilterCombiner_GRL_PrimVtx" )






#====================================================================
# Do the trigger selection
#====================================================================
include("PrimaryDPDMaker/SetupTrigDecisionTool.py")
from PrimaryDPDMaker.TriggerFilter import TriggerFilter
topSequence += TriggerFilter( "TriggerFilterInElLoose18Stream_L1_EM14",
                              trigger = "L1_EM14"
                              )
# Do the PrimaryVertex selection
#====================================================================
from D2PDMaker.D2PDMakerConf import D2PDVertexSelector
topSequence += D2PDVertexSelector( "VertexSelectorInWenuStream",
                                   OutputLevel          = INFO,
                                   inputCollection      = 'VxPrimaryCandidate',
                                   minNumberVxTracks    = 3
                                   )
algsToBookkeep.append( "VertexSelectorInWenuStream" )

#--------------------------------------------------------------------
# Set up the cumulative cut-flow for the standard pre-selection.
# This will use the Logical Filter Combiners to add individual cuts.
#--------------------------------------------------------------------
cmdString_GRL_PrimVtx = cmdString_GRL + "VertexSelectorInWenuStream"
topSequence += LogicalFilterCombiner( "StreamWenuFilterCombiner_GRL_PrimVtx",
                                      cmdstring = cmdString_GRL_PrimVtx )
algsToBookkeep.append( "StreamWenuFilterCombiner_GRL_PrimVtx" )






#====================================================================
# Do the trigger selection
#====================================================================
include("PrimaryDPDMaker/SetupTrigDecisionTool.py")
from PrimaryDPDMaker.TriggerFilter import TriggerFilter
topSequence += TriggerFilter( "TriggerFilterInWenuStream_L1_EM10",
                              trigger = "L1_EM10"
                              )
                                                    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()]
Exemple #9
0
                                                   types=["e","e","mu","mu"],\
                                                   collections=[eCollToUse,eCollToUse,"MuidMuonCollection","MuidMuonCollection"],\
                                                   mass=massCut_daod_4l,\
                                                   acceptFrwdE=jobproperties.HSG2.fourLeptonAcceptFrwdE())

theJob += mixedFilterStaco_daod_4l

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

theJob += mixedFilterMuid_daod_4l

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

combination = "HSG2_DAOD_4ElectronFilter or " + "HSG2_DAOD_4StacoMuonFilter or " + "HSG2_DAOD_4MuidMuonFilter or " + "HSG2_DAOD_4MixedFilterStaco or " + "HSG2_DAOD_4MixedFilterMuid"

totalDecision_daod_4l = LogicalFilterCombiner("HSG2_DAOD_4l_Filter",
                                              cmdstring=combination)
theJob += totalDecision_daod_4l

## This handles multiple output streams
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr

from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutHelper

# define streams

#streamOut = MSMgr.NewPoolStream("StreamDAOD_2LHSG2",runArgs.outputDAOD_2LHSG2File)
streamOut_daod_4l = MSMgr.NewPoolStream("StreamDAOD_HSG2",
                                        runArgs.outputDAOD_HSG2File)
streamOut_daod_4l.AcceptAlgs([totalDecision_daod_4l.getName()])
streamOut_daod_4l.AddOtherAlgsToBookkeep([
    "HSG2_DAOD_4ElectronFilter", "HSG2_DAOD_4StacoMuonFilter",