72 {
73
76
78 TH2F* hid = (TH2F*)
f.Get(
"mH2" );
79 TAxis* xaxis = hid->GetXaxis();
80 TAxis* yaxis = hid->GetYaxis();
81
82 int BINSx = xaxis->GetLast();
83 int BINSy = yaxis->GetLast();
84 int BINS = BINSx * BINSy;
85 double yvalue, ymax = 0.0;
86 int i, j, binxy;
87
88 for ( i = 1; i < BINSx + 1; i++ )
89 {
90 for ( j = 1; j < BINSy + 1; j++ )
91 {
92 binxy = hid->GetBin( i, j );
93 yvalue = hid->GetBinContent( binxy );
94
95 if ( yvalue > ymax ) ymax = yvalue;
96 }
97 }
98
99loop:
101
103 {
104 std::cout
105 << "The number of specified particles is not equal the number of decay daughters "
106 << endl;
107 ::abort();
108 }
109
110 EvtVector4R pt, pt2;
112
114 for (
int ii = 1; ii < nbx; ii++ ) { pt = pt + p->
getDaug( ii )->
getP4Lab(); }
116
118 for (
int jj = nbx + 1; jj < nbx + nby; jj++ ) pt2 = pt2 + p->
getDaug( jj )->
getP4Lab();
120
121 int xbin = hid->GetXaxis()->FindBin(
xmass );
122 int ybin = hid->GetYaxis()->FindBin( ymass );
123 int xybin = hid->GetBin( xbin, ybin );
124 double zvalue = hid->GetBinContent( xybin );
125 double xratio = zvalue / ymax;
126
128 if ( rd1 > xratio ) goto loop;
129 return;
130}
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
EvtParticle * getDaug(int i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
const char * setFileName()