import FWCore.ParameterSet.Config as cms

from PhysicsTools.SelectorUtils.jetIDSelector_cfi import jetIDSelector
from PhysicsTools.SelectorUtils.pfJetIDSelector_cfi import pfJetIDSelector


PATElectronNtupleMaker = cms.EDFilter(
        'PATElectronNtupleMaker',

        hltTag = cms.InputTag("TriggerResults::REDIGI"),
        MuonTag = cms.InputTag("selectedPatMuons"),
        ElectronTag = cms.InputTag("selectedPatElectrons"),
        PFElectronTag = cms.InputTag("patElectronsPFlowLoose"),
        caloJetTag= cms.InputTag("selectedPatJets"),
        JPTJetTag= cms.InputTag("selectedPatJetsAK5JPT"),
        PFJetTag= cms.InputTag("selectedPatJetsAK5PF"),
        PFlowJetTag= cms.InputTag("selectedPatJetsPFlow"),
        caloMETTag= cms.InputTag("patMETs"),
        tcMETTag= cms.InputTag("patMETsTC"),
        PFMETTag= cms.InputTag("patMETsPF"),
        PFlowMETTag = cms.InputTag("patMETsPFlow"),
        
        jetIdLoose = jetIDSelector.clone(),
        pfjetIdLoose = pfJetIDSelector.clone(),
        
        ntupleFile = cms.string("NtupleMaker.root"),
        inputType = cms.string("DATA")

)
예제 #2
0
## Maximal Number of Events
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100) )

from Analysis.JetAnalysis.multijetStudies_cfi import jetStudies as inputJetStudies
from Analysis.JetAnalysis.multijetStudies_cfi import pfJetStudies as inputPFJetStudies

from PhysicsTools.SelectorUtils.pfJetIDSelector_cfi import pfJetIDSelector as inputPFJetIDSelector
from PhysicsTools.SelectorUtils.jetIDSelector_cfi import jetIDSelector as inputJetIDSelector

process.TFileService = cms.Service("TFileService",
                                   fileName = cms.string("multijetStudies.root")
                                   )


process.multijetAna = cms.EDAnalyzer('EDMultijetAnalysis',
                                     pfJetIDSelector = inputPFJetIDSelector.clone(),
                                     jetIDSelector = inputJetIDSelector.clone(),
                                     jetStudies = inputJetStudies.clone(ptMin = cms.double(50.0)),
                                     pfJetStudies = inputPFJetStudies.clone(ptMin = cms.double(50.0)),
                                     plotParameters = cms.PSet ( doTracks = cms.bool(False),
                                                                 useMC = cms.bool(False)
                                                                 )
                                     )


process.p = cms.Path(
    process.multijetAna
    )

process.MessageLogger.cerr.FwkReport.reportEvery = 10000
예제 #3
0
import FWCore.ParameterSet.Config as cms

from PhysicsTools.SelectorUtils.jetIDSelector_cfi import jetIDSelector
from PhysicsTools.SelectorUtils.pfJetIDSelector_cfi import pfJetIDSelector
from Analysis.BoostedTopAnalysis.BoostedTopWTagParams_cfi import boostedTopWTagParams as inputBoostedTopWTagParams

MistagMakerParams = cms.PSet(
    dijetSelectorParams=cms.PSet(
        jetSrc=cms.InputTag('selectedPatJetsCA8PrunedCalo'),
        pfJetSrc=cms.InputTag('goodPatJetsCA8PrunedPF'),
        metSrc=cms.InputTag('patMETs'),
        pfMetSrc=cms.InputTag('patMETsPF'),
        useCalo=cms.bool(False),
        minNJets=cms.uint32(2),
        ptMin=cms.double(200),
        etaMax=cms.double(2.4),
        htMin=cms.double(0.0),
        ht2Min=cms.double(0.0)),
    jetIDParams=cms.PSet(jetIDSelector.clone()),
    pfJetIDParams=cms.PSet(pfJetIDSelector.clone()),
    boostedTopWTagParams=cms.PSet(inputBoostedTopWTagParams),
    wMassMin=cms.double(60),
    wMassMax=cms.double(100),
    jetPtMin=cms.double(200))
