diff --git a/numass-main/src/main/groovy/inr/numass/scripts/Underflow.groovy b/numass-main/src/main/groovy/inr/numass/scripts/Underflow.groovy index c54bbae2..af29f216 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/Underflow.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/Underflow.groovy @@ -81,6 +81,6 @@ printPoint(data, [16200d, 16400d, 16800d, 17000d, 17200d]) println() -Table t = new UnderflowCorrection().fitAllPoints(data, 400, 700, 3100, 20); +Table t = new UnderflowCorrection().fitAllPoints(data, 400, 650, 3100, 20); ColumnedDataWriter.writeDataSet(System.out, t, "underflow parameters") diff --git a/numass-main/src/main/java/inr/numass/tasks/NumassPrepareTask.java b/numass-main/src/main/java/inr/numass/tasks/NumassPrepareTask.java index b001206b..a1b4f630 100644 --- a/numass-main/src/main/java/inr/numass/tasks/NumassPrepareTask.java +++ b/numass-main/src/main/java/inr/numass/tasks/NumassPrepareTask.java @@ -10,8 +10,7 @@ import hep.dataforge.context.Context; import hep.dataforge.data.DataFilter; import hep.dataforge.data.DataNode; import hep.dataforge.data.DataTree; -import hep.dataforge.description.DescriptorBuilder; -import hep.dataforge.description.NodeDescriptor; +import hep.dataforge.description.NodeDef; import hep.dataforge.meta.Meta; import hep.dataforge.meta.Template; import hep.dataforge.tables.Table; @@ -27,6 +26,10 @@ import inr.numass.storage.NumassData; * * @author Alexander Nozik */ +@NodeDef(name = "prepare") +@NodeDef(name = "monitor") +@NodeDef(name = "merge") +@NodeDef(name = "data") public class NumassPrepareTask extends AbstractTask { @Override @@ -167,12 +170,12 @@ public class NumassPrepareTask extends AbstractTask
{ return "prepare"; } - @Override - public NodeDescriptor getDescriptor() { - return new DescriptorBuilder(getName()) - .addNode("prepare", PrepareDataAction.class) - .addNode("monitor", MonitorCorrectAction.class) - .addNode("merge", MergeDataAction.class) - .build(); - } +// @Override +// public NodeDescriptor getDescriptor() { +// return new DescriptorBuilder(getName()) +// .addNode("prepare", PrepareDataAction.class) +// .addNode("monitor", MonitorCorrectAction.class) +// .addNode("merge", MergeDataAction.class) +// .build(); +// } } diff --git a/numass-main/src/main/java/inr/numass/utils/PileUpSimulator.java b/numass-main/src/main/java/inr/numass/utils/PileUpSimulator.java index 0916bdf7..3b1195d2 100644 --- a/numass-main/src/main/java/inr/numass/utils/PileUpSimulator.java +++ b/numass-main/src/main/java/inr/numass/utils/PileUpSimulator.java @@ -21,7 +21,6 @@ import static java.lang.Math.max; * @author Alexander Nozik */ public class PileUpSimulator { - private final static double us = 1e-6;//microsecond private final double pointLength; private final RandomGenerator rnd; diff --git a/numass-main/src/main/java/inr/numass/utils/UnderflowCorrection.java b/numass-main/src/main/java/inr/numass/utils/UnderflowCorrection.java index 4bb914d5..b058a1df 100644 --- a/numass-main/src/main/java/inr/numass/utils/UnderflowCorrection.java +++ b/numass-main/src/main/java/inr/numass/utils/UnderflowCorrection.java @@ -26,6 +26,8 @@ import java.util.stream.Collectors; */ public class UnderflowCorrection { + private final static int CUTOFF = -200; + public double get(Logable log, Meta meta, NMPoint point) { if (point.getUset() >= meta.getDouble("underflow.threshold", 17000)) { if (meta.hasValue("underflow.function")) { @@ -68,7 +70,7 @@ public class UnderflowCorrection { double sigma = fitRes[1]; //builder.row(point.getUset(), a, sigma, (a * sigma * (Math.exp(xLow / sigma) - 1) - a*xLow) / norm + 1d); - builder.row(point.getUset(), a, sigma, a * sigma * (Math.exp(xLow / sigma)) / norm + 1d); + builder.row(point.getUset(), a, sigma, a * sigma * (Math.exp(xLow / sigma) - Math.exp(CUTOFF / sigma)) / norm + 1d); } return builder.build(); }