Skip to content

Adding autoconfigFromFlags to enable PRW

This is needed to get the pileup reweighting working again, as far as I can tell.

The one in the tutorial page:

PileupReweighting: {}

Fails with:

ValueError: useDefaultConfig requires files to be configured! Either pass them as an option or use flags.

That's presumably because useDefaultConfig is on by default; if I disable it:

PileupReweighting:
    # Use the default configurations?
    useDefaultConfig: False

Then instead the crash is:

  File "/cvmfs/atlas.cern.ch/repo/sw/software/25.2/AnalysisBase/25.2.29/InstallArea/x86_64-el9-gcc13-opt/python/PileupReweighting/AutoconfigurePRW.py", line 163, in getConfigurationFiles
    config = f'{default_directory}/DSID{dsid[:3]}xxx/pileup_{campaign.value}_dsid{dsid}_{simulation_type}.root'
                                        ~~~~^^^^
TypeError: 'NoneType' object is not subscriptable

Thanks to Michael Holzbock for the fix. Will also require some changes to atlassoftwaredocs.

Merge request reports

Loading