Descriptor markup update
This commit is contained in:
parent
5cf68cc21f
commit
dfb80bcdfd
@ -81,6 +81,6 @@ printPoint(data, [16200d, 16400d, 16800d, 17000d, 17200d])
|
|||||||
|
|
||||||
println()
|
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")
|
ColumnedDataWriter.writeDataSet(System.out, t, "underflow parameters")
|
||||||
|
|
||||||
|
@ -10,8 +10,7 @@ import hep.dataforge.context.Context;
|
|||||||
import hep.dataforge.data.DataFilter;
|
import hep.dataforge.data.DataFilter;
|
||||||
import hep.dataforge.data.DataNode;
|
import hep.dataforge.data.DataNode;
|
||||||
import hep.dataforge.data.DataTree;
|
import hep.dataforge.data.DataTree;
|
||||||
import hep.dataforge.description.DescriptorBuilder;
|
import hep.dataforge.description.NodeDef;
|
||||||
import hep.dataforge.description.NodeDescriptor;
|
|
||||||
import hep.dataforge.meta.Meta;
|
import hep.dataforge.meta.Meta;
|
||||||
import hep.dataforge.meta.Template;
|
import hep.dataforge.meta.Template;
|
||||||
import hep.dataforge.tables.Table;
|
import hep.dataforge.tables.Table;
|
||||||
@ -27,6 +26,10 @@ import inr.numass.storage.NumassData;
|
|||||||
*
|
*
|
||||||
* @author Alexander Nozik
|
* @author Alexander Nozik
|
||||||
*/
|
*/
|
||||||
|
@NodeDef(name = "prepare")
|
||||||
|
@NodeDef(name = "monitor")
|
||||||
|
@NodeDef(name = "merge")
|
||||||
|
@NodeDef(name = "data")
|
||||||
public class NumassPrepareTask extends AbstractTask<Table> {
|
public class NumassPrepareTask extends AbstractTask<Table> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -167,12 +170,12 @@ public class NumassPrepareTask extends AbstractTask<Table> {
|
|||||||
return "prepare";
|
return "prepare";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
// @Override
|
||||||
public NodeDescriptor getDescriptor() {
|
// public NodeDescriptor getDescriptor() {
|
||||||
return new DescriptorBuilder(getName())
|
// return new DescriptorBuilder(getName())
|
||||||
.addNode("prepare", PrepareDataAction.class)
|
// .addNode("prepare", PrepareDataAction.class)
|
||||||
.addNode("monitor", MonitorCorrectAction.class)
|
// .addNode("monitor", MonitorCorrectAction.class)
|
||||||
.addNode("merge", MergeDataAction.class)
|
// .addNode("merge", MergeDataAction.class)
|
||||||
.build();
|
// .build();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@ import static java.lang.Math.max;
|
|||||||
* @author <a href="mailto:altavir@gmail.com">Alexander Nozik</a>
|
* @author <a href="mailto:altavir@gmail.com">Alexander Nozik</a>
|
||||||
*/
|
*/
|
||||||
public class PileUpSimulator {
|
public class PileUpSimulator {
|
||||||
|
|
||||||
private final static double us = 1e-6;//microsecond
|
private final static double us = 1e-6;//microsecond
|
||||||
private final double pointLength;
|
private final double pointLength;
|
||||||
private final RandomGenerator rnd;
|
private final RandomGenerator rnd;
|
||||||
|
@ -26,6 +26,8 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
public class UnderflowCorrection {
|
public class UnderflowCorrection {
|
||||||
|
|
||||||
|
private final static int CUTOFF = -200;
|
||||||
|
|
||||||
public double get(Logable log, Meta meta, NMPoint point) {
|
public double get(Logable log, Meta meta, NMPoint point) {
|
||||||
if (point.getUset() >= meta.getDouble("underflow.threshold", 17000)) {
|
if (point.getUset() >= meta.getDouble("underflow.threshold", 17000)) {
|
||||||
if (meta.hasValue("underflow.function")) {
|
if (meta.hasValue("underflow.function")) {
|
||||||
@ -68,7 +70,7 @@ public class UnderflowCorrection {
|
|||||||
double sigma = fitRes[1];
|
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) - 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();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user