pisa.stages.aeff package

Submodules

pisa.stages.aeff.aeff module

PISA pi stage to apply effective area weights

class pisa.stages.aeff.aeff.aeff(**std_kwargs)[source]

Bases: Stage

PISA Pi stage to apply aeff weights.

This combines the detector effective area with the flux weights calculated in an earlier stage to compute the weights.

Various scalings can be applied for particular event classes. The weight is then multiplied by the livetime to get an event count.

Parameters:

params

Expected params are ..

livetime : Quantity with time units
aeff_scale : dimensionless Quantity
nutau_cc_norm : dimensionless Quantity
nutau_norm : dimensionless Quantity
nu_nc_norm : dimensionless Quantity

Expected container keys are ..

"weights"
"weighted_aeff"

apply_function()[source]

Implement in services (subclasses of Stage)

pisa.stages.aeff.aeff.init_test(**param_kwargs)[source]

Instantiation example

pisa.stages.aeff.param module

This is an effective area stage designed for quick studies of how effective areas affect experimental observables and sensitivities. In addition, it is supposed to be easily reproducible as it may rely on (phenomenological) functions or interpolated discrete data points, dependent on energy (and optionally cosine zenith), and which can thus be used as reference or benchmark scenarios.

pisa.stages.aeff.param.init_test(**param_kwargs)[source]

Instantiation example

pisa.stages.aeff.param.load_aeff_param(source)[source]

Load aeff parameterisation (energy- or coszen-dependent) from file or dictionary.

Parameters:

source (string or mapping) – Source of the parameterization. If string, treat as file path or resource location and load from the file; this must yield a mapping. If source is a mapping, it is used directly. See notes below on format.

Returns:

aeff_params – Keys are stringified flavintgroups and values are the callables that produce aeff when called with energy or coszen values.

Return type:

OrderedDict

Notes

The mapping passed via source or loaded therefrom must have the format:
{

<flavintgroup_string>: val, <flavintgroup_string>: val, …

}

Note that the transform_groups (container.name) defined in a pipeline config file using this must match the groupings defined above. `val`s can be one of the following:

  • Callable with one argument

  • String such that eval(val) yields a callable with one argument

  • Mapping with the format:
    {

    <”energy” or “coszen”>: [sequence of values], “aeff”: [sequence of values]

    }

    the two sequences are used to form a linear interpolant callable that maps energy or coszen values to aeff values. The effective area for any energy or coszen outside the bounds of the corresponding sequence is assumed to be 0.

class pisa.stages.aeff.param.param(**std_kwargs)[source]

Bases: Stage

Effective area service based on parameterisation functions stored in a .json file. Transforms an input map of a flux of a given flavour (and interaction) into maps of event rates, according to energy and cosine zenith dependent effective areas specified by parameterisation functions.

Parameters:

params (ParamSet or sequence with which to instantiate a ParamSet.) –

Expected params are ..

aeff_energy_paramfile : string
aeff_coszen_paramfile : string
livetime : Quantity [time]
aeff_scale : Quantity [dimensionless]

Expected container keys are ..

"true_energy"
"true_coszen"
"weights"

apply_function()[source]

Implement in services (subclasses of Stage)

pisa.stages.aeff.weight module

PISA pi stage to apply weights

pisa.stages.aeff.weight.init_test(**param_kwargs)[source]

Instantiation example

class pisa.stages.aeff.weight.weight(**std_kwargs)[source]

Bases: Stage

PISA Pi stage to apply weights. This assumes a weight has already been calculated. The weight is then multiplied by the livetime to get an event count.

Parameters:

params (ParamSet or sequence with which to instantiate a ParamSet.) –

Expected params are: ..

livetime : Quantity [time]
    Detector livetime for scaling template
weight_scale : Quantity [dimensionless]
    Overall scaling/normalisation of template

Expected container keys are ..

"weights"

apply_function()[source]

Implement in services (subclasses of Stage)

pisa.stages.aeff.weight_hnl module

PISA pi stage to apply HNL specific re-weighting

pisa.stages.aeff.weight_hnl.init_test(**param_kwargs)[source]

Instantiation example

pisa.stages.aeff.weight_hnl.re_weight_hnl(U_tau4_sq, mass, energy, tau, distance_min, distance_max, hnl_decay_width, c=<Quantity(2.99792458e+08, 'meter / second')>, hbar=<Quantity(6.58211957e-25, 'gigaelectron_volt * second')>)[source]

Function to re-weight HNL events (from sampling 1/L to target exponential)

Parameters:
  • U_tau4_sq (float) – Square of the HNL mixing angle

  • mass (float) – HNL mass in GeV

  • energy (float) – HNL energy in GeV

  • tau (float) – HNL proper lifetime in ns

  • distance_min (float) – Minimum sampling distance of HNL decay in m

  • distance_max (float) – Maximum sampling distance of HNL decay in m

  • hnl_decay_width (float) – HNL decay width in GeV

Returns:

weight_lifetime – Weight to re-weight HNL events

Return type:

float

class pisa.stages.aeff.weight_hnl.weight_hnl(**std_kwargs)[source]

Bases: Stage

PISA pi stage to apply HNL specific re-weighting.

This re-weights HNL events from sampling 1/L to target exponential and applies .

Parameters:

params

Expected params are .. ::

U_tau4_sq : dimensionless Quantity

apply_function()[source]

Implement in services (subclasses of Stage)

Module contents