68{
70
71
72
75 char nme[64];
76 float a11, a12, a21, a22, bb1, bb2;
77 float Zoff;
78 int Zbrick [57];
79 double x0[10000];
80 double y0[10000];
82 double tx0[10000];
83 double ty0[10000];
84 double chi20[10000];
85 double P0[10000];
86 int W0[10000];
87 int Flag0[10000];
88 int MCid[10000];
89 int TRid[10000];
90 int id[10000];
91 int Pid[10000];
92 double Esim[10000];
93 int Ncand=0;
94 int trid(0), nseg, n0;
95
96
97
98 sprintf(
fname,
"linked_tracks.root");
99 file1 =
new TFile(
fname ,
"READ");
100
103 TClonesArray *as = 0;
104
105 TTree *tree= (TTree*)file1->Get("tracks");
106
107 tree->SetBranchAddress("trid",&trid);
108 tree->SetBranchAddress("nseg",&nseg);
109 tree->SetBranchAddress("n0",&n0);
110
111 b1 = tree->GetBranch("t.");
113
114 b2 = tree->GetBranch("s");
115 b2->SetAddress(&as);
116
117
118
119
120
121 int nentries = int(tree->GetEntries());
122
124 tree->GetEntry(i);
125
126 int k = as->GetEntries();
128
129
130
134 tx0[Ncand] =
s->TX();
135 ty0[Ncand] =
s->TY();
136 chi20[Ncand] =
s->Chi2();
139 Flag0[Ncand] =
s->Flag();
140 TRid[Ncand] =
s->MCEvt();
141 Esim[Ncand] =
s->P();
143 Pid[Ncand] =
s->Z()/1290+1;
144
145 Ncand++;
146 }
147
148 printf("Ncand: %f\n",Ncand);
149
150 file1->Close();
151
152
153
154
155
156
157
160
161
162 shower.
rec(num,
MAXPLATE,
DATA,Ncand,x0,y0,
z0,tx0,ty0,chi20,W0,P0,Flag0,Pid,
id,TRid,Esim,
piece2,
piece2par,UPDOWN);
163
164 gROOT->ProcessLine(".q");
165}
brick z0
Definition: RecDispMC.C:106
TTree * tr
Definition: Shower_E_FromShowerRoot.C:5
Definition: EdbShowerRec.h:25
void rec(int num, int MAXPLATE, int DATA, int Ncand, double *x0, double *y0, double *z0, double *tx0, double *ty0, int *plate0, int *id0, int *TRid, double *Esim, int *mcDigitIndexTop, int *mcDigitIndexBottom, int piece2, int piece2par, int DOWN, EdbPVRec *pvr)
OLD — not used anymore....
Definition: EdbShowerRec.cxx:317
int nentries
Definition: check_shower.C:40
s
Definition: check_shower.C:55
const char * fname
Definition: mc2raw.cxx:41