CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
patTemplate_cfg.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask
3 from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger
4 
5 process = cms.Process("PAT", stage2L1Trigger)
6 
7 ## MessageLogger
8 process.load("FWCore.MessageLogger.MessageLogger_cfi")
9 
10 ## Options and Output Report
11 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
12 
13 ## Source
14 process.source = cms.Source("PoolSource",
15  fileNames = cms.untracked.vstring()
16 )
17 ## Maximal Number of Events
18 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100) )
19 
20 ## Geometry and Detector Conditions (needed for a few patTuple production steps)
21 process.load("Configuration.Geometry.GeometryRecoDB_cff")
22 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
23 from Configuration.AlCa.GlobalTag import GlobalTag
24 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc')
25 process.load("Configuration.StandardSequences.MagneticField_cff")
26 
27 ## Output Module Configuration (expects a path 'p')
28 from PhysicsTools.PatAlgos.patEventContent_cff import patEventContentNoCleaning
29 process.out = cms.OutputModule("PoolOutputModule",
30  fileName = cms.untracked.string('patTuple.root'),
31  ## save only events passing the full path
32  #SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('p') ),
33  ## save PAT output; you need a '*' to unpack the list of commands
34  ## 'patEventContent'
35  outputCommands = cms.untracked.vstring('drop *', *patEventContentNoCleaning )
36  )
37 
38 patAlgosToolsTask = getPatAlgosToolsTask(process)
39 process.outpath = cms.EndPath(process.out, patAlgosToolsTask)
def getPatAlgosToolsTask
Definition: helpers.py:13