MINT2
Chi2BoxSet.h
Go to the documentation of this file.
1 #ifndef MINT_DALITZ_CHI_SQUARED_BOX_SET_HH
2 #define MINT_DALITZ_CHI_SQUARED_BOX_SET_HH
3 
4 #include "Mint/Chi2Box.h"
6 #include "Mint/counted_ptr.h"
7 #include "Mint/DalitzHistoSet.h"
8 #include "Mint/PolymorphVector.h"
9 
10 #include "TColor.h"
11 #include "Rtypes.h"
12 
13 #include <iostream>
14 //#include <vector>
15 
16 
17 class IDalitzEvent;
18 
19 class Chi2BoxSet : public MINT::PolymorphVector<Chi2Box>{
21 
23 
24  double _normFactor;
25 
26  public:
27  Chi2BoxSet();
31  Chi2BoxSet(const DalitzArea& area
35  Chi2BoxSet(const Chi2BoxSet& other);
36  virtual ~Chi2BoxSet(){}
37 
39  _integCalc=fap;
40  }
41 
42  void add(const Chi2Box& box);
43  void add(const Chi2BoxSet& boxSet);
44 
45  void resetEventCounts();
46 
47  bool addData(const IDalitzEvent& evt);
48  bool addData(const IDalitzEvent* evt);
49  bool addMC(IDalitzEvent& evt, double weight);
50  bool addMC(IDalitzEvent* evt, double weight);
51 
52  void printBoxInfo(std::ostream& os = std::cout)const;
53  void print(std::ostream& os = std::cout)const{ printBoxInfo(os); }
54 
55  int nData() const;
56 
57  int nMC() const;
58  double weightedMC() const;
59  double weightedMC2() const;
60 
61  double rmsMC(int Ntotal) const;
62 
63  void setNormFactor(double nf){_normFactor = nf;}
64  double normFactor()const{return _normFactor;}
65 
66  void setHistoColour(Color_t fcolor);
67  void setFillColour(Color_t fcolor);
68  void setLineColour(Color_t fcolor);
70  const DalitzHistoSet& histoData()const;
72  const DalitzHistoSet& histoMC()const;
73 
74  double chi2(double normFactorPassed=-1) const;
75 };
76 
77 std::ostream& operator<<(std::ostream& os, const Chi2BoxSet& c2bs);
78 
79 #endif
80 //
void add(const Chi2Box &box)
Definition: Chi2BoxSet.cpp:53
void resetEventCounts()
Definition: Chi2BoxSet.cpp:63
MINT::counted_ptr< IIntegrationCalculator > _integCalc
Definition: Chi2BoxSet.h:20
double chi2(double normFactorPassed=-1) const
Definition: Chi2BoxSet.cpp:209
int nMC() const
Definition: Chi2BoxSet.cpp:134
std::ostream & operator<<(std::ostream &os, const Chi2BoxSet &c2bs)
Definition: Chi2BoxSet.cpp:236
bool addMC(IDalitzEvent &evt, double weight)
Definition: Chi2BoxSet.cpp:86
virtual ~Chi2BoxSet()
Definition: Chi2BoxSet.h:36
void printBoxInfo(std::ostream &os=std::cout) const
Definition: Chi2BoxSet.cpp:111
double weightedMC2() const
Definition: Chi2BoxSet.cpp:148
void setIIntegrationCalculator(MINT::counted_ptr< IIntegrationCalculator > fap)
Definition: Chi2BoxSet.h:38
void setHistoColour(Color_t fcolor)
Definition: Chi2BoxSet.cpp:183
double rmsMC(int Ntotal) const
Definition: Chi2BoxSet.cpp:157
double weightedMC() const
Definition: Chi2BoxSet.cpp:141
DalitzHistoSet & histoMC()
Definition: Chi2BoxSet.cpp:202
void setLineColour(Color_t fcolor)
Definition: Chi2BoxSet.cpp:191
double normFactor() const
Definition: Chi2BoxSet.h:64
DalitzHistoSet _histoData
Definition: Chi2BoxSet.h:22
void print(std::ostream &os=std::cout) const
Definition: Chi2BoxSet.h:53
int nData() const
Definition: Chi2BoxSet.cpp:127
void setFillColour(Color_t fcolor)
Definition: Chi2BoxSet.cpp:187
DalitzHistoSet & histoData()
Definition: Chi2BoxSet.cpp:196
bool addData(const IDalitzEvent &evt)
Definition: Chi2BoxSet.cpp:68
DalitzHistoSet _histoMC
Definition: Chi2BoxSet.h:22
void setNormFactor(double nf)
Definition: Chi2BoxSet.h:63
double _normFactor
Definition: Chi2BoxSet.h:24