315 |
|
|
316 |
// candeleteobj = 0; |
// candeleteobj = 0; |
317 |
|
|
318 |
|
// cout << t<<"--"<<c<<"--"<<o<<"--"<<r<<"--"<< endl; |
319 |
|
|
320 |
if (t){ |
if (t){ |
321 |
trk_track = new TrkTrack(*t); |
trk_track = new TrkTrack(*t); |
322 |
trk_ext_track = new ExtTrack(*t);//NB!! ha dimensione 6 invece che 8 |
trk_ext_track = new ExtTrack(*t);//NB!! ha dimensione 6 invece che 8 |
323 |
|
}else{ |
324 |
|
trk_track = new TrkTrack(); |
325 |
|
trk_ext_track = new ExtTrack(); |
326 |
|
|
327 |
} |
} |
328 |
|
|
329 |
if (c) |
if (c) |
330 |
calo_track = new CaloTrkVar(*c); |
calo_track = new CaloTrkVar(*c); |
331 |
|
else |
332 |
|
calo_track = new CaloTrkVar(); |
333 |
|
|
334 |
if (o) |
if (o) |
335 |
tof_track = new ToFTrkVar(*o); |
tof_track = new ToFTrkVar(*o); |
336 |
|
else |
337 |
|
tof_track = new ToFTrkVar(); |
338 |
|
|
339 |
if (r) |
if (r) |
340 |
orb_track = new OrbitalInfoTrkVar(*r); |
orb_track = new OrbitalInfoTrkVar(*r); |
341 |
|
else |
342 |
|
orb_track = new OrbitalInfoTrkVar(); |
343 |
|
|
344 |
|
// cout << trk_track<<"--"<< calo_track <<"--"<<tof_track<<"--"<<orb_track<<"--"<< endl; |
345 |
|
|
346 |
candeleteobj = 1; |
candeleteobj = 1; |
347 |
|
|
348 |
} |
} |
352 |
*/ |
*/ |
353 |
PamTrack::PamTrack(ExtTrack* t, CaloTrkVar* c, ToFTrkVar* o, OrbitalInfoTrkVar *r) { |
PamTrack::PamTrack(ExtTrack* t, CaloTrkVar* c, ToFTrkVar* o, OrbitalInfoTrkVar *r) { |
354 |
|
|
355 |
|
|
356 |
|
|
357 |
trk_ext_track = 0; |
trk_ext_track = 0; |
358 |
trk_track = 0; |
trk_track = 0; |
359 |
calo_track = 0; |
calo_track = 0; |
373 |
|
|
374 |
// candeleteobj = 0; |
// candeleteobj = 0; |
375 |
|
|
376 |
|
// cout << t<<"--"<<c<<"--"<<o<<"--"<<r<<"--"<< endl; |
377 |
|
|
378 |
|
|
379 |
if (t){ |
if (t){ |
380 |
//// trk_track = new TrkTrack(*t);//in this case TrkTrack object remains null |
//// trk_track = new TrkTrack(*t);//in this case TrkTrack object remains null |
381 |
trk_ext_track = new ExtTrack(*t); |
trk_ext_track = new ExtTrack(*t); |
382 |
|
}else{ |
383 |
|
trk_ext_track = new ExtTrack(); |
384 |
} |
} |
385 |
if (c) |
if (c) |
386 |
calo_track = new CaloTrkVar(*c); |
calo_track = new CaloTrkVar(*c); |
387 |
|
else |
388 |
|
calo_track = new CaloTrkVar(); |
389 |
|
|
390 |
if (o) |
if (o) |
391 |
tof_track = new ToFTrkVar(*o); |
tof_track = new ToFTrkVar(*o); |
392 |
|
else |
393 |
|
tof_track = new ToFTrkVar(); |
394 |
|
|
395 |
if (r) |
if (r) |
396 |
orb_track = new OrbitalInfoTrkVar(*r); |
orb_track = new OrbitalInfoTrkVar(*r); |
397 |
|
else |
398 |
|
orb_track = new OrbitalInfoTrkVar(); |
399 |
|
|
400 |
|
// cout << trk_track<<"--"<< calo_track <<"--"<<tof_track<<"--"<<orb_track<<"--"<< endl; |
401 |
|
|
402 |
candeleteobj = 1; |
candeleteobj = 1; |
403 |
pscore = 0; |
pscore = 0; |
404 |
iscore = 0; |
iscore = 0; |
1986 |
// cout<<"o "<<cp<<endl; |
// cout<<"o "<<cp<<endl; |
1987 |
// cout<<"o "<<op<<endl; |
// cout<<"o "<<op<<endl; |
1988 |
|
|
1989 |
|
// cout <<"old p:"<< tp<<"--"<<cp<<"--"<<op<<"--"<<rp<<"--"<< endl; |
1990 |
|
// cout <<"old i:"<< ti<<"--"<<ci<<"--"<<oi<<"--"<<ri<<"--"<< endl; |
1991 |
|
|
1992 |
new (ttsorted[i]) PamTrack(tp, cp, op, rp); |
new (ttsorted[i]) PamTrack(tp, cp, op, rp); |
1993 |
new (ttimage[i]) PamTrack(ti, ci, oi, ri); |
new (ttimage[i]) PamTrack(ti, ci, oi, ri); |
1994 |
|
|
2016 |
issorted = true; |
issorted = true; |
2017 |
lastsorted = GetReadEntry(); |
lastsorted = GetReadEntry(); |
2018 |
|
|
2019 |
|
// cout <<" SortTracks() -- end"<<endl; |
2020 |
|
|
2021 |
} |
} |
2022 |
; |
; |
2023 |
// |
// |
2181 |
|
|
2182 |
if(doit == 0){ |
if(doit == 0){ |
2183 |
|
|
2184 |
trk2 = trk2_obj; |
trk2 = (TRK2 ? trk2_obj: NULL);; |
2185 |
calo2 = calo2_obj; |
calo2 = (CAL2 ? calo2_obj: NULL);; |
2186 |
tof2 = tof2_obj; |
tof2 = (TOF ?tof2_obj: NULL);; |
2187 |
orb2 = orb2_obj; |
orb2 = (ORB ? orb2_obj: NULL);; |
|
|
|
|
trkext = trk_ext_obj; |
|
|
caloext = calo_ext_obj; |
|
|
tofext = tof_ext_obj; |
|
|
orbext = orb_ext_obj; |
|
|
|
|
|
|
|
|
|
|
2188 |
|
|
2189 |
|
trkext = (TRK2 ? trk_ext_obj: NULL);; |
2190 |
|
caloext = (CAL2 ? calo_ext_obj: NULL);; |
2191 |
|
tofext = (TOF ?tof_ext_obj: NULL);; |
2192 |
|
orbext = (ORB ? orb_ext_obj: NULL);; |
2193 |
|
|
2194 |
}else if (doit == 1){ |
}else if (doit == 1){ |
2195 |
|
|
2196 |
if(!NUC)break; |
if(!NUC)break; |
2197 |
|
|
2198 |
|
|
2199 |
trk2 = trk2_nuc_obj; |
trk2 = (TRK2 ?trk2_nuc_obj: NULL);; |
2200 |
calo2 = calo2_nuc_obj; |
calo2 = (CAL2 ? calo2_nuc_obj: NULL);; |
2201 |
tof2 = tof2_nuc_obj; |
tof2 = (TOF ?tof2_nuc_obj: NULL);; |
2202 |
orb2 = orb2_nuc_obj; |
orb2 = (ORB ? orb2_nuc_obj: NULL);; |
2203 |
|
|
2204 |
trkext = trk_ext_nuc_obj; |
trkext = (TRK2 ?trk_ext_nuc_obj: NULL);; |
2205 |
caloext = calo_ext_nuc_obj; |
caloext = (CAL2 ? calo_ext_nuc_obj: NULL);; |
2206 |
tofext = tof_ext_nuc_obj; |
tofext = (TOF ?tof_ext_nuc_obj: NULL);; |
2207 |
orbext = orb_ext_nuc_obj; |
orbext = (ORB ? orb_ext_nuc_obj: NULL);; |
2208 |
|
|
2209 |
|
|
2210 |
|
|
2237 |
OrbitalInfoTrkVar *rs = 0; |
OrbitalInfoTrkVar *rs = 0; |
2238 |
|
|
2239 |
// get tracker tracks |
// get tracker tracks |
2240 |
TrkTrack *tp = trk2->GetTrack(i); //tracker |
TrkTrack *tp = (TRK2 ? trk2->GetTrack(i): NULL); //tracker |
2241 |
CaloTrkVar *cp = calo2->GetCaloStoredTrack(tp->GetSeqNo()); |
CaloTrkVar *cp = (CAL2 ? calo2->GetCaloStoredTrack(tp->GetSeqNo()) : NULL); |
2242 |
ToFTrkVar *op = tof2->GetToFStoredTrack(tp->GetSeqNo()); |
ToFTrkVar *op = (TOF ? tof2->GetToFStoredTrack(tp->GetSeqNo()) : NULL); |
2243 |
OrbitalInfoTrkVar *rp = orb2->GetOrbitalInfoStoredTrack(tp->GetSeqNo()); |
OrbitalInfoTrkVar *rp = (ORB ? orb2->GetOrbitalInfoStoredTrack(tp->GetSeqNo()) : NULL); |
2244 |
|
|
2245 |
|
cout << "ORB="<<ORB<<" rp="<<rp<<endl; |
2246 |
|
|
2247 |
TrkTrack *ti = 0; //tracker (image) |
TrkTrack *ti = 0; //tracker (image) |
2248 |
CaloTrkVar *ci = 0; |
CaloTrkVar *ci = 0; |
2258 |
|
|
2259 |
if (tp->HasImage()) { |
if (tp->HasImage()) { |
2260 |
|
|
2261 |
ti = trk2->GetTrackImage(i); //tracker (image) |
ti = (TRK2 ? trk2->GetTrackImage(i) : NULL); //tracker (image) |
2262 |
ci = calo2->GetCaloStoredTrack(ti->GetSeqNo()); |
ci = (CAL2 ? calo2->GetCaloStoredTrack(ti->GetSeqNo()): NULL); |
2263 |
oi = tof2->GetToFStoredTrack(ti->GetSeqNo()); |
oi = (TOF ? tof2->GetToFStoredTrack(ti->GetSeqNo()): NULL); |
2264 |
ri = orb2->GetOrbitalInfoStoredTrack(ti->GetSeqNo()); |
ri = (ORB ? orb2->GetOrbitalInfoStoredTrack(ti->GetSeqNo()): NULL); |
2265 |
|
|
2266 |
// cout << "its image "<<i << " "<<hex<< ti <<dec<< endl; |
// cout << "its image "<<i << " "<<hex<< ti <<dec<< endl; |
2267 |
|
|
2629 |
// cout<<"o "<<cp<<endl; |
// cout<<"o "<<cp<<endl; |
2630 |
// cout<<"o "<<op<<endl; |
// cout<<"o "<<op<<endl; |
2631 |
|
|
2632 |
|
// cout <<"p:"<< tp<<"--"<<cp<<"--"<<op<<"--"<<rp<<"--"<< endl; |
2633 |
|
// cout <<"i:"<< ti<<"--"<<ci<<"--"<<oi<<"--"<<ri<<"--"<< endl; |
2634 |
|
|
2635 |
|
|
2636 |
|
|
2637 |
new (ttsorted[i]) PamTrack(tp, cp, op, rp); |
new (ttsorted[i]) PamTrack(tp, cp, op, rp); |
2638 |
new (ttimage[i]) PamTrack(ti, ci, oi, ri); |
new (ttimage[i]) PamTrack(ti, ci, oi, ri); |
2639 |
|
|
2657 |
// } |
// } |
2658 |
|
|
2659 |
|
|
2660 |
// cout << "text "<<doit<<endl; |
// cout << "text "<<orbext<<endl; |
2661 |
|
|
2662 |
|
|
2663 |
//-------------------------------------------------- |
//-------------------------------------------------- |
2666 |
if(EXT){ |
if(EXT){ |
2667 |
for(int it=0; it<trkext->GetEntries(); it++){ |
for(int it=0; it<trkext->GetEntries(); it++){ |
2668 |
|
|
2669 |
new (ttext[it]) PamTrack((ExtTrack*)(*trkext)[it], (CaloTrkVar*)(*caloext)[it], (ToFTrkVar*)(*tofext)[it], (OrbitalInfoTrkVar*)(*orbext)[it]); |
// if( |
2670 |
|
// it < caloext->GetEntries() && |
2671 |
|
// it < tofext->GetEntries() && |
2672 |
|
// it < orbext->GetEntries() && |
2673 |
|
// true){ |
2674 |
|
|
2675 |
|
ExtTrack *t = (trkext ?(ExtTrack*)(*trkext)[it]:NULL ); |
2676 |
|
CaloTrkVar *c =(caloext ?(CaloTrkVar*)(*caloext)[it]:NULL ); |
2677 |
|
ToFTrkVar *o = (tofext ?(ToFTrkVar*)(*tofext)[it]:NULL ); |
2678 |
|
OrbitalInfoTrkVar *r =(orbext ?(OrbitalInfoTrkVar*)(*orbext)[it]:NULL ); |
2679 |
|
// cout <<"ext:"<< t<<"--"<<c<<"--"<<o<<"--"<<r<<"--"<< endl; |
2680 |
|
|
2681 |
|
new (ttext[it]) PamTrack(t, c, o, r); |
2682 |
|
// }else{ |
2683 |
|
// cout << " PamLevel2::SortTracksNew() --> ORRORE E RACCAPRICCIO!!!"<<endl; |
2684 |
|
// cout << " trk ext-tracks = "<<trkext->GetEntries()<<endl; |
2685 |
|
// cout << " calo ext-tracks = "<<caloext->GetEntries()<<endl; |
2686 |
|
// cout << " tof ext-tracks = "<<tofext->GetEntries()<<endl; |
2687 |
|
// cout << " orb ext-tracks = "<<orbext->GetEntries()<<endl; |
2688 |
|
// } |
2689 |
} |
} |
2690 |
} |
} |
2691 |
|
|
2692 |
|
// cout <<" SortTracksNew() -- end"<<endl; |
2693 |
|
|
2694 |
|
|
2695 |
}; |
}; |
4127 |
isFragment = false; |
isFragment = false; |
4128 |
run_tree->GetEntry(irun); |
run_tree->GetEntry(irun); |
4129 |
if (!GetOrbitalInfo()) |
if (!GetOrbitalInfo()) |
4130 |
cout << "** WARNING ** missing OrbitalInfo ---> run info might be not correctly updated " << endl; |
cout << "PamLevel2::UpdateRunInfo(Long64_t "<<iev<<") ** WARNING ** missing OrbitalInfo ORB="<<ORB << endl; |
4131 |
if ( fUseDBinRunInfo ){ |
if ( fUseDBinRunInfo ){ |
4132 |
if (gltsync) |
if (gltsync) |
4133 |
delete gltsync; //Emiliano |
delete gltsync; //Emiliano |