예제 #4
0
        'JEC/MCRUN2_74_V9::All_L1FastJet_AK4PFchs.txt',
        'JEC/MCRUN2_74_V9::All_L2Relative_AK4PFchs.txt',
        'JEC/MCRUN2_74_V9::All_L3Absolute_AK4PFchs.txt'
    ]

if corrMETonTheFly:
    jecLevelsAK4 = [
        'JEC/MCRUN2_74_V9::All_L1FastJet_AK4PF.txt',
        'JEC/MCRUN2_74_V9::All_L2Relative_AK4PF.txt',
        'JEC/MCRUN2_74_V9::All_L3Absolute_AK4PF.txt'
    ]

from PhysicsTools.SelectorUtils.jetIDSelector_cfi import jetIDSelector
process.goodSlimmedJets = cms.EDFilter(
    "JetIDSelectionFunctorFilter",
    filterParams=jetIDSelector.clone(quality=cms.string('LOOSE')),
    src=cms.InputTag("slimmedJets"))

process.goodFatJets = cms.EDFilter(
    "JetIDSelectionFunctorFilter",
    filterParams=jetIDSelector.clone(quality=cms.string('LOOSE')),
    src=cms.InputTag(jetsAK8))

################## Ntuplizer ###################
process.ntuplizer = cms.EDAnalyzer(
    "Ntuplizer",
    runOnMC=cms.bool(runOnMC),
    doPruning=cms.bool(doAK8prunedReclustering),
    doTausBoosted=cms.bool(doSemileptonicTausBoosted),
    vertices=cms.InputTag("offlineSlimmedPrimaryVertices"),
    muons=cms.InputTag("slimmedMuons"),
                      HCalVeto=cms.double(999.0),
                      RelIso=cms.double(0.2),
                      cutsToIgnore=cms.vstring('Chi2', 'D0', 'ED0', 'SD0',
                                               'NHits', 'NValMuHits',
                                               'ECalVeto', 'HCalVeto'),
                      RecalcFromBeamSpot=cms.bool(False),
                      beamLineSrc=cms.InputTag("offlineBeamSpot")),
 # loose electrons
 electronIdLoose=cms.PSet(version=cms.string('FIRSTDATA'),
                          D0=cms.double(999.0),
                          ED0=cms.double(999.0),
                          SD0=cms.double(999.0),
                          RelIso=cms.double(0.2),
                          cutsToIgnore=cms.vstring('D0', 'ED0', 'SD0')),
 # loose jets
 jetIdLoose=jetIDSelector.clone(),
 pfjetIdLoose=pfJetIDSelector.clone(),
 # kinematic cuts
 minJets=cms.int32(1),
 muPlusJets=cms.bool(True),
 ePlusJets=cms.bool(False),
 muPtMin=cms.double(20.0),
 muEtaMax=cms.double(2.1),
 eleEtMin=cms.double(20.0),
 eleEtaMax=cms.double(2.4),
 muPtMinLoose=cms.double(10.0),
 muEtaMaxLoose=cms.double(2.5),
 eleEtMinLoose=cms.double(15.0),
 eleEtaMaxLoose=cms.double(2.5),
 jetPtMin=cms.double(30.0),
 jetEtaMax=cms.double(2.4),
예제 #6
0
   jecLevelsAK4chs = [
       'JEC/MCRUN2_74_V9::All_L1FastJet_AK4PFchs.txt',
       'JEC/MCRUN2_74_V9::All_L2Relative_AK4PFchs.txt',
       'JEC/MCRUN2_74_V9::All_L3Absolute_AK4PFchs.txt'
     ]
  
if corrMETonTheFly:  
   jecLevelsAK4 = [
       'JEC/MCRUN2_74_V9::All_L1FastJet_AK4PF.txt',
       'JEC/MCRUN2_74_V9::All_L2Relative_AK4PF.txt',
       'JEC/MCRUN2_74_V9::All_L3Absolute_AK4PF.txt'
     ]   

