19 , _integCalc(integPtr)
28 , _integCalc(integPtr)
43 , _histoData(other._histoData)
44 , _histoMC(other._histoMC)
45 , _normFactor(other._normFactor)
58 for(
unsigned int i=0; i<boxSet.
size(); i++){
64 for(
unsigned int i=0; i < this->
size(); i++){
65 (*this)[i].resetEventCounts();
69 for(
unsigned int i=0; i < this->
size(); i++){
70 if ((*
this)[i].addData(evt)){
78 for(
unsigned int i=0; i < this->
size(); i++){
79 if ((*
this)[i].addData(evt)){
87 for(
unsigned int i=0; i < this->
size(); i++){
88 if((*
this)[i].addMC(evt, weight)){
99 cout <<
"Chi2BoxSet::addMC for pointers called with evt = " 102 for(
unsigned int i=0; i < this->
size(); i++){
103 if((*
this)[i].addMC(evt, weight)){
112 os <<
"Chi2BoxSet with " << this->
size() <<
" sub-box";
113 if(this->
size() > 1) os <<
"es";
115 for(
unsigned int i=0; i < this->
size(); i++){
116 os <<
"\n " << i <<
") " << (*this)[i];
121 os <<
"\n sorted fractions in this box\n" 124 os <<
"\n--------------------------------------------------------\n" << endl;
129 for(
unsigned int i=0; i < this->
size(); i++){
130 sum += (*this)[i].nData();
136 for(
unsigned int i=0; i < this->
size(); i++){
137 sum += (*this)[i].nMC();
143 for(
unsigned int i=0; i < this->
size(); i++){
144 sum += (*this)[i].weightedMC();
150 for(
unsigned int i=0; i < this->
size(); i++){
151 sum += (*this)[i].weightedMC2();
210 double nf=normFactorPassed;
215 int n_data = this->
nData();
219 double varData_expected = weight_mc;
222 if(0 != varData_expected) varData = varData_expected;
223 else varData = n_data;
225 double var = varData + var_mc;
227 double delta_N = n_data - weight_mc;
228 double dNSq = delta_N * delta_N;
230 if( dNSq < var * 1.e-20)
chi2=0;
231 else chi2 = dNSq / var;
void add(const Chi2Box &box)
MINT::counted_ptr< IIntegrationCalculator > _integCalc
double chi2(double normFactorPassed=-1) const
virtual MINT::counted_ptr< IIntegrationCalculator > clone_IIntegrationCalculator() const =0
void push_back(const Chi2Box &c)
bool addMC(IDalitzEvent &evt, double weight)
void setFillColour(Color_t fcolor)
void printBoxInfo(std::ostream &os=std::cout) const
double weightedMC2() const
void setHistoColour(Color_t fcolor)
double rmsMC(int Ntotal) const
double weightedMC() const
virtual FitFractionList getFractions() const =0
void setLineColour(Color_t fcolor)
DalitzHistoSet & histoMC()
void setLineColour(Color_t fcolor)
void addEvent(const IDalitzEvent &evt, double weight=1)
unsigned int size() const
virtual void addEvent(IDalitzEvent *evtPtr, double weight=1)=0
double normFactor() const
DalitzHistoSet _histoData
void print(std::ostream &os=std::cout) const
void sortByMagnitudeDecending()
void setFillColour(Color_t fcolor)
DalitzHistoSet & histoData()
bool addData(const IDalitzEvent &evt)
std::ostream & operator<<(std::ostream &os, const Chi2BoxSet &c2bs)