53 |
// |
// |
54 |
// |
// |
55 |
//-------------------------------------- |
//-------------------------------------- |
56 |
|
void TrkHough::Set(){ |
57 |
|
if(!Candidates)Candidates = new TClonesArray("TrkTrack"); |
58 |
|
} |
59 |
|
//-------------------------------------- |
60 |
|
// |
61 |
|
// |
62 |
|
//-------------------------------------- |
63 |
/** |
/** |
64 |
* Fills a TrkHough object with values from a struct cTrkhough (to get data from F77 common). |
* Fills a TrkHough object with values from a struct cTrkhough (to get data from F77 common). |
65 |
*/ |
*/ |
136 |
// al4[ii] = (Float_t) lc->al[ii][4]; |
// al4[ii] = (Float_t) lc->al[ii][4]; |
137 |
// } |
// } |
138 |
TrkTrack* t_track = new TrkTrack(); |
TrkTrack* t_track = new TrkTrack(); |
139 |
Candidates = new TClonesArray("TrkTrack"); |
if(!Candidates) Candidates = new TClonesArray("TrkTrack"); |
140 |
TClonesArray &t = *Candidates; |
TClonesArray &t = *Candidates; |
141 |
|
|
142 |
for(int i=0; i<lc->ntracks; i++){ |
for(int i=0; i<lc->ntracks; i++){ |
143 |
|
// cout << " - "<<i<<endl; |
144 |
t_track->seqno = i; |
t_track->seqno = i; |
145 |
t_track->image = 0; |
t_track->image = 0; |
146 |
t_track->chi2 = lc->chi2[i]; |
t_track->chi2 = lc->chi2[i]; |
188 |
//----------------------------------------------------- |
//----------------------------------------------------- |
189 |
//----------------------------------------------------- |
//----------------------------------------------------- |
190 |
}; |
}; |
191 |
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
192 |
|
// evaluated coordinates (to define GF) |
193 |
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
194 |
|
int ngf = TrkParams::nGF; |
195 |
|
float *zgf = TrkParams::zGF; |
196 |
|
Trajectory tgf = Trajectory(ngf,zgf); |
197 |
|
tgf.DoTrack(t_track->al);//<<<< integrate the trajectory |
198 |
|
for(int ip=0; ip<ngf; ip++){ |
199 |
|
t_track->xGF[ip] = tgf.x[ip]; |
200 |
|
t_track->yGF[ip] = tgf.y[ip]; |
201 |
|
} |
202 |
// if(t_track->IsSaturated())t_track->Dump(); |
// if(t_track->IsSaturated())t_track->Dump(); |
203 |
new(t[i]) TrkTrack(*t_track); |
new(t[i]) TrkTrack(*t_track); |
204 |
t_track->Clear(); |
t_track->Clear(); |
205 |
}; |
}; |
206 |
|
// cout << t.GetEntries() <<" <> "<< Candidates->GetEntries()<<endl; |
207 |
|
|
208 |
delete t_track; |
delete t_track; |
209 |
|
|