[no commit message]
This commit is contained in:
parent
21c1edb323
commit
5081ce0b2c
@ -51,7 +51,7 @@ import hep.dataforge.io.FittingIOUtils
|
|||||||
setDefault(Locale.US);
|
setDefault(Locale.US);
|
||||||
|
|
||||||
//ModularSpectrum beta = new ModularSpectrum(new BetaSpectrum(), 8.3e-5, 13990d, 18600d);
|
//ModularSpectrum beta = new ModularSpectrum(new BetaSpectrum(), 8.3e-5, 13990d, 18600d);
|
||||||
//beta.setCaching(false);
|
|
||||||
ParametricFunction beta = new SterileNeutrinoSpectrum();
|
ParametricFunction beta = new SterileNeutrinoSpectrum();
|
||||||
|
|
||||||
NBkgSpectrum spectrum = new NBkgSpectrum(beta);
|
NBkgSpectrum spectrum = new NBkgSpectrum(beta);
|
||||||
@ -68,7 +68,7 @@ allPars.setPar("U2", 0.0, 1e-4, -1d, 1d);
|
|||||||
allPars.setPar("X", 0.04000, 0.01, 0d, Double.POSITIVE_INFINITY);
|
allPars.setPar("X", 0.04000, 0.01, 0d, Double.POSITIVE_INFINITY);
|
||||||
allPars.setPar("trap", 1.634, 0.01,0d, Double.POSITIVE_INFINITY);
|
allPars.setPar("trap", 1.634, 0.01,0d, Double.POSITIVE_INFINITY);
|
||||||
|
|
||||||
FittingIOUtils.printSpectrum(GlobalContext.out(), spectrum, allPars, 14000.0, 18600.0, 600);
|
FittingIOUtils.printSpectrum(GlobalContext.out(), spectrum, allPars, 14000.0, 18600.0, 400);
|
||||||
|
|
||||||
//SpectrumGenerator generator = new SpectrumGenerator(model, allPars, 12316);
|
//SpectrumGenerator generator = new SpectrumGenerator(model, allPars, 12316);
|
||||||
//
|
//
|
||||||
|
@ -22,7 +22,7 @@ public class NumassResolution extends AbstractParametricBiFunction {
|
|||||||
private static final String[] list = {}; //leaving
|
private static final String[] list = {}; //leaving
|
||||||
|
|
||||||
private final double resA;
|
private final double resA;
|
||||||
private double resB = Double.NaN;
|
private double resB = 0;
|
||||||
private BivariateFunction tailFunction = ResolutionFunction.getConstantTail();
|
private BivariateFunction tailFunction = ResolutionFunction.getConstantTail();
|
||||||
|
|
||||||
public NumassResolution(Meta meta) {
|
public NumassResolution(Meta meta) {
|
||||||
@ -61,7 +61,7 @@ public class NumassResolution extends AbstractParametricBiFunction {
|
|||||||
@Override
|
@Override
|
||||||
public double value(double E, double U, NamedValueSet set) {
|
public double value(double E, double U, NamedValueSet set) {
|
||||||
assert resA > 0;
|
assert resA > 0;
|
||||||
if (isNaN(resB)) {
|
if (resB == 0) {
|
||||||
return this.getValueFast(E, U);
|
return this.getValueFast(E, U);
|
||||||
}
|
}
|
||||||
assert resB > 0;
|
assert resB > 0;
|
||||||
|
@ -136,7 +136,7 @@ public class SterileNeutrinoSpectrum extends AbstractParametricFunction {
|
|||||||
throw new Error();
|
throw new Error();
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}).limit(num).parallel().sum();
|
}).parallel().limit(num).sum();
|
||||||
//triangle surface
|
//triangle surface
|
||||||
return Math.pow(eMax - u, 2d) / 2d * sum / num;
|
return Math.pow(eMax - u, 2d) / 2d * sum / num;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user