MINT2
Chi2Box.h
Go to the documentation of this file.
1 #ifndef DALITZ_CHI_SQUARED_BOX_HH
2 #define DALITZ_CHI_SQUARED_BOX_HH
3 
5 #include "Mint/DalitzArea.h"
6 //#include <vector>
7 #include <iostream>
8 #include "Mint/PolymorphVector.h"
9 
10 class IDalitzEvent;
11 class Chi2Box{
13 
14  int _nData;
15  int _nMC;
16  double _nWeightedMC;
17 
19 
20  public:
21  Chi2Box();
22  Chi2Box(const DalitzEventPattern& pat);
23  Chi2Box(const DalitzArea& area);
24  Chi2Box(const Chi2Box& other);
25  virtual ~Chi2Box(){}
26 
28 
29  void resetEventCounts();
30  void resetAll(); // changes box size!!
31  void enclosePhaseSpace(double safetyFactor=1.2);
32 
33  bool addData(const IDalitzEvent& evt);
34  bool addData(const IDalitzEvent* evt);
35  bool addMC(const IDalitzEvent& evt, double weight);
36  bool addMC(const IDalitzEvent* evt, double weight);
37 
38  int nData() const;
39 
40  int nMC() const;
41  double weightedMC() const;
42 
43  double weightedMC2() const;
44  double rmsMC(int Ntotal) const;
45 
46  double t01Min() const{return _area._t01.min();} // = s234
47  double t01Max() const{return _area._t01.max();}
48 
49  double s12Min() const{return _area._s12.min();}
50  double s12Max() const{return _area._s12.max();}
51 
52  double s23Min() const{return _area._s23.min();}
53  double s23Max() const{return _area._s23.max();}
54 
55  double s34Min() const{return _area._s34.min();}
56  double s34Max() const{return _area._s34.max();}
57 
58  double t40Min() const{return _area._t40.min();} // = s123
59  double t40Max() const{return _area._t40.max();}
60 
61  void print(std::ostream& os = std::cout) const;
62 };
63 
64 std::ostream& operator<<(std::ostream& os, const Chi2Box& box);
65 
66 #endif
67 //
double min() const
double t01Min() const
Definition: Chi2Box.h:46
double s23Min() const
Definition: Chi2Box.h:52
double weightedMC() const
Definition: Chi2Box.cpp:115
double t01Max() const
Definition: Chi2Box.h:47
void enclosePhaseSpace(double safetyFactor=1.2)
Definition: Chi2Box.cpp:38
int nMC() const
Definition: Chi2Box.cpp:112
double s12Max() const
Definition: Chi2Box.h:50
double max() const
int _nData
Definition: Chi2Box.h:14
DalitzArea _area
Definition: Chi2Box.h:12
double s34Min() const
Definition: Chi2Box.h:55
Chi2Box()
Definition: Chi2Box.cpp:7
double s23Max() const
Definition: Chi2Box.h:53
bool addData(const IDalitzEvent &evt)
Definition: Chi2Box.cpp:68
void print(std::ostream &os=std::cout) const
Definition: Chi2Box.cpp:142
DalitzCoordinate _t40
Definition: DalitzArea.h:51
DalitzCoordinate _t01
Definition: DalitzArea.h:51
bool addMC(const IDalitzEvent &evt, double weight)
Definition: Chi2Box.cpp:86
void resetAll()
Definition: Chi2Box.cpp:63
double rmsMC(int Ntotal) const
Definition: Chi2Box.cpp:121
double weightedMC2() const
Definition: Chi2Box.cpp:118
double t40Min() const
Definition: Chi2Box.h:58
DalitzCoordinate _s12
Definition: DalitzArea.h:51
std::ostream & operator<<(std::ostream &os, const Chi2Box &box)
Definition: Chi2Box.cpp:146
double s12Min() const
Definition: Chi2Box.h:49
double _nWeightedMC
Definition: Chi2Box.h:16
void resetEventCounts()
Definition: Chi2Box.cpp:57
double _weightMC_Squared
Definition: Chi2Box.h:18
double s34Max() const
Definition: Chi2Box.h:56
double t40Max() const
Definition: Chi2Box.h:59
int nData() const
Definition: Chi2Box.cpp:109
MINT::PolymorphVector< Chi2Box > split(int n=2)
Definition: Chi2Box.cpp:45
int _nMC
Definition: Chi2Box.h:15
DalitzCoordinate _s23
Definition: DalitzArea.h:51
virtual ~Chi2Box()
Definition: Chi2Box.h:25
DalitzCoordinate _s34
Definition: DalitzArea.h:51