Пример #1
0
import FWCore.ParameterSet.Config as cms



#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *

zMuMuAnalysisConfigurator = CutSequenceProducer(initialCounter  = 'initialZMuMuEvents',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())
zMuMuAnalysisConfigurator.addDiCandidateModule('zMuMuCandidates','PATMuPairProducer', 'patMuonsForAnalysis','patMuonsForAnalysis','patMETs','patOverloadedJets',0,9999,text = '',leadingObjectsOnly = False,dR = 0.15,recoMode = "")
zMuMuAnalysisConfigurator.addSorter('zMuMuCandidatesSorted','PATMuPairSorter')
zMuMuAnalysisConfigurator.addCandidateMETModule('wCands','PATMuonNuPairProducer','patMuonsForAnalysis','patMETs','selectedPatJets',1,9999,'AtLeastOneWCandidate')
zMuMuAnalysisConfigurator.addDiCandidateModule('zwMuMuMuCandidates','PATMuMuMuNuQuadProducer','zMuMuCandidates','wCands','patMETs','patOverloadedJets',0,9999,text = '',leadingObjectsOnly = False,dR = 0.15,recoMode = "")
zMuMuAnalysisConfigurator.addSelector('zMuMuCandidatesID','PATMuMuMuNuQuadSelector','leg1.leg1.userFloat("isWWMuon")&&leg1.leg2.userFloat("isWWMuon")&&leg1.leg1.pt()>15&&leg1.leg2.pt()>15&&abs(leg1.leg1.eta)<2.4&&abs(leg1.leg2.eta)<2.4','ZMuMuID')
zMuMuAnalysisConfigurator.addSelector('wMuCandidatesID','PATMuMuMuNuQuadSelector','leg2.lepton.userFloat("isWWMuon")&&leg2.lepton.pt()>15&&abs(leg2.lepton.eta)<2.4','wMuMuID')
zMuMuAnalysisConfigurator.addSelector('zMuMuCandidatesIsol1','PATMuMuMuNuQuadSelector','(leg1.leg1.chargedHadronIso()+leg1.leg1.photonIso()+leg1.leg1.neutralHadronIso())/leg1.leg1.pt()<0.25','ZMuMuLeg1Iso')
zMuMuAnalysisConfigurator.addSelector('zMuMuCandidatesIsol2','PATMuMuMuNuQuadSelector','(leg1.leg2.chargedHadronIso()+leg1.leg2.photonIso()+leg1.leg2.neutralHadronIso())/leg1.leg2.pt()<0.25','ZMuMuLeg2Iso')
zMuMuAnalysisConfigurator.addSelector('wMuMuCandidatesIsol2','PATMuMuMuNuQuadSelector','(leg2.lepton.chargedHadronIso()+leg2.lepton.photonIso()+leg2.lepton.neutralHadronIso())/leg2.lepton.pt()<0.25','WLegIso')
zMuMuAnalysisConfigurator.addSelector('zMuMuMuCandidates','PATMuMuMuNuQuadSelector','leg1.charge==0','ZMuMuOS',0,100)
#create the sequence
selectionSequence=zMuMuAnalysisConfigurator.returnSequence()




Пример #2
0
import FWCore.ParameterSet.Config as cms



#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *


tagAndProbeConfigurator = CutSequenceProducer(initialCounter  = 'initialTagAndProbeEvents',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())


##Tag and probe 
tagAndProbeConfigurator.addDiCandidateModule('tagAndProbeMuTracks','PATMuTrackPairProducer', 'patMuonsForAnalysis','trackCandidates','patMETs','selectedPatJets',1,9999,text = '',leadingObjectsOnly = True,dR = 0.15,recoMode = "")
tagAndProbeConfigurator.addSelector('selectedTagAndProbeMuTracks','PATMuTrackPairSelector','calibratedMET.pt()<20 && charge==0&&mass>50&&mass<120&&leg1.userFloat("isWWMuon")&&((leg1.chargedHadronIso+leg1.photonIso+leg1.neutralHadronIso)/leg1.pt()<0.2)&&leg1.pt()>25&&leg2.pt()>5&&abs(leg2.eta())<2.4&&abs(leg1.eta())<2.1','tagAndProbePairs',1,100)
tagAndProbeSequence =tagAndProbeConfigurator.returnSequence()




Пример #3
0
import FWCore.ParameterSet.Config as cms


#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *

###############################			Ele-Tau 		###################################
ETanalysisConfigurator = CutSequenceProducer(initialCounter  = 'initialEventsET',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())

#ESTausID
ETanalysisConfigurator.addSmearing('patOverloadedTaus','triggeredPatMuons','triggeredPatElectrons','cleanPatJets','patMVAMet','ET')

#create dielectrons
ETanalysisConfigurator.addDiCandidateModule('diElectrons','PATElePairProducer','smearedElectronsET','smearedElectronsET','smearedMETET','','smearedJetsET',0,9999,text = '',leadingObjectsOnly = False,dR = 0.15,recoMode = "")
ETanalysisConfigurator.addSelector('osDiElectrons','PATElePairSelector','abs(leg1.eta())<2.5&&abs(leg2.eta())<2.5&&abs(leg1.userFloat("ipDXY"))<0.045&&abs(leg2.userFloat("ipDXY"))<0.045&&abs(leg1.userFloat("dz"))<0.2&&abs(leg2.userFloat("dz"))<0.2&&leg1.pt()>15&&leg2.pt()>15&&charge==0&&leg2.userFloat("wp95V")>0&&leg1.userFloat("wp95V")>0&&(leg1.userIso(0)+max(leg1.userIso(1)+leg1.neutralHadronIso()-0.5*leg1.userIso(2),0.0))/leg1.pt()<0.3&&(leg2.userIso(0)+max(leg2.userIso(1)+leg2.neutralHadronIso()-0.5*leg2.userIso(2),0.0))/leg2.pt()<0.3','ZEEVEto',0,100)

#Make DiTaus
ETanalysisConfigurator.addDiCandidateModule('eleTaus','PATEleTauPairProducer','smearedElectronsET','smearedTausET','patMVAMet','smearedTausET','smearedJetsET',1,9999,text = 'AtLeastOneEleTau',leadingObjectsOnly = False,dR = 0.5,recoMode = "",genParticles='genDaughters')

ETanalysisConfigurator.addSelector('eleTausEleID',
                                'PATEleTauPairSelector',
                                '(abs(leg1.superCluster().eta())<0.8&&leg1.electronID("mvaNonTrigV0")>0.925)||(abs(leg1.superCluster().eta())<1.479&&leg1.electronID("mvaNonTrigV0")>0.975)||(leg1.electronID("mvaNonTrigV0")>0.985)',
                                'ElectronID',1)
ETanalysisConfigurator.addSelector('eleTausEleConvRej','PATEleTauPairSelector','leg1.userInt("missingHits")==0&&!(leg1.userInt("HasMatchedConversion")>0)','electronConvRej',1)
ETanalysisConfigurator.addSelector('eleTausElePtEta',
                                'PATEleTauPairSelector',
                                'leg1.pt()>20&&abs(leg1.eta())<2.1&&abs(leg1.userFloat("dz"))<0.2&&abs(leg1.userFloat("ipDXY"))<0.045','electronPtEta',1)
