I3GenieSystWeightTracReader

This module converts a list of GENIE ReWeight output root files to a dictionary with arrays of corresponding systematic weights for each event. Can convert systematic weights with arbitrary number of tweak dials (tweak dials are not saved).

Caution

Assumes that input files are produced for the same sequence of events as in I3GenieTracReader module. Event numbers are checked but there are no way to justify that particular grwght1p output file was produced for a given GHEP file.

Systematic weights reading module is separated from I3GenieTracReader because in newer versions of GENIE (>=v3) ReWeight and Generator are different products.

Example usage

tray.AddModule(I3GenieSystWeightTracReader,
               SystWghtFileNameList  = ['systw.NuMu.A.1400002.MaCCRES.root',
                                        'systw.NuMu.A.1400002.MaCCQE.root'],
               SystWghtDictName      = "SystWghtDictName")

Signature

class icecube.genie_reader.I3GenieSystWeightTracReader(context)

I3GenieSystWeightTracReader module.

Parameters:
  • SystWghtFileNameList (list of str, default=None) – List of names for the GENIE reweight files to use.

  • SystWghtDictName (str, default="I3GenieSystWeightDict") – Name of the output systematic weight dictionary.

Methods:

Configure()

Configures I3GenieSystWeightTracReader:

sets frame index to zero, opens all input GENIE systematic weight files, sets number of events.

get_systematic(syst_name, syst_iter, event_number)

Reads systematic weights array for systematic with of a given name for a specified event number.

DAQ(frame)

Gets systematic weight lists for all povided GENIE ReWeight files, stores them in dictionary and then writes it to a DAQ frame (I3GenieSystWeightDict).

Finish()

Finish, check if number of processed frames matches to the number obtained from the files during configuration.

Output object

I3GenieSystWeightTracReader produces only one type of objects:

  1. I3GenieSystWeightDict (Q-Frame)

    Dictionary (I3MapStringVectorDouble) which has an entry for each of the systematics from the files specified in SystWghtFileNameList. Name of a systematic is a key, which corresponds to an array of systematic weights. Example:

    I3GenieSystWeightDict [I3Map<string, vector<double> >]:
    [rw_AhtBY => [1, 1, 1, 1],
    rw_BhtBY => [1, 1, 1, 1],
    rw_CV1uBY => [1, 1, 1, 1],
    rw_CV2uBY => [1, 1, 1, 1],
    rw_MaCCQE => [1, 1, 1, 1],
    rw_MaCCRES => [0.131828, 0.197077, 0.316496, 0.360967],
    rw_MaCOHpi => [1, 1, 1, 1],
    rw_MaNCEL => [1, 1, 1, 1],
    rw_MaNCRES => [1, 1, 1, 1]]