Exemplo n.º 1
0
def run22XonSummer08AODSIM(process, layers=[0, 1]):
    ## (A): Drop FLow on input
    process.source.inputCommands = cms.untracked.vstring(
        'keep *',
        'drop *_particleFlow_*_*',
        #'drop *_particleFlowBlock_*_*',
    )
    ## (B): Also switch to CaloTau (temporary workaround)
    print "WARNING: to run on Summer08AODSIM from 2.2.X requirs to drop ParticleFlow,\n\tso PAT will switch from PFTau to CaloTau"
    from PhysicsTools.PatAlgos.tools.tauTools import switchToCaloTau
    switchToCaloTau(process)
Exemplo n.º 2
0
## import skeleton process
from PhysicsTools.PatAlgos.patTemplate_cfg import *

## ------------------------------------------------------
#  switch to CaloTau. Outputs will be:
#  - patCaloTaus,
#  - selectedPatCaloTaus,
#  - cleanPatCaloTaus
## ------------------------------------------------------
from PhysicsTools.PatAlgos.tools.tauTools import switchToCaloTau
switchToCaloTau(process)

## let it run
process.p = cms.Path(
            process.patDefaultSequence
            )

## ------------------------------------------------------
#  In addition you usually want to change the following
#  parameters:
## ------------------------------------------------------
#
#   process.GlobalTag.globaltag =  ...    ##  (according to https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions)
#                                         ##
from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValProdTTbarAODSIM
process.source.fileNames = filesRelValProdTTbarAODSIM
#                                         ##
process.maxEvents.input = 10
#                                         ##
#   process.out.outputCommands = [ ... ]  ##  (e.g. taken from PhysicsTools/PatAlgos/python/patEventContent_cff.py)
#                                         ##
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100) )


process.load("Configuration.StandardSequences.Geometry_cff")
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
process.GlobalTag.globaltag = cms.string('STARTUP_V4::All')
process.load("Configuration.StandardSequences.MagneticField_cff")

# PAT Layer 0+1
process.load("PhysicsTools.PatAlgos.patLayer0_cff")
process.load("PhysicsTools.PatAlgos.patLayer1_cff")
#process.content = cms.EDAnalyzer("EventContentAnalyzer")

# Switch to CaloTau (outputs will be allLayer0CaloTaus, allLayer1Taus, selectedLayer1Taus)
from PhysicsTools.PatAlgos.tools.tauTools import switchToCaloTau
switchToCaloTau(process)

process.p = cms.Path(
        #process.content +             # uncomment to get a dump of the input to PAT
        process.patLayer0 +
        process.patLayer1
)


# Output module configuration
process.out = cms.OutputModule("PoolOutputModule",
    fileName = cms.untracked.string('PATLayer1_Output.fromAOD_CaloTau_full.root'),
    # save only events passing the full path
    SelectEvents   = cms.untracked.PSet( SelectEvents = cms.vstring('p') ),
    outputCommands = cms.untracked.vstring('drop *')
)