Support #21568

Update LArSoft infrastructure for GENIE v3.0.2

Added by Steven Gardiner 11 months ago. Updated 10 months ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Spent time:


MicroBooNE plans to use GENIE v3 for its upcoming MCC9 production. In order for this to happen, we will need a version of LArSoft that is fully compatible with the latest GENIE release (v3.0.2).


#1 Updated by Lynn Garren 11 months ago

  • Status changed from New to Feedback

Just to be clear, this can be a release built against art v3_00_00, right?

#2 Updated by Steven Gardiner 11 months ago

Yes, that is my understanding. MicroBooNE recently tagged uboonecode v08_00_00, which is based on art v3. I will follow up tomorrow morning to confirm.

#3 Updated by Lynn Garren 11 months ago

nutools v2_27_00 is now available on SciSoft. This release uses genie v3_00_02.

Genie now has 16 tunes available. We will distribute the default tune used by genie. See the note below from Robert Hatcher.

Let me state that "G18_02a_00_000" is GENIE v3's default tune.  This corresponds to:

    setup genie_xsec v3_00_02 -q G1802a00000:k500:e1000

The GENIE tune name, sans underscores (which UPS won't allow for qualifiers) is the first part of the qualifier name for the v3_00_02 splines.  
The other two parts are k<number-of-knots> and e<max_energy>.

The meaning of the various tunes is documented here:   # follow the "Global fits & physics tunes" in list on the left

Beyond the default I think the choice of which tunes to (initially) make available needs to be driven by the experiments desires.

Other "interesting" tunes:

G00_00b_00_000    which is similar to v2_12_10 DefaultPlusMECWithNC

G18_10i_00_000     including diffractive and lambda production interactions and updated hA FSI;  
       with updated Berger-Sehgal model for RES and COH;
       LFG nuclear model. Nieves models for CCQE and CC 2p/2h interactions;
       CCQE axial form factor parametrerised with z-exp.

#4 Updated by Lynn Garren 11 months ago

  • % Done changed from 0 to 30

#5 Updated by Lynn Garren 11 months ago

  • Status changed from Feedback to Assigned
  • Assignee set to Lynn Garren

#6 Updated by Lynn Garren 11 months ago

Note that this will be a test release on branch v08_01_00_branch. Please note the policy for development from a tagged release.

#7 Updated by Lynn Garren 11 months ago

  • Assignee changed from Lynn Garren to Steven Gardiner
  • % Done changed from 30 to 40

There are two problems that will require expert help to resolve. One in larsim and one in nusystematics. I am reassigning to Steven Gardiner who can work with Robert Hatcher to fix the problems.

In larsim/EventWeight/Calculators/GenieWeightCalc.cxx:

/home/garren/scratch/larsoft/v08_01_00_01/srcs/larsim/larsim/EventWeight/Calculators/GenieWeightCalc.cxx: In member function ‘virtual void evwgh::GenieWeightCalc::Configure(const fhicl::ParameterSet&, CLHEP::HepRandomEngine&)’:
/home/garren/scratch/larsoft/v08_01_00_01/srcs/larsim/larsim/EventWeight/Calculators/GenieWeightCalc.cxx:294:42: error: ‘fReweightFrElas_N’ is not a member of ‘rwgt’
           driver.ReweightIntraNuke(rwgt::fReweightFrElas_N, reweightingSigmas[i_reweightingKnob][weight_point]);
/home/garren/scratch/larsoft/v08_01_00_01/srcs/larsim/larsim/EventWeight/Calculators/GenieWeightCalc.cxx:294:42: note: suggested alternative: ‘fReweightFrAbs_N’
           driver.ReweightIntraNuke(rwgt::fReweightFrElas_N, reweightingSigmas[i_reweightingKnob][weight_point]);
/home/garren/scratch/larsoft/v08_01_00_01/srcs/larsim/larsim/EventWeight/Calculators/GenieWeightCalc.cxx:312:42: error: ‘fReweightFrElas_pi’ is not a member of ‘rwgt’
           driver.ReweightIntraNuke(rwgt::fReweightFrElas_pi, reweightingSigmas[i_reweightingKnob][weight_point]);
/home/garren/scratch/larsoft/v08_01_00_01/srcs/larsim/larsim/EventWeight/Calculators/GenieWeightCalc.cxx:312:42: note: suggested alternative: ‘fReweightFrAbs_pi’
           driver.ReweightIntraNuke(rwgt::fReweightFrElas_pi, reweightingSigmas[i_reweightingKnob][weight_point]);

In both nusystematics/systproviders/ and nusystematics/systproviders/

/home/garren/scratch/larsoft/v08_01_00_01/srcs/nusystematics/nusystematics/systproviders/ In function ‘systtools::SystMetaData nusyst::ConfigureFSIParameterHeaders(const fhicl::ParameterSet&, systtools::paramId_t, fhicl::ParameterSet&)’:
/home/garren/scratch/larsoft/v08_01_00_01/srcs/nusystematics/nusystematics/systproviders/ error: ‘kINukeTwkDial_FrElas_pi’ was not declared in this scope
       {kINukeTwkDial_MFP_pi, kINukeTwkDial_FrCEx_pi, kINukeTwkDial_FrElas_pi,
/home/garren/scratch/larsoft/v08_01_00_01/srcs/nusystematics/nusystematics/systproviders/ error: could not convert ‘{kINukeTwkDial_MFP_pi, kINukeTwkDial_FrCEx_pi, <expression error>, kINukeTwkDial_FrInel_pi, kINukeTwkDial_FrAbs_pi, kINukeTwkDial_FrPiProd_pi}’ from ‘<brace-enclosed initializer list>’ to ‘std::vector<genie::rew::EGSyst>’
/home/garren/scratch/larsoft/v08_01_00_01/srcs/nusystematics/nusystematics/systproviders/ error: ‘kINukeTwkDial_FrElas_N’ was not declared in this scope
       {kINukeTwkDial_MFP_N, kINukeTwkDial_FrCEx_N, kINukeTwkDial_FrElas_N,
/home/garren/scratch/larsoft/v08_01_00_01/srcs/nusystematics/nusystematics/systproviders/ error: could not convert ‘{kINukeTwkDial_MFP_N, kINukeTwkDial_FrCEx_N, <expression error>, kINukeTwkDial_FrInel_N, kINukeTwkDial_FrAbs_N, kINukeTwkDial_FrPiProd_N}’ from ‘<brace-enclosed initializer list>’ to ‘std::vector<genie::rew::EGSyst>’

#8 Updated by Lynn Garren 11 months ago

All work should be done on the v08_01_00_branch for larana, lardata, lareventdisplay, larevt, larexamples, larg4, larpandora, larreco, larsim, larsoft, larwirecell, nusystematics. The ups/product_deps is updated with the new release version. Should be ready to tag once the problems are resolved.

Use existing tags for larcore larcorealg larcoreobj lardataalg lardataobj larpandoracontent larsoftobj.

There are old feature/team_for_genie_v3 branches in the experiment code. However, they date back to larsoft v07_06_01_01. I suggest starting a new feature branch from develop and merging the old branch. Also note that this was before the uboonecode split.

I've updated larsoft/bin/genie/ However, there may be required changes that we are not yet aware of.

#9 Updated by Steven Gardiner 11 months ago

  • % Done changed from 40 to 50

I've created feature branches called feature_v08_01_00/gardiner-genie-v3 in both the larsim and nusystematics repositories. These are based on the v08_01_00_branch branch and resolve the problems shown above. Robert Hatcher pointed out that nutools v2_27_00 may be built against GENIE v2 as well as v3. I've preserved that compatibility in my larsim and nusystematics feature branches by adding #ifdef GENIE_PRE_R3 guards as needed. Local test builds against both versions of GENIE were successful.

I'm starting more comprehensive testing locally as described here. I won't touch master or develop.

#10 Updated by Steven Gardiner 11 months ago

Building LArSoft, argoneutcode, dunetpc, etc. against GENIE v3.0.2 now works. After some troubleshooting, I've added code to larsim and nusystematics that correctly configures the appropriate v3 tune even when running those tools independently from the generation stage. However, running reweighting jobs after generation leads to "Invalid target" warnings like the following:

24-Dec-2018 10:34:35 CST  Initiating request to open input file "prodgenie_nu_dune10kt_1x2x6_gen.root" 
24-Dec-2018 10:34:35 CST  Opened input file "prodgenie_nu_dune10kt_1x2x6_gen.root" 
Begin processing the 1st record. run: 20000001 subRun: 0 event: 1 at 24-Dec-2018 10:34:38 CST
1545669278 INFO PDG : [n] <PDGLibrary.cxx::Instance (46)> : PDGLibrary late initialization
1545669278 INFO PDG : [n] <PDGLibrary.cxx::LoadDBase (90)> : Load PDG data from: /dune/app/users/gardiner/gv3lar/v08_01_00_01/e17d/localProducts_larsoft_v08_01_00_01_e17_debug/genie/v3_00_02/Linux64bit+2.6-2.12-e17-debug/GENIE-Generator/data/evgen/catalogues/pdg/genie_pdg_table.txt
1545669278 WARN Target : [n] <Target.cxx::ForceNucleusValidity (384)> : Invalid target -- Reseting to Z = 0, A = 0
1545669278 NOTICE ReW : [n] <GReWeight.cxx::CalcWeight (102)> : Calculator: xsec_ccqe => wght = 1
24-Dec-2018 10:34:38 CST  Opened output file with pattern "%ifb_%tc_eventweight.root" 
Begin processing the 2nd record. run: 20000001 subRun: 0 event: 2 at 24-Dec-2018 10:34:39 CST
1545669279 WARN Target : [n] <Target.cxx::ForceNucleusValidity (384)> : Invalid target -- Reseting to Z = 0, A = 0
1545669279 NOTICE ReW : [n] <GReWeight.cxx::CalcWeight (102)> : Calculator: xsec_ccqe => wght = 1
Begin processing the 3rd record. run: 20000001 subRun: 0 event: 3 at 24-Dec-2018 10:34:39 CST
1545669279 WARN Target : [n] <Target.cxx::ForceNucleusValidity (384)> : Invalid target -- Reseting to Z = 0, A = 0
1545669279 NOTICE ReW : [n] <GReWeight.cxx::CalcWeight (102)> : Calculator: xsec_ccqe => wght = 1.05822

I've confirmed that the correct PDG code for the target nucleus is being written to the GTruth objects produced during the generation stage and that these can be retrieved (via gallery) from the ROOT files successfully. The culprit appears to be a problem in rwgt::NuReweight::RetrieveGHEP(), but I'm still working to confirm this.

#11 Updated by Steven Gardiner 11 months ago

The "invalid target" warnings shown above should be fixed, but they are spurious and will not affect any reweighting results. I've completed investigating this problem and have pushed a fix for nutools on a feature branch (see nutools issue #21607 for more details). There is no need to wait for a new nutools release before producing a test release of LArSoft that is compatible with GENIE v3.0.2, so I will continue working to finish one.

#12 Updated by Steven Gardiner 11 months ago

  • % Done changed from 50 to 60

All needed changes have been merged into the v08_01_00_branch branch in the larsim and nusystematics repositories, and new tags have been created for the repositories that needed them. I'm resolving a permissions problem at the moment, but I will begin building larsoft v08_01_00_01 on Jenkins very soon.

#13 Updated by Lynn Garren 10 months ago

  • Status changed from Assigned to Resolved
  • % Done changed from 60 to 100

larsoft v08_01_00_01 with genie v3_00_02 was made available Jan. 7, 2019

Also available in: Atom PDF