30 _gamma(
"gamma",
"gamma",this),
31 _nominal(
"nominal",
"nominal",this),
32 _nominalErr(
"nominalErr",
"nominalErr",this),
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) ;
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;
115 for (
Int_t i=0 ; i<nbins ; i++) {
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) ;
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.
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
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
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
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Reimplementation of standard RooArgList::add()
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
RooAbsArg * first() 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)
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...