Data and categories: demonstration of real-discrete mapping functions
import ROOT
xframe =
x.frame(Title=
"Demo of threshold and binning mapping functions")
data.plotOn(xframe, Cut=
"xRegion==xRegion::SideBand", MarkerColor=
"r", LineColor=
"r")
xb.setRange(
"alt",
"x_coarse_bin1,x_coarse_bin3,x_coarse_bin5,x_coarse_bin7,x_coarse_bin9")
dataSel =
data.reduce(CutRange=
"alt", EventRange=(0, 5000))
c =
ROOT.TCanvas(
"rf405_realtocatfuncs",
"rf405_realtocatfuncs", 600, 600)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
[#1] INFO:Plotting -- RooTreeData::plotOn: plotting 2748 events out of 10000 total events
Table xBins : aData
+---------------+------+
| x_coarse_bin0 | 105 |
| x_coarse_bin1 | 329 |
| x_coarse_bin2 | 499 |
| x_coarse_bin3 | 739 |
| x_coarse_bin4 | 934 |
| x_coarse_bin5 | 1218 |
| x_coarse_bin6 | 1450 |
| x_coarse_bin7 | 1675 |
| x_coarse_bin8 | 1767 |
| x_coarse_bin9 | 1284 |
+---------------+------+
[#1] INFO:Plotting -- RooPlot::updateFitRangeNorm: New event count of 2627 will supersede previous event count of 10000 for normalization of PDF projections
- Date
- February 2018
- Authors
- Clemens Lange, Wouter Verkerke (C++ version)
Definition in file rf405_realtocatfuncs.py.