from PhysicsTools.SelectorUtils.jetIDSelector_cfi import jetIDSelector
process.goodSlimmedJets = cms.EDFilter("JetIDSelectionFunctorFilter",
                                    filterParams=jetIDSelector.clone(quality = cms.string('LOOSE')),
                                    src=cms.InputTag("slimmedJets")
                                    )                                            

process.goodFatJets = cms.EDFilter("JetIDSelectionFunctorFilter",
                                    filterParams=jetIDSelector.clone(quality = cms.string('LOOSE')),
                                    src=cms.InputTag(jetsAK8)
                                    )
                                                                        
################## Ntuplizer ###################
process.ntuplizer = cms.EDAnalyzer("Ntuplizer",
    runOnMC = cms.bool(runOnMC),
    doPruning = cms.bool(doAK8prunedReclustering),
    doTausBoosted = cms.bool(doSemileptonicTausBoosted),
    vertices = cms.InputTag("offlineSlimmedPrimaryVertices"),
    muons = cms.InputTag("slimmedMuons"),
예제 #7
0
    "PoolSource",
    fileNames=cms.untracked.vstring(
        "dcap:///pnfs/cms/WAX/11/store/user/rappocc/QCD_Pt100to250-madgraph/shyft_35x_v1/7d6b33b2c5d85d3512a9f559ea910755/multijets_1_1.root"
    ),
)
## Maximal Number of Events
process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(100))

from Analysis.JetAnalysis.multijetStudies_cfi import jetStudies as inputJetStudies
from Analysis.JetAnalysis.multijetStudies_cfi import pfJetStudies as inputPFJetStudies

from PhysicsTools.SelectorUtils.pfJetIDSelector_cfi import pfJetIDSelector as inputPFJetIDSelector
from PhysicsTools.SelectorUtils.jetIDSelector_cfi import jetIDSelector as inputJetIDSelector

process.TFileService = cms.Service("TFileService", fileName=cms.string("multijetStudies.root"))


process.multijetAna = cms.EDAnalyzer(
    "EDMultijetAnalysis",
    pfJetIDSelector=inputPFJetIDSelector.clone(),
    jetIDSelector=inputJetIDSelector.clone(),
    jetStudies=inputJetStudies.clone(ptMin=cms.double(50.0)),
    pfJetStudies=inputPFJetStudies.clone(ptMin=cms.double(50.0)),
    plotParameters=cms.PSet(doTracks=cms.bool(False), useMC=cms.bool(False)),
)


process.p = cms.Path(process.multijetAna)

