95RooAbsOptTestStatistic::RooAbsOptTestStatistic(
const char *
name,
const char *title,
RooAbsReal &
real,
97 RooAbsTestStatistic::Configuration
const &cfg)
102 if (operMode() !=
Slave) {
112RooAbsOptTestStatistic::RooAbsOptTestStatistic(
const RooAbsOptTestStatistic &
other,
const char *
name)
119 if (operMode() !=
Slave) {
121 if (
other._normSet) {
123 other._normSet->snapshot(*_normSet);
149 if (
_funcClone->getAttribute(
"BinnedLikelihood")) {
150 _funcClone->setAttribute(
"BinnedLikelihoodActive") ;
154 if (!projDeps.
empty()) {
177 indata.get()->snapshot(*_normSet,
false);
181 for (std::size_t i = 0; i <
_funcObsSet->size(); ++i) {
209 coutE(InputArguments) <<
"RooAbsOptTestStatistic: ERROR minimum of FUNC observable " << arg->
GetName()
210 <<
"(" <<
realReal->getMin() <<
") is smaller than that of "
211 << arg->GetName() <<
" in the dataset (" <<
datReal->getMin() <<
")" << std::endl ;
217 coutE(InputArguments) <<
"RooAbsOptTestStatistic: ERROR maximum of FUNC observable " << arg->GetName()
218 <<
" is larger than that of " << arg->GetName() <<
" in the dataset" << std::endl ;
239 cxcoutI(Fitting) <<
"RooAbsOptTestStatistic::ctor(" << GetName() <<
") constructing test statistic for sub-range named " <<
rangeName << std::endl ;
254 errMsg <<
"The observable \"" <<
realObs->GetName() <<
"\" doesn't define the requested range \""
255 <<
token <<
"\". Replacing it with the default range." << std::endl;
278 cxcoutI(Fitting) <<
"RooAbsOptTestStatistic::ctor(" << GetName()
279 <<
") fixing interpretation of coefficients of any RooAddPdf component to range " <<
addCoefRangeName << std::endl ;
297 if (!projDeps.
empty()) {
300 projDeps.
snapshot(*_projDeps,
false) ;
303 _normSet->
remove(*_projDeps,
true,
true) ;
312 coutI(Optimization) <<
"RooAbsOptTestStatistic::ctor(" << GetName() <<
") optimizing internal clone of p.d.f for likelihood evaluation."
313 <<
"Lazy evaluation and associated change tracking will disabled for all nodes that depend on observables" << std::endl ;
331 if(_takeGlobalObservablesFromData && _data->getGlobalObservables()) {
332 recursiveRedirectServers(*_data->getGlobalObservables()) ;
341RooAbsOptTestStatistic::~RooAbsOptTestStatistic()
343 if (operMode()==
Slave) {
363double RooAbsOptTestStatistic::combinedValue(
RooAbsReal** array,
Int_t n)
const
368 for (
Int_t i = 0; i <
n; ++i) {
370 carry +=
reinterpret_cast<RooAbsOptTestStatistic*
>(array[i])->getCarry();
372 const double t =
sum +
y;
373 carry = (t -
sum) -
y;
398void RooAbsOptTestStatistic::printCompactTreeHook(ostream& os,
const char*
indent)
400 RooAbsTestStatistic::printCompactTreeHook(os,
indent) ;
419void RooAbsOptTestStatistic::optimizeCaching()
459 coutW(InputArguments) <<
"RooAbsOptTestStatistic::setData(" << GetName() <<
") WARNING: test statistic was constructed with range selection on data, "
460 <<
"ignoring request to _not_ clone the input dataset" << std::endl ;
490 if(_takeGlobalObservablesFromData && _data->getGlobalObservables()) {
491 recursiveRedirectServers(*_data->getGlobalObservables()) ;
506 coutW(ObjectHandling) <<
"RooAbsOptTestStatistic::data(" << GetName()
507 <<
") WARNING: object sealed by creator - access to data is not permitted: "
518const RooAbsData& RooAbsOptTestStatistic::data()
const
522 coutW(ObjectHandling) <<
"RooAbsOptTestStatistic::data(" << GetName()
523 <<
") WARNING: object sealed by creator - access to data is not permitted: "
539void RooAbsOptTestStatistic::setUpBinSampling() {
541 auto& pdf =
static_cast<RooAbsPdf&
>(*_funcClone);
552const char* RooAbsOptTestStatistic::cacheUniqueSuffix()
const {
int Int_t
Signed integer 4 bytes (int)
static void indent(ostringstream &buf, int indent_level)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Abstract container object that can hold multiple RooAbsArg objects.
virtual bool remove(const RooAbsArg &var, bool silent=false, bool matchByNameOnly=false)
Remove the specified argument from our list.
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 ...
Abstract base class for objects that represent a real value and implements functionality common to al...
virtual double getValV(const RooArgSet *normalisationSet=nullptr) const
Return value of object.
bool redirectServersHook(const RooAbsCollection &newServerList, bool mustReplaceAll, bool nameChange, bool isRecursiveStep) override
Function that is called at the end of redirectServers().
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooArgSet * snapshot(bool deepCopy=true) const
Use RooAbsCollection::snapshot(), but return as RooArgSet.
static std::unique_ptr< RooAbsPdf > create(RooAbsPdf &pdf, RooAbsData const &data, double precision)
Creates a wrapping RooBinSamplingPdf if appropriate.
Container class to hold unbinned data.
static void softAbort()
Soft abort function that interrupts macro execution but doesn't kill ROOT.
Efficient implementation of a product of PDFs of the form.
Variable that can be changed from the outside.
const char * GetName() const override
Returns name of object.
RooCmdArg SelectVars(const RooArgSet &vars)
RooCmdArg CutRange(const char *rangeName)
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::unique_ptr< T > cloneTreeWithSameParameters(T const &arg, RooArgSet const *observables=nullptr)
Clone RooAbsArg object and reattach to original parameters.
static uint64_t sum(uint64_t i)