280 |
CaloTrkVar *calotrack = (CaloTrkVar*)t[itrk]; |
CaloTrkVar *calotrack = (CaloTrkVar*)t[itrk]; |
281 |
return calotrack; |
return calotrack; |
282 |
} |
} |
283 |
|
|
284 |
|
/** |
285 |
|
* Retrieves the calorimeter track matching the seqno-th tracker stored track. |
286 |
|
* (If seqno = -1 retrieves the self-trigger calorimeter track) |
287 |
|
*/ |
288 |
|
CaloTrkVar *CaloLevel2::GetCaloStoredTrack(int seqno){ |
289 |
|
|
290 |
|
if( ntrk()==0 ){ |
291 |
|
printf("CaloLevel2::GetCaloStoredTrack(int) : requested tracker SeqNo %i but no Calorimeter tracks are stored\n",seqno); |
292 |
|
return NULL; |
293 |
|
}; |
294 |
|
|
295 |
|
CaloTrkVar *c = 0; |
296 |
|
Int_t it_calo=0; |
297 |
|
|
298 |
|
do { |
299 |
|
c = GetCaloTrkVar(it_calo); |
300 |
|
it_calo++; |
301 |
|
} while( c && seqno != c->trkseqno && it_calo < ntrk()); |
302 |
|
|
303 |
|
if(!c || seqno != c->trkseqno){ |
304 |
|
c = 0; |
305 |
|
if(seqno!=-1 && seqno !=-2 && seqno!=-3 ) printf("CaloLevel2::GetCaloStoredTrack(int) : requested tracker SeqNo %i does not match Calorimeter stored tracks\n",seqno); |
306 |
|
}; |
307 |
|
return c; |
308 |
|
|
309 |
|
}; |