30 _gamma("
gamma","gamma",this),
31 _nominal("nominal","nominal",this),
32 _nominalErr("nominalErr","nominalErr",this),
42 if (phfSet.getSize()==1) {
48 <<
") ERROR: input object must be a RooParamHistFunc" << endl ;
49 throw std::string(
"RoohistConstraint::ctor ERROR incongruent input arguments") ;
57 const char* vname =
Form(
"%s_nominal_bin_%i",
GetName(),i) ;
70 addOwnedComponents(allVars) ;
77 RooFIter phiter = phfSet.fwdIterator() ;
80 vector<RooParamHistFunc*> phvec ;
83 while((arg=phiter.
next())) {
87 phvec.push_back(phfComp) ;
91 gammaSet.
add(phfComp->
_p) ;
95 <<
") ERROR: incongruent input arguments: all input RooParamHistFuncs should have same #bins" << endl ;
96 throw std::string(
"RoohistConstraint::ctor ERROR incongruent input arguments") ;
100 <<
") ERROR: incongruent input arguments: all input RooParamHistFuncs should have the same bin parameters" << endl ;
101 throw std::string(
"RoohistConstraint::ctor ERROR incongruent input arguments") ;
107 <<
") WARNING: ignoring input argument " << arg->
GetName() <<
" which is not of type RooParamHistFunc" << endl;
111 _gamma.add(gammaSet) ;
118 for (vector<RooParamHistFunc*>::iterator iter = phvec.begin() ; iter != phvec.end() ; ++iter) {
119 sumVal += (*iter)->getNominal(i) ;
122 if (sumVal<threshold) {
124 const char* vname =
Form(
"%s_nominal_bin_%i",
GetName(),i) ;
128 for (vector<RooParamHistFunc*>::iterator iter = phvec.begin() ; iter != phvec.end() ; ++iter) {
129 sumVal2 += (*iter)->getNominal(i) ;
134 vname =
Form(
"%s_nominal_error_bin_%i",
GetName(),i) ;
138 for (vector<RooParamHistFunc*>::iterator iter = phvec.begin() ; iter != phvec.end() ; ++iter) {
139 sumErr2 +=
pow((*iter)->getNominalError(i),2) ;
146 _nominalErr.add(*vare) ;
152 addOwnedComponents(allVars) ;
159 _gamma(
"gamma",this,other._gamma),
160 _nominal(
"nominal",this,other._nominal),
161 _nominalErr(
"nominalErr",this,other._nominalErr),
162 _relParam(other._relParam)
201 cout <<
"ERROR gam=0 and nom>0" << endl ;
214 for (
Int_t ii=0 ; ii<5000 ; ii++) _lut[ii] = 0 ;
216 for (
Int_t j=1 ; j<=5000 ; j++) {
218 for (
Int_t ii=j ; ii<=5000 ; ii++) {
228 cout <<
"logSum i=" << i << endl ;
229 for (
Int_t j=5000 ; j<=i ; j++) {
virtual const char * GetName() const
Returns name of object.
std::string GetName(const std::string &scope_name)
static long int sum(long int i)
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
virtual const RooArgSet * get() const
Double_t getVal(const RooArgSet *set=0) const
Double_t getLogVal(const RooArgSet *set=0) const
Return the log of the current value with given normalization An error message is printed if the argum...
Double_t evaluate() const
double pow(double, double)
virtual Double_t weight() const
RooRealVar represents a fundamental (non-derived) real valued object.
virtual void setVal(Double_t value)
Set value of variable to 'value'.
RooAbsArg * at(Int_t idx) const
void setConstant(Bool_t value=kTRUE)
char * Form(const char *fmt,...)
Double_t logSum(Int_t i) const
Double_t Poisson(Double_t x, Double_t par)
Compute the Poisson distribution function for (x,par) The Poisson PDF is implemented by means of Eule...
virtual Int_t numEntries() const
Return the number of bins.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooFIter fwdIterator() const
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...