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) ;
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++) {
double pow(double, double)
char * Form(const char *fmt,...)
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
RooFIter fwdIterator() const
RooAbsArg * first() const
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
void setConstant(Bool_t value=kTRUE)
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Double_t getVal(const RooArgSet *set=0) const
Evaluate object. Returns either cached value or triggers a recalculation.
RooAbsArg * at(Int_t idx) const
RooArgSet is a container object that can hold multiple RooAbsArg objects.
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 Double_t weight() const
virtual Int_t numEntries() const
Return the number of bins.
virtual const RooArgSet * get() 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 logSum(Int_t i) const
Double_t evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
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'.
virtual const char * GetName() const
Returns name of object.
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...
static long int sum(long int i)