95 _plotCoefNormSet(
"!plotCoefNormSet",
"plotCoefNormSet",this,
kFALSE,
kFALSE),
96 _plotCoefNormRange(0),
98 _indexCat(
"indexCat",
"Index category",this,inIndexCat),
118 _plotCoefNormSet(
"!plotCoefNormSet",
"plotCoefNormSet",this,
kFALSE,
kFALSE),
119 _plotCoefNormRange(0),
120 _partIntMgr(this,10),
121 _indexCat(
"indexCat",
"Index category",this,inIndexCat),
124 if (inPdfList.
size() != inIndexCat.
size()) {
125 coutE(InputArguments) <<
"RooSimultaneous::ctor(" <<
GetName()
126 <<
" ERROR: Number PDF list entries must match number of index category states, no PDFs added" << endl ;
130 map<string,RooAbsPdf*> pdfMap ;
131 auto indexCatIt = inIndexCat.
begin();
132 for (
unsigned int i=0; i < inPdfList.
size(); ++i) {
133 auto pdf =
static_cast<RooAbsPdf*
>(&inPdfList[i]);
134 const auto& nameIdx = (*indexCatIt++);
135 pdfMap[nameIdx.first] = pdf;
147 _plotCoefNormSet(
"!plotCoefNormSet",
"plotCoefNormSet",this,
kFALSE,
kFALSE),
148 _plotCoefNormRange(0),
149 _partIntMgr(this,10),
150 _indexCat(
"indexCat",
"Index category",this,inIndexCat),
174 for (map<string,RooAbsPdf*>::iterator iter=pdfMap.begin() ; iter!=pdfMap.end() ; ++iter) {
183 bool failure =
false;
184 for (map<string,RooAbsPdf*>::iterator iter=pdfMap.begin() ; iter!=pdfMap.end() ; ++iter) {
185 failure |=
addPdf(*iter->second,iter->first.c_str()) ;
189 throw std::invalid_argument(std::string(
"At least one of the PDFs of the RooSimultaneous ")
196 coutI(InputArguments) <<
"RooSimultaneous::initialize(" <<
GetName() <<
") INFO: one or more input component of simultaneous p.d.f.s are"
197 <<
" simultaneous p.d.f.s themselves, rewriting composite expressions as one-level simultaneous p.d.f. in terms of"
198 <<
" final constituents and extended index category" << endl ;
202 map<string,RooSimultaneousAux::CompInfo> compMap ;
203 for (map<string,RooAbsPdf*>::iterator iter=pdfMap.begin() ; iter!=pdfMap.end() ; ++iter) {
205 ci.
pdf = iter->second ;
217 compMap[iter->first] = ci ;
222 allCats.
add(allAuxCats) ;
225 bool failure =
false;
228 for (map<string,RooSimultaneousAux::CompInfo>::iterator citer = compMap.begin() ; citer != compMap.end() ; ++citer) {
231 if (citer->second.subIndexComps) {
232 repliCats.
remove(*citer->second.subIndexComps) ;
233 delete citer->second.subIndexComps ;
235 inIndexCat.
setLabel(citer->first.c_str()) ;
237 if (!citer->second.simPdf) {
243 for (
const auto& nameIdx : repliSuperCat) {
245 repliSuperCat.
setLabel(nameIdx.first) ;
248 failure |=
addPdf(*citer->second.pdf,superLabel.c_str()) ;
249 cxcoutD(InputArguments) <<
"RooSimultaneous::initialize(" <<
GetName()
250 <<
") assigning pdf " << citer->second.pdf->GetName() <<
" to super label " << superLabel << endl ;
260 for (
const auto&
type : *citer->second.subIndex) {
263 RooAbsPdf* compPdf = citer->second.simPdf->getPdf(
type.first.c_str());
265 failure |=
addPdf(*compPdf,superLabel.c_str()) ;
266 cxcoutD(InputArguments) <<
"RooSimultaneous::initialize(" <<
GetName()
267 <<
") assigning pdf " << compPdf->
GetName() <<
"(member of " << citer->second.pdf->GetName()
268 <<
") to super label " << superLabel << endl ;
270 coutW(InputArguments) <<
"RooSimultaneous::initialize(" <<
GetName() <<
") WARNING: No p.d.f. associated with label "
271 <<
type.second <<
" for component RooSimultaneous p.d.f " << citer->second.pdf->GetName()
272 <<
"which is associated with master index label " << citer->first << endl ;
283 for (
const auto& stype : *citer->second.subIndex) {
286 for (
const auto& nameIdx : repliSuperCat) {
287 repliSuperCat.
setLabel(nameIdx.first) ;
289 RooAbsPdf* compPdf = citer->second.simPdf->getPdf(stype.first.c_str());
291 failure |=
addPdf(*compPdf,superLabel.c_str()) ;
292 cxcoutD(InputArguments) <<
"RooSimultaneous::initialize(" <<
GetName()
293 <<
") assigning pdf " << compPdf->
GetName() <<
"(member of " << citer->second.pdf->GetName()
294 <<
") to super label " << superLabel << endl ;
296 coutW(InputArguments) <<
"RooSimultaneous::initialize(" <<
GetName() <<
") WARNING: No p.d.f. associated with label "
297 << stype.second <<
" for component RooSimultaneous p.d.f " << citer->second.pdf->GetName()
298 <<
"which is associated with master index label " << citer->first << endl ;
307 throw std::invalid_argument(std::string(
"Failed to initialise RooSimultaneous ") +
GetName());
323 _plotCoefNormSet(
"!plotCoefNormSet",this,other._plotCoefNormSet),
324 _plotCoefNormRange(other._plotCoefNormRange),
325 _partIntMgr(other._partIntMgr,this),
326 _indexCat(
"indexCat",this,other._indexCat),
327 _numPdf(other._numPdf)
356 return proxy ? ((
RooAbsPdf*)proxy->absArg()) : 0 ;
379 coutE(InputArguments) <<
"RooSimultaneous::addPdf(" <<
GetName() <<
"): PDF '" << pdf.
GetName()
386 coutE(InputArguments) <<
"RooSimultaneous::addPdf(" <<
GetName() <<
"): index state '"
387 << catLabel <<
"' has already an associated PDF." << endl ;
394 coutE(InputArguments) <<
"RooSimultaneous::addPdf(" <<
GetName()
395 <<
") ERROR: you cannot add a RooSimultaneous component to a RooSimultaneous using addPdf()."
396 <<
" Use the constructor with RooArgList if input p.d.f.s or the map<string,RooAbsPdf&> instead." << endl ;
432 anyCanExtend =
kTRUE;
436 anyMustExtend =
kTRUE;
465 if (proxy==0)
return 0 ;
479 catFrac=nEvtCat/nEvtTot ;
503 sum += ((
RooAbsPdf*)(proxy->absArg()))->expectedEvents(nset) ;
515 if (proxy==0)
return 0 ;
518 return ((
RooAbsPdf*)(proxy->absArg()))->expectedEvents(nset);
530 const RooArgSet* normSet,
const char* rangeName)
const
533 analVars.
add(allVars) ;
623 std::unique_ptr<RooArgSet> sliceSet( sliceSetTmp ? ((
RooArgSet*) sliceSetTmp->
Clone()) : nullptr );
630 const char* sliceCatState = pc.
getString(
"sliceCatState",0,
kTRUE) ;
643 unsigned int tokenIndex = 0;
644 for(
auto * scat : static_range_cast<RooCategory*>(sliceCatList)) {
645 const char* slabel = tokenIndex >= catTokens.size() ? nullptr : catTokens[tokenIndex++].c_str();
649 scat->setLabel(slabel) ;
651 sliceSet->add(*scat,
kFALSE) ;
658 coutE(InputArguments) <<
"RooSimultaneous::plotOn(" <<
GetName() <<
") ERROR: must have a projection dataset for index category" << endl ;
668 for (
const auto sliceArg : *sliceSet) {
671 projectedVars.
remove(*arg) ;
673 coutI(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") slice variable "
674 << sliceArg->GetName() <<
" was not projected anyway" << endl ;
677 }
else if (projSet) {
691 coutE(Plotting) <<
"RooSimultaneous::plotOn(" <<
GetName() <<
") ERROR: Projection over index category "
692 <<
"requested, but projection data set doesn't contain index category" << endl ;
707 if (projectedVars.
find(server->GetName())) {
709 projIdxServers.
add(*server) ;
719 for (
const auto server : projIdxServers) {
720 if (!projData->
get()->
find(server->GetName())) {
722 missing = server->GetName();
727 coutE(Plotting) <<
"RooSimultaneous::plotOn(" <<
GetName()
728 <<
") ERROR: Projection dataset doesn't contain complete set of index categories to do projection."
729 <<
"\n\tcategory " << missing <<
" is missing." << endl ;
743 std::unique_ptr<RooArgSet> idxCloneSet(
RooArgSet(*_indexCat).snapshot(
true) );
748 std::unique_ptr<RooArgSet> idxCompSliceSet( idxCatClone->getObservables(frame->
getNormVars()) );
754 <<
" represents a slice in the index category (" <<
_indexCat.
arg().
GetName() <<
")" << endl ;
762 for (
const auto arg : *idxCompSliceSet) {
765 if (sliceSet && (slicedComponent = sliceSet->find(*idxComp)) !=
nullptr) {
766 auto theCat =
static_cast<const RooAbsCategory*
>(slicedComponent);
767 idxComp->setIndex(theCat->getCurrentIndex(),
false);
775 cutString.
Append(
Form(
"%s==%d",idxComp->GetName(),idxComp->getCurrentIndex())) ;
782 std::unique_ptr<RooAbsData> projDataTmp(
const_cast<RooAbsData*
>(projData)->reduce(projDataVars,cutString) );
790 if (!cmdList.
find(
"Asymmetry")) {
791 cmdList2.
Add(&tmp1) ;
793 cmdList2.
Add(&tmp2) ;
815 idxCatClone->setLabel(proxy->name()) ;
819 for (
const auto idxSliceCompArg : *idxCompSliceSet) {
820 const auto idxSliceComp =
static_cast<RooAbsCategory*
>(idxSliceCompArg);
832 sumWeight += wTable->getFrac(proxy->name()) ;
835 pdfCompList.
add(proxy->arg()) ;
839 RooAddPdf *plotVar =
new RooAddPdf(plotVarName,
"weighted sum of RS components",pdfCompList,wgtCompList) ;
846 std::unique_ptr<RooAbsData> projDataTmp;
852 if (idxCompSliceSet->getSize()>0) {
854 for (
const auto idxSliceCompArg : *idxCompSliceSet) {
855 const auto idxSliceComp =
static_cast<RooAbsCategory*
>(idxSliceCompArg);
861 cutString.
Append(
Form(
"%s==%d",idxSliceComp->GetName(),idxSliceComp->getCurrentIndex())) ;
871 if (idxCompSliceSet->getSize()>0) {
872 projDataTmp.reset(
const_cast<RooAbsData*
>(projData)->reduce(projDataVars,cutString) );
874 projDataTmp.reset(
const_cast<RooAbsData*
>(projData)->reduce(projDataVars) );
880 projSetTmp.
add(*projSet) ;
885 delete idxCatServers ;
891 <<
" represents a slice in index category components " << *idxCompSliceSet << endl ;
895 if (idxCompProjSet->
getSize()>0) {
897 <<
" averages with data index category components " << *idxCompProjSet << endl ;
899 delete idxCompProjSet ;
912 if (!cmdList.
find(
"Asymmetry")) {
913 cmdList2.
Add(&tmp1) ;
915 cmdList2.
Add(&tmp2) ;
921 cmdList2.
Add(&tmp3) ;
922 frame2 = plotVar->
plotOn(frame,cmdList2) ;
925 frame2 = plotVar->
plotOn(frame,cmdList2) ;
993 if (vars.
find(idxCatName) && prototype==0
994 && (auxProto==0 || auxProto->
getSize()==0)
995 && (autoBinned || (binnedTag && strlen(binnedTag)))) {
1003 return genContext(vars,prototype,auxProto,verbose) ;
1016 const RooArgSet* protoVars = prototype ? prototype->
get() : 0 ;
1018 if (vars.
find(idxCatName) || (protoVars && protoVars->
find(idxCatName))) {
1047 }
else if (!allServers && anyServer) {
1049 coutE(Plotting) <<
"RooSimultaneous::genContext: ERROR: prototype must include either all "
1050 <<
" components of the RooSimultaneous index category or none " << endl ;
1059 coutE(InputArguments) <<
"RooSimultaneous::genContext(" <<
GetName()
1060 <<
") ERROR: no PDF associated with current state ("
1064 return ((
RooAbsPdf*)proxy->absArg())->genContext(vars,prototype,auxProto,verbose) ;
1075 Bool_t correctForBinVolume,
1076 Bool_t showProgress)
const
1079 correctForBinVolume, showProgress) == 0)
1105 for (
Int_t i=0 ; i<nEvents ; i++) {
1106 for (
const auto& nameIdx :
indexCat()) {
1122 data->
add(*globClone) ;
1136 if (precision < 0.)
return;
1140 for (
auto const &item : this->
indexCat()) {
1142 auto const &catName = item.
first;
1143 auto &pdf = *this->
getPdf(catName.c_str());
1149 newSamplingPdf->setAttribute(
1150 (std::string(
"ORIGNAME:") + pdf.GetName()).c_str());
1151 newSamplingPdfs.
addOwned(std::move(newSamplingPdf));
1173 std::map<std::string, double>
const& precisions,
1174 bool useCategoryNames ) {
1176 constexpr double defaultPrecision = -1.;
1180 for (
auto const &item : this->
indexCat()) {
1182 auto const &catName = item.
first;
1183 auto &pdf = *this->
getPdf(catName.c_str());
1184 std::string pdfName = pdf.GetName();
1186 auto found = precisions.find(useCategoryNames ? catName : pdfName);
1187 const double precision =
1188 found != precisions.end() ? found->second : defaultPrecision;
1196 newSamplingPdf->setAttribute(
1197 (std::string(
"ORIGNAME:") + pdf.GetName()).c_str());
1198 newSamplingPdfs.
addOwned(std::move(newSamplingPdf));
RooTemplateProxy< RooAbsReal > RooRealProxy
Compatibility typedef replacing the old RooRealProxy class.
char * Form(const char *fmt,...)
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Given a set of possible observables, return the observables that this PDF depends on.
Bool_t redirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t isRecursionStep=kFALSE)
Replace all direct servers of this object with the new servers in newServerList.
Bool_t dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, Bool_t valueOnly=kFALSE) const
Test whether we depend on (ie, are served by) any object in the specified collection.
virtual Bool_t isFundamental() const
Is this object a fundamental type that can be added to a dataset? Fundamental-type subclasses overrid...
bool addOwnedComponents(const RooAbsCollection &comps)
Take ownership of the contents of 'comps'.
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
virtual Bool_t isDerived() const
Does value or shape of this arg depend on any other arg?
const RefCountList_t & servers() const
List of all servers of this object.
TIterator * serverIterator() const
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
virtual bool setLabel(const char *label, Bool_t printError=kTRUE)=0
Change category state by specifying a state name.
RooAbsCategory is the base class for objects that represent a discrete value with a finite number of ...
virtual value_type getCurrentIndex() const
Return index number of current state.
virtual const char * getCurrentLabel() const
Return label string of current state.
std::map< std::string, value_type >::const_iterator begin() const
Iterator for category state names. Points to pairs of index and name.
std::size_t size() const
Number of states defined.
Bool_t contains(const RooAbsArg &var) const
Check if collection contains an argument with the same name as var.
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
void assign(const RooAbsCollection &other) const
Sets the value, cache and constant attribute of any argument in our set that also appears in the othe...
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add an argument and transfer the ownership to the collection.
Storage_t::size_type size() const
RooAbsArg * first() const
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsData is the common abstract base class for binned and unbinned datasets.
virtual const RooArgSet * get() const
virtual Roo1DTable * table(const RooArgSet &catSet, const char *cuts="", const char *opts="") const
Construct table for product of categories in catSet.
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
RooArgSet const * _normSet
Normalization integral (owned by _normMgr)
Bool_t canBeExtended() const
If true, PDF can provide extended likelihood term.
RooDataSet * generate(const RooArgSet &whatVars, Int_t nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none())
See RooAbsPdf::generate(const RooArgSet&,const RooCmdArg&,const RooCmdArg&,const RooCmdArg&,...
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none(), const RooCmdArg &arg9=RooCmdArg::none(), const RooCmdArg &arg10=RooCmdArg::none()) const
Helper calling plotOn(RooPlot*, RooLinkedList&) const.
Bool_t mustBeExtended() const
If true PDF must provide extended likelihood term.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooAbsReal * createIntegral(const RooArgSet &iset, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
Create an object that represents the integral of the function over one or more observables listed in ...
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
Bool_t plotSanityChecks(RooPlot *frame) const
Utility function for plotOn(), perform general sanity check on frame to ensure safe plotting operatio...
virtual void fixAddCoefNormalization(const RooArgSet &addNormSet=RooArgSet(), Bool_t force=kTRUE)
Fix the interpretation of the coefficient of any RooAddPdf component in the expression tree headed by...
void makeProjectionSet(const RooAbsArg *plotVar, const RooArgSet *allVars, RooArgSet &projectedVars, Bool_t silent) const
Utility function for plotOn() that constructs the set of observables to project when plotting ourselv...
RooDataHist * fillDataHist(RooDataHist *hist, const RooArgSet *nset, Double_t scaleFactor, Bool_t correctForBinVolume=kFALSE, Bool_t showProgress=kFALSE) const
Fill a RooDataHist with values sampled from this function at the bin centers.
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
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.
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=0, const TNamed *isetRangeName=0)
T * getObjByIndex(Int_t index) const
Retrieve payload object by slot index.
Int_t setObj(const RooArgSet *nset, T *obj, const TNamed *isetRangeName=0)
RooCategory is an object to represent discrete states.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
TObject * getObject(const char *name, TObject *obj=0)
Return TObject property registered with name 'name'.
Bool_t defineInt(const char *name, const char *argName, Int_t intNum, Int_t defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
void defineMutex(const char *argName1, const char *argName2)
Define arguments named argName1 and argName2 mutually exclusive.
Bool_t defineObject(const char *name, const char *argName, Int_t setNum, const TObject *obj=0, Bool_t isArray=kFALSE)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
const char * getString(const char *name, const char *defaultValue="", Bool_t convEmptyToNull=kFALSE)
Return string property registered with name 'name'.
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
const RooLinkedList & getObjectList(const char *name)
Return list of objects registered with name 'name'.
Bool_t defineDouble(const char *name, const char *argName, Int_t doubleNum, Double_t defValue=0.)
Define Double_t property name 'name' mapped to Double_t in slot 'doubleNum' in RooCmdArg with name ar...
Double_t getDouble(const char *name, Double_t defaultValue=0)
Return Double_t property registered with name 'name'.
void allowUndefined(Bool_t flag=kTRUE)
Bool_t defineString(const char *name, const char *argName, Int_t stringNum, const char *defValue="", Bool_t appendMode=kFALSE)
Define Double_t property name 'name' mapped to Double_t in slot 'stringNum' in RooCmdArg with name ar...
Bool_t ok(Bool_t verbose) const
Return true of parsing was successful.
Bool_t process(const RooCmdArg &arg)
Process given RooCmdArg.
The RooDataHist is a container class to hold N-dimensional binned data.
double weight(std::size_t i) const
Return weight of i-th bin.
void set(std::size_t binNumber, double weight, double wgtErr)
Set bin content of bin that was last loaded with get(std::size_t).
Double_t sumEntries() const override
Sum the weights of all bins.
Int_t numEntries() const override
Return the number of bins.
RooDataSet is a container class to hold unbinned data.
virtual const RooArgSet * get(Int_t index) const override
Return RooArgSet with coordinates of event 'index'.
virtual void add(const RooArgSet &row, Double_t weight=1.0, Double_t weightError=0) override
Add a data point, with its coordinates specified in the 'data' argset, to the data set.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
void Delete(Option_t *o=0)
Remove all elements in collection and delete all elements NB: Collection does not own elements,...
TObject * find(const char *name) const
Return pointer to object with given name in collection.
virtual void Add(TObject *arg)
static const TNamed * ptr(const char *stringPtr)
Return a unique TNamed pointer for given C++ string.
A RooPlot is a plot frame and a container for graphics objects within that frame.
const RooArgSet * getNormVars() const
RooAbsRealLValue * getPlotVar() const
void remove(const char *name=0, Bool_t deleteToo=kTRUE)
Remove object with given name, or last object added if no name is given.
RooRealVar represents a variable that can be changed from the outside.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Overloaded RooArgSet::add() method inserts 'var' into set and registers 'var' as server to owner with...
virtual void removeAll() override
Remove all argument inset using remove(const RooAbsArg&).
RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
virtual RooAbsGenContext * genContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE) const
Return specialized generator context for simultaneous p.d.f.s.
virtual Double_t evaluate() const
Return the current value: the value of the PDF associated with the current index category state.
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return the number of expected events: If the index is in nset, then return the sum of the expected ev...
virtual ~RooSimultaneous()
Destructor.
RooObjCacheManager _partIntMgr
virtual RooDataSet * generateSimGlobal(const RooArgSet &whatVars, Int_t nEvents)
Special generator interface for generation of 'global observables' – for RooStats tools.
Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Return analytical integration defined by given code.
virtual RooDataHist * fillDataHist(RooDataHist *hist, const RooArgSet *nset, Double_t scaleFactor, Bool_t correctForBinVolume=kFALSE, Bool_t showProgress=kFALSE) const
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg(), const RooCmdArg &arg9=RooCmdArg(), const RooCmdArg &arg10=RooCmdArg()) const
RooCategoryProxy _indexCat
virtual ExtendMode extendMode() const
Examine the pdf components and check if one of them can be extended or must be extended It is enough ...
virtual void selectNormalization(const RooArgSet *depSet=0, Bool_t force=kFALSE)
Interface function used by test statistics to freeze choice of observables for interpretation of frac...
Bool_t addPdf(const RooAbsPdf &pdf, const char *catLabel)
Associate given PDF with index category state label 'catLabel'.
friend class RooSimGenContext
Component normalization manager.
void initialize(RooAbsCategoryLValue &inIndexCat, std::map< std::string, RooAbsPdf * > pdfMap)
virtual RooAbsGenContext * autoGenContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE, Bool_t autoBinned=kTRUE, const char *binnedTag="") const
void wrapPdfsInBinSamplingPdfs(RooAbsData const &data, double precision)
Wraps the components of this RooSimultaneous in RooBinSamplingPdfs.
const TNamed * _plotCoefNormRange
Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &numVars, const RooArgSet *normSet, const char *rangeName=0) const
Forward determination of analytical integration capabilities to component p.d.f.s A unique code is as...
RooSetProxy _plotCoefNormSet
const RooAbsCategoryLValue & indexCat() const
virtual void selectNormalizationRange(const char *rangeName=0, Bool_t force=kFALSE)
Interface function used by test statistics to freeze choice of range for interpretation of fraction c...
friend class RooSimSplitGenContext
RooAbsPdf * getPdf(const char *catName) const
Return the p.d.f associated with the given index category name.
The RooSuperCategory can join several RooAbsCategoryLValue objects into a single category.
virtual Bool_t setLabel(const char *label, Bool_t printError=kTRUE) override
Set the value of the super category by specifying the state name.
const char * label() const
Get the label of the current category state. This function only makes sense for category proxies.
bool setArg(T &newRef)
Change object held in proxy into newRef.
const T & arg() const
Return reference to object held in proxy.
Iterator abstract base class.
virtual TObject * Next()=0
virtual void Add(TObject *obj)
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const
Return a list iterator.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual Int_t IndexOf(const TObject *obj) const
Return index of object in collection.
TString & Append(const char *cs)
RooCmdArg ProjWData(const RooAbsData &projData, Bool_t binData=kFALSE)
RooCmdArg DrawOption(const char *opt)
RooCmdArg Project(const RooArgSet &projSet)
RooCmdArg Normalization(Double_t scaleFactor)
std::vector< std::string > Split(std::string_view str, std::string_view delims, bool skipEmpty=false)
Splits a string at each character in delims.
RooArgSet * subIndexComps
const RooAbsCategoryLValue * subIndex
static uint64_t sum(uint64_t i)