Esempio n. 1
0
from CMGTools.Common.factories.cmgBaseJet_cfi import cmgBaseJet
from CMGTools.Common.skims.cmgPFJetSel_cfi import cmgPFJetSel
from CMGTools.Common.skims.cmgBaseJetSel_cfi import cmgBaseJetSel
from CMGTools.Common.skims.leadingCMGBaseJetSelector_cfi import leadingCMGBaseJetSelector
from CMGTools.Common.skims.leadingCMGPFJetSelector_cfi import leadingCMGPFJetSelector
from CMGTools.External.pujetidsequence_cff import puJetMva

# PF jets -------------------------------------------------------

# this pt cut is also going to be used to select GenJets,
# see CMGTools.Common.gen.generator.genJets_cff
ptCut = 'pt()>10'
cmgPFJetSel.cut = ptCut

# Jets for Type 1 MET corrections
cmgPFJetType1MET = cmgPFJetSel.clone(src = 'cmgPFJet',cut='pt() >= 10 && abs(eta()) < 4.7')

# PU JetID
cmgPUJetMva = puJetMva.clone()
cmgPUJetMva.jets = cms.InputTag('patJetsWithVar')

from CMGTools.Common.jetId_cff import *

pfJetSequence = cms.Sequence(
    cmgPUJetMva +
    cmgPFJet +
    cmgPFJetSel +
    cmgPFJetType1MET +
    jetIdSequence  
    )
from RecoJets.JetProducers.ak5PFJets_cfi import *
from RecoJets.JetProducers.kt4PFJets_cfi import *
from RecoJets.JetProducers.ca4PFJets_cfi import *


from CMGTools.Common.skims.cmgPFJetSel_cfi import cmgPFJetSel


##################################
#####def input jet collection ####
##################################

#########playing with PU ID
cmgPFJetSelNoPU = cmgPFJetSel.clone(
    src = 'cmgPFJetSel',
    cut = 'puId("full") > 3'#'puId("full") > 5'#passPuJetId("full", PileupJetIdentifier::kMedium )' #does not work
    )

