icecube.NuRadioMCInterface.reader module¶
- class icecube.NuRadioMCInterface.reader.EventFilter(GDCFile='/cvmfs/icecube.opensciencegrid.org/users/gen2-optical-sim/gcd/IceCubeHEX_Sunflower_240m_v3.2_ExtendedDepthRange.GCD.i3.bz2', padding=300.0, excludedOMtypes=None, onlyTracks=False)¶
Bases:
object
This class is used in an IceTray module which is defined below! Having this class independently (not inheriting from icetray.I3Module) allows easy and convinient access outside of IceTray.
This module only passes on events which hit the detector volume. The module makes a difference whether the particles produced in the first interaction were propagated or not.
Prior to propagation:
For cascade-only events the primary vertex has to be within the padded detector volume.
Tracks (muon or tau leptons) have to intersect with the detector volume assuming infinitiv track lenghts
Post propagation:
Any simulated particle track (MMCTrackList) has to fit the padded detector volume
Details:
To check for a track it uses the second particle in I3MCTree which should be the secondary lepton.
To check whether the propagation has already been simulated we check if “MMCTrackList” is in the frame.
To define the detector volume a GCD file has to be configured. The DOM positions define the surface + some padding (300m). Certain DOMs (IceTop, Armanda, …) are ignored.
- finish(name='Eventfilter')¶
Print statistic
- class icecube.NuRadioMCInterface.reader.EventFilterModule(ctx=None)¶
Bases:
I3Module
IceTray module which is a wrapper around the class EventFilter.
- Configure((I3Module)arg1) None : ¶
- C++ signature :
void Configure(PythonModule<I3Module> {lvalue})
- DAQ((I3Module)arg1, (I3Frame)arg2) None : ¶
- C++ signature :
void DAQ(PythonModule<I3Module> {lvalue},boost::shared_ptr<I3Frame>)
- Finish()¶
Print statistic
- class icecube.NuRadioMCInterface.reader.NuRadioMCReader(ctx)¶
Bases:
I3Module
This module reads NuRadioMC’s hdf5 files and injects particles to simulated the optical counter part of radio-producing neutrino events. It only injects the primary neutrino and particles produced in the primary neutrino interaction: A secondary lepton and a hadron bundle. Any secondary particle interaction which might have been simulated with NuRadioMC using PROPOSAL is ignored! So far only neutral- and charge-current interactions are supported.
- Details:
The position and direction of the secondary lepton and hadron bundle are the same as the primary neutrino
Eventwise meta data are stored in a struct “NuRadioMCEventInfo”
By default only events which triggered the radio detector are used (if a radio trigger was simulated)
- Configure()¶
Read in hdf5 files and cache their content in a dictionary
- Finish((I3Module)arg1) None : ¶
- C++ signature :
void Finish(PythonModule<I3Module> {lvalue})
- Process()¶
Loop over all events: produce the particles and store them in a MCTree
- apply_mask(mask)¶
Applies a mask to the data
- create_secondaries_at_first_interaction()¶
This function creates parameter of the secondary particles created in the primary interaction. This means that the optional propagation of muons and taus in NuRadioMC is ignored. HDF files of version <= 2.2 have to rely on this function, they do not contain enough information to reproduce the state of the muons and taus after/during propagation).
TODO: For files of version >= 3.0 we can implement a function taking into account the proposal propagation within NuRadioMC and injecting the lepton at an abitrary state along its propagation (an the energy losses it has produced so far).
NOTE: This function allows to “reproduce” the first interaction (if not stored due to a bug in v2.2 files) by “back propagating” the lepton from a (stored) secondary interaction. This is only possible if the inelasticity, stored for the secondary interaction, has been patch (in the files) to be not NAN (typically the inelasticity is set to NAN for secondary interactions, if the inelasticity is NAN the corresponding event is discarded). For those events the neutrino flavour is set to UNKNOWN and has to be recovered with the ParticleTypeRecover module.
- get_generator_info(index)¶
Store generator meta data in simulation frames. Per file one frame
- get_meta_event_information()¶
Store event-wise meta data
- icecube.NuRadioMCInterface.reader.get_interaction_type(type_str)¶
Convert string of interaction type to enum
- icecube.NuRadioMCInterface.reader.get_radio_trigger_type(trigger_strs)¶
Convert trigger names to enums
- icecube.NuRadioMCInterface.reader.get_strings_from_dict(d, key)¶
In some cases the hdf5 datasets contain strings which have to be decoded firt
- icecube.NuRadioMCInterface.reader.particle_type2pdg = {icecube._dataclasses.ParticleType.SMPMinus: -2000009501, icecube._dataclasses.ParticleType.SMPPlus: -2000009500, icecube._dataclasses.ParticleType.STauMinus: -2000009132, icecube._dataclasses.ParticleType.STauPlus: -2000009131, icecube._dataclasses.ParticleType.YAGLaser: -2000002201, icecube._dataclasses.ParticleType.N2Laser: -2000002101, icecube._dataclasses.ParticleType.FiberLaser: -2000002100, icecube._dataclasses.ParticleType.ContinuousEnergyLoss: -2000001111, icecube._dataclasses.ParticleType.WeakInt: -2000001007, icecube._dataclasses.ParticleType.Hadrons: -2000001006, icecube._dataclasses.ParticleType.MuPair: -2000001005, icecube._dataclasses.ParticleType.NuclInt: -2000001004, icecube._dataclasses.ParticleType.PairProd: -2000001003, icecube._dataclasses.ParticleType.DeltaE: -2000001002, icecube._dataclasses.ParticleType.Brems: -2000001001, icecube._dataclasses.ParticleType.Monopole: -2000000041, icecube._dataclasses.ParticleType.Nu: -2000000004, icecube._dataclasses.ParticleType.OmegabBarPlus: -5332, icecube._dataclasses.ParticleType.XibBar0: -5232, icecube._dataclasses.ParticleType.SigmabBarMinus: -5222, icecube._dataclasses.ParticleType.XibBarPlus: -5132, icecube._dataclasses.ParticleType.LambdabBar0: -5122, icecube._dataclasses.ParticleType.SigmabBarPlus: -5112, icecube._dataclasses.ParticleType.OmegacBar0: -4332, icecube._dataclasses.ParticleType.XicPrimeBarMinus: -4322, icecube._dataclasses.ParticleType.XicPrimeBar0: -4312, icecube._dataclasses.ParticleType.XicBarMinus: -4232, icecube._dataclasses.ParticleType.Sigmac2520BarMinusMinus: -4224, icecube._dataclasses.ParticleType.Sigmac2455BarMinusMinus: -4222, icecube._dataclasses.ParticleType.Sigmac2520BarMinus: -4214, icecube._dataclasses.ParticleType.Sigmac2455BarMinus: -4212, icecube._dataclasses.ParticleType.XicBar0: -4132, icecube._dataclasses.ParticleType.LambdacBarMinus: -4122, icecube._dataclasses.ParticleType.Sigmac2520Bar0: -4114, icecube._dataclasses.ParticleType.Sigmac2455Bar0: -4112, icecube._dataclasses.ParticleType.OmegaPlusBar: -3334, icecube._dataclasses.ParticleType.Xi0Bar: -3322, icecube._dataclasses.ParticleType.XiPlusBar: -3312, icecube._dataclasses.ParticleType.SigmaMinusBar: -3222, icecube._dataclasses.ParticleType.Sigma0Bar: -3212, icecube._dataclasses.ParticleType.LambdaBar: -3122, icecube._dataclasses.ParticleType.SigmaPlusBar: -3112, icecube._dataclasses.ParticleType.Delta1232BarMinusMinus: -2224, icecube._dataclasses.ParticleType.Delta1232BarMinus: -2214, icecube._dataclasses.ParticleType.PMinus: -2212, icecube._dataclasses.ParticleType.Delta1232Bar0: -2114, icecube._dataclasses.ParticleType.NeutronBar: -2112, icecube._dataclasses.ParticleType.Delta1232BarPlus: -1114, icecube._dataclasses.ParticleType.BcMinus: -541, icecube._dataclasses.ParticleType.BsBar0: -531, icecube._dataclasses.ParticleType.BMinus: -521, icecube._dataclasses.ParticleType.BBar0: -511, icecube._dataclasses.ParticleType.DsStarMinus: -433, icecube._dataclasses.ParticleType.DsMinusBar: -431, icecube._dataclasses.ParticleType.DStar2007Bar0: -423, icecube._dataclasses.ParticleType.D0Bar: -421, icecube._dataclasses.ParticleType.DStar2010Minus: -413, icecube._dataclasses.ParticleType.DMinus: -411, icecube._dataclasses.ParticleType.KStar892Minus: -323, icecube._dataclasses.ParticleType.KMinus: -321, icecube._dataclasses.ParticleType.KStar892Bar0: -313, icecube._dataclasses.ParticleType.Rho770Minus: -213, icecube._dataclasses.ParticleType.PiMinus: -211, icecube._dataclasses.ParticleType.WMinus: -24, icecube._dataclasses.ParticleType.NuTauBar: -16, icecube._dataclasses.ParticleType.TauPlus: -15, icecube._dataclasses.ParticleType.NuMuBar: -14, icecube._dataclasses.ParticleType.MuPlus: -13, icecube._dataclasses.ParticleType.NuEBar: -12, icecube._dataclasses.ParticleType.EPlus: -11, icecube._dataclasses.ParticleType.unknown: 0, icecube._dataclasses.ParticleType.EMinus: 11, icecube._dataclasses.ParticleType.NuE: 12, icecube._dataclasses.ParticleType.MuMinus: 13, icecube._dataclasses.ParticleType.NuMu: 14, icecube._dataclasses.ParticleType.TauMinus: 15, icecube._dataclasses.ParticleType.NuTau: 16, icecube._dataclasses.ParticleType.Gamma: 22, icecube._dataclasses.ParticleType.Z0: 23, icecube._dataclasses.ParticleType.WPlus: 24, icecube._dataclasses.ParticleType.Pi0: 111, icecube._dataclasses.ParticleType.Rho7700: 113, icecube._dataclasses.ParticleType.K0_Long: 130, icecube._dataclasses.ParticleType.PiPlus: 211, icecube._dataclasses.ParticleType.Rho770Plus: 213, icecube._dataclasses.ParticleType.Eta: 221, icecube._dataclasses.ParticleType.Omega782: 223, icecube._dataclasses.ParticleType.K0_Short: 310, icecube._dataclasses.ParticleType.KStar8920: 313, icecube._dataclasses.ParticleType.KPlus: 321, icecube._dataclasses.ParticleType.KStar892Plus: 323, icecube._dataclasses.ParticleType.EtaPrime958: 331, icecube._dataclasses.ParticleType.Phi1020: 333, icecube._dataclasses.ParticleType.DPlus: 411, icecube._dataclasses.ParticleType.DStar2010Plus: 413, icecube._dataclasses.ParticleType.D0: 421, icecube._dataclasses.ParticleType.DStar20070: 423, icecube._dataclasses.ParticleType.DsPlus: 431, icecube._dataclasses.ParticleType.DsStarPlus: 433, icecube._dataclasses.ParticleType.Etac1S: 441, icecube._dataclasses.ParticleType.Jpsi1S: 443, icecube._dataclasses.ParticleType.BZero: 511, icecube._dataclasses.ParticleType.BPlus: 521, icecube._dataclasses.ParticleType.Bs0: 531, icecube._dataclasses.ParticleType.BcPlus: 541, icecube._dataclasses.ParticleType.Delta1232Minus: 1114, icecube._dataclasses.ParticleType.Neutron: 2112, icecube._dataclasses.ParticleType.Delta12320: 2114, icecube._dataclasses.ParticleType.PPlus: 2212, icecube._dataclasses.ParticleType.Delta1232Plus: 2214, icecube._dataclasses.ParticleType.Delta1232PlusPlus: 2224, icecube._dataclasses.ParticleType.SigmaMinus: 3112, icecube._dataclasses.ParticleType.Lambda: 3122, icecube._dataclasses.ParticleType.Sigma0: 3212, icecube._dataclasses.ParticleType.SigmaPlus: 3222, icecube._dataclasses.ParticleType.XiMinus: 3312, icecube._dataclasses.ParticleType.Xi0: 3322, icecube._dataclasses.ParticleType.OmegaMinus: 3334, icecube._dataclasses.ParticleType.Sigmac24550: 4112, icecube._dataclasses.ParticleType.Sigmac25200: 4114, icecube._dataclasses.ParticleType.LambdacPlus: 4122, icecube._dataclasses.ParticleType.Xic0: 4132, icecube._dataclasses.ParticleType.Sigmac2455Plus: 4212, icecube._dataclasses.ParticleType.Sigmac2520Plus: 4214, icecube._dataclasses.ParticleType.Sigmac2455PlusPlus: 4222, icecube._dataclasses.ParticleType.Sigmac2520PlusPlus: 4224, icecube._dataclasses.ParticleType.XicPlus: 4232, icecube._dataclasses.ParticleType.XicPrime0: 4312, icecube._dataclasses.ParticleType.XicPrimePlus: 4322, icecube._dataclasses.ParticleType.Omegac0: 4332, icecube._dataclasses.ParticleType.SigmabMinus: 5112, icecube._dataclasses.ParticleType.Lambdab0: 5122, icecube._dataclasses.ParticleType.XibMinus: 5132, icecube._dataclasses.ParticleType.SigmabPlus: 5222, icecube._dataclasses.ParticleType.Xib0: 5232, icecube._dataclasses.ParticleType.OmegabMinus: 5332, icecube._dataclasses.ParticleType.Qball: 10000000, icecube._dataclasses.ParticleType.H2Nucleus: 1000010020, icecube._dataclasses.ParticleType.H3Nucleus: 1000010030, icecube._dataclasses.ParticleType.He3Nucleus: 1000020030, icecube._dataclasses.ParticleType.He4Nucleus: 1000020040, icecube._dataclasses.ParticleType.He5Nucleus: 1000020050, icecube._dataclasses.ParticleType.He6Nucleus: 1000020060, icecube._dataclasses.ParticleType.Li5Nucleus: 1000030050, icecube._dataclasses.ParticleType.Li6Nucleus: 1000030060, icecube._dataclasses.ParticleType.Li7Nucleus: 1000030070, icecube._dataclasses.ParticleType.Be9Nucleus: 1000040090, icecube._dataclasses.ParticleType.B10Nucleus: 1000050100, icecube._dataclasses.ParticleType.B11Nucleus: 1000050110, icecube._dataclasses.ParticleType.C12Nucleus: 1000060120, icecube._dataclasses.ParticleType.C13Nucleus: 1000060130, icecube._dataclasses.ParticleType.N14Nucleus: 1000070140, icecube._dataclasses.ParticleType.N15Nucleus: 1000070150, icecube._dataclasses.ParticleType.O16Nucleus: 1000080160, icecube._dataclasses.ParticleType.O17Nucleus: 1000080170, icecube._dataclasses.ParticleType.O18Nucleus: 1000080180, icecube._dataclasses.ParticleType.F19Nucleus: 1000090190, icecube._dataclasses.ParticleType.Ne20Nucleus: 1000100200, icecube._dataclasses.ParticleType.Ne21Nucleus: 1000100210, icecube._dataclasses.ParticleType.Ne22Nucleus: 1000100220, icecube._dataclasses.ParticleType.Na23Nucleus: 1000110230, icecube._dataclasses.ParticleType.Mg24Nucleus: 1000120240, icecube._dataclasses.ParticleType.Mg25Nucleus: 1000120250, icecube._dataclasses.ParticleType.Mg26Nucleus: 1000120260, icecube._dataclasses.ParticleType.Al26Nucleus: 1000130260, icecube._dataclasses.ParticleType.Al27Nucleus: 1000130270, icecube._dataclasses.ParticleType.Si28Nucleus: 1000140280, icecube._dataclasses.ParticleType.Si29Nucleus: 1000140290, icecube._dataclasses.ParticleType.Si30Nucleus: 1000140300, icecube._dataclasses.ParticleType.Si31Nucleus: 1000140310, icecube._dataclasses.ParticleType.Si32Nucleus: 1000140320, icecube._dataclasses.ParticleType.P31Nucleus: 1000150310, icecube._dataclasses.ParticleType.P32Nucleus: 1000150320, icecube._dataclasses.ParticleType.P33Nucleus: 1000150330, icecube._dataclasses.ParticleType.S32Nucleus: 1000160320, icecube._dataclasses.ParticleType.S33Nucleus: 1000160330, icecube._dataclasses.ParticleType.S34Nucleus: 1000160340, icecube._dataclasses.ParticleType.S35Nucleus: 1000160350, icecube._dataclasses.ParticleType.S36Nucleus: 1000160360, icecube._dataclasses.ParticleType.Cl35Nucleus: 1000170350, icecube._dataclasses.ParticleType.Cl36Nucleus: 1000170360, icecube._dataclasses.ParticleType.Cl37Nucleus: 1000170370, icecube._dataclasses.ParticleType.Ar36Nucleus: 1000180360, icecube._dataclasses.ParticleType.Ar37Nucleus: 1000180370, icecube._dataclasses.ParticleType.Ar38Nucleus: 1000180380, icecube._dataclasses.ParticleType.Ar39Nucleus: 1000180390, icecube._dataclasses.ParticleType.Ar40Nucleus: 1000180400, icecube._dataclasses.ParticleType.Ar41Nucleus: 1000180410, icecube._dataclasses.ParticleType.Ar42Nucleus: 1000180420, icecube._dataclasses.ParticleType.K39Nucleus: 1000190390, icecube._dataclasses.ParticleType.K40Nucleus: 1000190400, icecube._dataclasses.ParticleType.K41Nucleus: 1000190410, icecube._dataclasses.ParticleType.Ca40Nucleus: 1000200400, icecube._dataclasses.ParticleType.Ca41Nucleus: 1000200410, icecube._dataclasses.ParticleType.Ca42Nucleus: 1000200420, icecube._dataclasses.ParticleType.Ca43Nucleus: 1000200430, icecube._dataclasses.ParticleType.Ca44Nucleus: 1000200440, icecube._dataclasses.ParticleType.Ca45Nucleus: 1000200450, icecube._dataclasses.ParticleType.Ca46Nucleus: 1000200460, icecube._dataclasses.ParticleType.Ca47Nucleus: 1000200470, icecube._dataclasses.ParticleType.Ca48Nucleus: 1000200480, icecube._dataclasses.ParticleType.Sc44Nucleus: 1000210440, icecube._dataclasses.ParticleType.Sc45Nucleus: 1000210450, icecube._dataclasses.ParticleType.Sc46Nucleus: 1000210460, icecube._dataclasses.ParticleType.Sc47Nucleus: 1000210470, icecube._dataclasses.ParticleType.Sc48Nucleus: 1000210480, icecube._dataclasses.ParticleType.Ti44Nucleus: 1000220440, icecube._dataclasses.ParticleType.Ti45Nucleus: 1000220450, icecube._dataclasses.ParticleType.Ti46Nucleus: 1000220460, icecube._dataclasses.ParticleType.Ti47Nucleus: 1000220470, icecube._dataclasses.ParticleType.Ti48Nucleus: 1000220480, icecube._dataclasses.ParticleType.Ti49Nucleus: 1000220490, icecube._dataclasses.ParticleType.Ti50Nucleus: 1000220500, icecube._dataclasses.ParticleType.V48Nucleus: 1000230480, icecube._dataclasses.ParticleType.V49Nucleus: 1000230490, icecube._dataclasses.ParticleType.V50Nucleus: 1000230500, icecube._dataclasses.ParticleType.V51Nucleus: 1000230510, icecube._dataclasses.ParticleType.Cr50Nucleus: 1000240500, icecube._dataclasses.ParticleType.Cr51Nucleus: 1000240510, icecube._dataclasses.ParticleType.Cr52Nucleus: 1000240520, icecube._dataclasses.ParticleType.Cr53Nucleus: 1000240530, icecube._dataclasses.ParticleType.Cr54Nucleus: 1000240540, icecube._dataclasses.ParticleType.Mn52Nucleus: 1000250520, icecube._dataclasses.ParticleType.Mn53Nucleus: 1000250530, icecube._dataclasses.ParticleType.Mn54Nucleus: 1000250540, icecube._dataclasses.ParticleType.Mn55Nucleus: 1000250550, icecube._dataclasses.ParticleType.Fe54Nucleus: 1000260540, icecube._dataclasses.ParticleType.Fe55Nucleus: 1000260550, icecube._dataclasses.ParticleType.Fe56Nucleus: 1000260560, icecube._dataclasses.ParticleType.Fe57Nucleus: 1000260570, icecube._dataclasses.ParticleType.Fe58Nucleus: 1000260580, icecube._dataclasses.ParticleType.CherenkovPhoton: 2000009900}¶
Define trigger_names (as used in NuRadioMC) and corresponding enums as defined in icetray. The order of the following lists have to match!