1 |
mocchiut |
1.1 |
#include <TTree.h> |
2 |
|
|
|
3 |
|
|
void settrklev1(TTree *tree, Tracklev1 & trklev1){ |
4 |
|
|
tree->SetBranchAddress("good1",&trklev1.good1); |
5 |
|
|
tree->SetBranchAddress("nev1",&trklev1.nev1); |
6 |
|
|
tree->SetBranchAddress("pkt_type1",&trklev1.pkt_type1); |
7 |
|
|
tree->SetBranchAddress("pkt_num1",&trklev1.pkt_num1); |
8 |
|
|
tree->SetBranchAddress("obt1",&trklev1.obt1); |
9 |
|
|
tree->SetBranchAddress("which_calib1",&trklev1.which_calib1); |
10 |
|
|
tree->SetBranchAddress("nclstr1",&trklev1.nclstr1); |
11 |
|
|
tree->SetBranchAddress("view",trklev1.view); |
12 |
|
|
tree->SetBranchAddress("ladder",trklev1.ladder); |
13 |
|
|
tree->SetBranchAddress("maxs",trklev1.maxs); |
14 |
|
|
tree->SetBranchAddress("mult",trklev1.mult); |
15 |
|
|
tree->SetBranchAddress("dedx",trklev1.dedx); |
16 |
|
|
tree->SetBranchAddress("indstart",trklev1.indstart); |
17 |
|
|
tree->SetBranchAddress("indmax",trklev1.indmax); |
18 |
|
|
tree->SetBranchAddress("totcllength",&trklev1.totcllength); |
19 |
|
|
tree->SetBranchAddress("clsignal",trklev1.clsignal); |
20 |
|
|
tree->SetBranchAddress("cnev",trklev1.cnev); |
21 |
|
|
} |
22 |
|
|
|
23 |
|
|
void accesstrklev1(Tracklev1 & trklev1, CTracklev1 & ctrklev1){ |
24 |
|
|
ctrklev1.good1 = trklev1.good1; |
25 |
|
|
ctrklev1.nev1 = trklev1.nev1; |
26 |
|
|
ctrklev1.pkt_type1 = trklev1.pkt_type1; |
27 |
|
|
ctrklev1.pkt_num1 = trklev1.pkt_num1; |
28 |
|
|
ctrklev1.obt1 = trklev1.obt1; |
29 |
|
|
ctrklev1.nclstr1 = trklev1.nclstr1; |
30 |
|
|
for (Int_t i = 0; i<trklev1.nclstr1; i++){ |
31 |
|
|
ctrklev1.view[i] = trklev1.view[i]; |
32 |
|
|
ctrklev1.ladder[i] = trklev1.ladder[i]; |
33 |
|
|
ctrklev1.maxs[i] = trklev1.maxs[i]; |
34 |
|
|
ctrklev1.mult[i] = trklev1.mult[i]; |
35 |
|
|
ctrklev1.dedx[i] = trklev1.dedx[i]; |
36 |
|
|
ctrklev1.indstart[i] = trklev1.indstart[i]; |
37 |
|
|
ctrklev1.indmax[i] = trklev1.indmax[i]; |
38 |
|
|
}; |
39 |
|
|
ctrklev1.totcllength = trklev1.totcllength; |
40 |
|
|
for (Int_t i = 0; i<trklev1.totcllength; i++){ |
41 |
|
|
ctrklev1.clsignal[i] = trklev1.clsignal[i]; |
42 |
|
|
}; |
43 |
|
|
for (Int_t i = 0; i<12; i++){ |
44 |
|
|
for (Int_t j = 0; j<24; j++){ |
45 |
|
|
ctrklev1.cnev[i][j] = trklev1.cnev[j][i]; |
46 |
|
|
}; |
47 |
|
|
}; |
48 |
|
|
} |
49 |
|
|
|
50 |
|
|
void settrklev2(TTree *tree, Tracklev2 & trklev2){ |
51 |
|
|
tree->SetBranchAddress("good2",&trklev2.good2); |
52 |
|
|
tree->SetBranchAddress("nev2",&trklev2.nev2); |
53 |
|
|
tree->SetBranchAddress("pkt_type",&trklev2.pkt_type); |
54 |
|
|
tree->SetBranchAddress("pkt_num",&trklev2.pkt_num); |
55 |
|
|
tree->SetBranchAddress("obt",&trklev2.obt); |
56 |
|
|
tree->SetBranchAddress("which_calib",&trklev2.which_calib); |
57 |
|
|
tree->SetBranchAddress("ntrk",&trklev2.ntrk); |
58 |
mocchiut |
1.2 |
tree->SetBranchAddress("image",trklev2.image); |
59 |
mocchiut |
1.1 |
tree->SetBranchAddress("xm",trklev2.xm); |
60 |
|
|
tree->SetBranchAddress("ym",trklev2.ym); |
61 |
|
|
tree->SetBranchAddress("zm",trklev2.zm); |
62 |
|
|
tree->SetBranchAddress("resx",trklev2.resx); |
63 |
|
|
tree->SetBranchAddress("resy",trklev2.resy); |
64 |
|
|
tree->SetBranchAddress("al",trklev2.al); |
65 |
|
|
tree->SetBranchAddress("coval",trklev2.coval); |
66 |
|
|
tree->SetBranchAddress("chi2",trklev2.chi2); |
67 |
|
|
tree->SetBranchAddress("xgood",trklev2.xgood); |
68 |
|
|
tree->SetBranchAddress("ygood",trklev2.ygood); |
69 |
|
|
tree->SetBranchAddress("xv",trklev2.xv); |
70 |
|
|
tree->SetBranchAddress("yv",trklev2.yv); |
71 |
|
|
tree->SetBranchAddress("zv",trklev2.zv); |
72 |
|
|
tree->SetBranchAddress("axv",trklev2.axv); |
73 |
|
|
tree->SetBranchAddress("ayv",trklev2.ayv); |
74 |
|
|
tree->SetBranchAddress("dedxp",trklev2.dedxp); |
75 |
|
|
tree->SetBranchAddress("nclsx",trklev2.nclsx); |
76 |
|
|
tree->SetBranchAddress("nclsy",trklev2.nclsy); |
77 |
|
|
} |
78 |
|
|
|
79 |
|
|
void accesstrklev2(Tracklev2 & trklev2, CTracklev2 & ctrklev2){ |
80 |
|
|
ctrklev2.good2 = trklev2.good2; |
81 |
|
|
ctrklev2.nev2 = trklev2.nev2; |
82 |
|
|
ctrklev2.pkt_type = trklev2.pkt_type; |
83 |
|
|
ctrklev2.pkt_num = trklev2.pkt_num; |
84 |
|
|
ctrklev2.obt = trklev2.obt; |
85 |
|
|
ctrklev2.which_calib = trklev2.which_calib; |
86 |
|
|
ctrklev2.ntrk = trklev2.ntrk; |
87 |
|
|
for (Int_t i = 0; i<trklev2.ntrk; i++){ |
88 |
|
|
ctrklev2.chi2[i] = trklev2.chi2[i]; |
89 |
|
|
ctrklev2.image[i] = trklev2.image[i]; |
90 |
|
|
for (Int_t j = 0; j<6; j++){ |
91 |
|
|
ctrklev2.xm[j][i] = trklev2.xm[i][j]; |
92 |
|
|
ctrklev2.ym[j][i] = trklev2.ym[i][j]; |
93 |
|
|
ctrklev2.zm[j][i] = trklev2.zm[i][j]; |
94 |
|
|
ctrklev2.resx[j][i] = trklev2.resx[i][j]; |
95 |
|
|
ctrklev2.resy[j][i] = trklev2.resy[i][j]; |
96 |
|
|
ctrklev2.dedxp[j][i] = trklev2.dedxp[i][j]; |
97 |
|
|
if ( j<5 ) { |
98 |
|
|
ctrklev2.al[j][i] = trklev2.al[i][j]; |
99 |
|
|
for (Int_t jp = 0; jp<5; jp++){ |
100 |
|
|
ctrklev2.coval[j][jp][i] = trklev2.coval[i][jp][j]; |
101 |
|
|
}; |
102 |
|
|
}; |
103 |
|
|
ctrklev2.xgood[j][i] = trklev2.xgood[i][j]; |
104 |
|
|
ctrklev2.ygood[j][i] = trklev2.ygood[i][j]; |
105 |
|
|
ctrklev2.xv[j][i] = trklev2.xv[i][j]; |
106 |
|
|
ctrklev2.yv[j][i] = trklev2.yv[i][j]; |
107 |
|
|
ctrklev2.zv[j][i] = trklev2.zv[i][j]; |
108 |
|
|
ctrklev2.axv[j][i] = trklev2.axv[i][j]; |
109 |
|
|
ctrklev2.ayv[j][i] = trklev2.ayv[i][j]; |
110 |
|
|
if ( j == 0 ){ |
111 |
|
|
ctrklev2.nclsx[j] = trklev2.nclsx[j]; |
112 |
|
|
ctrklev2.nclsy[j] = trklev2.nclsy[j]; |
113 |
|
|
}; |
114 |
|
|
}; |
115 |
|
|
}; |
116 |
|
|
} |