-
Notifications
You must be signed in to change notification settings - Fork 1
/
FlatQCD-Herwig7-13000GeV_cfg_default.py
executable file
·179 lines (151 loc) · 7.96 KB
/
FlatQCD-Herwig7-13000GeV_cfg_default.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# Auto generated configuration file
# using:
# Revision: 1.19
# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
# with command line options: GeneratorInterface/Herwig7Interface/python/Herwig7_Dummy_ConfigFile_cff.py --fileout file:Herwigpp_ConfigFile_GEN_SIM.root --mc --eventcontent RAWSIM --datatier GEN-SIM --conditions auto:run2_mc --beamspot Realistic25ns13TeVEarly2017Collision --step GEN,SIM --nThreads 8 --geometry DB:Extended --era Run2_2017 --python_filename Herwig7Test_ConfigFile_GEN_SIM.py --no_exec --customise Configuration/DataProcessing/Utils.addMonitoring -n 100
import FWCore.ParameterSet.Config as cms
from Configuration.StandardSequences.Eras import eras
process = cms.Process('SIM',eras.Run2_2017)
# import of standard configurations
process.load('Configuration.StandardSequences.Services_cff')
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Configuration.EventContent.EventContent_cff')
process.load('SimGeneral.MixingModule.mixNoPU_cfi')
process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
process.load('Configuration.StandardSequences.GeometrySimDB_cff')
process.load('Configuration.StandardSequences.MagneticField_cff')
process.load('Configuration.StandardSequences.Generator_cff')
process.load('IOMC.EventVertexGenerators.VtxSmearedRealistic25ns13TeVEarly2017Collision_cfi')
process.load('GeneratorInterface.Core.genFilterSummary_cff')
process.load('Configuration.StandardSequences.SimIdeal_cff')
process.load('Configuration.StandardSequences.EndOfProcess_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(50000)
)
# Input source
process.source = cms.Source("EmptySource")
process.options = cms.untracked.PSet(
)
# Production Info
process.configurationMetadata = cms.untracked.PSet(
annotation = cms.untracked.string('GeneratorInterface/Herwig7Interface/python/Herwig7_Dummy_ConfigFile_cff.py nevts:5'),
name = cms.untracked.string('Applications'),
version = cms.untracked.string('$Revision: 1.19 $')
)
# Output definition
process.RAWSIMoutput = cms.OutputModule("PoolOutputModule",
SelectEvents = cms.untracked.PSet(
SelectEvents = cms.vstring('generation_step')
),
compressionAlgorithm = cms.untracked.string('LZMA'),
compressionLevel = cms.untracked.int32(9),
dataset = cms.untracked.PSet(
dataTier = cms.untracked.string('GEN-SIM'),
filterName = cms.untracked.string('')
),
eventAutoFlushCompressedSize = cms.untracked.int32(20971520),
fileName = cms.untracked.string('file:Herwigpp_ConfigFile_GEN_SIM.root'),
outputCommands = process.RAWSIMEventContent.outputCommands,
splitLevel = cms.untracked.int32(0)
)
# Additional output definition
# Other statements
process.XMLFromDBSource.label = cms.string("Extended")
process.genstepfilter.triggerConditions=cms.vstring("generation_step")
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
process.generator = cms.EDFilter("Herwig7GeneratorFilter",
configFiles = cms.vstring(),
dumpConfig = cms.untracked.string('HerwigConfig13.in'),
hw_com = cms.vstring(
'read snippets/PPCollider.in',
'cd /Herwig/Generators',
'set EventGenerator:EventHandler:LuminosityFunction:Energy 13000.0',
'set /Herwig/Particles/mu-:Stable Stable',
'set /Herwig/Particles/mu+:Stable Stable',
'set /Herwig/Particles/Sigma-:Stable Stable',
'set /Herwig/Particles/Sigmabar+:Stable Stable',
'set /Herwig/Particles/Lambda0:Stable Stable',
'set /Herwig/Particles/Lambdabar0:Stable Stable',
'set /Herwig/Particles/Sigma+:Stable Stable',
'set /Herwig/Particles/Sigmabar-:Stable Stable',
'set /Herwig/Particles/Xi-:Stable Stable',
'set /Herwig/Particles/Xibar+:Stable Stable',
'set /Herwig/Particles/Xi0:Stable Stable',
'set /Herwig/Particles/Xibar0:Stable Stable',
'set /Herwig/Particles/Omega-:Stable Stable',
'set /Herwig/Particles/Omegabar+:Stable Stable',
'set /Herwig/Particles/pi+:Stable Stable',
'set /Herwig/Particles/pi-:Stable Stable',
'set /Herwig/Particles/K+:Stable Stable',
'set /Herwig/Particles/K-:Stable Stable',
'set /Herwig/Particles/K_S0:Stable Stable',
'set /Herwig/Particles/K_L0:Stable Stable',
'mkdir /Herwig/Weights',
'cd /Herwig/Weights',
'create ThePEG::ReweightMinPT reweightMinPT ReweightMinPT.so',
'cd /Herwig/MatrixElements/',
'insert SubProcess:MatrixElements[0] MEQCD2to2',
'insert SubProcess:Preweights[0] /Herwig/Weights/reweightMinPT',
'cd /',
'set /Herwig/Weights/reweightMinPT:Power 4.5',
'set /Herwig/Weights/reweightMinPT:Scale 15*GeV',
'set /Herwig/Cuts/FirstJet:PtMin 8.*GeV',
),
parameterSets = cms.vstring('hw_com'),
crossSection = cms.untracked.double(-1),
dataLocation = cms.string('${HERWIGPATH:-6}'),
eventHandlers = cms.string('/Herwig/EventHandlers'),
filterEfficiency = cms.untracked.double(1.0),
generatorModule = cms.string('/Herwig/Generators/EventGenerator'),
repository = cms.string('${HERWIGPATH}/HerwigDefaults.rpo'),
run = cms.string('run13'),
runModeList = cms.untracked.string("read,run"),
seed = cms.untracked.int32(11),
)
process.ProductionFilterSequence = cms.Sequence(process.generator)
# Path and EndPath definitions
process.generation_step = cms.Path(process.pgen)
process.simulation_step = cms.Path(process.psim)
process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
process.endjob_step = cms.EndPath(process.endOfProcess)
process.RAWSIMoutput_step = cms.EndPath(process.RAWSIMoutput)
# Schedule definition
process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.RAWSIMoutput_step)
from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
associatePatAlgosToolsTask(process)
#Setup FWK for multithreaded
process.options.numberOfThreads=cms.untracked.uint32(1)
process.options.numberOfStreams=cms.untracked.uint32(0)
# filter all path with the production filter sequence
for path in process.paths:
getattr(process,path)._seq = process.ProductionFilterSequence * getattr(process,path)._seq
# customisation of the process.
# Automatic addition of the customisation function from Configuration.DataProcessing.Utils
from Configuration.DataProcessing.Utils import addMonitoring
#call to customisation function addMonitoring imported from Configuration.DataProcessing.Utils
process = addMonitoring(process)
# End of customisation functions
# Customisation from command line
# Add early deletion of temporary data products to reduce peak memory need
from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
process = customiseEarlyDelete(process)
# End adding early deletion
# customisation of the process.
process.load('GeneratorInterface.RivetInterface.rivetAnalyzer_cfi')
# Automatic addition of the customisation function from Configuration.GenProduction.rivet_customize
#from Configuration.GenProduction.rivet_customize import customise
def customise(process):
process.load('GeneratorInterface.RivetInterface.rivetAnalyzer_cfi')
process.rivetAnalyzer.AnalysisNames = cms.vstring('CMS_2018_I1682495','CMS_2016_I1459051')
process.rivetAnalyzer.CrossSection = cms.double(1.0)
process.rivetAnalyzer.OutputFile = cms.string('H7-QCD-13TeV.yoda')
process.rivetAnalyzer.UseExternalWeight = cms.bool(True)
process.rivetAnalyzer.useGENweights = cms.bool(True)
process.generation_step+=process.rivetAnalyzer
process.schedule.remove(process.RAWSIMoutput_step)
return(process)
#call to customisation function customise imported from Configuration.GenProduction.rivet_customize
process = customise(process)