-
Notifications
You must be signed in to change notification settings - Fork 0
/
dilepton_fulldataset2017.py
57 lines (47 loc) · 2.34 KB
/
dilepton_fulldataset2017.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import sys
import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing
options = VarParsing.VarParsing ('standard')
options.register('runOnly', '', VarParsing.VarParsing.multiplicity.singleton,VarParsing.VarParsing.varType.string, "Run only specified analysis")
options.register('yodafile', 'TZQ.yoda', VarParsing.VarParsing.multiplicity.singleton,VarParsing.VarParsing.varType.string, "DILEPTON_OUTPUT")
options.setDefault('maxEvents', 13276146)
if(hasattr(sys, "argv")):
options.parseArguments()
print(options)
process = cms.Process("runRivetAnalysis")
# import of standard configurations
process.load('Configuration.StandardSequences.Services_cff')
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(500000)
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(options.maxEvents))
process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring())
process.mergedGenParticles = cms.EDProducer("MergedGenParticleProducer",
inputPruned = cms.InputTag("prunedGenParticles"),
inputPacked = cms.InputTag("packedGenParticles"),
)
process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
process.generator = cms.EDProducer("GenParticles2HepMCConverter",
genParticles = cms.InputTag("mergedGenParticles"),
genEventInfo = cms.InputTag("generator", "", "SIM"),
signalParticlePdgIds = cms.vint32()
)
process.load("GeneratorInterface.RivetInterface.rivetAnalyzer_cfi")
if options.runOnly:
process.rivetAnalyzer.AnalysisNames = cms.vstring(options.runOnly)
else:
process.rivetAnalyzer.AnalysisNames = cms.vstring(
#'CMS_2016_I1434354', # diff xs lepton+jets
#'MC_TTBAR', # MC analysis for lepton+jets
#'MC_TOPMASS_LJETS', # MC analysis for lepton+jets top mass
#'CMS_LesHouches2015', # MC analysis for dilepton
#'MC_GENERIC', # MC generic analysis
#'MC_XS', # MC xs analysis
#'CMS_2018_I1690148', # jet substructure
#'MC_TCH'
#'TZQ_TRILEPTON'
'TZQ_DILEPTON_2017'
)
process.rivetAnalyzer.OutputFile = options.yodafile
process.rivetAnalyzer.HepMCCollection = cms.InputTag("generator:unsmeared")
process.rivetAnalyzer.CrossSection = 0.07358 #(from: XSDB, expressed in pb)
process.p = cms.Path(process.mergedGenParticles*process.generator*process.rivetAnalyzer)