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),
99 _rangeName(rangeName?rangeName:
""),
100 _addCoefRangeName(addCoefRangeName?addCoefRangeName:
""),
101 _splitRange(splitCutRange),
108 _mpinterl(interleave),
153 _paramSet(
"paramSet",
"Set of parameters",this),
156 _projDeps((
RooArgSet*)other._projDeps->Clone()),
157 _rangeName(other._rangeName),
158 _addCoefRangeName(other._addCoefRangeName),
159 _splitRange(other._splitRange),
161 _verbose(other._verbose),
164 _gofSplitMode(other._gofSplitMode),
167 _mpinterl(other._mpinterl),
168 _doOffset(other._doOffset),
169 _offset(other._offset),
170 _offsetCarry(other._offsetCarry),
171 _evalCarry(other._evalCarry)
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 ;
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)
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;
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 * GetTitle() const
Returns title of object.
virtual Double_t evaluate() const
Calculates and return value of test statistic.
Double_t _offsetCarry
Offset.
RooFit::MPSplit _mpinterl
Array of parallel execution frond ends.
ClassImp(TAlienJobStatusList) void TAlienJobStatusList TString split(jobstatus->GetKey("split"))
Print information about jobs.
void followAsSlave(RooRealMPFE &master)
void setSimCount(Int_t simCount)
GOFOpMode _gofOpMode
Is object initialized.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
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...
RooProdPdf is an efficient implementation of a product of PDFs of the form.
pRooRealMPFE * _mpfeArray
const RooAbsCategoryLValue & indexCat() const
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 Double_t getCarry() const
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
RooAbsPdf * getPdf(const char *catName) const
Return the p.d.f associated with the given index category name.
std::vector< RooFit::MPSplit > _gofSplitMode
Array of sub-contexts representing part of the combined test statistic.
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
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.
RooRealMPFE is the multi-processor front-end for parallel calculation of RooAbsReal objects...
virtual Double_t getCarry() const
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
std::map< std::string, std::string >::const_iterator iter
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state...
virtual Double_t getValV(const RooArgSet *set=0) const
Return value of object.
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...
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 initialize()
One-time initialization of the test statistic.
virtual Bool_t redirectServersHook(const RooAbsCollection &newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive)
Forward server redirect calls to component test statistics.
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
virtual Double_t evaluatePartition(Int_t firstEvent, Int_t lastEvent, Int_t stepSize) const =0
virtual Int_t numEntries() const
void SetName(const char *name)
Change (i.e.
char * Form(const char *fmt,...)
virtual const char * GetName() const
Returns name of object.
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...
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 Bool_t processEmptyDataSets() const
std::string _addCoefRangeName
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
virtual Double_t globalNormalization() const
Int_t _nGof
Number of designated set to calculated extended term.
RooAbsTestStatistic is the abstract base class for all test statistics.
void setValueDirty() const
virtual TList * split(const RooAbsCategory &splitCat, Bool_t createEmptyDataSets=kFALSE) const
Split dataset into subsets based on states of given splitCat in this dataset.
GOFOpMode operMode() const
Bool_t isOffsetting() const
Mother of all ROOT objects.
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects...
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
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
Bool_t canSplitFast() const
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 void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset...
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
double norm(double *x, double *p)
void enableOffsetting(Bool_t flag)
virtual const Text_t * GetName() const
Returns name of object.
RooAbsTestStatistic()
Default constructor.
TIterator * typeIterator() const
Return iterator over all defined states.
ClassImp(RooAbsTestStatistic)
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...
Int_t _nCPU
GOF MP Split mode specified by component (when Auto is active)