1 |
malbouis |
1.1 |
#
|
2 |
|
|
# SUSY-PAT configuration file
|
3 |
|
|
#
|
4 |
|
|
# PAT configuration for the SUSY group - 42X series
|
5 |
|
|
# More information here:
|
6 |
|
|
# https://twiki.cern.ch/twiki/bin/view/CMS/SusyPatLayer1DefV10
|
7 |
|
|
#
|
8 |
|
|
|
9 |
|
|
# Starting with a skeleton process which gets imported with the following line
|
10 |
|
|
from PhysicsTools.PatAlgos.patTemplate_cfg import *
|
11 |
|
|
|
12 |
|
|
#-- Meta data to be logged in DBS ---------------------------------------------
|
13 |
|
|
process.configurationMetadata = cms.untracked.PSet(
|
14 |
|
|
version = cms.untracked.string('$Revision: 1.38 $'),
|
15 |
|
|
name = cms.untracked.string('$Source: /cvs/CMSSW/CMSSW/PhysicsTools/Configuration/test/SUSY_pattuple_cfg.py,v $'),
|
16 |
|
|
annotation = cms.untracked.string('SUSY pattuple definition')
|
17 |
|
|
)
|
18 |
|
|
|
19 |
|
|
#-- Message Logger ------------------------------------------------------------
|
20 |
|
|
process.MessageLogger.categories.append('PATSummaryTables')
|
21 |
|
|
process.MessageLogger.cerr.PATSummaryTables = cms.untracked.PSet(
|
22 |
|
|
limit = cms.untracked.int32(-1),
|
23 |
|
|
reportEvery = cms.untracked.int32(1)
|
24 |
|
|
)
|
25 |
|
|
process.MessageLogger.cerr.FwkReport.reportEvery = 100
|
26 |
|
|
|
27 |
|
|
#-- VarParsing ----------------------------------------------------------------
|
28 |
|
|
import FWCore.ParameterSet.VarParsing as VarParsing
|
29 |
|
|
options = VarParsing.VarParsing ('standard')
|
30 |
|
|
|
31 |
|
|
options.output = "Hbb_PAT.root"
|
32 |
|
|
options.maxEvents = 100
|
33 |
|
|
# for SusyPAT configuration
|
34 |
|
|
options.register('GlobalTag', "", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "GlobalTag to use (if empty default Pat GT is used)")
|
35 |
|
|
options.register('mcInfo', True, VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.int, "process MonteCarlo data")
|
36 |
|
|
options.register('jetCorrections', 'L1FastJet', VarParsing.VarParsing.multiplicity.list, VarParsing.VarParsing.varType.string, "Level of jet corrections to use: Note the factors are read from DB via GlobalTag")
|
37 |
|
|
options.jetCorrections.append('L2Relative')
|
38 |
|
|
options.jetCorrections.append('L3Absolute')
|
39 |
|
|
options.register('hltName', 'HLT', VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "HLT menu to use for trigger matching")
|
40 |
|
|
options.register('mcVersion', '', VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "Currently not needed and supported")
|
41 |
|
|
options.register('jetTypes', '', VarParsing.VarParsing.multiplicity.list, VarParsing.VarParsing.varType.string, "Additional jet types that will be produced (AK5Calo and AK5PF, cross cleaned in PF2PAT, are included anyway)")
|
42 |
|
|
options.register('hltSelection', '', VarParsing.VarParsing.multiplicity.list, VarParsing.VarParsing.varType.string, "hlTriggers (OR) used to filter events")
|
43 |
|
|
options.register('doValidation', False, VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.int, "Include the validation histograms from SusyDQM (needs extra tags)")
|
44 |
|
|
options.register('doExtensiveMatching', False, VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.int, "Matching to simtracks (needs extra tags)")
|
45 |
|
|
options.register('doSusyTopProjection', False, VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.int, "Apply Susy selection in PF2PAT to obtain lepton cleaned jets (needs validation)")
|
46 |
|
|
options.register('addKeep', '', VarParsing.VarParsing.multiplicity.list, VarParsing.VarParsing.varType.string, "Additional keep and drop statements to trim the event content")
|
47 |
|
|
|
48 |
|
|
#---parse user input
|
49 |
|
|
options.parseArguments()
|
50 |
|
|
options._tagOrder =[]
|
51 |
|
|
|
52 |
|
|
#-- Input Source --------------------------------------------------------------
|
53 |
|
|
if options.files:
|
54 |
|
|
process.source.fileNames = cms.untracked.vstring (options.files)
|
55 |
|
|
process.source.fileNames = [
|
56 |
malbouis |
1.2 |
'root://xrootd.unl.edu//store/mc/Summer11/DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola/AODSIM/PU_S4_START42_V11-v1/0000/84DCBCB4-A49C-E011-AF91-001A4BA82032.root'
|
57 |
malbouis |
1.1 |
]
|
58 |
|
|
|
59 |
|
|
process.maxEvents.input = options.maxEvents
|
60 |
|
|
# Due to problem in production of LM samples: same event number appears multiple times
|
61 |
|
|
process.source.duplicateCheckMode = cms.untracked.string('noDuplicateCheck')
|
62 |
|
|
|
63 |
|
|
#-- Calibration tag -----------------------------------------------------------
|
64 |
|
|
if options.GlobalTag:
|
65 |
|
|
process.GlobalTag.globaltag = options.GlobalTag
|
66 |
|
|
|
67 |
|
|
############################# START SUSYPAT specifics ####################################
|
68 |
|
|
from PhysicsTools.Configuration.SUSY_pattuple_cff import addDefaultSUSYPAT, getSUSY_pattuple_outputCommands
|
69 |
|
|
#Apply SUSYPAT
|
70 |
|
|
addDefaultSUSYPAT(process,options.mcInfo,options.hltName,options.jetCorrections,options.mcVersion,options.jetTypes,options.doValidation,options.doExtensiveMatching,options.doSusyTopProjection)
|
71 |
|
|
SUSY_pattuple_outputCommands = getSUSY_pattuple_outputCommands( process )
|
72 |
|
|
############################## END SUSYPAT specifics ####################################
|
73 |
|
|
|
74 |
|
|
#-- HLT selection ------------------------------------------------------------
|
75 |
|
|
import HLTrigger.HLTfilters.hltHighLevel_cfi as hlt
|
76 |
|
|
if options.hltSelection:
|
77 |
|
|
process.hltFilter = hlt.hltHighLevel.clone(
|
78 |
|
|
HLTPaths = cms.vstring(options.hltSelection),
|
79 |
|
|
TriggerResultsTag = cms.InputTag("TriggerResults","",options.hltName),
|
80 |
|
|
throw = False
|
81 |
|
|
)
|
82 |
|
|
process.susyPatDefaultSequence.replace(process.eventCountProducer, process.eventCountProducer * process.hltFilter)
|
83 |
|
|
|
84 |
|
|
#-- Output module configuration -----------------------------------------------
|
85 |
|
|
process.out.fileName = options.output
|
86 |
|
|
|
87 |
|
|
# Custom settings
|
88 |
|
|
process.out.splitLevel = cms.untracked.int32(99) # Turn on split level (smaller files???)
|
89 |
|
|
process.out.overrideInputFileSplitLevels = cms.untracked.bool(True)
|
90 |
|
|
process.out.dropMetaData = cms.untracked.string('DROPPED') # Get rid of metadata related to dropped collections
|
91 |
|
|
process.out.outputCommands = cms.untracked.vstring('drop *', *SUSY_pattuple_outputCommands )
|
92 |
|
|
if options.hltSelection:
|
93 |
|
|
process.out.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring("p"))
|
94 |
|
|
if options.addKeep:
|
95 |
|
|
process.out.outputCommands.extend(options.addKeep)
|
96 |
|
|
|
97 |
|
|
#-- Execution path ------------------------------------------------------------
|
98 |
|
|
# Full path
|
99 |
malbouis |
1.2 |
process.p = cms.Path( process.susyPatDefaultSequence)
|
100 |
malbouis |
1.1 |
#-- Dump config ------------------------------------------------------------
|
101 |
|
|
file = open('SusyPAT_cfg.py','w')
|
102 |
|
|
file.write(str(process.dumpPython()))
|
103 |
|
|
file.close()
|