BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtHis2F.hh
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4//
5// Module: EvtGen/EvtHis2F.hh
6//
7// Description: Class to handle H2F histogram
8//
9// Modification history:
10//
11// PING RG September 8, 2010 Module created
12//
13//------------------------------------------------------------------------
14
15#ifndef EvtHis2F_HH
16#define EvtHis2F_HH
17
18#include "TH1.h"
19#include "TAxis.h"
20#include "TH2.h"
21#include "TH3.h"
22#include "TFile.h"
23#include "TApplication.h"
24#include "TROOT.h"
25#include "TChain.h"
26#include "TDirectory.h"
28
29class EvtHis2F {
30
31public:
32
34 virtual ~EvtHis2F();
35 void init();
36 void setFile(const char* dtfile);
37 void setHTitle(const char* htitle);
38 const char* getFile();
39 const char* getHTitle();
40 void HFill(double xmass2, double ymass2);
41 double getZvalue(double m12_square, double m13_square);
42 void HReweight();
43 bool AR(double xmass2,double ymass2); // major function: judge to accept or reject an event
44 bool AR(double xmass2,double ymass2, double zmax, TH2F *h2);
45 void setZmax( );
46 void setZmax(TH2F *H2);
47 double getZmax();
48 void setHmc(TH2F *H2);
49 void setHdt(TH2F *H2);
50 void setHwt(TH2F *H2){ HWT=(TH2F*) H2->Clone("HWT");}
51
52 TH2F* getHmc( );
53 TH2F* getHdt( );
54 TH2F* getHwt( );
55
56 void setBINSx(int bx){BINSx=bx;}
57 void setBINSy(int by){BINSy=by;}
58 void setXlow (double xl){xlow=xl;}
59 void setXup(double xu){xup=xu;}
60 void setYlow (double yl){ylow=yl;}
61 void setYup(double yu){yup=yu;}
62
63 void setBins(TH2F *h2);
64 int getBINSx(){return BINSx;}
65 int getBINSy(){return BINSy;}
66 double getXlow(){return xlow;}
67 double getYlow(){return ylow;}
68 double getXup(){return xup;}
69 double getYup(){return yup;}
70
71 void show(TH2F *h2);
72 void showFrame(TH2F *h2);
73
74 void init(TH2F *hmc, TH2F *hdt, TH2F *hwt);
75
76private:
77 TH2F *HDATA, *HMC, *HWT; //input DATA, MC AND RE-WEIGHTED DALITIZ PLOT
78 TFile *dataf;
79 double zmax; //maxium value at the reweight diagram
80 int BINSx, BINSy;
81 double xlow,xup,ylow,yup;
82 const char *datafile, *datatitle;
83 TDirectory dir;
84 int icount;
85 double max1,max2,max3;
86 TH2F *WT1,*WT2,*WT3;
87};
88
89
90#endif
91
void show(TH2F *h2)
Definition: EvtHis2F.cc:67
const char * getHTitle()
Definition: EvtHis2F.cc:31
void HReweight()
Definition: EvtHis2F.cc:137
void setBins(TH2F *h2)
Definition: EvtHis2F.cc:152
void setHwt(TH2F *H2)
Definition: EvtHis2F.hh:50
TH2F * getHmc()
Definition: EvtHis2F.cc:55
int getBINSy()
Definition: EvtHis2F.hh:65
void setHdt(TH2F *H2)
Definition: EvtHis2F.cc:50
void init()
Definition: EvtHis2F.cc:98
virtual ~EvtHis2F()
Definition: EvtHis2F.cc:25
void setYlow(double yl)
Definition: EvtHis2F.hh:60
double getZmax()
Definition: EvtHis2F.cc:192
double getYup()
Definition: EvtHis2F.hh:69
const char * getFile()
Definition: EvtHis2F.cc:27
int getBINSx()
Definition: EvtHis2F.hh:64
void setHmc(TH2F *H2)
Definition: EvtHis2F.cc:45
bool AR(double xmass2, double ymass2)
Definition: EvtHis2F.cc:205
void setYup(double yu)
Definition: EvtHis2F.hh:61
void setBINSx(int bx)
Definition: EvtHis2F.hh:56
void setXup(double xu)
Definition: EvtHis2F.hh:59
TH2F * getHwt()
Definition: EvtHis2F.cc:63
void HFill(double xmass2, double ymass2)
Definition: EvtHis2F.cc:129
EvtHis2F()
Definition: EvtHis2F.hh:33
void setHTitle(const char *htitle)
Definition: EvtHis2F.cc:40
void setBINSy(int by)
Definition: EvtHis2F.hh:57
double getYlow()
Definition: EvtHis2F.hh:67
void setZmax()
Definition: EvtHis2F.cc:177
void setXlow(double xl)
Definition: EvtHis2F.hh:58
double getZvalue(double m12_square, double m13_square)
Definition: EvtHis2F.cc:196
double getXup()
Definition: EvtHis2F.hh:68
TH2F * getHdt()
Definition: EvtHis2F.cc:59
double getXlow()
Definition: EvtHis2F.hh:66
void setFile(const char *dtfile)
Definition: EvtHis2F.cc:35
void showFrame(TH2F *h2)
Definition: EvtHis2F.cc:83