Exemplo n.º 1
0
## If running over data, remove GenJets
if options.runOnData:
    process.prePATSeq.remove(process.prunedGenParticles)
    process.jetSeq.remove(process.ak6GenJetsNoNu)
    process.jetSeq.remove(process.ak6GenJetsNoNuRU)
    #process.jetSeq.remove(process.ak8GenJetsNoNu)
    #process.jetSeq.remove(process.ak10GenJetsNoNu)

## We only want to use HLT filtering on data
if not options.useHLTFiltering:
    process.trigSeq.remove(process.hltFilter)

### Add PF2PAT output to the created file
from PhysicsTools.PatAlgos.patEventContent_cff import patEventContentNoCleaning
patEventContentNoCleaning.append('drop *_selectedPatJets_*_*')
patEventContentNoCleaning.append('drop *_selectedPatElectrons_*_*')
patEventContentNoCleaning.append('drop *_selectedPatMuons_*_*')
patEventContentNoCleaning.append('drop *_patMETs_*_*')
patEventContentNoCleaning.append('drop *_selectedPatTaus*_*_*')
patEventContentNoCleaning.append('keep GenRunInfoProduct_generator_*_*')
patEventContentNoCleaning.append('keep GenEventInfoProduct_generator_*_*')
patEventContentNoCleaning.append('keep PileupSummaryInfos_*_*_*')
patEventContentNoCleaning.append('keep *_prunedGenParticles_*_*')
patEventContentNoCleaning.append('keep *_offlineBeamSpot_*_*')
patEventContentNoCleaning.append('keep *_generalTracks_*_*')
patEventContentNoCleaning.append('keep *_offlinePrimaryVertices_*_*')
patEventContentNoCleaning.append('keep *_kt6PFJets_rho_*')
patEventContentNoCleaning.append('keep LumiSummary_lumiProducer_*_*')
patEventContentNoCleaning.append('drop *_TriggerResults_*_*')
patEventContentNoCleaning.append('keep *_TriggerResults_*_HLT')
    cut = cms.string('!isFake & ndof > 4 & abs(z) <= 24 & position.Rho <= 2'),
    filter = cms.bool(True)
)

## Define a sequence of trigger filters
process.trigSeq = cms.Sequence(
    process.hltFilter
)

## We only want to use HLT filtering on data
if not options.useHLTFiltering:
    process.trigSeq.remove(process.hltFilter)

## Add PF2PAT output to the created file
from PhysicsTools.PatAlgos.patEventContent_cff import patEventContentNoCleaning
patEventContentNoCleaning.append('drop *_selectedPatPFParticlesPFlow_*_*')
patEventContentNoCleaning.append('drop *_selectedPatJetsPFlow_*_*')
patEventContentNoCleaning.append('keep GenEventInfoProduct_generator_*_*')
patEventContentNoCleaning.append('keep PileupSummaryInfos_*_*_*')
## GenParticles
patEventContentNoCleaning.append('keep recoGenParticles_genParticles_*_*')
## For PF jets
patEventContentNoCleaning.append('keep *_pfNoElectronPFlow_*_*')
patEventContentNoCleaning.append('keep *_kt6PFJets_rho_*')
## HLT trigger results
patEventContentNoCleaning.append('drop *_TriggerResults_*_*')
patEventContentNoCleaning.append('keep *_TriggerResults_*_HLT')
## For b tagging
patEventContentNoCleaning.append('keep *_offlineBeamSpot_*_*')
patEventContentNoCleaning.append('keep *_generalTracks_*_*')
patEventContentNoCleaning.append('keep *_goodOfflinePrimaryVertices_*_*')