Polinomial corrections to spectrum.
This commit is contained in:
parent
c073ba6ce1
commit
12142b93bf
@ -1,56 +0,0 @@
|
||||
package inr.numass.scripts.temp
|
||||
|
||||
import hep.dataforge.context.Context
|
||||
import hep.dataforge.context.Global
|
||||
import hep.dataforge.grind.Grind
|
||||
import hep.dataforge.grind.GrindShell
|
||||
import hep.dataforge.grind.helpers.PlotHelper
|
||||
import hep.dataforge.stat.fit.ParamSet
|
||||
import hep.dataforge.values.Values
|
||||
import inr.numass.NumassPlugin
|
||||
import inr.numass.models.FSS
|
||||
import inr.numass.models.sterile.NumassBeta
|
||||
|
||||
Context ctx = Global.instance()
|
||||
ctx.getPluginManager().load(FXPlotManager)
|
||||
ctx.getPluginManager().load(NumassPlugin.class)
|
||||
|
||||
|
||||
new GrindShell(ctx).eval {
|
||||
def fssStream = getClass().getResourceAsStream("/data/FS.txt")
|
||||
def fss = new FSS(fssStream)
|
||||
|
||||
def beta = new NumassBeta();
|
||||
|
||||
def params = MetaMorph.morph(ParamSet,
|
||||
Grind.buildMeta("params") {
|
||||
E0(value: 18575, err: 0.1)
|
||||
mnu2(value: 0, err: 0.01)
|
||||
msterile2(value: 1000**2, err: 1)
|
||||
U2(value: 0, err: 1e-3)
|
||||
}
|
||||
)
|
||||
|
||||
def fsBeta = { double eIn, Values set ->
|
||||
double res = 0;
|
||||
for (int i = 0; i < fss.size(); i++) {
|
||||
res += fss.getP(i) * beta.value(fss.getE(i), eIn, set);
|
||||
}
|
||||
return res;
|
||||
};
|
||||
|
||||
|
||||
def xs = (1..400).collect{18500 + it/4}
|
||||
|
||||
def noFssPoints = xs.collect { beta.value(0,it, params) }
|
||||
def fssPoints = xs.collect { fsBeta(it, params) }
|
||||
|
||||
|
||||
(plots as PlotHelper).plot(xs,fssPoints,"FSS")
|
||||
(plots as PlotHelper).plot(xs,noFssPoints,"noFSS")
|
||||
|
||||
println "U\tFSS\tnoFSS"
|
||||
for(i in 0..399){
|
||||
println "${xs[i]}\t${fssPoints[i]}\t${noFssPoints[i]}"
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Alexander Nozik.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package inr.numass.scripts.temp
|
||||
|
||||
import hep.dataforge.context.Context
|
||||
import hep.dataforge.context.Global
|
||||
import hep.dataforge.grind.GrindShell
|
||||
import hep.dataforge.grind.helpers.PlotHelper
|
||||
|
||||
Context ctx = Global.instance()
|
||||
|
||||
new GrindShell(ctx).eval {
|
||||
(plots as PlotHelper).plotFunction(0,1){Math.sin it}
|
||||
}
|
Loading…
Reference in New Issue
Block a user