process.MessageLogger.cerr.FwkReport.reportEvery = 10000
def selectObjects(process, cms):
    print '=' * 60
    print "Setting up selected objects"
    print '=' * 60
    ###############################
    #### Selections Setup #########
    ###############################

    ### AK5 Jets
    #calo jets
    process.selectedPatJets.cut = cms.string("pt > 20 & abs(eta) < 2.5")
    #PF jets
    process.selectedPatJetsPFlow.cut = cms.string("pt > 20 & abs(eta) < 2.5")
    process.patJetsPFlow.addTagInfos = True
    process.patJetsPFlow.tagInfoSources = cms.VInputTag(
        cms.InputTag("secondaryVertexTagInfosAODPFlow"))
    process.patJetsPFlow.userData.userFunctions = cms.vstring(
        "? hasTagInfo('secondaryVertex') && tagInfoSecondaryVertex('secondaryVertex').nVertices() > 0 ? "
        "tagInfoSecondaryVertex('secondaryVertex').secondaryVertex(0).p4().mass() : 0"
    )
    process.patJetsPFlow.userData.userFunctionLabels = cms.vstring(
        'secvtxMass')

    # electrons
    process.selectedPatElectrons.cut = cms.string('pt > 10.0 & abs(eta) < 2.5')
    process.patElectrons.embedTrack = cms.bool(True)
    process.selectedPatElectronsPFlow.cut = cms.string(
        'pt > 10.0 & abs(eta) < 2.5')
    process.patElectronsPFlow.embedTrack = cms.bool(True)
    process.selectedPatElectronsLoosePFlow.cut = cms.string(
        'pt > 10.0 & abs(eta) < 2.5')
    process.patElectronsLoosePFlow.embedTrack = cms.bool(True)
    # muons
    process.selectedPatMuons.cut = cms.string('pt > 10.0 & abs(eta) < 2.5')
    process.patMuons.embedTrack = cms.bool(True)
    process.selectedPatMuonsPFlow.cut = cms.string(
        "pt > 10.0 & abs(eta) < 2.5")
    process.patMuonsPFlow.embedTrack = cms.bool(True)
    process.selectedPatMuonsLoosePFlow.cut = cms.string(
        "pt > 10.0 & abs(eta) < 2.5")
    process.patMuonsLoosePFlow.embedTrack = cms.bool(True)
    # taus
    process.selectedPatTausPFlow.cut = cms.string("pt > 10.0 & abs(eta) < 3")
    process.selectedPatTaus.cut = cms.string("pt > 10.0 & abs(eta) < 3")
    process.patTausPFlow.isoDeposits = cms.PSet()
    process.patTaus.isoDeposits = cms.PSet()
    # photons
    process.patPhotonsPFlow.isoDeposits = cms.PSet()
    process.patPhotons.isoDeposits = cms.PSet()

    # Apply jet ID to all of the jets upstream. We aren't going to screw around
    # with this, most likely. So, we don't really to waste time with it
    # at the analysis level.
    #default is version=PURE09, quality=loose ID
    #https://twiki.cern.ch/twiki/bin/view/CMS/JetID#Documentation
    from PhysicsTools.SelectorUtils.jetIDSelector_cfi import jetIDSelector
    process.goodPatJets = cms.EDFilter("JetIDSelectionFunctorFilter",
                                       filterParams=jetIDSelector.clone(),
                                       src=cms.InputTag("selectedPatJets"))

    from PhysicsTools.SelectorUtils.pfJetIDSelector_cfi import pfJetIDSelector
    process.goodPatJetsPFlow = cms.EDFilter(
        "PFJetIDSelectionFunctorFilter",
        filterParams=pfJetIDSelector.clone(),
        src=cms.InputTag("selectedPatJetsPFlow"))
    process.selectedPatJetsForMETtype1p2Corr.src = cms.InputTag(
        'selectedPatJetsPFlow')
    process.selectedPatJetsForMETtype2Corr.src = cms.InputTag(
        'selectedPatJetsPFlow')
예제 #9
0
import FWCore.ParameterSet.Config as cms

from PhysicsTools.SelectorUtils.jetIDSelector_cfi import jetIDSelector
from PhysicsTools.SelectorUtils.pfJetIDSelector_cfi import pfJetIDSelector
from Analysis.BoostedTopAnalysis.BoostedTopWTagParams_cfi import boostedTopWTagParams as inputBoostedTopWTagParams

MistagMakerParams = cms.PSet(
    dijetSelectorParams=cms.PSet(
        jetSrc=cms.InputTag("selectedPatJetsCA8PrunedCalo"),
        pfJetSrc=cms.InputTag("goodPatJetsCA8PrunedPF"),
        metSrc=cms.InputTag("patMETs"),
        pfMetSrc=cms.InputTag("patMETsPF"),
        useCalo=cms.bool(False),
        minNJets=cms.uint32(2),
        ptMin=cms.double(200),
        etaMax=cms.double(2.4),
        htMin=cms.double(0.0),
        ht2Min=cms.double(0.0),
    ),
    jetIDParams=cms.PSet(jetIDSelector.clone()),
    pfJetIDParams=cms.PSet(pfJetIDSelector.clone()),
    boostedTopWTagParams=cms.PSet(inputBoostedTopWTagParams),
    wMassMin=cms.double(60),
    wMassMax=cms.double(100),
    jetPtMin=cms.double(200),
)