#########playing with gen jet matching
#produce a collection of jets NOT matched to gen jet
deltaRJetGenJet = cms.EDProducer(
    "DeltaRVetoProducerPFJet",
    inputCollection = cms.InputTag('cmgPFJetSelCHS'),
    MatchingParams = cms.VPSet(
    cms.PSet(                                     
    vetoCollection=cms.InputTag("genJetSel"),
    minDeltaR=cms.double(0.4),
    removeMatchedObject=cms.bool(True)
    )
    ),
    verbose = cms.untracked.bool(False)
import FWCore.ParameterSet.Config as cms

from CMGTools.Utilities.metRecoilCorrection.recoilCorrectedMETTauMu_cfi import *
from CMGTools.Utilities.metRecoilCorrection.recoilCorrectedMETTauEle_cfi import *
from CMGTools.Utilities.metRecoilCorrection.recoilCorrectedMETMuEle_cfi import *
from CMGTools.Utilities.metRecoilCorrection.recoilCorrectedMETDiTau_cfi import *
from CMGTools.Common.generator.genWorZ_cfi import *
from SimGeneral.HepPDTESSource.pythiapdt_cfi import *


from CMGTools.Common.skims.cmgPFJetSel_cfi import cmgPFJetSel
cmgPFJetForRecoil = cmgPFJetSel.clone(
    cut = 'pt()>30 && abs(eta)<4.5 && getSelection("cuts_looseJetId") && passLooseFullPuJetId()',
    src = 'cmgPFJetSel')


metRecoilCorrectionInputSequence = cms.Sequence(
    cmgPFJetForRecoil +
    genWorZ 
    )

metRecoilCorrectionSequence  = cms.Sequence(
    metRecoilCorrectionInputSequence +
    recoilCorrectedMETTauMu  + 
    recoilCorrectedMETTauEle  +
    recoilCorrectedMETMuEle 
    # Recoil corrections for DiTau case not studied at all yet
    #recoilCorrectedMETDiTau 
    )
Esempio n. 4
0
import FWCore.ParameterSet.Config as cms

from CMGTools.Common.skims.cmgPFJetSel_cfi import cmgPFJetSel

jetIDJet = cmgPFJetSel.clone(
    cut = cms.string( "getSelection(\"cuts_looseJetId\") && pt() > 30" )
    )


Esempio n. 5
0
    process.schedule = cms.Schedule(process.hcallasereventfilter2012Path,*[p for p in process.schedule])

#### no AK5 pruned
if runPATCMG:
    process.p.remove(process.PATCMGJetSequenceCHSpruned)
process.p.remove(process.razorMJStructureJetSel30)

#### recalibrated jets
if recalibrateJets:
  from CMGTools.Common.miscProducers.cmgPFJetCorrector_cfi import cmgPFJetCorrector
  process.cmgPFJetCor = cmgPFJetCorrector.clone(src='cmgPFJetSel',
					      payload='AK5PF')
  process.cmgPFJetCorCHS = cmgPFJetCorrector.clone(src='cmgPFJetSelCHS',
						 payload='AK5PFchs')
  from CMGTools.Common.skims.cmgPFJetSel_cfi import cmgPFJetSel
  process.cmgPFJetSel = cmgPFJetSel.clone(src='cmgPFJetCor',
					      cut='pt()>30')
  process.cmgPFJetSelCHS = cmgPFJetSel.clone(src='cmgPFJetCorCHS',
					      cut='pt()>30')
  if runOnMC:
    process.cmgPFJetCor.levels = cms.vstring('L1FastJet','L2Relative','L3Absolute')
    process.cmgPFJetCorCHS.levels = cms.vstring('L1FastJet','L2Relative','L3Absolute')
  else:
    process.cmgPFJetCor.levels = cms.vstring('L1FastJet','L2Relative','L3Absolute','L2L3Residual')
    process.cmgPFJetCorCHS.levels = cms.vstring('L1FastJet','L2Relative','L3Absolute','L2L3Residual')
  process.p.insert(0,process.cmgPFJetSelCHS)
  process.p.insert(0,process.cmgPFJetSel)
  process.p.insert(0,process.cmgPFJetCorCHS)
  process.p.insert(0,process.cmgPFJetCor)

#### evaluate speed
import FWCore.ParameterSet.Config as cms

from CMGTools.Common.skims.cmgPFJetSel_cfi import cmgPFJetSel
from CMGTools.Common.skims.cmgCandCount_cfi import cmgCandCount
#####Jet Selection
cmgPFJetSelPt       = cmgPFJetSel.clone(
    src = 'cmgPFJetSel',
    cut = 'pt > 80. && abs(eta)<2.4')

cmgPFJetSelQuadJet  = cmgCandCount.clone(
    src = 'cmgPFJetSelPt',
    minNumber = 4
    )

cmgPFJetSelDiJet  = cmgCandCount.clone(
    src = 'cmgPFJetSelPt',
    minNumber = 2
    )
######MET selection
cmgPFMETSelPt       = cms.EDFilter(
    "CandViewSelector",
    src = cms.InputTag("cmgPFMET"),
    cut = cms.string( "pt()>200." )
    )

cmgPFMETSelCut      = cmgCandCount.clone(
    src = 'cmgPFMETSelPt',
    minNumber = 1
    )

skimmingTopTupleTrgSequence = cms.Sequence(
import FWCore.ParameterSet.Config as cms

# from CMGTools.H2TauTau.generator.metRecoilCorrection.recoilCorrectedMETTauMu_cfi import *
# from CMGTools.H2TauTau.generator.metRecoilCorrection.recoilCorrectedMETTauEle_cfi import *
# from CMGTools.H2TauTau.generator.metRecoilCorrection.recoilCorrectedMETMuEle_cfi import *
# from CMGTools.H2TauTau.generator.metRecoilCorrection.recoilCorrectedMETDiTau_cfi import *
from CMGTools.Utilities.generator.metRecoilCorrection.recoilCorrectedMETTauMu_cfi import *
from CMGTools.Utilities.generator.metRecoilCorrection.recoilCorrectedMETTauEle_cfi import *
from CMGTools.Utilities.generator.metRecoilCorrection.recoilCorrectedMETMuEle_cfi import *
from CMGTools.Utilities.generator.metRecoilCorrection.recoilCorrectedMETDiTau_cfi import *
from CMGTools.Common.generator.genWorZ_cfi import *
from SimGeneral.HepPDTESSource.pythiapdt_cfi import *

from CMGTools.Common.skims.cmgPFJetSel_cfi import cmgPFJetSel
cmgPFJetForRecoil = cmgPFJetSel.clone(
    cut=
    'pt()>30 && abs(eta)<4.5 && getSelection("cuts_looseJetId") && passLooseFullPuJetId()',
    src='cmgPFJetSel')

metRecoilCorrectionInputSequence = cms.Sequence(cmgPFJetForRecoil + genWorZ)

metRecoilCorrectionSequence2012 = cms.Sequence(
    metRecoilCorrectionInputSequence + recoilCorrectedMETTauMu2012 +
    recoilCorrectedMETTauEle2012 + recoilCorrectedMETMuEle2012
    # Recoil corrections for DiTau case not studied at all yet
    #recoilCorrectedMETDiTau2012
)
Esempio n. 8
0
import FWCore.ParameterSet.Config as cms

from CMGTools.Utilities.metRecoilCorrection.recoilCorrectedMETTauMu_cfi import *
from CMGTools.Utilities.metRecoilCorrection.recoilCorrectedMETTauEle_cfi import *
from CMGTools.Utilities.metRecoilCorrection.recoilCorrectedMETMuEle_cfi import *
from CMGTools.Utilities.metRecoilCorrection.recoilCorrectedMETDiTau_cfi import *
from CMGTools.Common.generator.genWorZ_cfi import *
from SimGeneral.HepPDTESSource.pythiapdt_cfi import *


from CMGTools.Common.skims.cmgPFJetSel_cfi import cmgPFJetSel
cmgPFJetForRecoilPresel = cmgPFJetSel.clone(
    cut = 'pt()>30 && abs(eta)<4.7 && getSelection("cuts_looseJetId")',
    src = 'cmgPFJetSel')

from CMGTools.Common.skims.cmgPFJetPUIDSel_cfi import cmgPFJetPUIDSel
cmgPFJetForRecoil = cmgPFJetPUIDSel.clone(
    src = 'cmgPFJetForRecoilPresel')

metRecoilCorrectionInputSequence = cms.Sequence(
    cmgPFJetForRecoilPresel +
    cmgPFJetForRecoil +
    genWorZ 
    )

metRecoilCorrectionSequence  = cms.Sequence(
    metRecoilCorrectionInputSequence +
    recoilCorrectedMETTauMu  + 
    recoilCorrectedMETTauEle  +
    recoilCorrectedMETMuEle 
    # Recoil corrections for DiTau case not studied at all yet
Esempio n. 9
0
import FWCore.ParameterSet.Config as cms

from CMGTools.Common.skims.cmgPFJetSel_cfi import cmgPFJetSel

jetIDJet = cmgPFJetSel.clone(
    cut=cms.string("getSelection(\"cuts_looseJetId\") && pt() > 30"))