Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preliminary stuff for herwig #117

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Preliminary stuff for herwig #117

wants to merge 3 commits into from

Conversation

Cvico
Copy link
Contributor

@Cvico Cvico commented Oct 22, 2023

Hi,

This is just a preliminary version of herwig config files for central herwig samples. There's no particular rush I think in having this implement in a short timescale, but I'm leaving the PR open just to have this in mind in the future. This might take a bit of time because if I'm not mistaken, it would require a bit of development in the backend.

I think there are a few things to discuss:

  • ExternalProducer: herwig requires to launch an script that merges lhe files before starting the shower step. This can be seen in the postGenerationCommand = cms.untracked.vstring('mergeLHE.py', '-i', 'thread*/cmsgrid_final.lhe', '-o', 'cmsgrid_final.lhe'), option in ExternalLHEProducer_Powheg-herwig7.dat.
  • Fragment: There are a few things to mention here.
    • Center of mass energy and processParameters (which for herwig are often specific commands of herwig) can be configured using the same placeholders as for pythia8.
    • I haven't found out what is the option configFiles = cms.vstring() in the fragment. Seems to me that this is to allow people to configure herwig commands using an input file that is a ".in" format. See the only example in cmssw that does not set this to just an empty variable here. This config points to this file.
  • Input process. I think for herwig samples we should have the mindset that by default these are variations of our commonly pythia8 showered samples. I've create the example I'm working now within TOP to test once the backend is set to consider herwig showers.

@Cvico
Copy link
Contributor Author

Cvico commented Oct 22, 2023

One more comment. I'm not sure if maybe we can add a replaceable in the common ExternalLHEProducer-Powheg.dat file so that it can be used for this as well.

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'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm i would suggest to add this with a replaceable instead of having a new data file in case it's needed

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 *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what this really does, are you aware of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhm that is loading the Herwig CH3 tuning right? Now what I'm not so sure is the Herwig7_7p1SettingsFor7p2_cfi, not sure if that's the latest.

Copy link
Contributor

@sihyunjeon sihyunjeon Oct 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should ask dominic, forwarding an email to you

Copy link

@Dominic-Stafford Dominic-Stafford Oct 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, just to add here, the Herwig7_7p1SettingsFor7p2 set a number of UE settings which changed when going from Herwig 7.1 to 7.2 back to their 7.1 values, since this was the release used to make the CH tunes, and hence it's recommended to use it as part of the tune

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dominic-Stafford wouldn't it make sense to add this to the CH settings? It will work with the old versions where this was already default and still with the new ones. We could make an entry in the fragment that these are not actual settings of the tune but default ones that have changed and where used to derive the tune. The current name is a bit confusing. I will still work with 7.3 and it is related to the tune not the general program, so people might only want it if they are using CH3.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, maybe this would make sense, though it might also cause confusion for people taking parameters from old cards if we remove it. Maybe first I should ask Emyr is there was a motivation for making it a separate block? For 7.3 this might need to be expanded as maybe there will be further parameters which should be set back to their 7.1 values


from Configuration.Generator.Herwig7Settings.Herwig7LHECommonSettings_cfi import *
from Configuration.Generator.Herwig7Settings.Herwig7StableParticlesForDetector_cfi import *
from Configuration.Generator.Herwig7Settings.Herwig7CH3TuneSettings_cfi import *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should make the tunes configurable

@Cvico
Copy link
Contributor Author

Cvico commented Oct 23, 2023

Hi, I've updated the PR following Dominic's mail (thanks a lot for the info!!)

I also modified the ExternalLHEProducer_Powheg.dat card to have a replaceable "$additionalCommands" that can should be changed by whatever we put in the .json (see the example file under NewTests folder in powheg). If nothing is provided, it should automatically remove the replaceable (I'll ask geovanny to see if this can be done, because the decission should be made in the backend).

@@ -0,0 +1,14 @@
{
"gridpack_submit": false,
"gridpack_path": "SingleT/ST_wtch_DR_slc7_amd64_gcc10_CMSSW_12_4_8_TWminustoLNu2Q_powheg-pythia8.tgz",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact that this is hard-coded here is just for testing ?

@Dominic-Stafford
Copy link

Hi, sorry, it's occurred to me it would probably be good to make these samples using the Herwig7HadronizerFilter rather than the old Herwig7GeneratorFilter. This is the change that fixes the issue of the wrong lhe events being saved due to Herwig silently skipping events, and is more relevant for mlm and FxFx where a lot of events get skipped in merging, but I think even for POWHEG Herwig will in some rare conditions veto an event, and this only need happen once for all subsequent events to have the wrong LHE information, so we should probably use the HadronizerFilter to be safe. How soon are you planning on producing these samples? The change hasn't made it into 12_4 yet, so should I ask the gen conveners to ask ORP for a new release?

@agrohsje
Copy link
Contributor

Yes. Please do so. I think it is good to have this consistently in Run3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants