64 _func(0), _data(0), _projDeps(0), _splitRange(0), _simCount(0),
65 _verbose(
kFALSE), _init(
kFALSE), _gofOpMode(Slave), _nEvents(0), _setNum(0),
66 _numSets(0), _extSet(0), _nGof(0), _gofArray(0), _nCPU(1), _mpfeArray(0),
68 _offsetCarry(0), _evalCarry(0)
100 const RooArgSet& projDeps,
const char* rangeName,
const char* addCoefRangeName,
103 _paramSet(
"paramSet",
"Set of parameters",this),
107 _rangeName(rangeName?rangeName:
""),
108 _addCoefRangeName(addCoefRangeName?addCoefRangeName:
""),
109 _splitRange(splitCutRange),
116 _mpinterl(interleave),
161 _paramSet(
"paramSet",
"Set of parameters",this),
164 _projDeps((
RooArgSet*)other._projDeps->Clone()),
165 _rangeName(other._rangeName),
166 _addCoefRangeName(other._addCoefRangeName),
167 _splitRange(other._splitRange),
169 _verbose(other._verbose),
172 _gofSplitMode(other._gofSplitMode),
175 _mpinterl(other._mpinterl),
176 _doOffset(other._doOffset),
177 _offset(other._offset),
178 _offsetCarry(other._offsetCarry),
179 _evalCarry(other._evalCarry)
264 carry = (t -
sum) -
y;
293 carry = (t -
sum) -
y;
326 throw(std::string(
"this should never happen")) ;
399 os <<
indent <<
"RooAbsTestStatistic begin GOF contents" << endl ;
403 indent2 +=
Form(
"[%d] ",i);
407 os <<
indent <<
"RooAbsTestStatistic end GOF contents" << endl;
468 RooAbsTestStatistic* gof =
create(
GetName(),
GetTitle(),*real,*data,*projDeps,rangeName,addCoefRangeName,1,
_mpinterl,
_verbose,
_splitRange);
476 ccoutD(
Eval) <<
"RooAbsTestStatistic::initMPMode: starting remote server process #" << i << endl;
485 coutI(
Eval) <<
"RooAbsTestStatistic::initMPMode: started " <<
_nCPU <<
" remote server process." << endl;
499 const RooArgSet* projDeps,
const char* rangeName,
const char* addCoefRangeName)
507 coutE(
Fitting) <<
"RooAbsTestStatistic::initSimMode(" <<
GetName() <<
") ERROR: index category of simultaneous pdf is missing in dataset, aborting" << endl;
508 throw std::string(
"RooAbsTestStatistic::initSimMode() ERROR, index category of simultaneous pdf is missing in dataset, aborting");
539 ccoutI(
Fitting) <<
"RooAbsTestStatistic::initSimMode: creating slave calculator #" <<
n <<
" for state " <<
type->GetName()
540 <<
" (" << dset->
numEntries() <<
" dataset entries)" << endl;
555 while ((component = iter.
next())) {
599 delete selTargetParams;
608 <<
" has no data entries, no slave calculator created" << endl;
613 coutI(
Fitting) <<
"RooAbsTestStatistic::initSimMode: created " <<
n <<
" slave calculators." << endl;
669 coutF(
DataHandling) <<
"RooAbsTestStatistic::setData(" <<
GetName() <<
") FATAL: setData() is not supported in multi-processor mode" << endl;
670 throw string(
"RooAbsTestStatistic::setData is not supported in MPMaster mode");
static void indent(ostringstream &buf, int indent_level)
char * Form(const char *fmt,...)
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
RooArgSet * getParameters(const RooAbsData *data, Bool_t stripDisconnected=kTRUE) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
void setValueDirty() const
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
void SetName(const char *name)
Set the name of the TNamed.
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
TIterator * typeIterator() const
Return iterator over all defined states.
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
RooAbsData is the common abstract base class for binned and unbinned datasets.
virtual TList * split(const RooAbsCategory &splitCat, Bool_t createEmptyDataSets=kFALSE) const
Split dataset into subsets based on states of given splitCat in this dataset.
virtual Double_t sumEntries() const =0
RooAbsData * getSimData(const char *idxstate)
virtual Int_t numEntries() const
Bool_t canSplitFast() const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
virtual Double_t getValV(const RooArgSet *normalisationSet=nullptr) const
Return value of object.
RooAbsTestStatistic is the abstract base class for all test statistics.
virtual Bool_t processEmptyDataSets() const
Int_t _nGof
Number of designated set to calculated extended term.
std::string _addCoefRangeName
GOFOpMode operMode() const
void initSimMode(RooSimultaneous *pdf, RooAbsData *data, const RooArgSet *projDeps, const char *rangeName, const char *addCoefRangeName)
Initialize simultaneous p.d.f processing mode.
Int_t _nCPU
GOF MP Split mode specified by component (when Auto is active)
virtual RooAbsTestStatistic * create(const char *name, const char *title, RooAbsReal &real, RooAbsData &data, const RooArgSet &projDeps, const char *rangeName=0, const char *addCoefRangeName=0, Int_t nCPU=1, RooFit::MPSplit interleave=RooFit::BulkPartition, Bool_t verbose=kTRUE, Bool_t splitCutRange=kFALSE, Bool_t binnedL=kFALSE)=0
RooFit::MPSplit _mpinterl
Array of parallel execution frond ends.
virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Forward constant term optimization management calls to component test statistics.
pRooAbsTestStatistic * _gofArray
virtual Double_t globalNormalization() const
Bool_t setData(RooAbsData &data, Bool_t cloneData=kTRUE)
Change dataset that is used to given one.
void enableOffsetting(Bool_t flag)
GOFOpMode _gofOpMode
Is object initialized
RooAbsTestStatistic()
Default constructor.
virtual Double_t evaluatePartition(Int_t firstEvent, Int_t lastEvent, Int_t stepSize) const =0
void setSimCount(Int_t simCount)
virtual Bool_t redirectServersHook(const RooAbsCollection &newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive)
Forward server redirect calls to component test statistics.
virtual Double_t getCarry() const
virtual Bool_t setDataSlave(RooAbsData &, Bool_t=kTRUE, Bool_t=kFALSE)
virtual ~RooAbsTestStatistic()
Destructor.
const RooArgSet * _projDeps
virtual Double_t combinedValue(RooAbsReal **gofArray, Int_t nVal) const =0
virtual Double_t evaluate() const
Calculates and return value of test statistic.
Bool_t isOffsetting() const
Double_t _evalCarry
avoids loss of precision
void initMPMode(RooAbsReal *real, RooAbsData *data, const RooArgSet *projDeps, const char *rangeName, const char *addCoefRangeName)
Initialize multi-processor calculation mode.
pRooRealMPFE * _mpfeArray
std::vector< RooFit::MPSplit > _gofSplitMode
Array of sub-contexts representing part of the combined test statistic.
Double_t _offsetCarry
Offset.
virtual void printCompactTreeHook(std::ostream &os, const char *indent="")
Add extra information on component test statistics when printing itself as part of a tree structure.
void setMPSet(Int_t setNum, Int_t numSets)
Set MultiProcessor set number identification of this instance.
Bool_t initialize()
One-time initialization of the test statistic.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state.
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
RooAbsArg * next()
Return next element or nullptr if at end.
RooProdPdf is an efficient implementation of a product of PDFs of the form.
RooRealMPFE is the multi-processor front-end for parallel calculation of RooAbsReal objects.
virtual Double_t getCarry() const
void initialize()
Initialize the remote process and message passing pipes between current process and remote process.
void enableOffsetting(Bool_t flag)
Control verbose messaging related to inter process communication on both client and server side.
virtual Double_t getValV(const RooArgSet *nset=0) const
If value needs recalculation and calculation has not beed started with a call to calculate() start it...
virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTracking=kTRUE)
Intercept call to optimize constant term in test statistics and forward it to object on server side.
void followAsSlave(RooRealMPFE &master)
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Overloaded RooArgSet::add() method inserts 'var' into set and registers 'var' as server to owner with...
RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
const RooAbsCategoryLValue & indexCat() const
RooAbsPdf * getPdf(const char *catName) const
Return the p.d.f associated with the given index category name.
Iterator abstract base class.
virtual TObject * Next()=0
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Template specialisation used in RooAbsArg:
static long int sum(long int i)