/[PAMELA software]/root2paw/inc/ctrkinclude.h
ViewVC logotype

Diff of /root2paw/inc/ctrkinclude.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mocchiut, Mon Dec 5 16:17:37 2005 UTC revision 1.3 by mocchiut, Thu Mar 9 15:46:24 2006 UTC
# Line 3  Line 3 
3  void settrklev1(TTree *tree, Tracklev1 & trklev1){  void settrklev1(TTree *tree, Tracklev1 & trklev1){
4      tree->SetBranchAddress("good1",&trklev1.good1);      tree->SetBranchAddress("good1",&trklev1.good1);
5      tree->SetBranchAddress("nev1",&trklev1.nev1);      tree->SetBranchAddress("nev1",&trklev1.nev1);
6        tree->SetBranchAddress("whic_calib1",&trklev1.whic_calib1);
7        tree->SetBranchAddress("swcode1",&trklev1.swcode1);
8        tree->SetBranchAddress("crc1",trklev1.crc1);
9      tree->SetBranchAddress("pkt_type1",&trklev1.pkt_type1);      tree->SetBranchAddress("pkt_type1",&trklev1.pkt_type1);
10      tree->SetBranchAddress("pkt_num1",&trklev1.pkt_num1);      tree->SetBranchAddress("pkt_num1",&trklev1.pkt_num1);
11      tree->SetBranchAddress("obt1",&trklev1.obt1);      tree->SetBranchAddress("obt1",&trklev1.obt1);
12      tree->SetBranchAddress("which_calib1",&trklev1.which_calib1);      tree->SetBranchAddress("cpu_crc1",&trklev1.cpu_crc1);
13      tree->SetBranchAddress("nclstr1",&trklev1.nclstr1);      tree->SetBranchAddress("nclstr1",&trklev1.nclstr1);
14      tree->SetBranchAddress("view",trklev1.view);      tree->SetBranchAddress("view",trklev1.view);
15      tree->SetBranchAddress("ladder",trklev1.ladder);      tree->SetBranchAddress("ladder",trklev1.ladder);
# Line 23  void settrklev1(TTree *tree, Tracklev1 & Line 26  void settrklev1(TTree *tree, Tracklev1 &
26  void accesstrklev1(Tracklev1 & trklev1, CTracklev1 & ctrklev1){  void accesstrklev1(Tracklev1 & trklev1, CTracklev1 & ctrklev1){
27      ctrklev1.good1 = trklev1.good1;      ctrklev1.good1 = trklev1.good1;
28      ctrklev1.nev1 = trklev1.nev1;          ctrklev1.nev1 = trklev1.nev1;    
29        ctrklev1.whic_calib1 = trklev1.whic_calib1;
30        ctrklev1.swcode1 = trklev1.swcode1;
31      ctrklev1.pkt_type1 = trklev1.pkt_type1;      ctrklev1.pkt_type1 = trklev1.pkt_type1;
32      ctrklev1.pkt_num1 = trklev1.pkt_num1;      ctrklev1.pkt_num1 = trklev1.pkt_num1;
33        ctrklev1.cpu_crc1 = trklev1.cpu_crc1;
34      ctrklev1.obt1 = trklev1.obt1;      ctrklev1.obt1 = trklev1.obt1;
35      ctrklev1.nclstr1 = trklev1.nclstr1;      ctrklev1.nclstr1 = trklev1.nclstr1;
36      for (Int_t i = 0; i<trklev1.nclstr1; i++){      for (Int_t i = 0; i<trklev1.nclstr1; i++){
# Line 41  void accesstrklev1(Tracklev1 & trklev1, Line 47  void accesstrklev1(Tracklev1 & trklev1,
47          ctrklev1.clsignal[i] = trklev1.clsignal[i];          ctrklev1.clsignal[i] = trklev1.clsignal[i];
48      };      };
49      for (Int_t i = 0; i<12; i++){      for (Int_t i = 0; i<12; i++){
50            ctrklev1.crc1[i] = trklev1.crc1[i];
51          for (Int_t j = 0; j<24; j++){          for (Int_t j = 0; j<24; j++){
52              ctrklev1.cnev[i][j] = trklev1.cnev[j][i];              ctrklev1.cnev[i][j] = trklev1.cnev[j][i];
53          };          };
# Line 48  void accesstrklev1(Tracklev1 & trklev1, Line 55  void accesstrklev1(Tracklev1 & trklev1,
55  }  }
56    
57  void settrklev2(TTree *tree, Tracklev2 & trklev2){  void settrklev2(TTree *tree, Tracklev2 & trklev2){
58     tree->SetBranchAddress("good2",&trklev2.good2);      // GENERAL
59     tree->SetBranchAddress("nev2",&trklev2.nev2);      tree->SetBranchAddress("good2",&trklev2.good2);
60     tree->SetBranchAddress("pkt_type",&trklev2.pkt_type);      tree->SetBranchAddress("nev2",&trklev2.nev2);
61     tree->SetBranchAddress("pkt_num",&trklev2.pkt_num);      tree->SetBranchAddress("which_calib",&trklev2.which_calib);
62     tree->SetBranchAddress("obt",&trklev2.obt);      tree->SetBranchAddress("swcode",&trklev2.swcode);
63     tree->SetBranchAddress("which_calib",&trklev2.which_calib);      tree->SetBranchAddress("crc",trklev2.crc);
64     tree->SetBranchAddress("ntrk",&trklev2.ntrk);      // CPU
65     tree->SetBranchAddress("image",&trklev2.image);      tree->SetBranchAddress("pkt_type",&trklev2.pkt_type);
66     tree->SetBranchAddress("xm",trklev2.xm);      tree->SetBranchAddress("pkt_num",&trklev2.pkt_num);
67     tree->SetBranchAddress("ym",trklev2.ym);      tree->SetBranchAddress("obt",&trklev2.obt);
68     tree->SetBranchAddress("zm",trklev2.zm);      tree->SetBranchAddress("cpu_crc",&trklev2.cpu_crc);
69     tree->SetBranchAddress("resx",trklev2.resx);      // TRACKS
70     tree->SetBranchAddress("resy",trklev2.resy);      tree->SetBranchAddress("ntrk",&trklev2.ntrk);
71     tree->SetBranchAddress("al",trklev2.al);      tree->SetBranchAddress("image",trklev2.image);
72     tree->SetBranchAddress("coval",trklev2.coval);      tree->SetBranchAddress("xm",trklev2.xm);
73     tree->SetBranchAddress("chi2",trklev2.chi2);      tree->SetBranchAddress("ym",trklev2.ym);
74     tree->SetBranchAddress("xgood",trklev2.xgood);      tree->SetBranchAddress("zm",trklev2.zm);
75     tree->SetBranchAddress("ygood",trklev2.ygood);      tree->SetBranchAddress("resx",trklev2.resx);
76     tree->SetBranchAddress("xv",trklev2.xv);      tree->SetBranchAddress("resy",trklev2.resy);
77     tree->SetBranchAddress("yv",trklev2.yv);      tree->SetBranchAddress("al",trklev2.al);
78     tree->SetBranchAddress("zv",trklev2.zv);      tree->SetBranchAddress("coval",trklev2.coval);
79     tree->SetBranchAddress("axv",trklev2.axv);      tree->SetBranchAddress("chi2",trklev2.chi2);
80     tree->SetBranchAddress("ayv",trklev2.ayv);      tree->SetBranchAddress("xgood",trklev2.xgood);
81     tree->SetBranchAddress("dedxp",trklev2.dedxp);      tree->SetBranchAddress("ygood",trklev2.ygood);
82     tree->SetBranchAddress("nclsx",trklev2.nclsx);      tree->SetBranchAddress("xv",trklev2.xv);
83     tree->SetBranchAddress("nclsy",trklev2.nclsy);      tree->SetBranchAddress("yv",trklev2.yv);
84        tree->SetBranchAddress("zv",trklev2.zv);
85        tree->SetBranchAddress("axv",trklev2.axv);
86        tree->SetBranchAddress("ayv",trklev2.ayv);
87        tree->SetBranchAddress("dedx_x",trklev2.dedx_x);
88        tree->SetBranchAddress("dedx_y",trklev2.dedx_y);
89        tree->SetBranchAddress("bdl",trklev2.bdl);
90        // SINGLETX
91        tree->SetBranchAddress("nclsx",&trklev2.nclsx);
92        tree->SetBranchAddress("planex",trklev2.planex);
93        tree->SetBranchAddress("xs",trklev2.xs);
94        tree->SetBranchAddress("sgnlxs",trklev2.sgnlxs);
95        // SINGLETY
96        tree->SetBranchAddress("nclsy",&trklev2.nclsy);
97        tree->SetBranchAddress("planey",trklev2.planey);
98        tree->SetBranchAddress("ys",trklev2.ys);
99        tree->SetBranchAddress("sgnlys",trklev2.sgnlys);
100  }  }
101    
102  void accesstrklev2(Tracklev2 & trklev2, CTracklev2 & ctrklev2){  void accesstrklev2(Tracklev2 & trklev2, CTracklev2 & ctrklev2){
103      ctrklev2.good2 = trklev2.good2;      ctrklev2.good2 = trklev2.good2;
104      ctrklev2.nev2 = trklev2.nev2;      ctrklev2.nev2 = trklev2.nev2;
105        ctrklev2.swcode = trklev2.swcode;
106      ctrklev2.pkt_type = trklev2.pkt_type;      ctrklev2.pkt_type = trklev2.pkt_type;
107      ctrklev2.pkt_num = trklev2.pkt_num;      ctrklev2.pkt_num = trklev2.pkt_num;
108      ctrklev2.obt = trklev2.obt;      ctrklev2.obt = trklev2.obt;
109      ctrklev2.which_calib = trklev2.which_calib;      ctrklev2.which_calib = trklev2.which_calib;
110        ctrklev2.cpu_crc = trklev2.cpu_crc;
111      ctrklev2.ntrk = trklev2.ntrk;      ctrklev2.ntrk = trklev2.ntrk;
112        ctrklev2.nclsx = trklev2.nclsx;
113        ctrklev2.nclsy = trklev2.nclsy;
114        for (Int_t i = 0; i<12; i++){
115            ctrklev2.crc[i] = trklev2.crc[i];
116        }
117        for (Int_t i = 0; i<trklev2.nclsx; i++){
118            ctrklev2.sgnlxs[i] = trklev2.sgnlxs[i];
119            ctrklev2.planex[i] = trklev2.planex[i];
120            for (Int_t j = 0; j<2; j++){
121                ctrklev2.xs[j][i] = trklev2.xs[i][j];
122            };
123        }    
124        for (Int_t i = 0; i<trklev2.nclsy; i++){
125            ctrklev2.sgnlys[i] = trklev2.sgnlys[i];
126            ctrklev2.planey[i] = trklev2.planey[i];
127            for (Int_t j = 0; j<2; j++){
128                ctrklev2.ys[j][i] = trklev2.ys[i][j];
129            };
130        }    
131      for (Int_t i = 0; i<trklev2.ntrk; i++){      for (Int_t i = 0; i<trklev2.ntrk; i++){
132            ctrklev2.bdl[i] = trklev2.bdl[i];
133          ctrklev2.chi2[i] = trklev2.chi2[i];          ctrklev2.chi2[i] = trklev2.chi2[i];
134          ctrklev2.image[i] = trklev2.image[i];          ctrklev2.image[i] = trklev2.image[i];
135          for (Int_t j = 0; j<6; j++){          for (Int_t j = 0; j<6; j++){
# Line 93  void accesstrklev2(Tracklev2 & trklev2, Line 138  void accesstrklev2(Tracklev2 & trklev2,
138              ctrklev2.zm[j][i] = trklev2.zm[i][j];              ctrklev2.zm[j][i] = trklev2.zm[i][j];
139              ctrklev2.resx[j][i] = trklev2.resx[i][j];              ctrklev2.resx[j][i] = trklev2.resx[i][j];
140              ctrklev2.resy[j][i] = trklev2.resy[i][j];              ctrklev2.resy[j][i] = trklev2.resy[i][j];
141              ctrklev2.dedxp[j][i] = trklev2.dedxp[i][j];              ctrklev2.dedx_x[j][i] = trklev2.dedx_x[i][j];
142                ctrklev2.dedx_y[j][i] = trklev2.dedx_y[i][j];
143              if ( j<5 ) {              if ( j<5 ) {
144                  ctrklev2.al[j][i] = trklev2.al[i][j];                  ctrklev2.al[j][i] = trklev2.al[i][j];
145                  for (Int_t jp = 0; jp<5; jp++){                  for (Int_t jp = 0; jp<5; jp++){
# Line 107  void accesstrklev2(Tracklev2 & trklev2, Line 153  void accesstrklev2(Tracklev2 & trklev2,
153              ctrklev2.zv[j][i] = trklev2.zv[i][j];              ctrklev2.zv[j][i] = trklev2.zv[i][j];
154              ctrklev2.axv[j][i] = trklev2.axv[i][j];              ctrklev2.axv[j][i] = trklev2.axv[i][j];
155              ctrklev2.ayv[j][i] = trklev2.ayv[i][j];              ctrklev2.ayv[j][i] = trklev2.ayv[i][j];
             if ( j == 0 ){  
                 ctrklev2.nclsx[j] = trklev2.nclsx[j];  
                 ctrklev2.nclsy[j] = trklev2.nclsy[j];  
             };  
156          };          };
157      };      };
158  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.23