Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion roofit/roofitcore/inc/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
#pragma link C++ class RooAddGenContext+ ;
#pragma link C++ class RooAddition+ ;
#pragma link C++ class RooAddModel+ ;
#pragma link C++ class RooAICRegistry+ ;
#pragma link C++ class RooArgList+ ;
#pragma link C++ class RooArgProxy+ ;
#pragma link C++ class RooArgSet+ ;
Expand Down
63 changes: 33 additions & 30 deletions roofit/roofitcore/inc/RooAICRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,44 +16,47 @@
#ifndef ROO_AIC_REGISTRY
#define ROO_AIC_REGISTRY

#include <array>
#include <memory>
#include <vector>
#include "Rtypes.h"

class RooArgSet;

typedef RooArgSet* pRooArgSet ;

/// Registry for analytical integration codes.
class RooAICRegistry {

public:
RooAICRegistry(UInt_t size = 10) ;
RooAICRegistry(const RooAICRegistry &other);
RooAICRegistry &operator=(const RooAICRegistry &other);
RooAICRegistry(RooAICRegistry &&other) = default;
RooAICRegistry &operator=(RooAICRegistry &&other) = default;
virtual ~RooAICRegistry() ;

Int_t store(const std::vector<Int_t>& codeList, RooArgSet* set1 = nullptr, RooArgSet* set2 = nullptr,
RooArgSet* set3 = nullptr, RooArgSet* set4 = nullptr) ;
const std::vector<Int_t>& retrieve(Int_t masterCode) const ;
const std::vector<Int_t>& retrieve(Int_t masterCode, pRooArgSet& set1) const ;
const std::vector<Int_t>& retrieve(Int_t masterCode, pRooArgSet& set1, pRooArgSet& set2) const ;
const std::vector<Int_t>& retrieve(Int_t masterCode, pRooArgSet& set1,
pRooArgSet& set2, pRooArgSet& set3, pRooArgSet& set4) const ;
size_t size() const;

private:
void copyImpl(const RooAICRegistry &other);
RooAICRegistry(std::size_t size = 10);
RooAICRegistry(const RooAICRegistry &other);
RooAICRegistry &operator=(const RooAICRegistry &other);
RooAICRegistry(RooAICRegistry &&other) = default;
RooAICRegistry &operator=(RooAICRegistry &&other) = default;

int store(const std::vector<int> &codeList, RooArgSet *set1 = nullptr, RooArgSet *set2 = nullptr,
RooArgSet *set3 = nullptr, RooArgSet *set4 = nullptr);

struct Output {
std::vector<int> const &codes;
std::array<RooArgSet*, 4> sets;
};

/// Retrieve the array of integer codes associated with the given master code,
/// together with the (up to four) RooArgSets associated with this master code.
Output retrieve(int masterCode)
{
Output out{.codes = _clArr[masterCode], .sets = {}};
for (std::size_t iArr = 0; iArr < 4; ++iArr) {
out.sets[iArr] = _asArr[iArr][masterCode].get();
}
return out;
}

/// Number of stored code lists.
std::size_t size() const { return _clArr.size(); }

protected:

std::vector<std::vector<Int_t> > _clArr; ///<! Array of array of code lists
std::vector<pRooArgSet> _asArr1; ///<! Array of 1st RooArgSet pointers
std::vector<pRooArgSet> _asArr2; ///<! Array of 2nd RooArgSet pointers
std::vector<pRooArgSet> _asArr3; ///<! Array of 3rd RooArgSet pointers
std::vector<pRooArgSet> _asArr4; ///<! Array of 4th RooArgSet pointers

ClassDef(RooAICRegistry,2) // Registry for analytical integration codes
} ;
std::vector<std::vector<int>> _clArr; ///<! Array of array of code lists
std::array<std::vector<std::unique_ptr<RooArgSet>>, 4> _asArr; ///<! Array of RooArgSet pointers
};

#endif
3 changes: 0 additions & 3 deletions roofit/roofitcore/inc/RooAddModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "RooResolutionModel.h"
#include "RooListProxy.h"
#include "RooSetProxy.h"
#include "RooAICRegistry.h"
#include "RooObjCacheManager.h"

