72 _cov(reduceToConditional ? fr.conditionalCovarianceMatrix(xvec) : fr.reducedCovarianceMatrix(xvec)),
79 list<string> munames ;
91 for (list<string>::iterator iter=munames.begin() ; iter!=munames.end() ; ++iter) {
153 RooAbsPdf(other,
name), _aicMap(other._aicMap), _x(
"x",this,other._x), _mu(
"mu",this,other._mu),
154 _cov(other._cov), _covI(other._covI), _det(other._det), _z(other._z)
186 return exp(-0.5*alpha) ;
207 analVars.
add(allVars) ;
217 <<
" observables, analytical integration is only implemented for the first 127 observables" << endl ;
234 <<
") Advertising analytical integral over " << xi->
GetName() <<
" as range is >" <<
_z <<
" sigma" << endl ;
240 <<
_z <<
" sigma, relying on numeric integral" << endl ;
250 <<
") Advertising analytical integral over " <<
pi->GetName() <<
" as range is >" <<
_z <<
" sigma" << endl ;
256 <<
_z <<
" sigma, relying on numeric integral" << endl ;
318 map<int,AnaIntData>::iterator iter =
_anaIntCache.find(code) ;
320 return iter->second ;
326 vector<int> map1,map2 ;
352 TMatrixD S22bar = S11 - S12*S22inv*S21 ;
359 cacheData.
pmap = map1 ;
360 cacheData.
nint = map2.size() ;
373 generateVars.
add(directVars) ;
381 <<
" observables, partial internal generation is only implemented for the first 127 observables" << endl ;
393 generateVars.
add(*arg) ;
435 vector<int>& omap = gd.
omap ;
441 for(
Int_t k= 0; k <nobs; k++) {
472 for (
int i=0 ; i<nobs ; i++) {
500 map<int,GenData>::iterator iter =
_genCache.find(code) ;
502 return iter->second ;
521 cacheData.
omap[i] = i ;
530 vector<int> map1, map2 ;
546 TMatrixD S22bar = S11 - S12 * (S22Inv * S21) ;
555 TVectorD mu1(map1.size()),mu2(map2.size()) ;
557 for (
UInt_t i=0 ; i<map1.size() ; i++) {
558 mu1(i) =
_muVec(map1[i]) ;
560 for (
UInt_t i=0 ; i<map2.size() ; i++) {
561 mu2(i) =
_muVec(map2[i]) ;
570 cacheData.
omap = map1 ;
571 cacheData.
pmap = map2 ;
574 cacheData.
mu1 = mu1 ;
575 cacheData.
mu2 = mu2 ;
577 cacheData.
S12S22I = S12S22Inv ;
595 cout <<
"RooMultiVarGaussian::decodeCode(" <<
GetName() <<
") ERROR don't have bit pattern for code " << code << endl ;
596 throw string(
"RooMultiVarGaussian::decodeCode() ERROR don't have bit pattern for code") ;
619 S11.
ResizeTo(map1.size(),map1.size()) ;
620 S12.
ResizeTo(map1.size(),map2.size()) ;
621 S21.
ResizeTo(map2.size(),map1.size()) ;
622 S22.
ResizeTo(map2.size(),map2.size()) ;
624 for (
UInt_t i=0 ; i<map1.size() ; i++) {
625 for (
UInt_t j=0 ; j<map1.size() ; j++)
626 S11(i,j) =
input(map1[i],map1[j]) ;
627 for (
UInt_t j=0 ; j<map2.size() ; j++)
628 S12(i,j) =
input(map1[i],map2[j]) ;
630 for (
UInt_t i=0 ; i<map2.size() ; i++) {
631 for (
UInt_t j=0 ; j<map1.size() ; j++)
632 S21(i,j) =
input(map2[i],map1[j]) ;
633 for (
UInt_t j=0 ; j<map2.size() ; j++)
634 S22(i,j) =
input(map2[i],map2[j]) ;
642 if (ibit<32) {
b0 |= (1<<ibit) ; return ; }
643 if (ibit<64) {
b1 |= (1<<(ibit-32)) ; return ; }
644 if (ibit<96) {
b2 |= (1<<(ibit-64)) ; return ; }
645 if (ibit<128) {
b3 |= (1<<(ibit-96)) ; return ; }
650 if (ibit<32)
return (b0 & (1<<ibit)) ;
651 if (ibit<64)
return (b1 & (1<<(ibit-32))) ;
652 if (ibit<96)
return (b2 & (1<<(ibit-64))) ;
653 if (ibit<128)
return (b3 & (1<<(ibit-96))) ;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t b
Option_t Option_t TPoint TPoint const char x2
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
TObject * Clone(const char *newname=0) const override
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.
Int_t getSize() const
Return the number of elements in the collection.
Bool_t contains(const RooAbsArg &var) const
Check if collection contains an argument with the same name as var.
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.
virtual Double_t getMax(const char *name=0) const
Get maximum of currently defined range.
void setConstant(Bool_t value=kTRUE)
virtual Double_t getMin(const char *name=0) const
Get minimum of currently defined range.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
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.
bool addOwned(RooAbsArg &var, bool silent=false) override
Overloaded RooCollection_t::addOwned() method insert object into owning set and registers object as s...
bool add(const RooAbsArg &var, bool valueServer, bool shapeServer, bool silent)
Overloaded RooCollection_t::add() method insert object into set and registers object as server to own...
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
const RooArgList & floatParsFinal() const
Return list of floating parameters after fit.
Bool_t getBit(Int_t ibit)
Bool_t operator==(const BitBlock &other)
Multivariate Gaussian p.d.f.
void decodeCode(Int_t code, std::vector< int > &map1, std::vector< int > &map2) const
Decode analytical integration/generation code into index map of integrated/generated (map2) and non-i...
std::vector< BitBlock > _aicMap
!
static void blockDecompose(const TMatrixD &input, const std::vector< int > &map1, const std::vector< int > &map2, TMatrixDSym &S11, TMatrixD &S12, TMatrixD &S21, TMatrixDSym &S22)
Block decomposition of covI according to given maps of observables.
AnaIntData & anaIntData(Int_t code) const
Check if cache entry was previously created.
std::map< int, GenData > _genCache
!
Double_t evaluate() const override
Do not persist.
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
void initGenerator(Int_t code) override
Clear the GenData cache as its content is not invariant under changes in the mu vector.
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const override
Handle full integral here.
GenData & genData(Int_t code) const
WVE – CHECK THAT GENDATA IS VALID GIVEN CURRENT VALUES OF _MU.
Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const override
Special case: generate all observables.
std::map< int, AnaIntData > _anaIntCache
!
void generateEvent(Int_t code) override
Retrieve generator config from cache.
static Double_t gaussian(TRandom *generator=randomGenerator())
Return a Gaussian random variable with mean 0 and variance 1.
RooRealVar represents a variable that can be changed from the outside.
void setVal(Double_t value) override
Set value of variable to 'value'.
Cholesky Decomposition class.
Bool_t Decompose() override
Matrix A is decomposed in component U so that A = U^T * U If the decomposition succeeds,...
const TMatrixD & GetU() const
TMatrixTBase< Element > & ResizeTo(Int_t nrows, Int_t ncols, Int_t=-1) override
Set size of the matrix to nrows x ncols New dynamic elements are created, the overlapping part of the...
TMatrixTSym< Element > & Invert(Double_t *det=0)
Invert the matrix and calculate its determinant Notice that the LU decomposition is used instead of B...
Double_t Determinant() const override
TMatrixT< Element > & Invert(Double_t *det=0)
Invert the matrix and calculate its determinant.
TMatrixTBase< Element > & ResizeTo(Int_t nrows, Int_t ncols, Int_t=-1) override
Set size of the matrix to nrows x ncols New dynamic elements are created, the overlapping part of the...
const char * GetName() const override
Returns name of object.
TVectorT< Element > & ResizeTo(Int_t lwb, Int_t upb)
Resize the vector to [lwb:upb] .
RooConstVar & RooConst(Double_t val)
RVec< PromoteTypes< T0, T1 > > pow(const T0 &x, const RVec< T1 > &v)
RVec< PromoteType< T > > exp(const RVec< T > &v)
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
static constexpr double pi