6 float eff,
x[400],y[400];
8 TFile *
f =
new TFile(
"effTree.root",
"read");
9 TTree *
t = (TTree*)
f->Get(
"effTree");
11 t->SetBranchAddress(
"rBin", &rBin);
12 t->SetBranchAddress(
"phiBin", &phiBin);
13 t->SetBranchAddress(
"zBin", &zBin);
14 t->SetBranchAddress(
"eff", &eff);
15 t->SetBranchAddress(
"x",
x);
16 t->SetBranchAddress(
"y", y);
19 float efficiency[43][6][6];
20 float propTime[43][6][6][400];
21 float prob[43][6][6][400];
23 for (Int_t i = 0; i <
nR*
nPhi*
nZ; i++){
28 efficiency[r][phi][z] = eff;
29 for (Int_t j = 0; j < 400; j++){
30 propTime[r][phi][z][j] =
x[j];
31 prob[r][phi][z][j] = y[j];
39 Float_t x0[400], y0[400];
43 float x1[400],y1[400];
45 sprintf(
file,
"/ihepbatch/besd12/liuy/EndcapTof/OpInETof2/results/%d/timeSta_%d_%d_%d.root",rPos,rPos,phi0,z0);
47 TH1F* h1 =
new TH1F(
"h1",
"time distr.(ns)",400,0,20);
48 TFile*
f1 = TFile::Open(
file);
49 TNtuple*
n1 = (TNtuple*)
f1 -> Get(
"timeTuple");
50 n1->SetBranchAddress(
"inTimePre",&t1);
51 int nEntries = (Int_t)
n1->GetEntries();
52 cout <<
"nEntries:" << nEntries <<
"\n" << endl;
54 for(
int m=0;m<nEntries;m++)
59 double norm = h1->Integral();
65 cout <<
"The eff is null!" << endl;
68 TAxis* xaxis = h1->GetXaxis();
69 for(
int m=0;m<400;m++)
71 x1[m] = xaxis->GetBinCenter(m);
72 y1[m] = h1->GetBinContent(m);
76 for(Int_t i=0;i<400;i++)
78 x0[i] = propTime[r0][phi0][z0][i] - x1[i];
79 y0[i] = prob[r0][phi0][z0][i] - y1[i];
82 TGraph *g =
new TGraph( 400, x0, y0);
sprintf(cut,"kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")