67 _func(0), _data(0), _projDeps(0), _splitRange(0), _simCount(0),
68 _verbose(
kFALSE), _init(
kFALSE), _gofOpMode(Slave), _nEvents(0), _setNum(0),
69 _numSets(0), _extSet(0), _nGof(0), _gofArray(0), _nCPU(1), _mpfeArray(0),
71 _offsetCarry(0), _evalCarry(0)
92 const RooArgSet& projDeps,
const char* rangeName,
const char* addCoefRangeName,
95 _paramSet(
"paramSet",
"Set of parameters",this),
153 _paramSet(
"paramSet",
"Set of parameters",this),
256 carry = (t -
sum) - y;
285 carry = (t -
sum) - y;
318 throw(std::string(
"this should never happen")) ;
391 os << indent <<
"RooAbsTestStatistic begin GOF contents" << endl ;
394 TString indent2(indent);
395 indent2 +=
Form(
"[%d] ",i);
399 os << indent <<
"RooAbsTestStatistic end GOF contents" << endl;
460 RooAbsTestStatistic* gof =
create(
GetName(),
GetTitle(),*real,*data,*projDeps,rangeName,addCoefRangeName,1,
_mpinterl,
_verbose,
_splitRange);
468 ccoutD(
Eval) <<
"RooAbsTestStatistic::initMPMode: starting remote server process #" << i << endl;
477 coutI(
Eval) <<
"RooAbsTestStatistic::initMPMode: started " << _nCPU <<
" remote server process." << endl;
491 const RooArgSet* projDeps,
const char* rangeName,
const char* addCoefRangeName)
496 TString simCatName(simCat.
GetName());
499 coutE(
Fitting) <<
"RooAbsTestStatistic::initSimMode(" <<
GetName() <<
") ERROR: index category of simultaneous pdf is missing in dataset, aborting" << endl;
500 throw std::string(
"RooAbsTestStatistic::initSimMode() ERROR, index category of simultaneous pdf is missing in dataset, aborting");
531 ccoutI(
Fitting) <<
"RooAbsTestStatistic::initSimMode: creating slave calculator #" << n <<
" for state " << type->
GetName()
532 <<
" (" << dset->
numEntries() <<
" dataset entries)" << endl;
547 while ((component = iter.
next())) {
590 delete selTargetParams;
599 <<
" has no data entries, no slave calculator created" << endl;
604 coutI(
Fitting) <<
"RooAbsTestStatistic::initSimMode: created " << n <<
" slave calculators." << endl;
607 TIterator* iter = dsetList->MakeIterator();
609 while((ds = iter->
Next())) {
667 coutF(
DataHandling) <<
"RooAbsTestStatistic::setData(" <<
GetName() <<
") FATAL: setData() is not supported in multi-processor mode" << endl;
668 throw string(
"RooAbsTestStatistic::setData is not supported in MPMaster mode");
virtual Double_t sumEntries() const =0
virtual const char * GetName() const
Returns name of object.
static long int sum(long int i)
Double_t _offsetCarry
Offset.
RooFit::MPSplit _mpinterl
Array of parallel execution frond ends.
void followAsSlave(RooRealMPFE &master)
void setSimCount(Int_t simCount)
GOFOpMode _gofOpMode
Is object initialized.
RooAbsData * getSimData(const char *idxstate)
virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Forward constant term optimization management calls to component test statistics. ...
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
virtual Bool_t processEmptyDataSets() const
GOFOpMode operMode() const
RooProdPdf is an efficient implementation of a product of PDFs of the form.
pRooRealMPFE * _mpfeArray
void initMPMode(RooAbsReal *real, RooAbsData *data, const RooArgSet *projDeps, const char *rangeName, const char *addCoefRangeName)
Initialize multi-processor calculation mode.
void initialize()
Initialize the remote process and message passing pipes between current process and remote process...
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
std::vector< RooFit::MPSplit > _gofSplitMode
Array of sub-contexts representing part of the combined test statistic.
void initSimMode(RooSimultaneous *pdf, RooAbsData *data, const RooArgSet *projDeps, const char *rangeName, const char *addCoefRangeName)
Initialize simultaneous p.d.f processing mode.
void setMPSet(Int_t setNum, Int_t numSets)
Set MultiProcessor set number identification of this instance.
Iterator abstract base class.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
void setValueDirty() const
Bool_t isOffsetting() const
RooRealMPFE is the multi-processor front-end for parallel calculation of RooAbsReal objects...
virtual Double_t getValV(const RooArgSet *set=0) const
Return value of object.
pRooAbsTestStatistic * _gofArray
Double_t _evalCarry
avoids loss of precision
virtual ~RooAbsTestStatistic()
Destructor.
virtual Double_t combinedValue(RooAbsReal **gofArray, Int_t nVal) const =0
const RooArgSet * _projDeps
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state...
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...
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
Bool_t initialize()
One-time initialization of the test statistic.
virtual Double_t getCarry() const
virtual Bool_t redirectServersHook(const RooAbsCollection &newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive)
Forward server redirect calls to component test statistics.
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
virtual Double_t getCarry() const
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
TIterator * typeIterator() const
Return iterator over all defined states.
virtual const Text_t * GetName() const
Returns name of object.
const RooAbsCategoryLValue & indexCat() const
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual Double_t evaluatePartition(Int_t firstEvent, Int_t lastEvent, Int_t stepSize) const =0
void SetName(const char *name)
Set the name of the TNamed.
char * Form(const char *fmt,...)
RooAbsData is the common abstract base class for binned and unbinned datasets.
static void indent(ostringstream &buf, int indent_level)
void enableOffsetting(Bool_t flag)
Control verbose messaging related to inter process communication on both client and server side...
std::string _addCoefRangeName
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
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...
Int_t _nGof
Number of designated set to calculated extended term.
RooAbsTestStatistic is the abstract base class for all test statistics.
virtual Double_t globalNormalization() const
Mother of all ROOT objects.
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects...
Bool_t canSplitFast() const
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
RooAbsPdf * getPdf(const char *catName) const
Return the p.d.f associated with the given index category name.
Bool_t setData(RooAbsData &data, Bool_t cloneData=kTRUE)
Change dataset that is used to given one.
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
virtual TObject * Next()=0
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 Bool_t setDataSlave(RooAbsData &, Bool_t=kTRUE, Bool_t=kFALSE)
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...
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
virtual Double_t evaluate() const
Calculates and return value of test statistic.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset...
double norm(double *x, double *p)
void enableOffsetting(Bool_t flag)
RooAbsTestStatistic()
Default constructor.
virtual Int_t numEntries() const
virtual const char * GetTitle() const
Returns title of object.
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...
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...
Int_t _nCPU
GOF MP Split mode specified by component (when Auto is active)