km3pipe.physics

Cherenkov photon parameters.

Module Contents

Functions

cherenkov(calib_hits, track)

Compute parameters of Cherenkov photons emitted from a track and hitting a PMT.

get_closest(track, du_pos)

calculate the distance of closest approach (d_closest) and its coordinate along the z axis (z_closest).

cut4d(point4d, tmin, tmax, rmin, rmax, items[, c_water])

Select items with a certain time residual and

Attributes

log

km3pipe.physics.log[source]
km3pipe.physics.cherenkov(calib_hits, track)[source]

Compute parameters of Cherenkov photons emitted from a track and hitting a PMT. calib_hits is the table of calibrated hits of the track.

Parameters:
calib_hitskp Table or a DataFrame or a numpy recarray or a dict.
Table of calibrated hits with the following parameters:
  • pos_x.

  • pos_y.

  • pos_z.

  • dir_x.

  • dir_y.

  • dir_z.

trackawkward.Array, DataFrame, numpy.recarray, km3pipe.Table or a dict.
One track with the following parameters:
  • pos_x.

  • pos_y.

  • pos_z.

  • dir_x.

  • dir_y.

  • dir_z.

Returns:
ndarray
a structured array of the physics parameters of Cherenkov photons:
  • d_photon_closest: the closest distance between the PMT and the track

(it is perpendicular to the track). - d_photon: distance traveled by the photon from the track to the PMT. - d_track: distance along the track where the photon was emitted. - t_photon: time of photon travel in [s]. - cos_photon_PMT: cos angle of impact of photon with respect to the PMT direction: - dir_x_photon, dir_y_photon, dir_z_photon: photon directions.

km3pipe.physics.get_closest(track, du_pos)[source]

calculate the distance of closest approach (d_closest) and its coordinate along the z axis (z_closest). These calculations aLWAYS assume vertical DU.

Parameters:
trackawkward.Array, DataFrame, numpy.recarray, km3pipe.Table or a dict.
One track with the following parameters:
  • pos_x.

  • pos_y.

  • pos_z.

  • dir_x.

  • dir_y.

  • dir_z.

du_posa DataFrame or a numpy recarray or a km3pipe Table or a dict.
du_pos vector with the following information:
  • pos_x.

  • pos_y.

  • pos_z.

Returns:
tuple

(d_closest, z_closest).

km3pipe.physics.cut4d(point4d, tmin, tmax, rmin, rmax, items, c_water=C_WATER)[source]

Select items with a certain time residual and within a certain radius around a given 4D point.

Parameters:
point4d: array of shape(x, y, z, t)

central point of the selection

tmin: float

minimum tres of the sphere selection

tmax: float

maximum tres of the sphere selection

rmin: float

minimum radius of the sphere selection

rmax: float

maximum radius of the sphere selection

items: iterable with pos_[xyz]-attributed items

the items to cut on

Returns:
iterable with pos_[xyz]-attributed items

items which survived the cut.