CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
patTemplate_cfg.py
Go to the documentation of this file.
2 
3 process = cms.Process("PAT")
4 
5 ## MessageLogger
6 process.load("FWCore.MessageLogger.MessageLogger_cfi")
7 
8 ## Options and Output Report
9 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
10 
11 ## Source
12 from PhysicsTools.PatAlgos.tools.cmsswVersionTools import pickRelValInputFiles
13 process.source = cms.Source("PoolSource",
14  fileNames = cms.untracked.vstring(
15  pickRelValInputFiles( cmsswVersion = 'CMSSW_4_2_0_pre8'
16  , relVal = 'RelValTTbar'
17  , globalTag = 'START42_V7'
18  , numberOfFiles = 1
19  )
20  )
21 )
22 ## Maximal Number of Events
23 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100) )
24 
25 ## Geometry and Detector Conditions (needed for a few patTuple production steps)
26 process.load("Configuration.StandardSequences.Geometry_cff")
27 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
28 from Configuration.PyReleaseValidation.autoCond import autoCond
29 process.GlobalTag.globaltag = cms.string( autoCond[ 'startup' ] )
30 process.load("Configuration.StandardSequences.MagneticField_cff")
31 
32 ## Standard PAT Configuration File
33 process.load("PhysicsTools.PatAlgos.patSequences_cff")
34 
35 ## Output Module Configuration (expects a path 'p')
36 from PhysicsTools.PatAlgos.patEventContent_cff import patEventContent
37 process.out = cms.OutputModule("PoolOutputModule",
38  fileName = cms.untracked.string('patTuple.root'),
39  # save only events passing the full path
40  SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('p') ),
41  # save PAT Layer 1 output; you need a '*' to
42  # unpack the list of commands 'patEventContent'
43  outputCommands = cms.untracked.vstring('drop *', *patEventContent )
44  )
45 
46 process.outpath = cms.EndPath(process.out)