Page MenuHomeHEPForge

Implement Sherpa's PHOTONS++ as alternative for final-state radiation
ClosedPublic

Authored by abudinen on Apr 19 2024, 7:40 PM.

Details

Summary

This is a first full working version of an interface between EvtGen and
Sherpa's PHOTONS++ generator for final-state radiation.

This includes an additonal interface to use EvtGen's random-number generator inside Sherpa.

The intialisation of the interface updates Sherpa's KF_Table containing particle properties
based on EvtGen's PDL table.

The common model testing module was updated to add options for different FSR generators.
The possibility to specify the FSR generator as additional input argument was added to the testing module.

The modifications required to link with Sherpa's libraries and to build sherpa from source
where included in the respective EvtGen compilation files.

This is associated with T250 and !14.

Test Plan

Run compilation and new Sherpa PHOTONS++ tests.

Diff Detail

Repository
rEVTGEN evtgen
Branch
StudyWithSherpa
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 307
Build 307: arc lint + arc unit

Event Timeline

abudinen created this revision.
abudinen retitled this revision from Fixed conflict in CMakeLists.txt to Implement Sherpa's PHOTONS++ as alternative for final-state radiation .Apr 19 2024, 7:42 PM
abudinen edited the summary of this revision. (Show Details)
abudinen changed the visibility from "All Users" to "Public (No Login Required)".
abudinen changed the edit policy from "All Users" to "Restricted Project (Project)".
abudinen added a project: Restricted Project.

I added a few points to consult with Sherpa experts as we discussed.

src/EvtGenExternal/EvtSherpaPhotons.cpp
119

This will eventually need modifications to support newer Sherpa releases, eventually by adding #ifdef conditions.

275

We rely here on the fact that PHOTONS++ adds the new FSR photons at the end of the blob. We assume this wont change in the future. We need to check also how to obtain the info from l+l- produced by virtual-photon splitting in future Sherpa releases.

src/EvtGenExternal/EvtSherpaPhotons.cpp
275

Based on the review by Marek, the order of particles in the Blob and the "S" flag will most likely remain as they are. As for the l+l- from virtual photons, we will have to adapt the code once Sherpa-3.0.0 is out.

test/testDecayModel.cc
170

I chatted with @jback about this. I think it would be good to enable the user to change the generator settings via decay file. But this is to be added in a subsequent merge request.

abudinen retitled this revision from Implement Sherpa's PHOTONS++ as alternative for final-state radiation to Implement Sherpa's PHOTONS++ as alternative for final-state radiation.
  • Moved internal Sherpa configurations for RNG interface into a dedicated cpp file.

Looks good to me, many thanks @abudinen! But let's give the others some time to check through again just to be sure.

This revision is now accepted and ready to land.May 1 2024, 4:18 PM

I have a few minor suggestions about adding more comments and have suggested a way that we can define the Sherpa parameters via the decay file.

src/EvtGenExternal/EvtSherpaPhotons.cpp
187

Can we make a comment about what the integers 0 and 1 mean here?

220

Provide a comment about what the -1 integer is for.

224

Provide a comment to say this sets the state as "initial"?

247

Comment to say this is a "final" particle?

src/EvtGenExternal/EvtSherpaRandom.cpp
34

Do we need "eventually" here?

test/testDecayModel.cc
170

If we want to do this now, then perhaps something like the following could work (but I have not tested this):

#include "EvtGenBase/EvtSymTable.hh"

else if ( fsrGenerator == "Sherpa" ) {

   // Define Sherpa integer flags (say what they are)
   // Integer flag ierr set when retrieving decay file parameters
   int S1{1}, S2{0}, ierr{0};
   // Retrieve parameters from decay file.
   const std::string S1Name = EvtSymTable::get( "SherpaFSR1", ierr );
   const std::string S2Name = EvtSymTable::get( "SherpaFSR2", ierr );  

   // Update S1 and S2 parameters if they have been defined (may need to use string compare function here...)
   if ( S1Name != "SherpaFSR1" ) {
      S1 = atoi( S1Name.c_str() );
   }
   if ( S2Name != "SherpaFSR2" ) {
      S2 = atoi( S2Name.c_str() );
   }
   // Setup the Sherpa Photons model
   radCorrEngine = genList.getSherpaPhotonsModel( 1e-7, S1, S2 );  
}

Could also add the cut-off as a parameter.

The ierr flag is a dummy control integer used by the EvtSymTable class:

https://gitlab.cern.ch/evtgen/evtgen/-/blob/master/src/EvtGenBase/EvtSymTable.cpp#L55

It is always set to 0 and is not updated to be 1 (or -1) for "failed" when the decay parameter string is not found. When it fails, it just returns the parameter word and not the number. For the above code, if "Define SherpaFSR1 2" is set in the decay file, then the returned string will be "2", which is then converted to an integer. If this is not found, then the returned string will be "SherpaFSR1", which is not the integer string, and so the integer we declared earlier is not modified.

abudinen added inline comments.
src/EvtGenExternal/EvtSherpaRandom.cpp
34

This is from the original code that Marek pointed us to. I am leaving it as it is.

test/testDecayModel.cc
170

In principle a good idea and I gave it a try, but it doesn't work yet because we need to first create the EvtGen object and then pass the decay file via readUDecay to have the EvtSymTable::get function retrieving the value. However, we need to setup the radCorrEngine to create the EvtGen object. So it is a sort of chicken and egg problem. So I think we need to leave this to a future differential.

abudinen marked 2 inline comments as done.
  • Moved internal Sherpa configurations for RNG interface into a dedicated cpp file.
  • Adapt setupEvtGen.sh to new Photos and Tauola URLs
  • Update CI and Doxygen configs to include Sherpa
  • Disable Sherpa in HepMC2 build
  • Implemented comments by John.

This code is ready to be merged. We will leave the ability to change the Sherpa configuration via decay file parameters as a future enhancement.

  • Add option for saving GCC temporary files (commented out for now)
  • Fix problem with GCC13 compilation of EvtSherpaRandom
  • Fix problem with GCC13 compilation of EvtSherpaRandom
  • Find Sherpa version and use it to control use of DECLARE_GETTER macro
  • Implemented support for fsrGenerator as argument for testing file. Implemented modification of output and ref files if FSR is on.
  • Implemented Tom's comments
  • Reverted obsolete testing .json file sufixes.
  • Added entries into history and readme files.
  • Updated reference web sited for Photos and Tauola in readme file.