PAT v2 Conversion Guide
Complete:
How to convert an old config file to the new PAT workflow
Overview
The main differences between the new and the old workflow is that:
- There is no longer a 'layer 0'. there is just:
- Duplicated Electron and Photon removal, only for 2.2.X (in 3.0.X the POG will take care of it correctly).
- Some extra reconstruction on top of AOD (e.g. extra electron ids, trigger matching, ...)
- After this step, we produce PAT objects: the
allLayer1Objects
- Such objects are then passed through a preselection step:
selectedLayer1Objects
- Selected objects are then passed through a cleaning step to produce the
cleanLayer1Objects
You can turn off the layer 1 cleaning step with these lines in your config file:
from CMS.PhysicsTools.PatAlgos.tools.coreTools import removeCleaning
removeCleaning(process)
You must then also update your output module configuration to use the
patEventContentNoLayer1Cleaning
instead of the
patEventContent
An example config file is
patLayer1_fromAOD_noLayer1Cleaning_full.cfg.py
Note: layer 1 cleaning is of course turned off in the
PF2PAT example config files, as the cleaning is performed by the
PF2PAT sequence.
Recipe for the impatient user
- remove
patLayer1_cff
and patLayer0_cff
; load instead patSequences_cff
- remove
patLayer1
and patLayer0
replace with patDefaultSequence
- replace the EventContent part
## OLD
process.load( "CMS.PhysicsTools.PatAlgos.patLayer1_EventContent_cff" )
process.out.outputCommands.extend( process.patLayer1EventContent )
## NEW
from CMS.PhysicsTools.PatAlgos.patEventContent_cff import *
process.out.outputCommands += patEventContent
- Warning: patEventContent only contains the PAT Objects. You should add yourself the other AOD objects you want to keep.
- replace
PATLayer0Summary
with PATSummaryTables
in the MessageLogger configuration
Review status
Responsible:
GiovanniPetrucciani
Last reviewed by:
GiovanniPetrucciani