Ejemplo n.º 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()




    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",
Ejemplo n.º 3
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()





Ejemplo n.º 4
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()




Ejemplo n.º 5
0
DiElePreSel2='(leg1.isEB &&(leg1.sigmaIetaIeta<0.01)&&(-0.8<leg1.deltaPhiSuperClusterTrackAtVtx<0.8 ) && ( -0.007<leg1.deltaEtaSuperClusterTrackAtVtx<0.007) ) || (leg1.isEE &&(leg1.sigmaIetaIeta<0.03)&&(-0.7<leg1.deltaPhiSuperClusterTrackAtVtx<0.7 ) && ( -0.01<leg1.deltaEtaSuperClusterTrackAtVtx<0.01) )'
DiElePreSel2='(leg2.isEB &&(leg2.sigmaIetaIeta<0.01)&&(-0.8<leg2.deltaPhiSuperClusterTrackAtVtx<0.8 ) && ( -0.007<leg2.deltaEtaSuperClusterTrackAtVtx<0.007) ) || (leg2.isEE &&(leg2.sigmaIetaIeta<0.03)&&(-0.7<leg2.deltaPhiSuperClusterTrackAtVtx<0.7 ) && ( -0.01<leg2.deltaEtaSuperClusterTrackAtVtx<0.01) )'
DiElePreSel3='(leg1.chargedHadronIso+leg1.photonIso()+leg1.neutralHadronIso())/leg1.pt()<0.3&&(leg2.chargedHadronIso+leg2.photonIso()+leg2.neutralHadronIso())/leg2.pt()<0.3'


######################__________________________________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',
Ejemplo n.º 6
0
######################__________________________________MNJ_____________________________________##############################

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




#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_____________________________________##############################
Ejemplo n.º 7
0
                                          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)
import FWCore.ParameterSet.Config as cms



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


muEnrichedConfigurator = CutSequenceProducer(initialCounter  = 'initialMuEnrichedEvents',
                                  pyModuleName = __name__,
                                  pyNameSpace  = locals())


muEnrichedConfigurator.addDiCandidateModule('diMuonsMuEnrichedFR','PATMuPairProducer', 'patMuonsForAnalysis','patMuonsForAnalysis','patMETs','selectedPatJets',0,9999,text = '',leadingObjectsOnly = False,dR = 0.15,recoMode = "")
muEnrichedConfigurator.addSelector('osDiMuonsMuEnrichedFR','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
muEnrichedConfigurator.addCandidateMETModule('muEnrichedCands','PATMuonNuPairProducer','patMuonsForAnalysis','patMETs','selectedPatJets',0,9999,'')
muEnrichedConfigurator.addSelector('muEnrichedSelectedCands','PATMuonNuPairSelector','lepton.pt()>15&&abs(lepton.eta())<2.1&&((lepton.chargedHadronIso+lepton.photonIso+lepton.neutralHadronIso)/lepton.pt()>0.5)&&(lepton.triggerObjectMatchesByPath("HLT_Mu9").size>0||(lepton.triggerObjectMatchesByPath("HLT_Mu11").size>0)||(lepton.triggerObjectMatchesByPath("HLT_Mu15_v1").size>0))&&mt<40.','',0,100)
muEnrichedConfigurator.addGeneric('muEnrichedJetsForFakeRate','MuonNuPairJetFetcher')

muEnrichedSequence = muEnrichedConfigurator.returnSequence()





Ejemplo n.º 9
0
                                  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)

#
#make Gen Ws


#analysisConfigurator.addSelector('wCandsGoodMuon','PATMuonNuPairSelector','lepton.pt()>20&&abs(lepton.eta())<2.4','OneLeptonInAcceptance',1)

selectionSequence =analysisConfigurator.returnSequence()
######################__________________________________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
MNBBanalysisConfigurator.addDiCandidateModule('diJets','PATJetPairProducer', 'patJetsForAnalysis','patJetsForAnalysis','systematicsMET','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')