Weighting of genie-reader simulation¶
Because of technical reasons, simulation produced with genie-reader
has to be weighted differently then GENIE-IceTray
or NuGen simulations.
This document provides instructions on how to properly weight genie-reader events for analysis.
General idea of weighting IceCube simulation¶
Usually it is convenient to generate simulation with an artificial (non-physical) spectrum and in a specific geometry (one of possible reasons could be to populate phase-space regions with low selection efficiency) and then reweight it.
Goal of weighting is then to “undo” event distributions resulting from generation process, such as generated flux and also geometrical effects, so
we can combine sets of events generated with different geometries and/or energy ranges;
can get realistic rate when weighting events with physical flux.
In case of typical IceCube neutrino simulation,
where \(P_{int}\) is interaction probability, \(S\) is the cross section of generated cylinder, \(\Omega\) is a solid angle in which neutrinos were generated, \(\Phi_{phys}(E,[\theta, ...])\) is physical flux and \(\Phi_{gen}(E)\) is generated flux.
In IceCube simulation generated flux is generally a power law spectrum
so
One can see that amplitude \(A\) is then needed to calculate event weight. The amplitude can be found if we know number of flux events (initially generated events which haven’t necessarily interacted in the detector),
then amplitude is
Event weight then can be calculated as
Caution
This should be done for each of neutrino types and/or generation volume/energy range setups separately!
Number of events vs. Number of flux events¶
It is important to use number of flux events and not number of interactions for weighting, as they are not the same.
Weighting genie-reader simulation¶
In genie-reader
simulation number of flux neutrinos \(N_{flux~ev.}\) is stored inside an icetray::simclasses::I3GenieInfo
object in S-frame (typically named I3GenieInfo
) and can be obtained as
n_flux_events = frame['I3GenieInfo'].n_flux_events
In order to correctly weight simulation user should sum up n_flux_events
values for all used files for a given neutrino type (NuE, NuEBar, NuMu, NuMuBar, NuTau, NuTauBar) and with the same energy (zenith, azimuth) range and generation volume and use this number to divide the weight:
then
where \(OneWeight = P_{int}\cdot S\cdot \Omega \cdot \frac{\int_{E_{min}}^{E_max} E^{-\gamma} dE}{E^{-\gamma}}\), as a standard for IceCube neutrino simulation, is precalculated and stored in I3MCWeightDict
in Q-frames.
Caution
Each set of simulation with specific settings (energy range, neutrino type, etc.) should be weighted using it’s corresponding \(N_{flux~ev}^{total}\) value!