minor fixes
This commit is contained in:
parent
93bb93e837
commit
0a18e10275
@ -7,6 +7,7 @@ import hep.dataforge.kodex.configure
|
||||
import hep.dataforge.maths.histogram.UnivariateHistogram
|
||||
import hep.dataforge.meta.Laminate
|
||||
import hep.dataforge.plots.PlotPlugin
|
||||
import hep.dataforge.plots.XYFunctionPlot
|
||||
import hep.dataforge.plots.data.DataPlot
|
||||
import hep.dataforge.tables.Adapters
|
||||
import hep.dataforge.tables.Table
|
||||
@ -82,6 +83,14 @@ class TimeAnalyzerAction : OneToOneAction<NumassPoint, Table>() {
|
||||
}.fillData(histogram)
|
||||
|
||||
histPlot.add(histogramPlot)
|
||||
|
||||
//val cr = input.events.count().toDouble() / input.length.toMillis() *1000
|
||||
|
||||
histPlot.add(
|
||||
XYFunctionPlot.plot(name + "_theory", 0.0, binSize * binNum) {
|
||||
trueCR * Math.exp(- it * trueCR / 1e6)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (inputMeta.getBoolean("plotStat", true)) {
|
||||
|
@ -11,16 +11,15 @@ import inr.numass.data.api.timeOffset
|
||||
import inr.numass.data.generateBlock
|
||||
import org.apache.commons.math3.random.JDKRandomGenerator
|
||||
import org.apache.commons.math3.random.RandomGenerator
|
||||
import java.lang.Math.exp
|
||||
import java.time.Instant
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
FXPlotManager().startGlobal()
|
||||
NumassPlugin().startGlobal()
|
||||
|
||||
val cr = 10e3;
|
||||
val length = 30e9.toLong();
|
||||
val num = 20;
|
||||
val cr = 30e3
|
||||
val length = 30e9.toLong()
|
||||
val num = 20
|
||||
val dt = 6.5
|
||||
|
||||
val rnd = JDKRandomGenerator()
|
||||
@ -35,7 +34,8 @@ fun main(args: Array<String>) {
|
||||
|
||||
|
||||
val chain = MarkovChain(OrphanNumassEvent(1000, 0)) { event ->
|
||||
val deltaT = rnd.nextDeltaTime(cr * exp(- event.timeOffset / 1e11))
|
||||
//val deltaT = rnd.nextDeltaTime(cr * exp(- event.timeOffset / 1e11))
|
||||
val deltaT = rnd.nextDeltaTime(cr)
|
||||
OrphanNumassEvent(1000, event.timeOffset + deltaT)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user