class AddCacheElem;
Expand Down Expand Up @@ -113,8 +112,6 @@ class RooAddModel : public RooResolutionModel {

mutable RooObjCacheManager _intCacheMgr ; ///<! Manager of cache with integrals

mutable RooAICRegistry _codeReg = 10; ///<! Registry of component analytical integration codes

RooListProxy _pdfList ; ///< List of component PDFs
RooListProxy _coefList ; ///< List of coefficients
mutable RooArgList* _snormList{nullptr}; ///<! List of supplemental normalization factors
Expand Down
2 changes: 0 additions & 2 deletions roofit/roofitcore/inc/RooHistFunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "RooAbsReal.h"
#include "RooRealProxy.h"
#include "RooSetProxy.h"
#include "RooAICRegistry.h"
#include "RooTrace.h"
#include "RooDataHist.h"

Expand Down Expand Up @@ -116,7 +115,6 @@ class RooHistFunc : public RooAbsReal {
RooSetProxy _depList; ///< List of observables mapped onto histogram observables
RooDataHist* _dataHist = nullptr; ///< Unowned pointer to underlying histogram
std::unique_ptr<RooDataHist> _ownedDataHist; ///<! Owned pointer to underlying histogram
mutable RooAICRegistry _codeReg; ///<! Auxiliary class keeping tracking of analytical integration code
Int_t _intOrder = 0; ///< Interpolation order
bool _cdfBoundaries = false; ///< Use boundary conditions for CDFs.
mutable double _totVolume = 0.0; ///<! Total volume of space (product of ranges of observables)
Expand Down
2 changes: 0 additions & 2 deletions roofit/roofitcore/inc/RooHistPdf.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "RooAbsPdf.h"
#include "RooRealProxy.h"
#include "RooSetProxy.h"
#include "RooAICRegistry.h"
#include "RooDataHist.h"

#include <list>
Expand Down Expand Up @@ -111,7 +110,6 @@ class RooHistPdf : public RooAbsPdf {
RooSetProxy _pdfObsList; ///< List of observables mapped onto histogram observables
RooDataHist* _dataHist = nullptr; ///< Unowned pointer to underlying histogram
std::unique_ptr<RooDataHist> _ownedDataHist; ///<! Owned pointer to underlying histogram
mutable RooAICRegistry _codeReg ; ///<! Auxiliary class keeping tracking of analytical integration code
Int_t _intOrder = 0; ///< Interpolation order
bool _cdfBoundaries = false; ///< Use boundary conditions for CDFs.
mutable double _totVolume = 0.0; ///<! Total volume of space (product of ranges of observables)
Expand Down
3 changes: 1 addition & 2 deletions roofit/roofitcore/inc/RooProdPdf.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "RooAbsPdf.h"
#include "RooListProxy.h"
#include "RooLinkedList.h"
#include "RooAICRegistry.h"
#include "RooObjCacheManager.h"
#include "RooCmdArg.h"

Expand Down Expand Up @@ -185,7 +184,7 @@ class RooProdPdf : public RooAbsPdf {
const RooArgSet *auxProto=nullptr, bool verbose= false) const override ;


mutable RooAICRegistry _genCode ; ///<! Registry of composite direct generator codes
mutable std::vector<std::vector<int>> _genCode; ///<! Registry of composite direct generator codes

double _cutOff = 0.0; ///< Cutoff parameter for running product
RooListProxy _pdfList ; ///< List of PDF components
Expand Down
1 change: 0 additions & 1 deletion roofit/roofitcore/inc/RooRealSumFunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include "RooAbsPdf.h"
#include "RooListProxy.h"
#include "RooAICRegistry.h"
#include "RooObjCacheManager.h"

#include <list>
Expand Down
1 change: 0 additions & 1 deletion roofit/roofitcore/inc/RooRealSumPdf.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include "RooAbsPdf.h"
#include "RooListProxy.h"
#include "RooAICRegistry.h"
#include "RooObjCacheManager.h"

class RooRealSumPdf : public RooAbsPdf {
Expand Down
1 change: 0 additions & 1 deletion roofit/roofitcore/inc/RooSimultaneous.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#ifndef ROO_SIMULTANEOUS
#define ROO_SIMULTANEOUS

#include <RooAICRegistry.h>
#include <RooAbsCacheElement.h>
#include <RooAbsPdf.h>
#include <RooArgList.h>
Expand Down
Loading
Loading