icecube.icetop_Level3_scripts.modules.AddSLCCalibration module

class icecube.icetop_Level3_scripts.modules.AddSLCCalibration.AddSLCCalibration(ctx)

Bases: I3Module

Takes a GCD files, a jsonl file with p0/p1 calibration information and COP calculation catalog for estimating the crossover points. Adds a I3IceTopSLCCalibrationCollection frame object to the C frame with the SLC calibrations constants for all IceTop DOMs (also for the “chip unknown” case) and the COPs which is where the ATWD channels are expected to switch.

Calibration((I3Module)arg1, (I3Frame)arg2) None :
C++ signature :

void Calibration(PythonModule<I3Module> {lvalue},boost::shared_ptr<I3Frame>)

Configure((I3Module)arg1) None :
C++ signature :

void Configure(PythonModule<I3Module> {lvalue})

DetectorStatus((I3Module)arg1, (I3Frame)arg2) None :
C++ signature :

void DetectorStatus(PythonModule<I3Module> {lvalue},boost::shared_ptr<I3Frame>)

charge_to_COP(OMKey, charge0, charge1, decimalyear=0)

Supplied with an OM key, this function applies the linear fit (parameters taken from the COPcatalog file) on the “saturation charges” for ATWD 0 and 1 and returns the estimated COPs

Parameters:
  • OMKey (icetray.OMKey) – DOM to get the COPs for

  • charge0 (float) – saturation charge for ATWD 0

  • charge1 (float) – saturation charge for ATWD 1

Returns:

COP01, COP12

Return type:

tuple(float, float)

creepyear_from_headerline(l)
estimateCOPs(Cframe, Dframe, OMKey, dy)

This function calculates the theoretical crossover points for a given OMKey , i.e. at which bin count (in PE’s) the ATWD channel is considered saturated. If a DOM is not listed in the dom_status of the GCD or does not show up in the COPCatalog file it will return (0, 0)

Returns:

COP01, COP12

Return type:

tuple(float, float)

p0p1(n, x, y, xx, yy, xy)

Function implements a linear regression of a scatterplot of x and y values, according to the algorithm described in Numerical Recipes. Used in particular here to find the SLC calibration intercept and slope, which are known as “p0” and “p1”, from SLC and HLC hit charge information.

The same function is duplicated in pfmonitoring, which does this on a run-by-run basis when it sends the six running sums to the north; it sends p0 and p1 and their errors to the north as well. It’s also the same function as in the SLCCalRunFitter (which is part of the vemcal project) for doing the same process on historical data. The reason it’s needed here (again) is for when the running sums from Chip 0 and Chip 1 are to be combined together and a p0 and p1 computed for their combination.

Parameters:
  • n – number of hits

  • x – sum of x’s (SLC PE’s)

  • y – sum of y’s (HLC PE’s)

  • xx – sum of x**2

  • yy – sum of y**2 a

  • xy – sum of x*y

Returns:

p0 (intercept), p1 (slope), error on p0, error on p1 and chi-squared of the fit