Esempio n. 1
0
process.slimmedJets.clearDaughters = False
#process.slimmedElectrons.dropRecHits = True
#process.slimmedElectrons.dropBasicClusters = True
#process.slimmedElectrons.dropPFlowClusters = True
#process.slimmedElectrons.dropPreshowerClusters = True

from PhysicsTools.PatAlgos.tools.trigTools import switchOnTriggerStandAlone
switchOnTriggerStandAlone( process )
process.patTrigger.packTriggerPathNames = cms.bool(True)

#                                         ##
#   process.options.wantSummary = False   ##  (to suppress the long output at the end of the job)
#                                         ##

# apply type I/type I + II PFMEt corrections to pat::MET object
# and estimate systematic uncertainties on MET
from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection
from PhysicsTools.PatUtils.tools.metUncertaintyTools import runMEtUncertainties
addJetCollection(process, postfix   = "ForMetUnc", labelName = 'AK5PF', jetSource = cms.InputTag('ak5PFJets'), jetCorrections = ('AK5PF', ['L1FastJet', 'L2Relative', 'L3Absolute'], ''), btagDiscriminators = ['combinedSecondaryVertexBJetTags' ] )
runMEtUncertainties(process,jetCollection="selectedPatJetsAK5PFForMetUnc", outputModule=None)

#   process.out.outputCommands = [ ... ]  ##  (e.g. taken from PhysicsTools/PatAlgos/python/patEventContent_cff.py)
#                                         ##
process.out.fileName = 'patTuple_micro.root'
process.out.outputCommands = process.MicroEventContentMC.outputCommands
process.out.dropMetaData = cms.untracked.string('ALL')
process.out.fastCloning= cms.untracked.bool(False)
process.out.overrideInputFileSplitLevels = cms.untracked.bool(True)

Esempio n. 2
0
### =====================================================================================================
# Define the input source
fname = 'root://eoscms.cern.ch//store/relval/CMSSW_8_0_20/RelValTTbar_13/GEN-SIM-RECO/80X_mcRun2_asymptotic_2016_TrancheIV_v4_Tr4GT_v4-v1/00000/1E399A96-C47A-E611-A718-0025905B8572.root'

# Define the input source
process.source = cms.Source("PoolSource",
                            fileNames=cms.untracked.vstring([fname]))

### ---------------------------------------------------------------------------
### Removing the HF from the MET computation
### ---------------------------------------------------------------------------
if not useHFCandidates:
    process.noHFCands = cms.EDFilter(
        "CandPtrSelector",
        src=cms.InputTag("packedPFCandidates"),
        cut=cms.string("abs(pdgId)!=1 && abs(pdgId)!=2 && abs(eta)<3.0"))

#jets are rebuilt from those candidates by the tools, no need to do anything else
### =================================================================================

from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties import runMETCorrectionsAndUncertainties

process.load("PhysicsTools.PatAlgos.producersLayer1.jetProducer_cff")
process.load("PhysicsTools.PatAlgos.selectionLayer1.jetSelector_cfi")
#default configuration for miniAOD reprocessing, change the isData flag to run on data
#for a full met computation, remove the pfCandColl input
runMETCorrectionsAndUncertainties(process,
                                  #isData=runOnData,
                                  )
Esempio n. 3
0
process.selectedPatJets.cut = cms.string("pt > 10")
process.selectedPatMuons.cut = cms.string(
    "pt > 5 || isPFMuon || (pt > 3 && (isGlobalMuon || isStandAloneMuon || numberOfMatches > 0 || muonID('RPCMuLoose')))"
)
process.selectedPatElectrons.cut = cms.string("")
process.selectedPatTaus.cut = cms.string(
    "pt > 20 && tauID('decayModeFinding')> 0.5")
process.selectedPatPhotons.cut = cms.string("pt > 15 && hadTowOverEm()<0.15 ")

process.slimmedJets.clearDaughters = False

from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection

addJetCollection(process,
                 labelName='CA8',
                 jetSource=cms.InputTag('ca8PFJetsCHS'))
process.selectedPatJetsCA8.cut = cms.string("pt > 100")

process.slimmedJetsCA8 = cms.EDProducer(
    "PATJetSlimmer",
    src=cms.InputTag("selectedPatJetsCA8"),
    map=cms.InputTag("packedPFCandidates"),
    clearJetVars=cms.bool(True),
    clearDaughters=cms.bool(False),
    clearTrackRefs=cms.bool(True),
    dropSpecific=cms.bool(False),
)
process.slimmedJetsCA8.clearDaughters = False

## PU JetID
process.load("PhysicsTools.PatAlgos.slimming.pileupJetId_cfi")