48 _set1(
"set1",
"First set of components",this),
49 _takeGlobalObservablesFromData{takeGlobalObservablesFromData}
51 for (
const auto comp : constraintSet) {
53 coutE(InputArguments) <<
"RooConstraintSum::ctor(" <<
GetName() <<
") ERROR: component " << comp->GetName()
54 <<
" is not of type RooAbsPdf" << std::endl ;
69 _set1(
"set1",this,other._set1),
70 _paramSet(other._paramSet),
71 _takeGlobalObservablesFromData{other._takeGlobalObservablesFromData}
83 for (
const auto comp :
_set1) {
96 for (
const auto comp :
_set1) {
97 sum -= std::log(dataMap.
at(comp)[0]);
105 std::unique_ptr<RooAbsReal> newArg{
static_cast<RooAbsReal*
>(this->
Clone())};
107 for (
const auto server : newArg->servers()) {
109 server->getObservables(&
_paramSet, nset);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
bool recursiveRedirectServers(const RooAbsCollection &newServerList, bool mustReplaceAll=false, bool nameChange=false, bool recurseInNewSet=true)
Recursively replace all servers with the new servers in newSet.
TObject * Clone(const char *newname=nullptr) const override
Make a clone of an object using the Streamer facility.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
RooAbsData is the common abstract base class for binned and unbinned datasets.
RooArgSet const * getGlobalObservables() const
Returns snapshot of global observables stored in this data.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
bool add(const RooAbsArg &var, bool valueServer, bool shapeServer, bool silent)
Overloaded RooCollection_t::add() method insert object into set and registers object as server to own...
RooConstraintSum calculates the sum of the -(log) likelihoods of a set of RooAbsPfs that represent co...
std::unique_ptr< RooAbsArg > compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext &ctx) const override
bool setData(RooAbsData const &data, bool cloneData=true)
Replace the variables in this RooConstraintSum with the global observables in the dataset if they mat...
RooListProxy _set1
Set of constraint terms.
double evaluate() const override
Return sum of -log of constraint p.d.f.s.
void computeBatch(cudaStream_t *, double *output, size_t size, RooFit::Detail::DataMap const &) const override
Base function for computing multiple values of a RooAbsReal.
RooArgSet _paramSet
Set of parameters to which constraints apply.
const bool _takeGlobalObservablesFromData
If the global observable values are taken from data.
static void softAbort()
Soft abort function that interrupts macro execution but doesn't kill ROOT.
void compileServer(RooAbsArg &server, RooAbsArg &arg, RooArgSet const &normSet)
RooSpan< const double > at(RooAbsArg const *arg, RooAbsArg const *caller=nullptr)
const char * GetName() const override
Returns name of object.
static uint64_t sum(uint64_t i)