Bin errors are always computed taking weights into account.
error = sqrt( SUM[ weight*weight ])
Depending on histogram operations, bin errors are combined in the error of the resulting bin. Formulas should be equivalent to the ones used in HBOOK.
void add( const Like_Parent &other )
error_ = other.error()*other.error() + error_ ;
void sub( const Like_Parent &other )
error_ = other.error() * other.error() + error_ ;
void mul( const Like_Parent &other )
error_ = error_ * other.value()*other.value() +
other.error()*other.error() * value_*value_ ;
void div( const Like_Parent &other )
e = pow(other.error(),4) ;
error_ = error_ * other.value()*other.value() +
other.error()*other.error() * value_*value_ ;
if( e != 0 )
error_ = ( error_/e );
void binomial_div( const Like_Parent &other )
e = other.error()*other.error() ;
error_ = sqrt( error_ / e );
error_ = error_ * (1-error_);
error_ = error_ * error_;
error_ = ( error_ / e );