Skip to content

Commit

Permalink
Backport the changes on cfi/cff files in `Configuration/Generator/pyt…
Browse files Browse the repository at this point in the history
…hon` to enable concurrent GEN

 Big backport from cms-sw#34710 following the same four-step rule. It also includes the backport of cms-sw#29305, cms-sw#33516, cms-sw#34463 with the same goal (these are never backported to 10_6_X)
  • Loading branch information
colizz committed Aug 5, 2021
1 parent 54a5120 commit 9f49128
Show file tree
Hide file tree
Showing 181 changed files with 649 additions and 176 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
generator = cms.EDFilter("Pythia8GeneratorFilter",
generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter",
pythiaPylistVerbosity = cms.untracked.int32(1),
filterEfficiency = cms.untracked.double(1.0),
pythiaHepMCVerbosity = cms.untracked.bool(False),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import FWCore.ParameterSet.Config as cms
generator = cms.EDFilter("Pythia8GeneratorFilter",
generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter",
pythiaPylistVerbosity = cms.untracked.int32(1),
filterEfficiency = cms.untracked.double(1.0),
pythiaHepMCVerbosity = cms.untracked.bool(False),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
generator = cms.EDFilter("Pythia8GeneratorFilter",
generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter",
pythiaPylistVerbosity = cms.untracked.int32(1),
filterEfficiency = cms.untracked.double(1.0),
pythiaHepMCVerbosity = cms.untracked.bool(False),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import FWCore.ParameterSet.Config as cms

_generator = cms.EDFilter("AMPTGeneratorFilter",
diquarky = cms.double(0.0),
diquarkx = cms.double(0.0),
diquarkpx = cms.double(7.0),
ntmax = cms.int32(1000),
dpcoal = cms.double(1000000.0),
diquarkembedding = cms.int32(0),
maxmiss = cms.int32(1000),
ktkick = cms.int32(1),
mu = cms.double(3.2264),
quenchingpar = cms.double(2.0),
popcornpar = cms.double(1.0),
drcoal = cms.double(1000000.0),
amptmode = cms.int32(1),
izpc = cms.int32(0),
popcornmode = cms.bool(True),
minijetpt = cms.double(-7.0),
ks0decay = cms.bool(False),
alpha = cms.double(0.47140452),
dt = cms.double(0.2),
rotateEventPlane = cms.bool(True),
shadowingmode = cms.bool(True),
diquarkpy = cms.double(0.0),
deuteronfactor = cms.int32(5),
stringFragB = cms.double(0.9),#default value in Hijing. Good for pA
quenchingmode = cms.bool(False),
stringFragA = cms.double(0.5),
deuteronmode = cms.int32(0),
doInitialAndFinalRadiation = cms.int32(3),
phidecay = cms.bool(True),
deuteronxsec = cms.int32(1),
pthard = cms.double(2.0),
firstRun = cms.untracked.uint32(1),
frame = cms.string('CMS'),
targ = cms.string('P'),
izp = cms.int32(82),
bMin = cms.double(0),
firstEvent = cms.untracked.uint32(1),
izt = cms.int32(1),
proj = cms.string('A'),
comEnergy = cms.double(5020.0),
iat = cms.int32(1),
bMax = cms.double(15),
iap = cms.int32(208)
)

from GeneratorInterface.Core.ExternalGeneratorFilter import ExternalGeneratorFilter
generator = ExternalGeneratorFilter(_generator)

configurationMetadata = cms.untracked.PSet(
version = cms.untracked.string('$Revision$'),
name = cms.untracked.string('$Source$'),
annotation = cms.untracked.string('AMPT PPb 5020 GeV Minimum Bias')
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.MCTunes2017.PythiaCP5Settings_cfi import *
from GeneratorInterface.EvtGenInterface.EvtGenSetting_cff import *

_generator = cms.EDFilter("Pythia8GeneratorFilter",
comEnergy = cms.double(13000.0),
crossSection = cms.untracked.double(54000000000),
filterEfficiency = cms.untracked.double(3.0e-4),
pythiaHepMCVerbosity = cms.untracked.bool(False),
maxEventsToPrint = cms.untracked.int32(0),
pythiaPylistVerbosity = cms.untracked.int32(0),
ExternalDecays = cms.PSet(
#using alternative name for decayer
EvtGen1 = cms.untracked.PSet(
#uses latest evt and decay tables from evtgen 1.6
decay_table = cms.string('GeneratorInterface/EvtGenInterface/data/DECAY_2014_NOLONGLIFE.DEC'),
particle_property_file = cms.FileInPath('GeneratorInterface/EvtGenInterface/data/evt_2014.pdl'),
convertPythiaCodes = cms.untracked.bool(False),
#here we will use the user.dec store in the release
user_decay_file = cms.vstring('GeneratorInterface/ExternalDecays/data/Bs_mumu.dec'),
list_forced_decays = cms.vstring('MyB_s0','Myanti-B_s0'),
operates_on_particles = cms.vint32()
),
parameterSets = cms.vstring('EvtGen1')
),
PythiaParameters = cms.PSet(
pythia8CommonSettingsBlock,
pythia8CP5SettingsBlock,
processParameters = cms.vstring(
#filter of a b-quark before hadronizing, and use a better data-like process
'PTFilter:filter = on',
'PTFilter:quarkToFilter = 5',
'PTFilter:scaleToFilter = 1.0',
'SoftQCD:nonDiffractive = on',
),
parameterSets = cms.vstring('pythia8CommonSettings',
'pythia8CP5Settings',
'processParameters',
)
)
)

from GeneratorInterface.Core.ExternalGeneratorFilter import ExternalGeneratorFilter
generator = ExternalGeneratorFilter(_generator)

generator.PythiaParameters.processParameters.extend(EvtGenExtraParticles)

MuMuFilter = cms.EDFilter("MCParticlePairFilter",
Status = cms.untracked.vint32(1, 1),
MinPt = cms.untracked.vdouble(3., 3.),
MaxEta = cms.untracked.vdouble(2.5, 2.5),
MinEta = cms.untracked.vdouble(-2.5, -2.5),
ParticleCharge = cms.untracked.int32(-1),
ParticleID1 = cms.untracked.vint32(13,-13),
)

# -- Require Muon from Bs
MuFilter = cms.EDFilter("PythiaFilter",
Status = cms.untracked.int32(1),
MotherID = cms.untracked.int32(531),
MinPt = cms.untracked.double(3.),
ParticleID = cms.untracked.int32(13),
MaxEta = cms.untracked.double(2.5),
MinEta = cms.untracked.double(-2.5)
)

ProductionFilterSequence = cms.Sequence(generator*MuMuFilter*MuFilter)
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.MCTunes2017.PythiaCP5Settings_cfi import *
from GeneratorInterface.EvtGenInterface.EvtGenSetting_cff import *

_generator = cms.EDFilter("Pythia8GeneratorFilter",
pythiaPylistVerbosity = cms.untracked.int32(0),
pythiaHepMCVerbosity = cms.untracked.bool(False),
comEnergy = cms.double(13000.0),
maxEventsToPrint = cms.untracked.int32(0),
ExternalDecays = cms.PSet(
EvtGen130 = cms.untracked.PSet(
#uses latest evt and decay tables from evtgen 1.6
decay_table = cms.string('GeneratorInterface/EvtGenInterface/data/DECAY_2014_NOLONGLIFE.DEC'),
particle_property_file = cms.FileInPath('GeneratorInterface/EvtGenInterface/data/evt_2014.pdl'),
convertPythiaCodes = cms.untracked.bool(False),
#user_decay_file = cms.vstring('GeneratorInterface/ExternalDecays/data/Bu_Kstarmumu_Kspi.dec'),
#content was dump in the embed string below. This should test this feature.
list_forced_decays = cms.vstring('MyB+','MyB-'),
operates_on_particles = cms.vint32(),
user_decay_embedded= cms.vstring(
'# This is the decay file for the decay B+ -> MU+ MU- K*+(-> Ks pi+)',
'#',
'# Descriptor: [B+ -> mu+ mu- {,gamma} {,gamma} (K*+ -> Ks pi+)]cc',
'#',
'# NickName:',
'#',
'# Physics: Includes radiative mode',
'#',
'# Tested: Yes',
'# By: K. Ulmer',
'# Date: 2-26-08',
'#',
'Alias MyB+ B+',
'Alias MyB- B-',
'ChargeConj MyB+ MyB-',
'Alias MyK*+ K*+',
'Alias MyK*- K*-',
'ChargeConj MyK*+ MyK*-',
'Alias MyK_S0 K_S0',
'ChargeConj MyK_S0 MyK_S0',
'#',
'Decay MyB+',
' 1.000 MyK*+ mu+ mu- BTOSLLBALL;',
'Enddecay',
'CDecay MyB-',
'#',
'Decay MyK*+',
' 1.000 MyK_S0 pi+ VSS;',
'Enddecay',
'CDecay MyK*-',
'#',
'Decay MyK_S0',
' 1.000 pi+ pi- PHSP;',
'Enddecay',
'End'
),
),
parameterSets = cms.vstring('EvtGen130')
),
PythiaParameters = cms.PSet(
pythia8CommonSettingsBlock,
pythia8CP5SettingsBlock,
processParameters = cms.vstring(
'HardQCD:gg2bbbar = on ',
'HardQCD:qqbar2bbbar = on ',
'HardQCD:hardbbbar = on',
'PhaseSpace:pTHatMin = 20.',
),
parameterSets = cms.vstring('pythia8CommonSettings',
'pythia8CP5Settings',
'processParameters',
)
)
)

from GeneratorInterface.Core.ExternalGeneratorFilter import ExternalGeneratorFilter
generator = ExternalGeneratorFilter(_generator)

generator.PythiaParameters.processParameters.extend(EvtGenExtraParticles)

configurationMetadata = cms.untracked.PSet(
version = cms.untracked.string('$Revision: 1.1 $'),
name = cms.untracked.string('$Source: Configuration/Generator/python/BuToKstarMuMu_forSTEAM_13TeV_cfi.py $'),
annotation = cms.untracked.string('Summer14: Pythia8+EvtGen130 generation of Bu --> K* Mu+Mu-, 13TeV, Tune CP5')
)

###########
# Filters #
###########
# Filter only pp events which produce a B+:
bufilter = cms.EDFilter("PythiaFilter", ParticleID = cms.untracked.int32(521))

# Filter on final state muons
mumugenfilter = cms.EDFilter("MCParticlePairFilter",
Status = cms.untracked.vint32(1, 1),
MinPt = cms.untracked.vdouble(2.8, 2.8),
MinP = cms.untracked.vdouble(2.8, 2.8),
MaxEta = cms.untracked.vdouble(2.3, 2.3),
MinEta = cms.untracked.vdouble(-2.3, -2.3),
ParticleID1 = cms.untracked.vint32(13,-13),
ParticleID2 = cms.untracked.vint32(13,-13)
)


ProductionFilterSequence = cms.Sequence(generator*bufilter*mumugenfilter)
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
nEvents = cms.untracked.uint32(5000),
numberOfParameters = cms.uint32(1),
outputFile = cms.string('cmsgrid_final.lhe'),
scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh')
scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh'),
generateConcurrently = cms.untracked.bool(True)
)
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
nEvents = cms.untracked.uint32(5000),
numberOfParameters = cms.uint32(1),
outputFile = cms.string('cmsgrid_final.lhe'),
scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh')
scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh'),
generateConcurrently = cms.untracked.bool(True),
postGenerationCommand = cms.untracked.vstring('mergeLHE.py', '-i', 'thread*/cmsgrid_final.lhe', '-o', 'cmsgrid_final.lhe')
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@



generator = cms.EDFilter("Pythia8GeneratorFilter",
generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter",
comEnergy = cms.double(13000.0),
crossSection = cms.untracked.double(6.44),
filterEfficiency = cms.untracked.double(1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@



generator = cms.EDFilter("Pythia8GeneratorFilter",
generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter",
comEnergy = cms.double(14000.0),
crossSection = cms.untracked.double(6.44),
filterEfficiency = cms.untracked.double(1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
outputFile = cms.string("cmsgrid_final.lhe"),
numberOfParameters = cms.uint32(4),
args = cms.vstring('/cvmfs/cms.cern.ch/phys_generator/gridpacks/UL/13TeV/madgraph/V5_2.6.5/dyellell01234j_5f_LO_MLM_v2/DYJets_HT-incl_slc6_amd64_gcc630_CMSSW_9_3_16_tarball.tar.xz','false','slc6_amd64_gcc630','CMSSW_9_3_16'),
nEvents = cms.untracked.uint32(10)
nEvents = cms.untracked.uint32(10),
generateConcurrently = cms.untracked.bool(True),
postGenerationCommand = cms.untracked.vstring('mergeLHE.py', '-i', 'thread*/cmsgrid_final.lhe', '-o', 'cmsgrid_final.lhe'),
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
outputFile = cms.string("cmsgrid_final.lhe"),
numberOfParameters = cms.uint32(4),
args = cms.vstring('/cvmfs/cms.cern.ch/phys_generator/gridpacks/UL/13TeV/madgraph/V5_2.6.5/dyellell012j_5f_LO_MLM/dyellell012j_5f_LO_MLM_slc6_amd64_gcc630_CMSSW_9_3_16_tarball.tar.xz','false','slc6_amd64_gcc630','CMSSW_9_3_16'),
nEvents = cms.untracked.uint32(10)
nEvents = cms.untracked.uint32(10),
generateConcurrently = cms.untracked.bool(True)
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
nEvents = cms.untracked.uint32(5000),
numberOfParameters = cms.uint32(1),
outputFile = cms.string('cmsgrid_final.lhe'),
scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh')
scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh'),
generateConcurrently = cms.untracked.bool(True)
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
nEvents = cms.untracked.uint32(5000),
numberOfParameters = cms.uint32(1),
outputFile = cms.string('cmsgrid_final.lhe'),
scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh')
scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh'),
generateConcurrently = cms.untracked.bool(True)
)

#Link to datacards:
Expand All @@ -15,7 +16,7 @@
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.MCTunes2017.PythiaCP5Settings_cfi import *

generator = cms.EDFilter("Pythia8HadronizerFilter",
generator = cms.EDFilter("Pythia8ConcurrentHadronizerFilter",
pythiaHepMCVerbosity = cms.untracked.bool(False),
maxEventsToPrint = cms.untracked.int32(0),
pythiaPylistVerbosity = cms.untracked.int32(1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *

generator = cms.EDFilter("Pythia8GeneratorFilter",
generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter",
pythiaPylistVerbosity = cms.untracked.int32(0),
filterEfficiency = cms.untracked.double(1),
pythiaHepMCVerbosity = cms.untracked.bool(False),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
generator = cms.EDFilter("Pythia8GeneratorFilter",
generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter",
maxEventsToPrint = cms.untracked.int32(1),
pythiaPylistVerbosity = cms.untracked.int32(1),
filterEfficiency = cms.untracked.double(1.0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
nEvents = cms.untracked.uint32(5000),
numberOfParameters = cms.uint32(1),
outputFile = cms.string('cmsgrid_final.lhe'),
scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh')
scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh'),
generateConcurrently = cms.untracked.bool(True)
)

Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
nEvents = cms.untracked.uint32(5000),
numberOfParameters = cms.uint32(1),
outputFile = cms.string('cmsgrid_final.lhe'),
scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh')
scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh'),
generateConcurrently = cms.untracked.bool(True)
)


generator = cms.EDFilter("Pythia8HadronizerFilter",
generator = cms.EDFilter("Pythia8ConcurrentHadronizerFilter",
maxEventsToPrint = cms.untracked.int32(1),
pythiaPylistVerbosity = cms.untracked.int32(1),
filterEfficiency = cms.untracked.double(1.0),
Expand Down
3 changes: 2 additions & 1 deletion Configuration/Generator/python/GGToH_Pow_LHE_13TeV_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
nEvents = cms.untracked.uint32(5000),
numberOfParameters = cms.uint32(1),
outputFile = cms.string('cmsgrid_final.lhe'),
scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh')
scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh'),
generateConcurrently = cms.untracked.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@



generator = cms.EDFilter("Pythia8GeneratorFilter",
generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter",
comEnergy = cms.double(13000.0),
crossSection = cms.untracked.double(6.44),
filterEfficiency = cms.untracked.double(1),
Expand Down
Loading

0 comments on commit 9f49128

Please sign in to comment.