icecube.icetop_Level3_scripts.modules.AddSLCCalibration module¶
- class icecube.icetop_Level3_scripts.modules.AddSLCCalibration.AddSLCCalibrationCollection(ctx)¶
Bases:
I3Module
Take a GCD file and modify it according to a jsonl file with p0/p1 calibration information.
Adds a I3IceTopSLCCalibrationCollection frame object to the C frame with the SLC calibrations constants for all IceTop DOMs (also for the “chip unknown” case).
- 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})
- 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