From d1c1cb5479c0acf91a853d26f4ef9e6a8cc80a35 Mon Sep 17 00:00:00 2001 From: Carlos Vico Villalba Date: Sun, 22 Oct 2023 15:53:15 +0200 Subject: [PATCH 1/3] Preliminary stuff for herwig --- .../TWminustoLNu2Q_powheg-herwig7.json | 11 ++++++ .../ExternalLHEProducer_Powheg-herwig7.dat | 12 ++++++ Fragments/PartonShower/powheg-herwig7.dat | 39 +++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 Cards/Powheg/NewTests/TWminustoLNu2Q_powheg-herwig7/TWminustoLNu2Q_powheg-herwig7.json create mode 100644 Fragments/Generator/ExternalLHEProducer_Powheg-herwig7.dat create mode 100644 Fragments/PartonShower/powheg-herwig7.dat diff --git a/Cards/Powheg/NewTests/TWminustoLNu2Q_powheg-herwig7/TWminustoLNu2Q_powheg-herwig7.json b/Cards/Powheg/NewTests/TWminustoLNu2Q_powheg-herwig7/TWminustoLNu2Q_powheg-herwig7.json new file mode 100644 index 00000000..8ea88d1c --- /dev/null +++ b/Cards/Powheg/NewTests/TWminustoLNu2Q_powheg-herwig7/TWminustoLNu2Q_powheg-herwig7.json @@ -0,0 +1,11 @@ +{ + "gridpack_submit": false, + "gridpack_path": "SingleT/ST_wtch_DR_slc7_amd64_gcc10_CMSSW_12_4_8_TWminustoLNu2Q_powheg-pythia8.tgz", + + "fragment": ["Generator/ExternalLHEProducer_Powheg-herwig7.dat","PartonShower/powheg-herwig7.dat","Filter/OneLepton.dat"], + "fragment_user": [], + "fragment_vars": { + "processParameters": [ + ] + } +} diff --git a/Fragments/Generator/ExternalLHEProducer_Powheg-herwig7.dat b/Fragments/Generator/ExternalLHEProducer_Powheg-herwig7.dat new file mode 100644 index 00000000..6c64d371 --- /dev/null +++ b/Fragments/Generator/ExternalLHEProducer_Powheg-herwig7.dat @@ -0,0 +1,12 @@ +import FWCore.ParameterSet.Config as cms + +externalLHEProducer = cms.EDProducer('ExternalLHEProducer', + args = cms.vstring('$pathToProducedGridpack'), + 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'), + generateConcurrently = cms.untracked.bool($concurrentLHEforPowheg) + postGenerationCommand = cms.untracked.vstring('mergeLHE.py', '-i', 'thread*/cmsgrid_final.lhe', '-o', 'cmsgrid_final.lhe'), +) + diff --git a/Fragments/PartonShower/powheg-herwig7.dat b/Fragments/PartonShower/powheg-herwig7.dat new file mode 100644 index 00000000..ba305294 --- /dev/null +++ b/Fragments/PartonShower/powheg-herwig7.dat @@ -0,0 +1,39 @@ +import FWCore.ParameterSet.Config as cms + +from Configuration.Generator.Herwig7Settings.Herwig7LHECommonSettings_cfi import * +from Configuration.Generator.Herwig7Settings.Herwig7StableParticlesForDetector_cfi import * +from Configuration.Generator.Herwig7Settings.Herwig7CH3TuneSettings_cfi import * +from Configuration.Generator.Herwig7Settings.Herwig7LHEPowhegSettings_cfi import * +from Configuration.Generator.Herwig7Settings.Herwig7PSWeightsSettings_cfi import * +from Configuration.Generator.Herwig7Settings.Herwig7_7p1SettingsFor7p2_cfi import * + +generator = cms.EDFilter("Herwig7GeneratorFilter", + herwig7LHECommonSettingsBlock, + herwig7LHEPowhegSettingsBlock, + herwig7p1SettingsFor7p2Block, + herwig7StableParticlesForDetectorBlock, + herwig7PSWeightsSettingsBlock, + herwig7CH3SettingsBlock, + configFiles = cms.vstring(), + dataLocation = cms.string('${HERWIGPATH}'), + eventHandlers = cms.string('/Herwig/EventHandlers'), + generatorModule = cms.string('/Herwig/Generators/EventGenerator'), + hw_user_settings = cms.vstring( + 'set /Herwig/EventHandlers/EventHandler:LuminosityFunction:Energy $comEnergy*GeV', + $processParameters + ), + parameterSets = cms.vstring( + 'hw_lhe_common_settings', + 'hw_lhe_powheg_settings', + 'hw_7p1SettingsFor7p2', + 'herwig7CH3PDF', + 'herwig7CH3AlphaS', + 'herwig7CH3MPISettings', + 'herwig7StableParticlesForDetector', + 'hw_PSWeights_settings', + 'hw_user_settings' + ), + repository = cms.string('${HERWIGPATH}/HerwigDefaults.rpo'), + run = cms.string('InterfaceMatchboxTest'), + runModeList = cms.untracked.string('read,run'), +) From 2890503f6dcdfaaf7442f22858e118fff7d82d14 Mon Sep 17 00:00:00 2001 From: Carlos Vico Villalba Date: Sun, 22 Oct 2023 18:42:40 +0200 Subject: [PATCH 2/3] Added configurable tuning for herwig --- Fragments/PartonShower/powheg-herwig7.dat | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Fragments/PartonShower/powheg-herwig7.dat b/Fragments/PartonShower/powheg-herwig7.dat index ba305294..6462e9ff 100644 --- a/Fragments/PartonShower/powheg-herwig7.dat +++ b/Fragments/PartonShower/powheg-herwig7.dat @@ -2,7 +2,7 @@ import FWCore.ParameterSet.Config as cms from Configuration.Generator.Herwig7Settings.Herwig7LHECommonSettings_cfi import * from Configuration.Generator.Herwig7Settings.Herwig7StableParticlesForDetector_cfi import * -from Configuration.Generator.Herwig7Settings.Herwig7CH3TuneSettings_cfi import * +from Configuration.Generator.Herwig7Settings.Herwig7$tuneTuneSettings_cfi import * from Configuration.Generator.Herwig7Settings.Herwig7LHEPowhegSettings_cfi import * from Configuration.Generator.Herwig7Settings.Herwig7PSWeightsSettings_cfi import * from Configuration.Generator.Herwig7Settings.Herwig7_7p1SettingsFor7p2_cfi import * @@ -13,7 +13,7 @@ generator = cms.EDFilter("Herwig7GeneratorFilter", herwig7p1SettingsFor7p2Block, herwig7StableParticlesForDetectorBlock, herwig7PSWeightsSettingsBlock, - herwig7CH3SettingsBlock, + herwig7$tuneSettingsBlock, configFiles = cms.vstring(), dataLocation = cms.string('${HERWIGPATH}'), eventHandlers = cms.string('/Herwig/EventHandlers'), @@ -26,9 +26,9 @@ generator = cms.EDFilter("Herwig7GeneratorFilter", 'hw_lhe_common_settings', 'hw_lhe_powheg_settings', 'hw_7p1SettingsFor7p2', - 'herwig7CH3PDF', - 'herwig7CH3AlphaS', - 'herwig7CH3MPISettings', + 'herwig7$tunePDF', + 'herwig7$tuneAlphaS', + 'herwig7$tuneMPISettings', 'herwig7StableParticlesForDetector', 'hw_PSWeights_settings', 'hw_user_settings' From 0cfbf14ab29f4bb29abc3d95466f7310f085dca2 Mon Sep 17 00:00:00 2001 From: Carlos Vico Villalba Date: Mon, 23 Oct 2023 14:19:26 +0200 Subject: [PATCH 3/3] Updated PR --- .../TWminustoLNu2Q_powheg-herwig7.json | 5 ++++- .../Generator/ExternalLHEProducer_Powheg-herwig7.dat | 12 ------------ Fragments/Generator/ExternalLHEProducer_Powheg.dat | 3 ++- Fragments/PartonShower/powheg-herwig7.dat | 3 --- 4 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 Fragments/Generator/ExternalLHEProducer_Powheg-herwig7.dat diff --git a/Cards/Powheg/NewTests/TWminustoLNu2Q_powheg-herwig7/TWminustoLNu2Q_powheg-herwig7.json b/Cards/Powheg/NewTests/TWminustoLNu2Q_powheg-herwig7/TWminustoLNu2Q_powheg-herwig7.json index 8ea88d1c..f99ceac1 100644 --- a/Cards/Powheg/NewTests/TWminustoLNu2Q_powheg-herwig7/TWminustoLNu2Q_powheg-herwig7.json +++ b/Cards/Powheg/NewTests/TWminustoLNu2Q_powheg-herwig7/TWminustoLNu2Q_powheg-herwig7.json @@ -2,10 +2,13 @@ "gridpack_submit": false, "gridpack_path": "SingleT/ST_wtch_DR_slc7_amd64_gcc10_CMSSW_12_4_8_TWminustoLNu2Q_powheg-pythia8.tgz", - "fragment": ["Generator/ExternalLHEProducer_Powheg-herwig7.dat","PartonShower/powheg-herwig7.dat","Filter/OneLepton.dat"], + "fragment": ["Generator/ExternalLHEProducer_Powheg.dat","PartonShower/powheg-herwig7.dat","Filter/OneLepton.dat"], "fragment_user": [], "fragment_vars": { "processParameters": [ + ], + "additionalCommands" : [ + "postGenerationCommand = cms.untracked.vstring('mergeLHE.py', '-i', 'thread*/cmsgrid_final.lhe', '-o', 'cmsgrid_final.lhe')" ] } } diff --git a/Fragments/Generator/ExternalLHEProducer_Powheg-herwig7.dat b/Fragments/Generator/ExternalLHEProducer_Powheg-herwig7.dat deleted file mode 100644 index 6c64d371..00000000 --- a/Fragments/Generator/ExternalLHEProducer_Powheg-herwig7.dat +++ /dev/null @@ -1,12 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -externalLHEProducer = cms.EDProducer('ExternalLHEProducer', - args = cms.vstring('$pathToProducedGridpack'), - 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'), - generateConcurrently = cms.untracked.bool($concurrentLHEforPowheg) - postGenerationCommand = cms.untracked.vstring('mergeLHE.py', '-i', 'thread*/cmsgrid_final.lhe', '-o', 'cmsgrid_final.lhe'), -) - diff --git a/Fragments/Generator/ExternalLHEProducer_Powheg.dat b/Fragments/Generator/ExternalLHEProducer_Powheg.dat index d47ebdc1..c0a43d03 100644 --- a/Fragments/Generator/ExternalLHEProducer_Powheg.dat +++ b/Fragments/Generator/ExternalLHEProducer_Powheg.dat @@ -6,6 +6,7 @@ externalLHEProducer = cms.EDProducer('ExternalLHEProducer', numberOfParameters = cms.uint32(1), outputFile = cms.string('cmsgrid_final.lhe'), scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh'), - generateConcurrently = cms.untracked.bool($concurrentLHEforPowheg) + generateConcurrently = cms.untracked.bool($concurrentLHEforPowheg), + $additionalCommands ) diff --git a/Fragments/PartonShower/powheg-herwig7.dat b/Fragments/PartonShower/powheg-herwig7.dat index 6462e9ff..63f5aa10 100644 --- a/Fragments/PartonShower/powheg-herwig7.dat +++ b/Fragments/PartonShower/powheg-herwig7.dat @@ -4,7 +4,6 @@ from Configuration.Generator.Herwig7Settings.Herwig7LHECommonSettings_cfi import from Configuration.Generator.Herwig7Settings.Herwig7StableParticlesForDetector_cfi import * from Configuration.Generator.Herwig7Settings.Herwig7$tuneTuneSettings_cfi import * from Configuration.Generator.Herwig7Settings.Herwig7LHEPowhegSettings_cfi import * -from Configuration.Generator.Herwig7Settings.Herwig7PSWeightsSettings_cfi import * from Configuration.Generator.Herwig7Settings.Herwig7_7p1SettingsFor7p2_cfi import * generator = cms.EDFilter("Herwig7GeneratorFilter", @@ -12,7 +11,6 @@ generator = cms.EDFilter("Herwig7GeneratorFilter", herwig7LHEPowhegSettingsBlock, herwig7p1SettingsFor7p2Block, herwig7StableParticlesForDetectorBlock, - herwig7PSWeightsSettingsBlock, herwig7$tuneSettingsBlock, configFiles = cms.vstring(), dataLocation = cms.string('${HERWIGPATH}'), @@ -30,7 +28,6 @@ generator = cms.EDFilter("Herwig7GeneratorFilter", 'herwig7$tuneAlphaS', 'herwig7$tuneMPISettings', 'herwig7StableParticlesForDetector', - 'hw_PSWeights_settings', 'hw_user_settings' ), repository = cms.string('${HERWIGPATH}/HerwigDefaults.rpo'),