NuRadioMC.EvtGen.NuRadioProposal module

class NuRadioMC.EvtGen.NuRadioProposal.SecondaryProperties(distance, energy, shower_type, code, name, parent_energy)[source]

Bases: object

This class stores the properties from secondary particles that are relevant for NuRadioMC, namely: - distance : Distance to the first interaction vertex - energy : Particle energy - shower_type : Whether the shower they induce is hadronic or electromagnetic - name : Name according to NuRadioReco.utilities.particle_names - parent_energy : Energy of the parent particle

Distance and energy are in NuRadioMC units

NuRadioMC.EvtGen.NuRadioProposal.particle_code(pp_type)[source]

For an integer, corresponding to a proposal.particle.Interaction_Type or proposal.particle.Particle_Type, it returns the corresponding PDG particle code.

Parameters:
pp_type: int, corresponding to a proposal.particle.Interaction_Type or

proposal.particle.Particle_Type

Returns:
integer with the PDG particle code. None if the argument is not a particle
NuRadioMC.EvtGen.NuRadioProposal.is_em_primary(pp_type)[source]

For an integer corresponding to a particle type or interaction type of proposal, returns True if the object can be an electromagnetic shower primary and False otherwise

Parameters:
pp_type: int, corresponding to a pp.proposal.Interaction_Type or pp.proposal.Particle_Type
Returns:
bool, True if the particle can be an electromagnetic shower primary and False otherwise
NuRadioMC.EvtGen.NuRadioProposal.is_had_primary(pp_type)[source]

Given an integer corresponding to a particle type or interaction type of proposal, returns True if the object can be a hadronic shower primary and False otherwise

Parameters:
pp_type: int, corresponding to a pp.proposal.Interaction_Type or pp.proposal.Particle_Type
Returns:
bool, True if the particle can be a hadronic shower primary and False otherwise
NuRadioMC.EvtGen.NuRadioProposal.is_shower_primary(pp_type)[source]

Given an integer corresponding to a particle type or interaction type of proposal, returns True if the object can be a shower primary and False otherwise

Parameters:
pp_type: int, corresponding to a pp.proposal.Interaction_Type or pp.proposal.Particle_Type
Returns:
bool, True if the particle can be a shower primary and False otherwise
class NuRadioMC.EvtGen.NuRadioProposal.ProposalFunctions(*args, **kwargs)[source]

Bases: object

This class serves as a container for PROPOSAL functions. The functions that start with double underscore take PROPOSAL units as an argument and should not be used from the outside to avoid mismatching units.

Methods

get_decays(energy_leptons_nu, lepton_codes)

Propagates a set of leptons and returns a list with the properties of the decay particles.

get_secondaries_array(energy_leptons_nu, ...)

Propagates a set of leptons and returns a list with the properties for all the properties of the shower-inducing secondary particles

Parameters:
config_file: string or path

The user can specify the path to their own config file or choose among the available options: -‘SouthPole’, a config file for the South Pole (spherical Earth). It consists of a 2.7 km deep layer of ice, bedrock below and air above. -‘MooresBay’, a config file for Moore’s Bay (spherical Earth). It consists of a 576 m deep ice layer with a 2234 m deep water layer below, and bedrock below that. -‘InfIce’, a config file with a medium of infinite ice -‘Greenland’, a config file for Summit Station, Greenland (spherical Earth), same as SouthPole but with a 3 km deep ice layer.

log_level: logging level
tables_path: path

Path to PROPOSAL tables. Should be set to a path where PROPOSAL tables exist, or where PROPOSAL tables can be saved. This avoids that PROPOSAL has to regenerate tables (which can take several minutes) every time the script is executed. Default: None -> create directory “proposal_tables” at the location of this file.

seed: int

Seed to be used by PROPOSAL

upper_energy_limit: float

upper_energy_limit of tables that will be created by PROPOSAL, in NuRadioMC units (eV). There will be an error if primaries with energies above this energy will be injected. Note that PROPOSAL will have to regenerate tables for a new values of upper_energy_limit

create_new: bool (default:False)

Can be used to force the creation of a new ProposalFunctions object. By default, the __init__ will only create a new object if none already exists. For more details, check the documentation for the Singleton metaclass.

Methods

get_decays(energy_leptons_nu, lepton_codes)

Propagates a set of leptons and returns a list with the properties of the decay particles.

get_secondaries_array(energy_leptons_nu, ...)

Propagates a set of leptons and returns a list with the properties for all the properties of the shower-inducing secondary particles

get_secondaries_array(energy_leptons_nu, lepton_codes, lepton_positions_nu=None, lepton_directions=None, low_nu=500000000000000.0, propagation_length_nu=1000000.0, min_energy_loss_nu=500000000000000.0, propagate_decay_muons=True)[source]

Propagates a set of leptons and returns a list with the properties for all the properties of the shower-inducing secondary particles

Parameters:
energy_leptons_nu: array of floats

Array with the energies of the input leptons, in NuRadioMC units (eV)

lepton_codes: array of integers

Array with the PDG lepton codes

lepton_positions_nu: array of (float, float, float) tuples

Array containing the lepton positions in NuRadioMC units (m)

lepton_directions: array of (float, float, float) tuples

Array containing the lepton directions, normalised to 1

low_nu: float

Low energy limit for the propagating particle in NuRadioMC units (eV) controls the minimum energy of the particle. Below this energy, the propagated particle will be discarded

propagation_length_nu: float

Maximum propagation length in NuRadioMC units (m)

min_energy_loss_nu: float

Minimum energy for a selected secondary-induced shower (eV) controls the minimum energy a secondary shower must have to be returned and saved in an event file

propagate_decay_muons: bool

If True, muons created by tau decay are propagated and their induced showers are stored

Returns:
secondaries_array: 2D-list containing SecondaryProperties objects

For each primary a list containing the information on the shower-inducing secondaries is returned. The first dimension indicates the (index of the) primary lepton and the second dimension navigates through the secondaries produced by that primary (time-ordered). The SecondaryProperties properties are in NuRadioMC units.

get_decays(energy_leptons_nu, lepton_codes, lepton_positions_nu=None, lepton_directions=None, low_nu=100000000000000.0, propagation_length_nu=1000000.0)[source]

Propagates a set of leptons and returns a list with the properties of the decay particles.

Parameters:
energy_leptons_nu: array of floats

Array with the energies of the input leptons, in NuRadioMC units (eV)

lepton_codes: array of integers

Array with the PDG lepton codes

lepton_positions_nu: array of (float, float, float) tuples

Array containing the lepton positions in NuRadioMC units (m)

lepton_directions: array of (float, float, float) tuples

Array containing the lepton directions, normalised to 1

low_nu: float

Low energy limit for the propagating particle in NuRadioMC units (eV)

propagation_length_nu: float

Maximum propagation length in NuRadioMC units (m)

Returns:
decays_array: array of (float, float) tuples

The first element of the tuple contains the decay distance in m The second element contains the decay energy in eV (NuRadioMC units)