本文整理汇总了C#中IQueryable.FuturePlot方法的典型用法代码示例。如果您正苦于以下问题:C# IQueryable.FuturePlot方法的具体用法?C# IQueryable.FuturePlot怎么用?C# IQueryable.FuturePlot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IQueryable
的用法示例。
在下文中一共展示了IQueryable.FuturePlot方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalcSignalToBackground
/// <summary>
/// Calculate a set of plots over this list of events
/// </summary>
/// <param name="signal"></param>
/// <param name="background"></param>
/// <param name="jetSelectorFunc"></param>
/// <param name="dir"></param>
private static Tuple<IFutureValue<NTH1>, IFutureValue<NTH1>> CalcSignalToBackground(IQueryable<JetInfoExtra> signal, IQueryable<JetInfoExtra> background,
IPlotSpec<JetInfoExtra> plotter,
FutureTDirectory dir,
string name)
{
GC.Collect(3, GCCollectionMode.Forced, true);
// Some generic plots
signal
.FuturePlot(JetExtraPtPlot, $"{name}_sig")
.Save(dir);
background
.FuturePlot(JetExtraPtPlot, $"{name}_back")
.Save(dir);
signal
.FuturePlot(JetExtraEtaPlot, $"{name}_sig")
.Save(dir);
background
.FuturePlot(JetExtraEtaPlot, $"{name}_back")
.Save(dir);
// get the histograms for the signal and background
var sPlot = signal
.FuturePlot(plotter, "eff_sig")
.Rename($"{name}_sig")
.Save(dir)
.Normalize()
.AsCumulative(startWithZeroEff: false)
.Rename($"{name}_sigrtback_sig")
.Save(dir);
var bPlot = background
.FuturePlot(plotter, "eff_back")
.Rename($"{name}_back")
.Save(dir)
.Normalize()
.AsCumulative()
.Rename($"{name}_sigrtback_back")
.Save(dir);
var bPlotSqrt = bPlot
.Sqrt();
// As a bonus, calc the effeciency graf. Get the x and y for that.
// TODO: there doesn't seem to be a get accessor for Content on NTH1 - is that really right?
//var r = from s in sPlot
// let sContent = Enumerable.Range(1, s.NbinsX).Select(idx => s.GetBinContent(idx)).ToArray()
// from b in bPlot
// select new ROOTNET.NTGraph(s.NBinsX, sContent, sContent);
var effCurve = from s in sPlot
from b in bPlot
select CalculateROC(s, b, $"{name}_roc",$"ROC for {name}");
effCurve
.Save(dir);
// Calc the S/sqrt(B) and return it.
sPlot
.DividedBy(bPlotSqrt)
.Rename($"{name}_sigrtback")
.Save(dir);
return Tuple.Create(sPlot, bPlot);
}
示例2: LLPBasicInfo
/// <summary>
/// Some very basic LLP plots. Good LLPs are < 1.7 in eta?? For forward it is 1.7 to 2.5.
/// </summary>
/// <param name="LLPsToPlot"></param>
/// <param name="dir"></param>
private static void LLPBasicInfo(IQueryable<recoTreeLLPs> LLPsToPlot, IQueryable<recoTreeJets> jets, FutureTDirectory dir)
{
// LLP's and LLP's associated with a jet
LLPsToPlot
.FuturePlot(LLPLxyPlot, "all")
.Save(dir);
LLPsToPlot
.FuturePlot(LLPEtaPlot, "all")
.Save(dir);
var jetsWithLLPS = jets
.Where(j => j.LLP.IsGoodIndex());
jetsWithLLPS
.Select(j => j.LLP)
.FuturePlot(LLPLxyPlot, "JetMatched")
.Save(dir);
jetsWithLLPS
.Select(j => j.LLP)
.FuturePlot(LLPEtaPlot, "JetMatched")
.Save(dir);
// And look at the EMF as a function of the jet decay length so we can see exactly where the Calorimeter is.
jetsWithLLPS
.FuturePlot(JetCalRVsLXYPlot, "JetsWithLLPs")
.Save(dir);
// Check out what things look like for our cut region.
LLPsToPlot
.Where(llp => Constants.InCalorimeter.Invoke(llp.Lxy/1000))
.FuturePlot(LLPLxyPlot, "In Cut CAL Range")
.Save(dir);
}