32void assignSpan(std::span<T> &to, std::span<T>
const &from)
37std::map<RooFit::Detail::DataKey, std::span<const double>>
41 std::map<RooFit::Detail::DataKey, std::span<const double>>
dataSpans;
45 auto insert = [&](
const char *key, std::span<const double> span) {
46 const TNamed *namePtr =
nameReg.constPtr((prefix + key).c_str());
50 auto retrieve = [&](
const char *key) {
51 const TNamed *namePtr =
nameReg.constPtr((prefix + key).c_str());
55 std::size_t nEvents =
static_cast<size_t>(
data.numEntries());
57 auto weight =
data.getWeightBatch(0, nEvents,
false);
76 buffer.push_back(1.0);
82 buffer.reserve(nEvents);
84 for (std::size_t i = 0; i < nEvents; ++i) {
86 buffer.push_back(weight[i]);
96 insert(RooFit::Detail::RooNLLVarNew::weightVarName, weight);
97 insert(RooFit::Detail::RooNLLVarNew::weightVarNameSumW2,
weightSumW2);
102 for (
auto const &item :
data.getBatches(0, nEvents)) {
104 std::span<const double> span{item.second};
110 for (std::size_t i = 0; i < nEvents; ++i) {
112 buffer.push_back(span[i]);
115 insert(item.first->GetName(), {buffer.data(), buffer.size()});
120 for (
auto const &item :
data.getCategoryBatches(0, nEvents)) {
122 std::span<const RooAbsCategory::value_type>
intSpan{item.second};
128 for (std::size_t i = 0; i < nEvents; ++i) {
130 buffer.push_back(
static_cast<double>(
intSpan[i]));
133 insert(item.first->GetName(), {buffer.data(), buffer.size()});
141 std::vector<bool> isInRange(nEvents,
false);
156 nEvents = std::accumulate(isInRange.begin(), isInRange.end(), 0);
165 double *buffer =
buffers.top().data();
167 for (std::size_t i = 0; i < isInRange.size(); ++i) {
206std::map<RooFit::Detail::DataKey, std::span<const double>>
211 std::vector<std::pair<std::string, RooAbsData const *>> datasets;
212 std::vector<bool> isBinnedL;
224 datasets.emplace_back(std::string(
"_") +
d->GetName() +
"_",
d);
225 isBinnedL.emplace_back(
simComponent->getAttribute(
"BinnedLikelihoodActive"));
231 datasets.emplace_back(
"", &
data);
232 isBinnedL.emplace_back(
false);
235 std::map<RooFit::Detail::DataKey, std::span<const double>>
dataSpans;
242 for (
auto const &item :
spans) {
250 buffer.reserve(
data.getGlobalObservables()->size());
252 buffer.push_back(arg->getVal());
269std::map<RooFit::Detail::DataKey, std::size_t> RooFit::BatchModeDataHelpers::determineOutputSizes(
272 std::map<RooFit::Detail::DataKey, std::size_t>
output;
281 if (inputSize != -1) {
287 std::size_t
size = 1;
291 if (!arg->isReducerNode()) {
293 if (
server->isValueServer(*arg)) {
295 if (inputSize != 1) {
ROOT::RRangeCast< T, true, Range_t > dynamic_range_cast(Range_t &&coll)
ROOT::RRangeCast< T, false, Range_t > static_range_cast(Range_t &&coll)
static void retrieve(const gsl_integration_workspace *workspace, double *a, double *b, double *r, double *e)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
const_iterator end() const
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
static RooNameReg & instance()
Return reference to singleton instance.
Variable that can be changed from the outside.
Facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
The TNamed class is the base class for all named ROOT classes.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
std::vector< std::string > Split(std::string_view str, std::string_view delims, bool skipEmpty=false)
Splits a string at each character in delims.
std::string getRangeNameForSimComponent(std::string const &rangeName, bool splitRange, std::string const &catName)
void getSortedComputationGraph(RooAbsArg const &func, RooArgSet &out)