270 |
/** |
/** |
271 |
* Fills a TrkLevel2 object with values from a struct cTrkLevel2 (to get data from F77 common). |
* Fills a TrkLevel2 object with values from a struct cTrkLevel2 (to get data from F77 common). |
272 |
*/ |
*/ |
273 |
void TrkLevel2::FillCommonVar(cTrkLevel2 *l2){ |
void TrkLevel2::SetFromLevel2Struct(cTrkLevel2 *l2){ |
274 |
// |
// |
275 |
// Track = new TClonesArray("TrkTrack"); |
// Track = new TClonesArray("TrkTrack"); |
276 |
// SingletX = new TClonesArray("TrkSinglet"); |
// SingletX = new TClonesArray("TrkSinglet"); |
337 |
delete t_track; |
delete t_track; |
338 |
delete t_singlet; |
delete t_singlet; |
339 |
} |
} |
340 |
|
/** |
341 |
|
* Fills a struct cTrkLevel2 with values from a TrkLevel2 object (to put data into a F77 common). |
342 |
|
*/ |
343 |
|
|
344 |
|
void TrkLevel2::GetLevel2Struct(cTrkLevel2 *l2) const { |
345 |
|
|
346 |
|
// general variables |
347 |
|
l2->good2 = good2 ; |
348 |
|
for(Int_t i=0; i<12 ; i++){ |
349 |
|
l2->crc[i] = crc[i]; |
350 |
|
}; |
351 |
|
// *** TRACKS *** |
352 |
|
|
353 |
|
l2->ntrk = Track->GetEntries(); |
354 |
|
for(Int_t i=0;i<l2->ntrk;i++){ |
355 |
|
l2->image[i] = 1 + ((TrkTrack *)Track->At(i))->image; |
356 |
|
l2->chi2_nt[i] = ((TrkTrack *)Track->At(i))->chi2; |
357 |
|
for(int it1=0;it1<5;it1++){ |
358 |
|
l2->al_nt[i][it1] = ((TrkTrack *)Track->At(i))->al[it1]; |
359 |
|
for(int it2=0;it2<5;it2++) |
360 |
|
l2->coval[i][it2][it1] = ((TrkTrack *)Track->At(i))->coval[it1][it2]; |
361 |
|
}; |
362 |
|
for(int ip=0;ip<6;ip++){ |
363 |
|
l2->xgood_nt[i][ip] = ((TrkTrack *)Track->At(i))->xgood[ip]; |
364 |
|
l2->ygood_nt[i][ip] = ((TrkTrack *)Track->At(i))->ygood[ip]; |
365 |
|
l2->xm_nt[i][ip] = ((TrkTrack *)Track->At(i))->xm[ip]; |
366 |
|
l2->ym_nt[i][ip] = ((TrkTrack *)Track->At(i))->ym[ip]; |
367 |
|
l2->zm_nt[i][ip] = ((TrkTrack *)Track->At(i))->zm[ip]; |
368 |
|
l2->resx_nt[i][ip] = ((TrkTrack *)Track->At(i))->resx[ip]; |
369 |
|
l2->resy_nt[i][ip] = ((TrkTrack *)Track->At(i))->resy[ip]; |
370 |
|
l2->xv_nt[i][ip] = ((TrkTrack *)Track->At(i))->xv[ip]; |
371 |
|
l2->yv_nt[i][ip] = ((TrkTrack *)Track->At(i))->yv[ip]; |
372 |
|
l2->zv_nt[i][ip] = ((TrkTrack *)Track->At(i))->zv[ip]; |
373 |
|
l2->axv_nt[i][ip] = ((TrkTrack *)Track->At(i))->axv[ip]; |
374 |
|
l2->ayv_nt[i][ip] = ((TrkTrack *)Track->At(i))->ayv[ip]; |
375 |
|
l2->dedx_x[i][ip] = ((TrkTrack *)Track->At(i))->dedx_x[ip]; |
376 |
|
l2->dedx_y[i][ip] = ((TrkTrack *)Track->At(i))->dedx_y[ip]; |
377 |
|
}; |
378 |
|
} |
379 |
|
|
380 |
|
// *** SINGLETS *** |
381 |
|
l2->nclsx = SingletX->GetEntries(); |
382 |
|
for(Int_t i=0;i<l2->nclsx;i++){ |
383 |
|
l2->planex[i] = ((TrkSinglet *)SingletX->At(i))->plane; |
384 |
|
l2->xs[i][0] = ((TrkSinglet *)SingletX->At(i))->coord[0]; |
385 |
|
l2->xs[i][1] = ((TrkSinglet *)SingletX->At(i))->coord[1]; |
386 |
|
l2->signlxs[i] = ((TrkSinglet *)SingletX->At(i))->sgnl; |
387 |
|
} |
388 |
|
l2->nclsy = SingletY->GetEntries(); |
389 |
|
for(Int_t i=0;i<l2->nclsy;i++){ |
390 |
|
l2->planey[i] = ((TrkSinglet *)SingletY->At(i))->plane; |
391 |
|
l2->ys[i][0] = ((TrkSinglet *)SingletY->At(i))->coord[0]; |
392 |
|
l2->ys[i][1] = ((TrkSinglet *)SingletY->At(i))->coord[1]; |
393 |
|
l2->signlys[i] = ((TrkSinglet *)SingletY->At(i))->sgnl; |
394 |
|
} |
395 |
|
} |
396 |
//-------------------------------------- |
//-------------------------------------- |
397 |
// |
// |
398 |
// |
// |