ETanalysisConfigurator.addSelector('eleTausEleIsolationLoose','PATEleTauPairSelector','(leg1.userIso(0)+max(leg1.userIso(1)+leg1.neutralHadronIso()-0.5*leg1.userIso(2),0.0))/leg1.pt()<0.5','electronIsolationLoose',1)
ETanalysisConfigurator.addSelector('eleTausTauPtEta',
Пример #4
0
######################__________________________________MNJ_____________________________________##############################

MNJanalysisConfigurator = CutSequenceProducer(initialCounter  = 'initialEventsMNJ',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())

MNJanalysisConfigurator.addSmearing('cleanPatTaus','cleanPatMuons','cleanPatElectrons','patJetsForAnalysis','systematicsMET','default','MNJ')


#Make Muons+MET
MNJanalysisConfigurator.addCandidateMETModule('wCands','PATMuonNuPairProducer','smearedMuonsMNJ','smearedMETMNJ','smearedJetsMNJ',1,9999,'AtLeastOneWCandidate',genParticles="genDaughters")
#MNJanalysisConfigurator.addSelector('wCandsTight','PATMuonNuPairSelector',munuTight,'tightID',1)
MNJanalysisConfigurator.addSelector('wCandsKIN','PATMuonNuPairSelector',munuKIN,'wCandsKIN',1)
MNJanalysisConfigurator.addSelector('wCandsSel','PATMuonNuPairSelector',munuSel,'wCandsSel',1)

MNJanalysisConfigurator.addDiCandidateModule('diMuons','PATMuPairProducer', 'smearedMuonsMNJ','cleanPatMuons','smearedMETMNJ','smearedJetsMNJ',0,9999,text = '',dR=0.5,recoMode = "")
MNJanalysisConfigurator.addSelector('diMuonsSel','PATMuPairSelector',DiMuonPreSel+'&&'+DiMuonPreSel2+'&&'+DiMuonPreSel3,'diMuonSel',0,0)
MNJanalysisConfigurator.addSorter('diMuonsSorted','PATMuPairSorter')


#create the sequence
MNJselectionSequence =MNJanalysisConfigurator.returnSequence()

######################__________________________________ENJ_____________________________________##############################

ENJanalysisConfigurator = CutSequenceProducer(initialCounter  = 'initialEventsENJ',
                                  pyModuleName = __name__,                                  pyNameSpace  = locals())

ENJanalysisConfigurator.addSmearing('cleanPatTaus','cleanPatMuons','cleanPatElectrons','patJetsForAnalysis','systematicsMET','default','ENJ')

#Make Di Muons to VETO DY
######################__________________________________MNBB_____________________________________##############################

MNBBanalysisConfigurator = CutSequenceProducer(
    initialCounter="initialEventsMNBB", pyModuleName=__name__, pyNameSpace=locals()
)


# Make Di Muons to VETO DY
MNBBanalysisConfigurator.addDiCandidateModule(
    "diMuons",
    "PATMuPairProducer",
    "cleanPatMuons",
    "cleanPatMuons",
    "systematicsMET",
    "patJetsForAnalysis",
    0,
    9999,
    text="",
    dR=0.5,
    recoMode="",
    genParticles="genDaughters",
)
MNBBanalysisConfigurator.addSelector(
    "diMuonsSel", "PATMuPairSelector", DiMuonPreSel + "&&" + DiMuonPreSel2 + "&&" + DiMuonPreSel3, "diMuonSel", 0, 999
)
MNBBanalysisConfigurator.addSorter("diMuonsSorted", "PATMuPairSorter")

# Make Muons+MET
MNBBanalysisConfigurator.addCandidateMETModule(
    "wCands",
    "PATMuonNuPairProducer",

##Tag and probe electron+SC
#tagAndProbeConfigurator2.addDiCandidateModule('tagAndProbeEleSCs','PATEleSCPairProducer', 'triggeredPatElectrons','superClusterCands','systematicsMET','cleanPatJets',1,9999,text = '',leadingObjectsOnly = True,dR = 0.5,recoMode = "")
#tagAndProbeConfigurator2.addSorter('eleSCsSorted','PATEleSCPairSorter')
#tagAndProbeConfigurator2.addSelector('selectedTagAndProbeEleSCs','PATEleSCPairSelector','calibratedMET.pt()<20 && abs(leg1.eta())<2.5&&abs(leg2.eta())<2.5&&leg1.pt()>20&&leg2.pt()>5&&mass>50&&mass<120&&leg1.userFloat("WWID")>0&&(leg1.chargedHadronIso+leg1.photonIso+leg1.neutralHadronIso())/leg1.pt()<0.1','tagAndProbeEleSCs',0,100)
#tagAndProbeSequenceEleSCs =tagAndProbeConfigurator2.returnSequence()



#Tag and probe electron+electron
tagAndProbeConfigurator3 = CutSequenceProducer(initialCounter  = 'initialTagAndProbeEvents3',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())

tagAndProbeConfigurator3.addDiCandidateModule('tagAndProbeDiElectrons','PATElePairProducer', 'triggeredPatElectrons','triggeredPatElectrons','systematicsMET','cleanPatJets',0,9999,text = '',leadingObjectsOnly = False,dR = 0.15,recoMode = "")
tagAndProbeConfigurator3.addSorter('dielectronsSortedByZMass','PATElePairSorterByZMass')
tagAndProbeConfigurator3.addSelector('selectedTagAndProbeDiElectrons','PATElePairSelector','calibratedMET.pt()<20&&leg1.pt()>20&&leg2.pt()>5&&charge==0&&(leg1.userIso(0)+max(0.0, leg1.userIso(1)+leg1.neutralHadronIso()-0.5*leg1.userIso(2)))/leg1.pt()<0.10&&leg1.userFloat("WWID")>0&&abs(leg1.eta())<2.5','EEss',0,100)
tagAndProbeSequenceDiElectrons =tagAndProbeConfigurator3.returnSequence()

# tagAndProbeConfigurator4 = CutSequenceProducer(initialCounter  = 'initialTagAndProbeEvents4',
#                                   pyModuleName = __name__,
#                                   pyNameSpace  = locals())
#                                   
# ##Tag and probe electron+Tau
# tagAndProbeConfigurator4.addDiCandidateModule('tagAndProbeEleTaus','PATEleTauPairProducer', 'triggeredPatElectrons','triggeredPatTaus','systematicsMET','cleanPatJets',1,9999,text = '',leadingObjectsOnly = True,dR = 0.15,recoMode = "")
# tagAndProbeConfigurator4.addSelector('selectedTagAndProbeEleTaus','PATEleTauPairSelector','abs(leg2.eta())<2.1&&(!(abs(leg2.eta())>1.442&&abs(leg2.eta())<1.566))&&leg1.pt()>15&&charge==0&&leg2.pt()>5&&mass>15&&mass<120&&leg1.userFloat("WWID")>0&&(leg1.chargedHadronIso+leg1.photonIso+leg1.neutralHadronIso)/leg1.pt()<0.1&&(leg2.userFloat("hltOverlapFilterIsoEle15IsoPFTau20")+leg2.userFloat("hltOverlapFilterIsoEle15IsoPFTau15")+leg2.userFloat("hltOverlapFilterIsoEle15TightIsoPFTau20")+leg2.userFloat("hltOverlapFilterIsoEle18MediumIsoPFTau20")+leg2.userFloat("hltOverlapFilterIsoEle20MediumIsoPFTau20"))>0.5','tagAndProbeEleTracks',0,100)
# 
# tagAndProbeSequenceEleTaus =tagAndProbeConfigurator4.returnSequence()

Пример #7
0
import FWCore.ParameterSet.Config as cms



#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *


analysisConfigurator = CutSequenceProducer(initialCounter  = 'initialEvents',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())


#Make Di Muons to VETO DY
analysisConfigurator.addDiCandidateModule('diMuons','PATMuPairProducer', 'patMuonsForAnalysis','patMuonsForAnalysis','patMETs','selectedPatJets',0,9999,text = '',leadingObjectsOnly = True,dR = 0.15,recoMode = "")
analysisConfigurator.addSorter('diMuonsSorted','PATMuPairSorter')

#Make Muons+MET
analysisConfigurator.addCandidateMETModule('wCands','PATMuonNuPairProducer','patMuonsForAnalysis','patMETs','selectedPatJets',1,9999,'AtLeastOneWCandidate')
analysisConfigurator.addSelector('wCandsGoodMuon','PATMuonNuPairSelector','lepton.pt()>10&&abs(lepton.eta())<2.4','OneLeptonInAcceptance',1)
#analysisConfigurator.addSorter('diTausSorted','PATMuTauPairSorter')


#make Gen Ws
analysisConfigurator.addCandidateMETModule('wGenCands','PATCandNuPairProducer','genMuons','genNeutrinos','selectedPatJets',0,9999,'')
selectionSequence =analysisConfigurator.returnSequence()




Пример #8
0
import FWCore.ParameterSet.Config as cms



#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *

zEleEleAnalysisConfigurator = CutSequenceProducer(initialCounter  = 'initialZEleEleEvents',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())
zEleEleAnalysisConfigurator.addDiCandidateModule('zEleEleCandidates','PATElePairProducer', 'convRejElectrons','convRejElectrons','patMETs','selectedPatJets',0,9999,text = '',leadingObjectsOnly = False,dR = 0.15,recoMode = "")
zEleEleAnalysisConfigurator.addSorter('zEleEleCandidatesSorted','PATElePairSorter')
zEleEleAnalysisConfigurator.addSelector('zEleEleCandidatesID','PATElePairSelector','leg1.userFloat("WWID")>0&&leg2.userFloat("WWID")>0 &&leg1.pt()>15&&leg2.pt()>15','ZEleEleID')
# zEleEleAnalysisConfigurator.addEleEleSVFit('zEleEleCandidatesSVFit')
zEleEleAnalysisConfigurator.addSelector('zEleEleCandidatesIsol1','PATElePairSelector','leg1.dr03TkSumPt()/leg1.pt()<0.25','ZEleEleLeg1Iso')
zEleEleAnalysisConfigurator.addSelector('zEleEleCandidatesIsol2','PATElePairSelector','leg1.dr03TkSumPt()/leg2.pt()<0.25','ZEleEleLeg2Iso')
zEleEleAnalysisConfigurator.addSelector('zEleEleCandidatesOS','PATElePairSelector','charge==0','ZEleEleOS',0,100)
#create the sequence
zEleEleSelectionSequence=zEleEleAnalysisConfigurator.returnSequence()




import FWCore.ParameterSet.Config as cms



#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *


tagAndProbeConfigurator = CutSequenceProducer(initialCounter  = 'initialTagAndProbeEvents',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())


##Tag and probe 
tagAndProbeConfigurator.addDiCandidateModule('tagAndProbeMuTracks','PATMuPairProducer', 'triggeredPatMuons','triggeredPatMuons','systematicsMET','selectedPatJets',1,9999,text = '',leadingObjectsOnly = True,dR = 0.15,recoMode = "")
#tagAndProbeConfigurator.addSelector('selectedTagAndProbeMuTracks','PATMuPairSelector','calibratedMET.pt()<20 && charge==0&&mass>50&&mass<120&&leg1.userFloat("isWWMuon")&&((leg1.chargedHadronIso+leg1.photonIso+leg1.neutralHadronIso)/leg1.pt()<0.2)&&leg1.pt()>25&&leg2.pt()>5&&abs(leg2.eta())<2.4&&abs(leg1.eta())<2.1','tagAndProbePairs',1,100)
tagAndProbeConfigurator.addSorter('dimuonsSortedByZMass','PATMuPairSorterByZMass')
tagAndProbeConfigurator.addSelector('selectedTagAndProbeMuTracks','PATMuPairSelector','calibratedMET.pt()<20&&charge==0&&mass>50&&mass<120&&leg1.pt()>25&&leg2.pt()>5&&abs(leg2.eta())<2.4&&abs(leg1.eta())<2.1','tagAndProbePairs',1,100)
tagAndProbeSequence =tagAndProbeConfigurator.returnSequence()




Пример #10
0
import FWCore.ParameterSet.Config as cms


# Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *

zMuMuAnalysisConfigurator = CutSequenceProducer(
    initialCounter="initialZMuMuEvents", pyModuleName=__name__, pyNameSpace=locals()
)
zMuMuAnalysisConfigurator.addDiCandidateModule(
    "zMuMuCandidates",
    "PATMuPairProducer",
    "patMuonsForAnalysis",
    "patMuonsForAnalysis",
    "patMETs",
    "patOverloadedJets",
    0,
    9999,
    text="",
    leadingObjectsOnly=False,
    dR=0.15,
    recoMode="",
)
zMuMuAnalysisConfigurator.addSorter("zMuMuCandidatesSorted", "PATMuPairSorter")
zMuMuAnalysisConfigurator.addSelector(
    "zMuMuCandidatesID",
    "PATMuPairSelector",
    'leg1.userFloat("isWWMuon")&&leg2.userFloat("isWWMuon")&&leg1.pt()>15&&leg2.pt()>15&&abs(leg1.eta)<2.4&&abs(leg2.eta)<2.4',
    "ZMuMuID",
)
zMuMuAnalysisConfigurator.addSelector(
    "zMuMuCandidatesIsol1",
Пример #11
0
import FWCore.ParameterSet.Config as cms

#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *

tagAndProbeConfigurator = CutSequenceProducer(
    initialCounter='initialTagAndProbeEvents',
    pyModuleName=__name__,
    pyNameSpace=locals())

##Tag and probe
tagAndProbeConfigurator.addDiCandidateModule('tagAndProbeMuTracks',
                                             'PATMuTrackPairProducer',
                                             'patMuonsForAnalysis',
                                             'trackCandidates',
                                             'patMETs',
                                             'selectedPatJets',
                                             1,
                                             9999,
                                             text='',
                                             leadingObjectsOnly=True,
                                             dR=0.15,
                                             recoMode="")
tagAndProbeConfigurator.addSelector(
    'selectedTagAndProbeMuTracks', 'PATMuTrackPairSelector',
    'calibratedMET.pt()<20 && charge==0&&mass>50&&mass<120&&leg1.userFloat("isWWMuon")&&((leg1.chargedHadronIso+leg1.photonIso+leg1.neutralHadronIso)/leg1.pt()<0.2)&&leg1.pt()>25&&leg2.pt()>5&&abs(leg2.eta())<2.4&&abs(leg1.eta())<2.1',
    'tagAndProbePairs', 1, 100)
tagAndProbeSequence = tagAndProbeConfigurator.returnSequence()
Пример #12
0
import FWCore.ParameterSet.Config as cms



#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *


tagAndProbeConfigurator = CutSequenceProducer(initialCounter  = 'initialTagAndProbeEvents',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())


##Tag and probe 
tagAndProbeConfigurator.addDiCandidateModule('tagAndProbePairs','PATEleTrackPairProducer', 'convRejElectrons','trackCandidates','patMETs','selectedPatJets',1,9999,text = '',leadingObjectsOnly = True,dR = 0.15,recoMode = "")
tagAndProbeConfigurator.addSelector('selectedTagAndProbeMuTracks','PATEleTrackPairSelector','leg1.pt()>5&&abs(leg2.eta())<2.4&&abs(leg1.eta())<2.1','tagAndProbePairs',1,100)
tagAndProbeSequence =tagAndProbeConfigurator.returnSequence()




Пример #13
0
#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *


analysisConfigurator = CutSequenceProducer(initialCounter  = 'initialEvents',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())


DiMuonPreSel='leg1.isGlobalMuon && leg1.isTrackerMuon && leg2.isGlobalMuon && leg2.isTrackerMuon && leg1.pt()>20 && leg2.pt()>20'
DiMuonPreSel2='(leg1.isolationR03().sumPt+leg1.isolationR03().emEt+leg1.isolationR03().hadEt)/leg1.pt()<0.15 '
DiMuonPreSel3='(leg2.isolationR03().sumPt+leg2.isolationR03().emEt+leg2.isolationR03().hadEt)/leg2.pt()<0.15 '


#Make Di Muons to VETO DY
analysisConfigurator.addDiCandidateModule('diMuons','PATMuPairProducer', 'cleanPatMuons','cleanPatMuons','systematicsMET','cleanPatJets',0,9999,text = '',leadingObjectsOnly = True,dR = 0.15,recoMode = "")
analysisConfigurator.addSelector('diMuonsSel','PATMuPairSelector',DiMuonPreSel+'&&'+DiMuonPreSel2+'&&'+DiMuonPreSel3,'diMuonSel',0,999)
analysisConfigurator.addSorter('diMuonsSorted','PATMuPairSorter')


#Make Muons+MET
analysisConfigurator.addCandidateMETModule('wCands','PATMuonNuPairProducer','cleanPatMuons','systematicsMET','cleanPatJets',1,9999,'AtLeastOneWCandidate',genParticles="genDaughters")
#analysisConfigurator.addCandidateMETModule('wGenCands','PATCandNuPairProducer','genMuons','genNeutrinos','cleanPatJets',0,9999,'')

analysisConfigurator.addSelector('wCandsKIN','PATMuonNuPairSelector','lepton.pt()>25 && abs(lepton.eta())<2.1','wCandsKIN',1)
analysisConfigurator.addSelector('wCandsJets','PATMuonNuPairSelector','lepton.userInt("WWID2011")==1','wCandsSel',1)
#analysisConfigurator.addGeneric('wCandsJetFetch','MuonNuPairJetFetcher')
#analysisConfigurator.addSelector('wCandsJetSel','PATMuonNuPairSelector','pt>20&&abs(eta)<2.5&&nConstituents>1&&neutralHadronEnergyFraction<0.99&&neutralEmEnergyFraction<0.99&&chargedMultiplicity>0&&chargedHadronEnergyFraction>0.0&&chargedEmEnergyFraction<0.99','wCandsJets',1)
#analysisConfigurator.addSelector('wCandsJets','PATMuonNuPairSelector','nJets>1','wCandsJets',1)

#
Пример #14
0
import FWCore.ParameterSet.Config as cms

#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *

zMuMuAnalysisConfigurator = CutSequenceProducer(
    initialCounter='initialZMuMuEvents',
    pyModuleName=__name__,
    pyNameSpace=locals())
zMuMuAnalysisConfigurator.addDiCandidateModule('zMuMuCandidates',
                                               'PATMuPairProducer',
                                               'patMuonsForAnalysis',
                                               'patMuonsForAnalysis',
                                               'patMETs',
                                               'patOverloadedJets',
                                               0,
                                               9999,
                                               text='',
                                               leadingObjectsOnly=False,
                                               dR=0.15,
                                               recoMode="")
zMuMuAnalysisConfigurator.addSorter('zMuMuCandidatesSorted', 'PATMuPairSorter')
zMuMuAnalysisConfigurator.addSelector(
    'zMuMuCandidatesID', 'PATMuPairSelector',
    'leg1.userFloat("isWWMuon")&&leg2.userFloat("isWWMuon")&&leg1.pt()>15&&leg2.pt()>15&&abs(leg1.eta)<2.4&&abs(leg2.eta)<2.4',
    'ZMuMuID')
zMuMuAnalysisConfigurator.addSelector(
    'zMuMuCandidatesIsol1', 'PATMuPairSelector',
    '(leg1.chargedHadronIso()+leg1.photonIso()+leg1.neutralHadronIso())/leg1.pt()<0.25',
    'ZMuMuLeg1Iso')
zMuMuAnalysisConfigurator.addSelector(
Пример #15
0
import FWCore.ParameterSet.Config as cms

#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *

analysisConfigurator = CutSequenceProducer(initialCounter  = 'initialEvents',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())
#Add smearing
analysisConfigurator.addSmearing('patOverloadedTaus','patMuonsForAnalysis','convRejElectrons','selectedPatJets')
#Create di muon OS pairs 
analysisConfigurator.addDiCandidateModule('diMuons','PATMuPairProducer', 'smearedMuons','smearedMuons','smearedMET','smearedJets',1)
#Require they are OS and at least Global muons
analysisConfigurator.addSelector('osDiMuons','PATMuPairSelector','charge==0&&leg1.isGlobalMuon&&leg2.isGlobalMuon&& mass>60','DiMuonCreation',1)
#Make DiTaus
analysisConfigurator.addDiCandidateModule('diTaus','PATDiTauPairProducer','smearedTaus','smearedTaus','smearedMET','smearedJets',1,9999,text='AtLeastOneDiTau',leadingObjectsOnly = False,dR = 0.5,recoMode ="",genParticles='genDaughters')
#Combine and create zz candidates
analysisConfigurator.addDiCandidateModule('zzCands','PATMuMuTauTauQuadProducer','osDiMuons','diTaus','smearedMET','smearedJets',1,9999,text='AtLeastOneZZ',leadingObjectsOnly = False,dR = 0.5,recoMode ="",genParticles='genDaughters')
#cross clean the legs of the ZZ (i.e the two Zs by product ID and DeltaR
analysisConfigurator.addCrossCleanerModule('zzCleanedCands','PATMuMuTauTauQuadCrossCleaner',1,9999,text='AtLeastOneZZCleanedCandidate',dR = 0.1)
analysisConfigurator.addSelector('zzCleanedMuID','PATMuMuTauTauQuadSelector','leg1.leg1.userFloat("isWWMuon")&&leg1.leg2.userFloat("isWWMuon")','WWMuonID')
analysisConfigurator.addSelector('zzCleanedMuIso','PATMuMuTauTauQuadSelector','(leg1.leg1.isolationR03.sumPt+leg1.leg1.isolationR03.emEt+leg1.leg1.isolationR03.hadEt)/leg1.leg1.pt()<0.2&&(leg1.leg2.isolationR03.sumPt+leg1.leg2.isolationR03.emEt+leg1.leg2.isolationR03.hadEt)/leg1.leg2.pt()<0.2','LooseMuIso')
#Sort your ZZ candidates by higher Z1 Pt + Z2 Pt 
analysisConfigurator.addSorter('zzCleanedCandsSorted','PATMuMuTauTauQuadSorter')

#JustIllustrate a selector (i.e require that pt of all legs is above a threshold
analysisConfigurator.addSelector('zzCleanedCandsAboveThreshold','PATMuMuTauTauQuadSelector','leg1().leg1().pt()>10 && leg1().leg2().pt()>10 && leg2().leg1().pt()>10 &&leg2().leg2().pt()>10','AtLeastOneZZCandOverThresholds')
#Apply loose tau ID
analysisConfigurator.addSelector('zzCleanedCandsTauID','PATMuMuTauTauQuadSelector','leg2.leg1.tauID("decayModeFinding")&&leg2.leg2.tauID("decayModeFinding")','DecayModeFinding')
analysisConfigurator.addSelector('zzCleanedCandsTauIso','PATMuMuTauTauQuadSelector','leg2.leg1.tauID("byVLooseIsolation")&&leg2.leg2.tauID("byVLooseIsolation")','TauIsolation')
analysisConfigurator.addSelector('zzCleanedCandsMuRej','PATMuMuTauTauQuadSelector','leg2.leg1.tauID("againstMuonLoose")&&leg2.leg2.tauID("againstMuonLoose")','TauMuRejection')
Пример #16
0
import FWCore.ParameterSet.Config as cms

from UWAnalysis.Configuration.tools.CutSequenceProducer import *

MC2011TriggerPaths=["HLT_Mu17_Mu8","HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL"]
DATA2011TriggerPaths=["HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL","HLT_Ele17_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL_Ele8_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL","HLT_Mu17_Mu8","HLT_DoubleMu7","HLT_Mu13_Mu8"]
DATAMC2012TriggerPaths=["HLT_Mu17_Mu8","HLT_Mu17_TkMu8","HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL","HLT_Mu8_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL","HLT_Mu17_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL","HLT_Ele15_Ele8_Ele5_CaloIdL_TrkIdVL"]


#MM
ZMM = CutSequenceProducer(initialCounter  = 'initialEventsZMM',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())
ZMM.addDiCandidateModule('ZMMInit','PATMuPairProducer', 'looseMuons','looseMuons','systematicsMET','selectedPatJets',1,genParticles='genDaughters')
ZMM.addSelector('ZMMSel','PATMuPairSelector','mass>40&&charge==0&&leg1.pfCandidateRef().isNonnull()&&(leg1.isGlobalMuon()||leg1.isTrackerMuon())&&abs(leg1.eta())<2.4 && leg1.pt()>5 && abs(leg1.userFloat("ip3DS"))<4 && abs(leg1.userFloat("ipDXY"))<0.5 && abs(leg1.userFloat("dz"))<1.0&&leg2.pfCandidateRef().isNonnull()&&(leg2.isGlobalMuon()||leg2.isTrackerMuon())&&abs(leg2.eta())<2.4 && leg2.pt()>5 && abs(leg2.userFloat("ip3DS"))<4 && abs(leg2.userFloat("ipDXY"))<0.5 && abs(leg2.userFloat("dz"))<1.0  ','one Z1 mmm',1)
ZMM.addSelector('ZMMIso','PATMuPairSelector','(leg1.chargedHadronIso()+max(0.0,leg1.neutralHadronIso()+leg1.photonIso()-leg1.userFloat("zzRho2012")*leg1.userFloat("effArea")))/leg1.pt<0.40 && (leg2.chargedHadronIso()+max(0.0,leg2.neutralHadronIso()+leg2.photonIso()-leg2.userFloat("zzRho2012")*leg2.userFloat("effArea")))/leg2.pt<0.40','MMMLeadingZMuIso')
ZMM.addSorter('ZMMFinal',"PATMuPairSorter")
ZMMSeq = ZMM.returnSequence()

#EE
ZEE = CutSequenceProducer(initialCounter  = 'initialEventsZEE',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())
ZEE.addDiCandidateModule('ZEEInit','PATElePairProducer', 'looseElectrons','looseElectrons','systematicsMET','selectedPatJets',1,genParticles='genDaughters')
ZEE.addSelector('ZEESel','PATElePairSelector','mass>40&&charge==0&&leg1.userFloat("mvaNonTrigV0Pass")>0 && leg1.gsfTrack().trackerExpectedHitsInner().numberOfHits()<2 && leg1.pt()>7 && abs(leg1.eta())<2.5 && abs(leg1.userFloat("ip3DS"))<4 && abs(leg1.userFloat("ipDXY"))<0.5 && abs(leg1.userFloat("dz"))<1.0 && leg2.userFloat("mvaNonTrigV0Pass")>0 && leg2.gsfTrack().trackerExpectedHitsInner().numberOfHits()<2 && leg2.pt()>7 && abs(leg2.eta())<2.5 && abs(leg2.userFloat("ip3DS"))<4 && abs(leg2.userFloat("ipDXY"))<0.5 && abs(leg2.userFloat("dz"))<1.0','one Z1 eem',1)
ZEE.addSelector('ZEEIso','PATElePairSelector','(leg1.chargedHadronIso()+max(0.0,leg1.neutralHadronIso()+leg1.photonIso()-leg1.userFloat("zzRho2012")*leg1.userFloat("effArea")))/leg1.pt<0.40 && (leg2.chargedHadronIso()+max(0.0,leg2.neutralHadronIso()+leg2.photonIso()-leg2.userFloat("zzRho2012")*leg2.userFloat("effArea")))/leg2.pt<0.40','EEMLeadingZMuIso')
ZEE.addSorter('ZEEFinal',"PATElePairSorter")
ZEESeq = ZEE.returnSequence()

#MMM tri
MMMtri = CutSequenceProducer(initialCounter  = 'initialEventsMMM',
Пример #17
0
                                             pyModuleName=__name__,
                                             pyNameSpace=locals())

#ESTausID
ETanalysisConfigurator.addSmearing('patOverloadedTaus', 'triggeredPatMuons',
                                   'triggeredPatElectrons', 'cleanPatJets',
                                   'patMVAMet', 'ET')

#create dielectrons
ETanalysisConfigurator.addDiCandidateModule('diElectrons',
                                            'PATElePairProducer',
                                            'smearedElectronsET',
                                            'smearedElectronsET',
                                            'smearedMETET',
                                            '',
                                            'smearedJetsET',
                                            0,
                                            9999,
                                            text='',
                                            leadingObjectsOnly=False,
                                            dR=0.15,
                                            recoMode="")
ETanalysisConfigurator.addSelector(
    'osDiElectrons', 'PATElePairSelector',
    'abs(leg1.eta())<2.5&&abs(leg2.eta())<2.5&&abs(leg1.userFloat("ipDXY"))<0.045&&abs(leg2.userFloat("ipDXY"))<0.045&&abs(leg1.userFloat("dz"))<0.2&&abs(leg2.userFloat("dz"))<0.2&&leg1.pt()>15&&leg2.pt()>15&&charge==0&&leg2.userFloat("wp95V")>0&&leg1.userFloat("wp95V")>0&&(leg1.userIso(0)+max(leg1.userIso(1)+leg1.neutralHadronIso()-0.5*leg1.userIso(2),0.0))/leg1.pt()<0.3&&(leg2.userIso(0)+max(leg2.userIso(1)+leg2.neutralHadronIso()-0.5*leg2.userIso(2),0.0))/leg2.pt()<0.3',
    'ZEEVEto', 0, 100)

#Make DiTaus
ETanalysisConfigurator.addDiCandidateModule('eleTaus',
                                            'PATEleTauPairProducer',
                                            'smearedElectronsET',
Пример #18
0
import FWCore.ParameterSet.Config as cms

#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *

tagAndProbeConfigurator = CutSequenceProducer(initialCounter='initialEvents',
                                              pyModuleName=__name__,
                                              pyNameSpace=locals())

##Tag and probe electron+GSF track
tagAndProbeConfigurator.addDiCandidateModule('tagAndProbeEleTracks',
                                             'PATEleTrackPairProducer',
                                             'convRejElectrons',
                                             'gsfTrackCandidates',
                                             'patMETs',
                                             'selectedPatJets',
                                             1,
                                             9999,
                                             text='',
                                             leadingObjectsOnly=True,
                                             dR=0.15,
                                             recoMode="")
tagAndProbeConfigurator.addSorter('eleTracksSorted', 'PATEleTrackPairSorter')
tagAndProbeConfigurator.addSelector(
    'selectedTagAndProbeEleTracks', 'PATEleTrackPairSelector',
    'abs(leg2.eta())<2.1&&(!(abs(leg2.eta())>1.442&&abs(leg2.eta())<1.566))&&leg1.pt()>15&&charge==0&&leg2.pt()>5&&mass>15&&mass<120&&leg1.userFloat("WWID")>0&&(leg1.chargedHadronIso+leg1.photonIso+leg1.neutralHadronIso)/leg1.pt()<0.1',
    'tagAndProbeEleTracks', 0, 100)

tagAndProbeSequenceEleTracks = tagAndProbeConfigurator.returnSequence()

##Tag and probe electron+SC
tagAndProbeConfigurator2 = CutSequenceProducer(
Пример #19
0



#Make Di Muons to VETO DY
#MNJanalysisConfigurator.addDiCandidateModule('diMuons','PATMuPairProducer', 'patMuonsForAnalysis','patMuonsForAnalysis','patMETs','patJetsForAnalysis',0,9999,text = '',dR=0.5,recoMode = "")
#MNJanalysisConfigurator.addSelector('diMuonsSel','PATMuPairSelector',DiMuonPreSel+'&&'+DiMuonPreSel2+'&&'+DiMuonPreSel3,'diMuonSel',0,999)
#MNJanalysisConfigurator.addSorter('diMuonsSorted','PATMuPairSorter')

#Make Muons+MET
MNJanalysisConfigurator.addCandidateMETModule('wCands','PATMuonNuPairProducer','patMuonsForAnalysis','patMETs','patJetsForAnalysis',1,9999,'AtLeastOneWCandidate',genParticles="genDaughters")
#MNJanalysisConfigurator.addSelector('wCandsTight','PATMuonNuPairSelector',munuTight,'tightID',1)
MNJanalysisConfigurator.addSelector('wCandsKIN','PATMuonNuPairSelector',munuKIN,'wCandsKIN',1)
MNJanalysisConfigurator.addSelector('wCandsSel','PATMuonNuPairSelector',munuSel,'wCandsSel',1)

MNJanalysisConfigurator.addDiCandidateModule('diMuons','PATMuPairProducer', 'patMuonsForAnalysis','patMuonsForAnalysis','patMETs','patJetsForAnalysis',0,9999,text = '',dR=0.5,recoMode = "")
MNJanalysisConfigurator.addSelector('diMuonsSel','PATMuPairSelector',DiMuonPreSel+'&&'+DiMuonPreSel2+'&&'+DiMuonPreSel3,'diMuonSel',0,999)
MNJanalysisConfigurator.addSorter('diMuonsSorted','PATMuPairSorter')




#create the sequence
MNJselectionSequence =MNJanalysisConfigurator.returnSequence()

######################__________________________________ENJ_____________________________________##############################

ENJanalysisConfigurator = CutSequenceProducer(initialCounter  = 'initialEventsENJ',
                                  pyModuleName = __name__,                                  pyNameSpace  = locals())

#Make Di Muons to VETO DY
Пример #20
0

jetKIN='leg1.pt>20 && leg2.pt> 20 && abs(leg1.eta)<2.4 && abs(leg2.eta)<2.4'


######################__________________________________MNBB_____________________________________##############################

MNBBanalysisConfigurator = CutSequenceProducer(initialCounter  = 'initialEventsMNBB',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())




#Make Di Muons to VETO DY
MNBBanalysisConfigurator.addDiCandidateModule('diMuons','PATMuPairProducer', 'patMuonsForAnalysis','patMuonsForAnalysis','patMETs','patJetsForAnalysis',0,9999,text = '',dR=0.5,recoMode = "",genParticles = "genDaughters")
MNBBanalysisConfigurator.addSelector('diMuonsSel','PATMuPairSelector',DiMuonPreSel+'&&'+DiMuonPreSel2+'&&'+DiMuonPreSel3,'diMuonSel',0,999)
MNBBanalysisConfigurator.addSorter('diMuonsSorted','PATMuPairSorter')

#Make Muons+MET
MNBBanalysisConfigurator.addCandidateMETModule('wCands','PATMuonNuPairProducer','patMuonsForAnalysis','patMETs','patJetsForAnalysis',1,9999,'AtLeastOneWCandidate',genParticles="genDaughters")
#MNBBanalysisConfigurator.addSelector('wCandsTight','PATMuonNuPairSelector',munuTight,'tightID',1)
MNBBanalysisConfigurator.addSelector('wCandsKIN','PATMuonNuPairSelector',munuKIN,'wCandsKIN',1)
MNBBanalysisConfigurator.addSelector('wCandsSel','PATMuonNuPairSelector',munuSel,'wCandsSel',1)

#Make Di Jets
MNBBanalysisConfigurator.addDiCandidateModule('diJets','PATJetPairProducer', 'patJetsForAnalysis','patJetsForAnalysis','patMETs','patJetsForAnalysis',1,9999,leadingObjectsOnly = True,dR = 0.5,recoMode = "",genParticles = "genDaughters")
MNBBanalysisConfigurator.addSelector('diJetsKIN','PATJetPairSelector',jetKIN,'JetEtKIN',1,999)
MNBBanalysisConfigurator.addSelector('diJetsSel','PATJetPairSelector','','JetEtSel',1,999)
MNBBanalysisConfigurator.addSorter('diJetsSorted','PATJetPairSorter')
Пример #21
0
import FWCore.ParameterSet.Config as cms



#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *


tagAndProbeConfigurator = CutSequenceProducer(initialCounter  = 'initialEvents',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())


##Tag and probe electron+GSF track
tagAndProbeConfigurator.addDiCandidateModule('tagAndProbeEleTracks','PATEleTrackPairProducer', 'convRejElectrons','gsfTrackCandidates','patMETs','selectedPatJets',1,9999,text = '',leadingObjectsOnly = True,dR = 0.15,recoMode = "")
tagAndProbeConfigurator.addSorter('eleTracksSorted','PATEleTrackPairSorter')
tagAndProbeConfigurator.addSelector('selectedTagAndProbeEleTracks','PATEleTrackPairSelector','abs(leg2.eta())<2.1&&(!(abs(leg2.eta())>1.442&&abs(leg2.eta())<1.566))&&leg1.pt()>15&&charge==0&&leg2.pt()>5&&mass>15&&mass<120&&leg1.userFloat("WWID")>0&&(leg1.chargedHadronIso+leg1.photonIso+leg1.neutralHadronIso)/leg1.pt()<0.1','tagAndProbeEleTracks',0,100)

tagAndProbeSequenceEleTracks =tagAndProbeConfigurator.returnSequence()


##Tag and probe electron+SC
tagAndProbeConfigurator2 = CutSequenceProducer(initialCounter  = 'initialTagAndProbeEvents2',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())


##Tag and probe electron+SC
tagAndProbeConfigurator2.addDiCandidateModule('tagAndProbeEleSCs','PATEleSCPairProducer', 'convRejElectrons','superClusterCands','patMETs','selectedPatJets',1,9999,text = '',leadingObjectsOnly = True,dR = 0.5,recoMode = "")
tagAndProbeConfigurator.addSorter('eleSCsSorted','PATEleSCPairSorter')
tagAndProbeConfigurator2.addSelector('selectedTagAndProbeEleSCs','PATEleSCPairSelector','calibratedMET.pt()<20 && abs(leg1.eta())<2.5&&abs(leg2.eta())<2.5&&leg1.pt()>20&&leg2.pt()>5&&mass>50&&mass<120&&leg1.userFloat("WWID")>0&&(leg1.chargedHadronIso+leg1.photonIso+leg1.neutralHadronIso())/leg1.pt()<0.1','tagAndProbeEleSCs',0,100)
Пример #22
0
                moduleType='PATMuonSelector',
               src = 'cleanPatMuons',
               cut=cut,
               maxFilter=9999,
               summaryText='extraMuVeto',
               )

#Di Taus
TT.addDiCandidateModule(moduleName='diTaus',
                        moduleType='PATTauPairProducer',
                        src1='smearedTausTT',
                        src2='smearedTausTT',
                        met='smearedMETTT',
                        taus='triggeredPatTaus',  # fixme: check
                        jets='smearedJetsTT',
                        min=1,
                        max=9999,
                        text='AtLeastOneDiTau',
                        leadingObjectsOnly=False,
                        dR=0.5,
                        recoMode="",
                        genParticles='genDaughters',
                        genParticlesForMVAMet='genHiggs',
                        doBTagSys = 0) #0 for no sys, 1 for sys, 2 for mis

TT.addSorter('diTauCandidatesSorted', 'PATTauPairSorter')



cuts1 = [('ttPtEta1', 'leg1.pt()>45 && abs(leg1.eta())<2.1', 1, 9999),
        ('ttPtEta2', 'leg2.pt()>45 && abs(leg2.eta())<2.1', 1, 9999),
        ('tau1Hadronic','leg1.tauID("decayModeFinding")>0',1,9999),
Пример #23
0


llLeadingIso1='(leg1.pt()>20&&(leg1.chargedHadronIso()+max(leg1.photonIso()+leg1.neutralHadronIso()-0.5*leg1.userIso(0),0.0))/leg1.pt()<0.25)'
llLeadingIso2='(leg2.pt()>10&&(leg2.chargedHadronIso()+max(leg2.photonIso()+leg2.neutralHadronIso()-0.5*leg2.userIso(0),0.0))/leg2.pt()<0.25)'
llLeadingIso=llLeadingIso1+'&&'+llLeadingIso2
mumuLeadingID='leg1.isGlobalMuon()&&leg2.isGlobalMuon()&&leg1.isTrackerMuon()&&leg2.isTrackerMuon()'
mumuLeading=mumuLeadingID+'&& mass>60 && mass<120 && abs(leg1.eta())<2.4 && abs(leg2.eta())<2.4'
eeLeading='charge==0 && leg1.electronID("cicTight")&1==1 && leg2.electronID("cicTight")&1==1 && mass>60 && mass<120 && abs(leg1.eta())<2.5 && abs(leg2.eta())<2.5'

EEanalysisConfigurator = CutSequenceProducer(initialCounter  = 'initialEventsEE',
                                                                                 pyModuleName = __name__,
                                                                                 pyNameSpace  = locals())

EEanalysisConfigurator.addSmearing('patOverloadedTaus','patMuonsForAnalysis','convRejElectrons','selectedPatJets','EE')
EEanalysisConfigurator.addDiCandidateModule('EEdiElectrons','PATElePairProducer', 'smearedElectronsEE','smearedElectronsEE','smearedMETEE','smearedJetsEE',1,genParticles='genDaughters')
EEanalysisConfigurator.addSorter('zEleEleCandidatesSorted','PATElePairSorter')
EEanalysisConfigurator.addSelector('EEosDiElectrons','PATElePairSelector','leg1.gsfTrack().trackerExpectedHitsInner().numberOfHits()<2&&leg2.gsfTrack().trackerExpectedHitsInner().numberOfHits()<2&&(leg1.electronID("cicTight")==1||leg1.electronID("cicTight")==3||leg1.electronID("cicTight")==5||leg1.electronID("cicTight")==7||leg1.electronID("cicTight")==9||leg1.electronID("cicTight")==11||leg1.electronID("cicTight")==13||leg1.electronID("cicTight")==15)&&(leg2.electronID("cicTight")==1||leg2.electronID("cicTight")==3||leg2.electronID("cicTight")==5||leg2.electronID("cicTight")==7||leg2.electronID("cicTight")==9||leg2.electronID("cicTight")==11||leg2.electronID("cicTight")==13||leg2.electronID("cicTight")==15)&&charge==0&&abs(leg1.eta())<2.5&&abs(leg2.eta())<2.5&&mass>40 && leg1.userFloat("SIP3D")<4 && leg2.userFloat("SIP3D")<4','EEDiEleCreation',1)
EEanalysisConfigurator.addSelector('EEeleIso','PATElePairSelector',llLeadingIso,'EELeadingZEleIso')
EEanalysisConfigurator.addSelector('EEaboveThresh','PATElePairSelector','leg1.pt()>20 && leg2.pt()>10','EEAtLeastOneZZCandOverThresholds')

zEleEleSelectionSequence =EEanalysisConfigurator.returnSequence()

MManalysisConfigurator = CutSequenceProducer(initialCounter  = 'initialEventsMM',
                                                                                                                              pyModuleName = __name__,
                                                                                                                              pyNameSpace  = locals())
#Add smearing
MManalysisConfigurator.addSmearing('patOverloadedTaus','patMuonsForAnalysis','convRejElectrons','selectedPatJets')
#Create di muon OS pairs
MManalysisConfigurator.addDiCandidateModule('MMdiMuons','PATMuPairProducer', 'smearedMuons','smearedMuons','smearedMET','smearedJets',1,genParticles='genDaughters')
MManalysisConfigurator.addSorter('zMuMuCandidatesSorted','PATMuPairSorter')
Пример #24
0
import FWCore.ParameterSet.Config as cms



#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *


analysisConfigurator = CutSequenceProducer(initialCounter  = 'initialEvents',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())

#analysisConfigurator.addSmearing('patOverloadedTaus','cleanPatMuons','cleanPatElectrons','cleanPatJets','systematicsMET')

analysisConfigurator.addDiCandidateModule('BASECandidates','PATMuPairProducer', 'cleanPatMuons','cleanPatMuons','systematicsMET','patOverloadedJets',0,9999,text = '',leadingObjectsOnly = False,dR = 0.15,recoMode = "")
analysisConfigurator.addSorter('BASECandidatesSorted','PATMuPairSorter')
analysisConfigurator.addSelector('BASECandidatesID','PATMuPairSelector','leg1.userFloat("isWWMuon")&&leg2.userFloat("isWWMuon")&&leg1.pt()>15&&leg2.pt()>15&&abs(leg1.eta)<2.5&&abs(leg2.eta)<2.5','ZMuMuID')

analysisConfigurator.addDiCandidateModule('zJJCandidates','PATJetPairProducer', 'patOverloadedJets','patOverloadedJets','patMETs','patOverloadedJets',0,9999,text = '',leadingObjectsOnly = False,dR = 0.15,recoMode = "")
analysisConfigurator.addSorter('zJJCandidatesSorted','PATJetPairSorter')
analysisConfigurator.addSelector('zJJCandidatesID','PATJetPairSelector','leg1.pt()>25&&leg2.pt()>25&&abs(leg1.eta)<3&&abs(leg2.eta)<3','ZJJID') 

analysisConfigurator.addDiCandidateModule('zBASEJJ','PATMuMuJJQuadProducer','BASECandidatesID','zJJCandidatesID','patMETs','patOverloadedJets',1,9999,text='MuMuJJAtLeastOneZZ',leadingObjectsOnly = False,dR = 0.5,recoMode ="",genParticles='genDaughters')

analysisConfigurator.addCrossCleanerModule('BASEJJCleanedCands','PATMuMuJJQuadCrossCleaner',1,9999,text='MMJJAtLeastOneZZCleanedCandidate',dR = 0.5)  


selectionSequence =analysisConfigurator.returnSequence()


Пример #25
0
    initialCounter="initialEventsET", pyModuleName=__name__, pyNameSpace=locals()
)


ETanalysisConfigurator.addSmearing(
    "triggeredPatTaus", "triggeredPatMuons", "triggeredPatElectrons", "cleanPatJets", "patMVAMetEleTau", "ET"
)

# create dielectrons
ETanalysisConfigurator.addDiCandidateModule(
    "diElectrons",
    "PATElePairProducer",
    "smearedElectronsET",
    "smearedElectronsET",
    "smearedMETET",
    "smearedJetsET",
    0,
    9999,
    text="",
    leadingObjectsOnly=False,
    dR=0.15,
    recoMode="",
)
ETanalysisConfigurator.addSelector(
    "osDiElectrons",
    "PATElePairSelector",
    'abs(leg1.userFloat("dz"))<0.2&&abs(leg2.userFloat("dz"))<0.2&&leg1.pt()>15&&leg2.pt()>15&&charge==0&&leg2.userFloat("wp95V")>0&&leg1.userFloat("wp95V")>0&&(leg1.userIso(0)+max(leg1.userIso(1)+leg1.neutralHadronIso()-0.5*leg1.userIso(2),0.0))/leg1.pt()<0.3&&(leg2.userIso(0)+max(leg2.userIso(1)+leg2.neutralHadronIso()-0.5*leg2.userIso(2),0.0))/leg2.pt()<0.3',
    "ZEEVEto",
    0,
    100,
)
Пример #26
0
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())


#Make Di Muons to VETO DY
#MNJanalysisConfigurator.addDiCandidateModule('diMuons','PATMuPairProducer', 'cleanPatMuons','cleanPatMuons','systematicsMET','patJetsForAnalysis',0,9999,text = '',dR=0.5,recoMode = "")
#MNJanalysisConfigurator.addSelector('diMuonsSel','PATMuPairSelector',DiMuonPreSel+'&&'+DiMuonPreSel2+'&&'+DiMuonPreSel3,'diMuonSel',0,999)
#MNJanalysisConfigurator.addSorter('diMuonsSorted','PATMuPairSorter')

#Make Muons+MET
MNJanalysisConfigurator.addCandidateMETModule('wCands','PATMuonNuPairProducer','cleanPatMuons','systematicsMET','patJetsForAnalysis',1,9999,'AtLeastOneWCandidate',genParticles="genDaughters")
#MNJanalysisConfigurator.addSelector('wCandsTight','PATMuonNuPairSelector',munuTight,'tightID',1)
MNJanalysisConfigurator.addSelector('wCandsKIN','PATMuonNuPairSelector',munuKIN,'wCandsKIN',1)
MNJanalysisConfigurator.addSelector('wCandsSel','PATMuonNuPairSelector',munuSel,'wCandsSel',1)

MNJanalysisConfigurator.addDiCandidateModule('diMuons','PATMuPairProducer', 'cleanPatMuons','cleanPatMuons','systematicsMET','patJetsForAnalysis',0,9999,text = '',dR=0.5,recoMode = "")
MNJanalysisConfigurator.addSelector('diMuonsSel','PATMuPairSelector',DiMuonPreSel+'&&'+DiMuonPreSel2+'&&'+DiMuonPreSel3,'diMuonSel',0,999)
MNJanalysisConfigurator.addSorter('diMuonsSorted','PATMuPairSorter')


#create the sequence
MNJselectionSequence =MNJanalysisConfigurator.returnSequence()

######################__________________________________ENJ_____________________________________##############################

ENJanalysisConfigurator = CutSequenceProducer(initialCounter  = 'initialEventsENJ',
                                  pyModuleName = __name__,                                  pyNameSpace  = locals())

#Make Di Muons to VETO DY
ENJanalysisConfigurator.addDiCandidateModule('diElecs','PATElePairProducer', 'cleanPatElectrons','cleanPatElectrons','systematicsMET','patJetsForAnalysis',0,9999,text = '',dR=0.5,recoMode = "")
ENJanalysisConfigurator.addSelector('diElecsSel','PATElePairSelector',DiElePreSel+'&&'+DiElePreSel2+'&&'+DiElePreSel3,'diElecsSel',0,9999)
Пример #27
0
import FWCore.ParameterSet.Config as cms



###MU ENRICHED QCD#####################################################################################################
from UWAnalysis.Configuration.tools.CutSequenceProducer import *


wJetsConfigurator = CutSequenceProducer(initialCounter  = 'initialWJetsEvents',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())


wJetsConfigurator.addDiCandidateModule('diMuonswJetsFR','PATMuPairProducer', 'patMuonsForAnalysis','patMuonsForAnalysis','patMETs','selectedPatJets',0,9999,text = '',leadingObjectsOnly = False,dR = 0.15,recoMode = "")
wJetsConfigurator.addSelector('osDiMuonswJetsFR','PATMuPairSelector','charge==0&&leg1.isGlobalMuon&&leg2.isGlobalMuon&&((leg1.chargedHadronIso+leg1.photonIso+leg1.neutralHadronIso)/leg1.pt()<0.26)&&((leg2.chargedHadronIso+leg2.photonIso+leg2.neutralHadronIso)/leg2.pt()<0.3)','',0,0)
#Make Muons+MET
wJetsConfigurator.addCandidateMETModule('wJetsCands','PATMuonNuPairProducer','patMuonsForAnalysis','patMETs','selectedPatJets',0,9999,'')
wJetsConfigurator.addSelector('wJetsSelectedCands','PATMuonNuPairSelector','lepton.pt()>15&&abs(lepton.eta())<2.1&&((lepton.chargedHadronIso+lepton.photonIso+lepton.neutralHadronIso)/lepton.pt()<0.2)&&(lepton.triggerObjectMatchesByPath("HLT_Mu9").size>0||(lepton.triggerObjectMatchesByPath("HLT_Mu11").size>0)||(lepton.triggerObjectMatchesByPath("HLT_Mu11").size>0))&&mt>45.','',0,100)
wJetsConfigurator.addGeneric('wJetsForFakeRate','MuonNuPairJetFetcher')
wJetsSequence = wJetsConfigurator.returnSequence()





Пример #28
0
analysisConfigurator = CutSequenceProducer(initialCounter='initialEvents',
                                           pyModuleName=__name__,
                                           pyNameSpace=locals())

DiMuonPreSel = 'leg1.isGlobalMuon && leg1.isTrackerMuon && leg2.isGlobalMuon && leg2.isTrackerMuon && leg1.pt()>20 && leg2.pt()>20'
DiMuonPreSel2 = '(leg1.isolationR03().sumPt+leg1.isolationR03().emEt+leg1.isolationR03().hadEt)/leg1.pt()<0.15 '
DiMuonPreSel3 = '(leg2.isolationR03().sumPt+leg2.isolationR03().emEt+leg2.isolationR03().hadEt)/leg2.pt()<0.15 '

#Make Di Muons to VETO DY
analysisConfigurator.addDiCandidateModule('diMuons',
                                          'PATMuPairProducer',
                                          'cleanPatMuons',
                                          'cleanPatMuons',
                                          'systematicsMET',
                                          'cleanPatJets',
                                          0,
                                          9999,
                                          text='',
                                          leadingObjectsOnly=True,
                                          dR=0.15,
                                          recoMode="")
analysisConfigurator.addSelector(
    'diMuonsSel', 'PATMuPairSelector',
    DiMuonPreSel + '&&' + DiMuonPreSel2 + '&&' + DiMuonPreSel3, 'diMuonSel', 0,
    999)
analysisConfigurator.addSorter('diMuonsSorted', 'PATMuPairSorter')

#Make Muons+MET
analysisConfigurator.addCandidateMETModule('wCands',
                                           'PATMuonNuPairProducer',
                                           'cleanPatMuons',
Пример #29
0
analysisConfigurator = CutSequenceProducer(initialCounter='initialEvents',
                                           pyModuleName=__name__,
                                           pyNameSpace=locals())

#Add smearing
analysisConfigurator.addSmearing('patOverloadedTaus', 'patMuonsForAnalysis',
                                 'convRejElectrons', 'patOverloadedJets',
                                 'METInputTag')

#Create di muon pairs for veto purposes
analysisConfigurator.addDiCandidateModule('diMuons',
                                          'PATMuPairProducer',
                                          'smearedMuons',
                                          'smearedMuons',
                                          'smearedMET',
                                          'smearedJets',
                                          0,
                                          9999,
                                          text='',
                                          leadingObjectsOnly=False,
                                          dR=0.15,
                                          recoMode="")
analysisConfigurator.addSelector(
    'osDiMuons', 'PATMuPairSelector',
    'charge==0&&leg1.isGlobalMuon&&leg2.isGlobalMuon&&leg1.pt()>15&&leg2.pt()>15&&(leg1.chargedHadronIso()+max(0.0,leg1.photonIso()+leg1.neutralHadronIso()-0.5*leg1.userIso(0)))/leg1.pt()<0.2&&(leg2.chargedHadronIso()+max(0.0,leg2.photonIso+leg2.neutralHadronIso()-0.5*leg2.userIso(0)))/leg2.pt()<0.2',
    'DiMuonCreation', 0, 0)
analysisConfigurator.addSorter('diMuonsSorted', 'PATMuPairSorter')

#Make DiTaus
analysisConfigurator.addDiCandidateModule('muJets',
                                          'PATMuJetPairProducer',
                                          'smearedMuons',
import FWCore.ParameterSet.Config as cms

#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *

######################__________________________________MMMT_____________________________________##############################

MMMTanalysisConfigurator = CutSequenceProducer(initialCounter  = 'initialEventsMMMT',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())
#nSVfitTrackService = cms.Service("NSVfitTrackService")
#Add smearing
MMMTanalysisConfigurator.addSmearing('patOverloadedTaus','patMuonsForAnalysis','convRejElectrons','selectedPatJets')
MMMTanalysisConfigurator.addDiCandidateModule('MMMTdiMuons','PATMuPairProducer', 'smearedMuons','smearedMuons','smearedMET','smearedJets',1,genParticles='genDaughters')
MMMTanalysisConfigurator.addSelector('MMMTosDiMuons','PATMuPairSelector','charge==0&&leg1.isGlobalMuon()&&leg2.isGlobalMuon()&& mass>40 && abs(leg1.eta())<2.4 && abs(leg2.eta())<2.4','MMMTDiMuonCreation',1)
MMMTanalysisConfigurator.addDiCandidateModule('MMMTmuTau','PATMuTauPairProducer', 'smearedMuons','smearedTaus','smearedMET','smearedJets',1,9999,text = 'MMMTAtLeastOneMuTau',leadingObjectsOnly = False,dR = 0.3,recoMode = "",genParticles='genDaughters')
MMMTanalysisConfigurator.addDiCandidateModule('MMMTzzCands','PATMuMuMuTauQuadProducer','MMMTosDiMuons','MMMTmuTau','smearedMET','smearedJets',1,9999,text='MMMTAtLeastOneZZ',leadingObjectsOnly = False,dR = 0.01,recoMode ="",genParticles='genDaughters')
MMMTanalysisConfigurator.addCrossCleanerModule('MMMTzzCleanedCands','PATMuMuMuTauQuadCrossCleaner',1,9999,text='MMMTAtLeastOneZZCleanedCandidate',dR = 0.1)
MMMTanalysisConfigurator.addSelector('MMMTzzMuID','PATMuMuMuTauQuadSelector','leg1.leg1.isGlobalMuon()&&leg1.leg1.isTrackerMuon()&&leg1.leg2.isTrackerMuon()&&leg1.leg2.isTrackerMuon()','MMMTLeadingZMuID')
MMMTanalysisConfigurator.addSelector('MMMTzzMuIso','PATMuMuMuTauQuadSelector','(leg1.leg1.chargedHadronIso()+max(leg1.leg1.photonIso()+leg1.leg1.neutralHadronIso()-0.5*leg1.leg1.userIso(0),0.0))/leg1.leg1.pt()<0.25&&(leg1.leg2.chargedHadronIso()+max(leg1.leg2.photonIso()+leg1.leg2.neutralHadronIso()-0.5*leg1.leg2.userIso(0),0.0))/leg1.leg2.pt()<0.25','MMMTLeadingZMuIso')
MMMTanalysisConfigurator.addSelector('MMMTzzMuID2','PATMuMuMuTauQuadSelector','leg2.leg1.isGlobalMuon()&&leg2.leg1.isTrackerMuon()','MMMTSecondZMuID')
MMMTanalysisConfigurator.addSelector('MMMTzzTauID','PATMuMuMuTauQuadSelector','leg2.leg2.tauID("decayModeFinding")','MMMTTauDecayModeFinding')
MMMTanalysisConfigurator.addSelector('MMMTzzTauDiscr','PATMuMuMuTauQuadSelector','leg2.leg2.tauID("againstElectronLoose")&&leg2.leg2.tauID("againstMuonTight")','MMMTTauLeptonDiscrimantor')
MMMTanalysisConfigurator.addSelector('MMMTzzMuIso2','PATMuMuMuTauQuadSelector','(leg2.leg1.chargedHadronIso()+max(leg2.leg1.photonIso()+leg2.leg1.neutralHadronIso()-0.5*leg2.leg1.userIso(0),0.0))/leg2.leg1.pt()<0.15','MMMTSecondZMuIso')
MMMTanalysisConfigurator.addSelector('MMMTzzTauIso','PATMuMuMuTauQuadSelector','leg2.leg2.tauID("byLooseCombinedIsolationDeltaBetaCorr")','MMMTTauLooseIsolation')
MMMTanalysisConfigurator.addSorter('MMMTzzCleanedCandsSortedByZMass','PATMuMuMuTauQuadSorterByZMass')
MMMTanalysisConfigurator.addSelector('MMMTzzCleanedCandsAboveThreshold','PATMuMuMuTauQuadSelector','leg1().leg1().pt()>20 && leg1().leg2().pt()>10 && leg2().leg1().pt()>10 &&leg2().leg2().pt()>20 && abs(leg2.leg1.eta())<2.4 && abs(leg2.leg2.eta())<2.3','MMMTAtLeastOneZZCandOverThresholds')
MMMTanalysisConfigurator.addSelector('MMMTzzCleanedCandsMuTauQ','PATMuMuMuTauQuadSelector','leg2.charge()==0','MMMTMuTauCharge')
MMMTanalysisConfigurator.addSelector('MMMTzzCleanedCandsMMMass','PATMuMuMuTauQuadSelector','leg1.mass()>60&&leg1.mass()<120','MMMTMMMass')
MMMTanalysisConfigurator.addSorter('MMMTFinalSel','PATMuMuMuTauQuadSorterByZMass')
MMMTanalysisConfigurator.addSelector('MMMTzzCleanedCandsMTMass','PATMuMuMuTauQuadSelector','leg2.mass()>30&&leg2.mass()<80','MMMTMTMass')
Пример #31
0
#Import tool that creates the cut sequence
from UWAnalysis.Configuration.tools.CutSequenceProducer import *


analysisConfigurator = CutSequenceProducer(initialCounter  = 'initialEvents',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())

nSVfitTrackService = cms.Service("NSVfitTrackService")

analysisConfigurator.addSmearing('patOverloadedTaus','patMuonsForAnalysis','convRejElectrons','patOverloadedJets')


#create dielectrons
analysisConfigurator.addDiCandidateModule('diElectrons','PATElePairProducer', 'smearedElectrons','smearedElectrons','smearedMET','smearedJets',0,9999,text = '',leadingObjectsOnly = False,dR = 0.15,recoMode = "")
analysisConfigurator.addSelector('osDiElectrons','PATElePairSelector','leg1.pt()>15&&leg2.pt()>15&&charge==0&&(leg1.userFloat("WWID")>0||leg1.userFloat("WWMVAID")>0)&&leg2.userFloat("wp95")>0&&(leg1.chargedHadronIso()+max(leg1.photonIso()+leg1.neutralHadronIso()-0.5*leg1.userIso(0),0.0))/leg1.pt()<0.25&&(leg2.chargedHadronIso()+max(leg2.photonIso()+leg2.neutralHadronIso()-0.5*leg2.userIso(0),0.0))/leg2.pt()<0.25','ZEEVEto',0,100)

#Make DiTaus
analysisConfigurator.addDiCandidateModule('eleTaus','PATEleTauPairProducer', 'smearedElectrons','smearedTaus','smearedMET','smearedJets',1,9999,text = 'AtLeastOneEleTau',leadingObjectsOnly = False,dR = 0.5,recoMode = "",genParticles='genDaughters')
analysisConfigurator.addSelector('eleTausWW','PATEleTauPairSelector','leg1.userFloat("WWID")>0||leg1.userFloat("WWMVAID")>0','WWElectronID',1)
analysisConfigurator.addSelector('eleTausElePtEta','PATEleTauPairSelector','leg1.pt()>20&&abs(leg1.eta())<2.1','electronPtEta',1)
#analysisConfigurator.addSelector('eleTausEleIsolation','PATEleTauPairSelector','(leg1.chargedHadronIso()+max(leg1.photonIso()+leg1.neutralHadronIso()-0.5*leg1.particleIso(),0.0))/leg1.pt()<0.1','electronIsolation',1)
analysisConfigurator.addSelector('eleTausTauPtEta','PATEleTauPairSelector','leg2.tauID("decayModeFinding")&&leg2.pt()>20&&abs(leg2.eta())<2.3','TauDecayFound',1)
analysisConfigurator.addSelector('eleTausVLooseIsolation','PATEleTauPairSelector','leg2.tauID("byVLooseCombinedIsolationDeltaBetaCorr")>0','TauLooseIso',1)
#analysisConfigurator.addSelector('eleTausLooseIsolation','PATEleTauPairSelector','leg2.tauID("byLooseCombinedIsolationDeltaBetaCorr")>0','TauLooseIso',1)
analysisConfigurator.addSelector('eleTausTauMuonVeto','PATEleTauPairSelector','leg2.tauID("againstMuonLoose")','AgainstMuon',1)
analysisConfigurator.addSelector('eleTausTauElectronVeto','PATEleTauPairSelector','leg2.tauID("againstElectronMedium")','AgainstElectron',1)
analysisConfigurator.addEleTauNSVFit('eleTausNSVFit')
analysisConfigurator.addSorter('eleTausSorted','PATEleTauPairSorter')
analysisConfigurator.addSelector('eleTausOS','PATEleTauPairSelector','charge==0','OS',1)

jetKIN='leg1.pt>20 && leg2.pt> 20 && abs(leg1.eta)<5 && abs(leg2.eta)<5'


######################__________________________________MNBB_____________________________________##############################

MNBBanalysisConfigurator = CutSequenceProducer(initialCounter  = 'initialEventsMNBB',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())




#Make Di Muons to VETO DY
MNBBanalysisConfigurator.addDiCandidateModule('diMuons','PATMuPairProducer', 'cleanPatMuons','cleanPatMuons','systematicsMET','patJetsForAnalysis',0,9999,text = '',dR=0.5,recoMode = "",genParticles = "genDaughters")
MNBBanalysisConfigurator.addSelector('diMuonsSel','PATMuPairSelector',DiMuonPreSel+'&&'+DiMuonPreSel2+'&&'+DiMuonPreSel3,'diMuonSel',0,999)
MNBBanalysisConfigurator.addSorter('diMuonsSorted','PATMuPairSorter')

#Make Muons+MET
MNBBanalysisConfigurator.addCandidateMETModule('wCands','PATMuonNuPairProducer','cleanPatMuons','systematicsMET','patJetsForAnalysis',1,9999,'AtLeastOneWCandidate',genParticles="genDaughters")
#MNBBanalysisConfigurator.addSelector('wCandsTight','PATMuonNuPairSelector',munuTight,'tightID',1)
MNBBanalysisConfigurator.addSelector('wCandsKIN','PATMuonNuPairSelector',munuKIN,'wCandsKIN',1)
MNBBanalysisConfigurator.addSelector('wCandsSel','PATMuonNuPairSelector',munuSel,'wCandsSel',1)

#Make Elecs+MET
MNBBanalysisConfigurator.addCandidateMETModule('wCandsEleVeto','PATElectronNuPairProducer','cleanPatElectrons','systematicsMET','patJetsForAnalysis',0,9999,'WCandidatesELE',genParticles="genDaughters")
MNBBanalysisConfigurator.addSelector('wCandsKINEleVeto','PATElectronNuPairSelector',elenuKIN,'wCandsKINEle',0,9999)
MNBBanalysisConfigurator.addSelector('wCandsSelEleVeto','PATElectronNuPairSelector',elenuSel,'wCandsSelEle',0,9999)

#Make Di Jets