| 371 |
|
|
| 372 |
} |
} |
| 373 |
; |
; |
| 374 |
|
|
| 375 |
PamTrack::PamTrack(const PamTrack& track) { |
PamTrack::PamTrack(const PamTrack& track) { |
| 376 |
|
|
| 377 |
TrkTrack *t = track.trk_track; |
TrkTrack *t = track.trk_track; |
| 378 |
|
ExtTrack *e = track.trk_ext_track; |
| 379 |
CaloTrkVar *c = track.calo_track; |
CaloTrkVar *c = track.calo_track; |
| 380 |
ToFTrkVar *o = track.tof_track; |
ToFTrkVar *o = track.tof_track; |
| 381 |
OrbitalInfoTrkVar *r = track.orb_track; |
OrbitalInfoTrkVar *r = track.orb_track; |
| 382 |
|
|
| 383 |
trk_track = 0; |
trk_ext_track = 0; |
| 384 |
calo_track = 0; |
trk_track = 0; |
| 385 |
tof_track = 0; |
calo_track = 0; |
| 386 |
orb_track = 0; |
tof_track = 0; |
| 387 |
|
orb_track = 0; |
| 388 |
|
if(e) |
| 389 |
|
trk_ext_track = new ExtTrack(*e); |
| 390 |
if (t) |
if (t) |
| 391 |
trk_track = new TrkTrack(*t); |
trk_track = new TrkTrack(*t); |
| 392 |
if (c) |
if (c) |
| 395 |
tof_track = new ToFTrkVar(*o); |
tof_track = new ToFTrkVar(*o); |
| 396 |
if (r) |
if (r) |
| 397 |
orb_track = new OrbitalInfoTrkVar(*r); |
orb_track = new OrbitalInfoTrkVar(*r); |
| 398 |
|
|
| 399 |
candeleteobj = 1; |
candeleteobj = 1; |
| 400 |
pscore = 0; |
pscore = 0; |
| 401 |
iscore = 0; |
iscore = 0; |
| 402 |
|
|
| 403 |
} |
} |
|
void PamTrack::Clear() { |
|
| 404 |
|
|
| 405 |
// cout << "PamTrack::Clear() "<<candeleteobj<<endl; |
void PamTrack::Copy( PamTrack& track) const { |
| 406 |
|
|
| 407 |
|
track.trk_track = trk_track; |
| 408 |
|
track.trk_ext_track = trk_ext_track; |
| 409 |
|
track.calo_track = calo_track; |
| 410 |
|
track.tof_track = tof_track; |
| 411 |
|
track.orb_track = orb_track; |
| 412 |
|
|
| 413 |
|
track.candeleteobj = candeleteobj; |
| 414 |
|
track.pscore = pscore; |
| 415 |
|
track.iscore = iscore; |
| 416 |
|
|
| 417 |
|
} |
| 418 |
|
|
| 419 |
|
|
| 420 |
|
|
| 421 |
|
void PamTrack::Clear(Option_t *option) { |
| 422 |
|
|
| 423 |
|
// cout << "PamTrack::Clear( "<<option<<" ) "<<candeleteobj<<endl; |
| 424 |
if (candeleteobj) { |
if (candeleteobj) { |
| 425 |
|
|
| 426 |
if (trk_ext_track) |
if (trk_ext_track) |
| 427 |
trk_ext_track->ExtTrack::Clear(); |
trk_ext_track->ExtTrack::Clear(option); |
| 428 |
if (trk_track) |
if (trk_track) |
| 429 |
trk_track->TrkTrack::Clear(); |
trk_track->TrkTrack::Clear(); |
| 430 |
if (calo_track) |
if (calo_track) |
| 449 |
// cout << "PamTrack::Delete() "<<candeleteobj<<endl; |
// cout << "PamTrack::Delete() "<<candeleteobj<<endl; |
| 450 |
if (candeleteobj) { |
if (candeleteobj) { |
| 451 |
if (trk_ext_track) { |
if (trk_ext_track) { |
| 452 |
trk_ext_track->ExtTrack::Clear(); |
// trk_ext_track->ExtTrack::Clear("C");//Clear is called for all the array elements |
| 453 |
|
trk_ext_track->ExtTrack::Clear("C+C");//Clear is called for all the array elements passing option 'C' |
| 454 |
delete trk_ext_track; |
delete trk_ext_track; |
| 455 |
} |
} |
| 456 |
if (trk_track) { |
if (trk_track) { |
| 585 |
|
|
| 586 |
run_obj = 0;//new GL_RUN(); |
run_obj = 0;//new GL_RUN(); |
| 587 |
soft_obj = 0;// Emiliano |
soft_obj = 0;// Emiliano |
| 588 |
|
proc_obj = 0;// Emiliano |
| 589 |
irun = -1LL; |
irun = -1LL; |
| 590 |
irunt = -1LL; |
irunt = -1LL; |
| 591 |
totrunentry = 0LL; |
totrunentry = 0LL; |
| 596 |
gltsync = 0; // Emiliano |
gltsync = 0; // Emiliano |
| 597 |
fUpdateRunInfo = true; // Emiliano |
fUpdateRunInfo = true; // Emiliano |
| 598 |
fUseDBinRunInfo = true; // Emiliano |
fUseDBinRunInfo = true; // Emiliano |
| 599 |
|
fDiscarded = false; //EM |
| 600 |
isSync = false; // by default assume that the level2 file(s) is(are) not sinchronized between L0/DB and L2, that is we miss some packets in L2 due to nested/DV-skipped events |
isSync = false; // by default assume that the level2 file(s) is(are) not sinchronized between L0/DB and L2, that is we miss some packets in L2 due to nested/DV-skipped events |
| 601 |
il0entry = 0LL; |
il0entry = 0LL; |
| 602 |
// hasL0EE = true; |
// hasL0EE = true; |
| 612 |
|
|
| 613 |
run_tree = NULL; |
run_tree = NULL; |
| 614 |
run_tree_clone = NULL; |
run_tree_clone = NULL; |
| 615 |
|
|
| 616 |
|
proc_tree = NULL; |
| 617 |
|
proc_tree_clone = NULL; |
| 618 |
|
|
| 619 |
sel_tree = NULL; |
sel_tree = NULL; |
| 620 |
sel_tree_clone = NULL; |
sel_tree_clone = NULL; |
| 621 |
|
|
| 647 |
if (strcmp(pamdbpsw, "")) |
if (strcmp(pamdbpsw, "")) |
| 648 |
psw = pamdbpsw; |
psw = pamdbpsw; |
| 649 |
|
|
| 650 |
|
customString = ""; |
| 651 |
|
|
| 652 |
// sorted_tracks = 0;//new TRefArray(); |
// sorted_tracks = 0;//new TRefArray(); |
| 653 |
|
|
| 654 |
CAL0 = false; |
CAL0 = false; |
| 665 |
ND = true; |
ND = true; |
| 666 |
AC = true; |
AC = true; |
| 667 |
ORB = true; |
ORB = true; |
| 668 |
|
PROC = true; |
| 669 |
GP = false; |
GP = false; |
| 670 |
|
|
| 671 |
EXT = false; |
EXT = false; |
| 672 |
NUC = false; |
NUC = false; |
| 673 |
trkAlg = "";//default tracking algorythm |
trkAlg = "STD";//default tracking algorythm |
| 674 |
|
|
| 675 |
RUN = true; |
RUN = true; |
| 676 |
|
|
| 708 |
delete run_obj; |
delete run_obj; |
| 709 |
if (soft_obj) |
if (soft_obj) |
| 710 |
delete soft_obj; //Emiliano |
delete soft_obj; //Emiliano |
| 711 |
|
if (proc_obj) |
| 712 |
|
delete proc_obj; //Emiliano |
| 713 |
|
|
| 714 |
// cout << "void PamLevel2::Clear()"<<endl; |
// cout << "void PamLevel2::Clear()"<<endl; |
| 715 |
if (h0_obj) |
if (h0_obj) |
| 910 |
orb2_obj->Clear(); |
orb2_obj->Clear(); |
| 911 |
if (gp_obj) |
if (gp_obj) |
| 912 |
gp_obj->Clear(); |
gp_obj->Clear(); |
| 913 |
|
if (proc_obj) |
| 914 |
|
proc_obj->Clear(); |
| 915 |
|
|
| 916 |
// if(sorted_tracks)sorted_tracks->Clear(); |
// if(sorted_tracks)sorted_tracks->Clear(); |
| 917 |
// sorted_tracks.Clear(); |
// sorted_tracks.Clear(); |
| 992 |
if (sel_tree) |
if (sel_tree) |
| 993 |
sel_tree->Delete();; |
sel_tree->Delete();; |
| 994 |
sel_tree = NULL; |
sel_tree = NULL; |
| 995 |
|
|
| 996 |
|
if (proc_tree) |
| 997 |
|
proc_tree->Delete(); |
| 998 |
|
proc_tree = NULL; |
| 999 |
// |
// |
| 1000 |
// Close file |
// Close file |
| 1001 |
// |
// |
| 1019 |
ac_obj = 0; |
ac_obj = 0; |
| 1020 |
orb2_obj = 0; |
orb2_obj = 0; |
| 1021 |
gp_obj = 0; |
gp_obj = 0; |
| 1022 |
|
proc_obj = 0; |
| 1023 |
|
|
| 1024 |
trk_ext_obj = 0; |
trk_ext_obj = 0; |
| 1025 |
trk_ext_nuc_obj = 0; |
trk_ext_nuc_obj = 0; |
| 1051 |
// |
// |
| 1052 |
run_obj = 0;//new GL_RUN(); |
run_obj = 0;//new GL_RUN(); |
| 1053 |
soft_obj = 0;// Emiliano |
soft_obj = 0;// Emiliano |
| 1054 |
|
proc_obj = 0;// Emiliano |
| 1055 |
irun = -1; |
irun = -1; |
| 1056 |
irunt = -1; |
irunt = -1; |
| 1057 |
totrunentry = 0LL; |
totrunentry = 0LL; |
| 1226 |
if (!objname.CompareTo("SoftInfo")) |
if (!objname.CompareTo("SoftInfo")) |
| 1227 |
return &soft_obj; // Emiliano |
return &soft_obj; // Emiliano |
| 1228 |
|
|
| 1229 |
|
if (!objname.CompareTo("ProcInfo")){ |
| 1230 |
|
if (!proc_obj) |
| 1231 |
|
proc_obj = new ProcInfo(); |
| 1232 |
|
return &proc_obj; // Emiliano |
| 1233 |
|
} |
| 1234 |
|
|
| 1235 |
return NULL; |
return NULL; |
| 1236 |
} |
} |
| 1237 |
; |
; |
| 1249 |
return 0; |
return 0; |
| 1250 |
|
|
| 1251 |
if (calo2_obj->CaloLevel2::ntrk() == 0) { |
if (calo2_obj->CaloLevel2::ntrk() == 0) { |
| 1252 |
cout << "PamLevel2::GetCaloStoredTrack(int) : requested tracker SeqNo " << seqno |
if( seqno >=0 ){ |
| 1253 |
<< " but no Calorimeter tracks are stored" << endl; |
cout << "PamLevel2::GetCaloStoredTrack(int) : requested tracker SeqNo " << seqno; |
| 1254 |
return NULL; |
cout << " but no Calorimeter tracks are stored" << endl; |
| 1255 |
|
} |
| 1256 |
|
return NULL; |
| 1257 |
}; |
}; |
| 1258 |
|
|
| 1259 |
CaloTrkVar *c = 0; |
CaloTrkVar *c = 0; |
| 1266 |
|
|
| 1267 |
if (!c || seqno != c->trkseqno) { |
if (!c || seqno != c->trkseqno) { |
| 1268 |
c = 0; |
c = 0; |
| 1269 |
if (seqno != -1) |
if (seqno != -1 && seqno>=0) |
| 1270 |
cout << "PamLevel2::GetCaloStoredTrack(int) : requested tracker SeqNo " << seqno |
cout << "PamLevel2::GetCaloStoredTrack(int) : requested tracker SeqNo " << seqno |
| 1271 |
<< " does not match Calorimeter stored tracks" << endl; |
<< " does not match Calorimeter stored tracks" << endl; |
| 1272 |
}; |
}; |
| 1385 |
// |
// |
| 1386 |
// |
// |
| 1387 |
//-------------------------------------- |
//-------------------------------------- |
| 1388 |
/** |
// /** |
| 1389 |
* Give the pamela track associated to a tracker track, retrieving related calorimeter, orbitalinfo and tof track information. |
// * Give the pamela track associated to a tracker track, retrieving related calorimeter, orbitalinfo and tof track information. |
| 1390 |
*/ |
// */ |
| 1391 |
PamTrack* PamLevel2::GetPamTrackAlong(TrkTrack* t) { |
// PamTrack* PamLevel2::GetPamTrackAlong(TrkTrack* t) { |
| 1392 |
|
|
| 1393 |
cout << "PamLevel2::GetPamTrackAlong(TrkTrack* t) **obsolete** " << endl; |
// cout << "PamLevel2::GetPamTrackAlong(TrkTrack* t) **obsolete** " << endl; |
| 1394 |
cout << "(if you use it, remember to delete the PamTrack object)" << endl; |
// cout << "(if you use it, remember to delete the PamTrack object)" << endl; |
| 1395 |
|
|
| 1396 |
CaloTrkVar *c = 0; |
// CaloTrkVar *c = 0; |
| 1397 |
ToFTrkVar *o = 0; |
// ToFTrkVar *o = 0; |
| 1398 |
OrbitalInfoTrkVar *r = 0; |
// OrbitalInfoTrkVar *r = 0; |
| 1399 |
|
|
| 1400 |
if (CAL2) |
// if (CAL2) |
| 1401 |
c = GetCaloStoredTrack(t->GetSeqNo()); |
// c = GetCaloStoredTrack(t->GetSeqNo()); |
| 1402 |
if (TOF) |
// if (TOF) |
| 1403 |
o = GetToFStoredTrack(t->GetSeqNo()); |
// o = GetToFStoredTrack(t->GetSeqNo()); |
| 1404 |
if (ORB) |
// if (ORB) |
| 1405 |
r = GetOrbitalInfoStoredTrack(t->GetSeqNo()); |
// r = GetOrbitalInfoStoredTrack(t->GetSeqNo()); |
| 1406 |
|
|
| 1407 |
// if(t && c && o)track = new PamTrack(t,c,o); |
// // if(t && c && o)track = new PamTrack(t,c,o); |
| 1408 |
PamTrack *track = new PamTrack(t, c, o, r); |
// PamTrack *track = new PamTrack(t, c, o, r); |
| 1409 |
|
|
| 1410 |
return track; |
// return track; |
| 1411 |
|
|
| 1412 |
} |
// } |
| 1413 |
; |
// ; |
| 1414 |
//-------------------------------------- |
//-------------------------------------- |
| 1415 |
// |
// |
| 1416 |
// |
// |
| 1417 |
//-------------------------------------- |
//-------------------------------------- |
| 1418 |
/** |
// /** |
| 1419 |
* Retrieves the it-th stored track. |
// * Retrieves the it-th stored track. |
| 1420 |
* It override TrkLevel2::GetTrack(int it). |
// * It override TrkLevel2::GetTrack(int it). |
| 1421 |
* @param itrk Track number, ranging from 0 to GetNTracks(). |
// * @param itrk Track number, ranging from 0 to GetNTracks(). |
| 1422 |
*/ |
// */ |
| 1423 |
|
|
| 1424 |
PamTrack* PamLevel2::GetStoredTrack(Int_t itrk) { |
// PamTrack* PamLevel2::GetStoredTrack(Int_t itrk) { |
| 1425 |
|
|
| 1426 |
|
// cout << "PamLevel2::GetStoredTrack(Int_t itrk) **to-be-updated** " << endl; |
| 1427 |
|
// cout |
| 1428 |
|
// << "for the moment, better use separately the methods: TrkLevel2::GetStoredTrack(seqno) CaloLevel2::GetCaloTrkVar(Int_t notrack) ToFLevel2::GetToFTrkVar(Int_t notrack) OrbitalInfo::GetOrbitalInfoTrkVar(Int_t notrack)" |
| 1429 |
|
// << endl; |
| 1430 |
|
// cout << "(if you use it, remember to delete the PamTrack object)" << endl; |
| 1431 |
|
// PamTrack *track = 0; |
| 1432 |
|
|
| 1433 |
cout << "PamLevel2::GetStoredTrack(Int_t itrk) **to-be-updated** " << endl; |
// if (itrk >= 0 && itrk < trk2_obj->TrkLevel2::ntrk()) { |
|
cout |
|
|
<< "for the moment, better use separately the methods: TrkLevel2::GetStoredTrack(seqno) CaloLevel2::GetCaloTrkVar(Int_t notrack) ToFLevel2::GetToFTrkVar(Int_t notrack) OrbitalInfo::GetOrbitalInfoTrkVar(Int_t notrack)" |
|
|
<< endl; |
|
|
cout << "(if you use it, remember to delete the PamTrack object)" << endl; |
|
|
PamTrack *track = 0; |
|
| 1434 |
|
|
| 1435 |
if (itrk >= 0 && itrk < trk2_obj->TrkLevel2::ntrk()) { |
// TrkTrack *t = trk2_obj->TrkLevel2::GetStoredTrack(itrk); |
| 1436 |
|
// track = GetPamTrackAlong(t); |
| 1437 |
|
|
| 1438 |
TrkTrack *t = trk2_obj->TrkLevel2::GetStoredTrack(itrk); |
// } |
| 1439 |
track = GetPamTrackAlong(t); |
// else { |
| 1440 |
|
// cout << "PamLevel2::GetStoredTrack(int) : tracker track SeqNo " << itrk << " does not exist (GetNTracks() = " |
| 1441 |
} |
// << trk2_obj->TrkLevel2::GetNTracks() << ")" << endl; |
| 1442 |
else { |
// }; |
|
cout << "PamLevel2::GetStoredTrack(int) : tracker track SeqNo " << itrk << " does not exist (GetNTracks() = " |
|
|
<< trk2_obj->TrkLevel2::GetNTracks() << ")" << endl; |
|
|
}; |
|
| 1443 |
|
|
| 1444 |
return track; |
// return track; |
| 1445 |
|
|
| 1446 |
} |
// } |
| 1447 |
//-------------------------------------- |
//-------------------------------------- |
| 1448 |
// |
// |
| 1449 |
|
|
| 1497 |
Int_t ObjectNumber = TProcessID::GetObjectCount(); |
Int_t ObjectNumber = TProcessID::GetObjectCount(); |
| 1498 |
|
|
| 1499 |
// create TCloneArrays to store tracks and its images |
// create TCloneArrays to store tracks and its images |
| 1500 |
if (!tsorted) |
// if (!tsorted) |
| 1501 |
tsorted = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
// tsorted = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
| 1502 |
tsorted->Delete(); |
// tsorted->Clear("C+C");//Delete(); |
| 1503 |
TClonesArray &ttsorted = *tsorted; |
// if (!timage) |
| 1504 |
|
// timage = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
| 1505 |
|
// timage->Clear("C+C");//Delete(); |
| 1506 |
|
|
| 1507 |
|
if(tsorted)delete tsorted; |
| 1508 |
|
if(timage) delete timage; |
| 1509 |
|
tsorted = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
| 1510 |
|
timage = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
| 1511 |
|
|
| 1512 |
if (!timage) |
|
| 1513 |
timage = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
TClonesArray &ttsorted = *tsorted; |
|
timage->Delete(); |
|
| 1514 |
TClonesArray &ttimage = *timage; |
TClonesArray &ttimage = *timage; |
| 1515 |
|
|
| 1516 |
|
|
| 2046 |
//----------------------------------------------------------- |
//----------------------------------------------------------- |
| 2047 |
// create/reset TCloneArrays to store tracks and their images |
// create/reset TCloneArrays to store tracks and their images |
| 2048 |
//----------------------------------------------------------- |
//----------------------------------------------------------- |
| 2049 |
|
|
| 2050 |
|
// cout << " PamLevel2::SortTracksNew() --- Clear TClonesArray objects"<<endl; |
| 2051 |
|
|
| 2052 |
// main tracks from standard alg |
// main tracks from standard alg |
| 2053 |
if (!tsorted) |
// if (!tsorted) |
| 2054 |
tsorted = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
// tsorted = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
| 2055 |
tsorted->Delete(); |
// tsorted->Clear("C+C");//Delete(); |
| 2056 |
// track images from standard alg |
// // track images from standard alg |
| 2057 |
if (!timage) |
// if (!timage) |
| 2058 |
timage = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
// timage = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
| 2059 |
timage->Delete(); |
// timage->Clear("C+C");//Delete(); |
| 2060 |
// tracks from extended algorythm |
// // tracks from extended algorythm |
| 2061 |
if(EXT && !text) |
// if(EXT && !text) |
| 2062 |
text = new TClonesArray("PamTrack",trk_ext_obj->GetEntries()); |
// text = new TClonesArray("PamTrack",trk_ext_obj->GetEntries()); |
| 2063 |
if(text)text->Delete(); |
// if(text)text->Clear("C+C");//Delete(); |
| 2064 |
|
|
| 2065 |
|
if(tsorted)delete tsorted; |
| 2066 |
|
if(timage) delete timage; |
| 2067 |
|
if(text) delete text; |
| 2068 |
|
tsorted = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
| 2069 |
|
timage = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
| 2070 |
|
text = new TClonesArray("PamTrack",trk_ext_obj->GetEntries()); |
| 2071 |
|
|
| 2072 |
//----------------------------------------------------------- |
//----------------------------------------------------------- |
| 2073 |
// create/reset TCloneArrays to store tracks and their images |
// create/reset TCloneArrays to store tracks and their images |
| 2074 |
//----------------------------------------------------------- |
//----------------------------------------------------------- |
| 2075 |
if(NUC){ |
if(NUC){ |
| 2076 |
|
|
| 2077 |
|
|
| 2078 |
|
if(tsorted_nuc)delete tsorted_nuc; |
| 2079 |
|
if(timage_nuc) delete timage_nuc; |
| 2080 |
|
if(text_nuc) delete text_nuc; |
| 2081 |
|
tsorted_nuc = new TClonesArray("PamTrack", trk2_nuc_obj->GetNTracks()); |
| 2082 |
|
timage_nuc = new TClonesArray("PamTrack", trk2_nuc_obj->GetNTracks()); |
| 2083 |
|
text_nuc = new TClonesArray("PamTrack",trk_ext_nuc_obj->GetEntries()); |
| 2084 |
|
|
| 2085 |
// main tracks from standard alg |
// main tracks from standard alg |
| 2086 |
if (!tsorted_nuc) |
// if (!tsorted_nuc) |
| 2087 |
tsorted_nuc = new TClonesArray("PamTrack", trk2_nuc_obj->GetNTracks()); |
// tsorted_nuc = new TClonesArray("PamTrack", trk2_nuc_obj->GetNTracks()); |
| 2088 |
tsorted_nuc->Delete(); |
// tsorted_nuc->Clear("C+C");//Delete(); |
| 2089 |
// track images from standard alg |
// // track images from standard alg |
| 2090 |
if (!timage_nuc) |
// if (!timage_nuc) |
| 2091 |
timage_nuc = new TClonesArray("PamTrack", trk2_nuc_obj->GetNTracks()); |
// timage_nuc = new TClonesArray("PamTrack", trk2_nuc_obj->GetNTracks()); |
| 2092 |
timage_nuc->Delete(); |
// timage_nuc->Clear("C+C");//Delete(); |
| 2093 |
// tracks from extended algorythm |
// // tracks from extended algorythm |
| 2094 |
if(EXT && !text_nuc) |
// if(EXT && !text_nuc) |
| 2095 |
text_nuc = new TClonesArray("PamTrack",trk_ext_nuc_obj->GetEntries()); |
// text_nuc = new TClonesArray("PamTrack",trk_ext_nuc_obj->GetEntries()); |
| 2096 |
if(text_nuc)text_nuc->Delete(); |
// if(text_nuc)text_nuc->Clear("C+C");//Delete(); |
| 2097 |
|
|
| 2098 |
} |
} |
| 2099 |
//-------------------------------------------------- |
//-------------------------------------------------- |
| 2100 |
// retrieve sorting method |
// retrieve sorting method |
| 2656 |
/** |
/** |
| 2657 |
* This method overrides TrkLevel2::GetTracks(), where sorting is done by decreasing number of fit points and increasing chi^2. |
* This method overrides TrkLevel2::GetTracks(), where sorting is done by decreasing number of fit points and increasing chi^2. |
| 2658 |
* PamLevel2::GetTracks() keeps the same track order given by TrkLevel2::GetTracks(), but checks image selection by using calorimeter and ToF tracking information. |
* PamLevel2::GetTracks() keeps the same track order given by TrkLevel2::GetTracks(), but checks image selection by using calorimeter and ToF tracking information. |
| 2659 |
/* |
*/ |
| 2660 |
|
|
| 2661 |
// TRefArray *PamLevel2::GetTracks(){ |
// TRefArray *PamLevel2::GetTracks(){ |
| 2662 |
|
|
| 2674 |
// |
// |
| 2675 |
// |
// |
| 2676 |
//-------------------------------------- |
//-------------------------------------- |
| 2677 |
|
|
| 2678 |
/** |
/** |
| 2679 |
* Retrieves the it-th Pamela "physical" track. |
* Retrieves the it-th Pamela "physical" track. |
| 2680 |
* It override TrkLevel2::GetTrack(int it). |
* It override TrkLevel2::GetTrack(int it). |
| 2681 |
* @param it Track number, ranging from 0 to GetNTracks(). |
* @param it Track number, ranging from 0 to GetNTracks(). |
| 2682 |
*/ |
*/ |
| 2683 |
PamTrack *PamLevel2::GetTrack(int it) { |
PamTrack *PamLevel2::GetTrackOld(int it) { |
| 2684 |
|
|
| 2685 |
PamTrack *track = NULL; |
PamTrack *track = NULL; |
| 2686 |
|
|
| 2689 |
// *-*-*-*-*-*-*-*-*-*-*-*-* |
// *-*-*-*-*-*-*-*-*-*-*-*-* |
| 2690 |
if (!tsorted) |
if (!tsorted) |
| 2691 |
return track; |
return track; |
| 2692 |
if (!tsorted->GetEntries()) |
// if (!tsorted->GetEntries()) |
| 2693 |
|
// return track; |
| 2694 |
|
if (tsorted->GetEntries()==0) |
| 2695 |
return track; |
return track; |
| 2696 |
|
|
| 2697 |
|
|
| 2698 |
if (it >= 0 && it < trk2_obj->TrkLevel2::GetNTracks()) { |
if ( |
| 2699 |
track = (PamTrack*)((*tsorted)[it]); |
tsorted && |
| 2700 |
|
it >= 0 && |
| 2701 |
|
it < trk2_obj->TrkLevel2::GetNTracks() && |
| 2702 |
|
it < tsorted->GetEntries() && |
| 2703 |
|
true) { |
| 2704 |
|
track = (PamTrack*)((*tsorted)[it]); |
| 2705 |
} |
} |
| 2706 |
else { |
else { |
| 2707 |
cout << "PamLevel2::GetTrack(int) : tracker track SeqNo " << it << " does not exist (GetNTracks() = " |
cout << "PamLevel2::GetTrackOld(int) : tracker track SeqNo " << it << " does not exist (GetNTracks() = " |
| 2708 |
<< trk2_obj->TrkLevel2::GetNTracks() << ")" << endl; |
<< trk2_obj->TrkLevel2::GetNTracks() << ")" << endl; |
| 2709 |
}; |
}; |
| 2710 |
|
|
| 2720 |
* @param it Track number, ranging from 0 to GetNTracks(). |
* @param it Track number, ranging from 0 to GetNTracks(). |
| 2721 |
* @param alg Algorythm, see SetTrakingAlgorythm(char *alg) for explanation. |
* @param alg Algorythm, see SetTrakingAlgorythm(char *alg) for explanation. |
| 2722 |
*/ |
*/ |
| 2723 |
PamTrack *PamLevel2::GetTrack(int it, char* alg) { |
PamTrack *PamLevel2::GetTrack(int it, const char* alg) { |
| 2724 |
|
|
| 2725 |
TString s(alg); |
TString s(alg); |
| 2726 |
if(!s.CompareTo("") ||!s.CompareTo("STD") )return GetTrack(it); //old algorythm |
if(!s.CompareTo("") ||!s.CompareTo("STD") )return GetTrackOld(it); //old algorythm |
| 2727 |
|
|
| 2728 |
|
|
| 2729 |
SortTracksNew(); |
SortTracksNew(); |
| 2771 |
}; |
}; |
| 2772 |
|
|
| 2773 |
|
|
| 2774 |
|
cout << "PamTrack *PamLevel2::GetTrack("<<it<<","<<alg<<") -- wrong track number or unrecognised algorithm"<<endl; |
| 2775 |
|
|
| 2776 |
return NULL; |
return NULL; |
| 2777 |
|
|
| 2787 |
|
|
| 2788 |
} |
} |
| 2789 |
; |
; |
| 2790 |
Int_t PamLevel2::GetNTracks(char* alg) { |
Int_t PamLevel2::GetNTracks(const char* alg) { |
| 2791 |
|
|
| 2792 |
|
|
| 2793 |
// cout << " trk_nuc_obj->GetEntries() "<<trk_nuc_obj->GetEntries()<<" trk2_nuc_obj->GetNTracks() "<<trk2_nuc_obj->GetNTracks()<<endl; |
// cout << " trk_nuc_obj->GetEntries() "<<trk_nuc_obj->GetEntries()<<" trk2_nuc_obj->GetNTracks() "<<trk2_nuc_obj->GetNTracks()<<endl; |
| 2808 |
if(s.Contains("NUC", TString::kIgnoreCase) && NUC ) |
if(s.Contains("NUC", TString::kIgnoreCase) && NUC ) |
| 2809 |
return trk2_nuc_obj->TrkLevel2::GetNTracks(); |
return trk2_nuc_obj->TrkLevel2::GetNTracks(); |
| 2810 |
|
|
| 2811 |
|
cout << "Int_t PamLevel2::GetNTracks("<<alg<<") -- unrecognised algorithm"<<endl; |
| 2812 |
|
|
| 2813 |
return 0; |
return 0; |
| 2814 |
|
|
| 2815 |
} |
} |
| 2823 |
* Retrieves (if present) the image of the it-th Pamela "physical" track, sorted by the method PamLevel2::SortTracks(). |
* Retrieves (if present) the image of the it-th Pamela "physical" track, sorted by the method PamLevel2::SortTracks(). |
| 2824 |
* @param it Track number, ranging from 0 to GetNTracks(). |
* @param it Track number, ranging from 0 to GetNTracks(). |
| 2825 |
*/ |
*/ |
| 2826 |
PamTrack *PamLevel2::GetTrackImage(int it) { |
PamTrack *PamLevel2::GetTrackImageOld(int it) { |
| 2827 |
|
|
| 2828 |
// *-*-*-*-*-*-*-*-*-*-*-*-* |
// *-*-*-*-*-*-*-*-*-*-*-*-* |
| 2829 |
SortTracks(); |
SortTracks(); |
| 2847 |
}; |
}; |
| 2848 |
} |
} |
| 2849 |
else { |
else { |
| 2850 |
cout << "PamLevel2::GetTrackImage(int) : Tracker track SeqNo " << it << " does not exist (GetNTracks() = " |
cout << "PamLevel2::GetTrackImageOld(int) : Tracker track SeqNo " << it << " does not exist (GetNTracks() = " |
| 2851 |
<< trk2_obj->TrkLevel2::GetNTracks() << ")" << endl; |
<< trk2_obj->TrkLevel2::GetNTracks() << ")" << endl; |
| 2852 |
}; |
}; |
| 2853 |
|
|
| 2858 |
* @param it Track number, ranging from 0 to GetNTracks(). |
* @param it Track number, ranging from 0 to GetNTracks(). |
| 2859 |
* @param alg Algorythm, see SetTrakingAlgorythm(char *alg) for explanation. |
* @param alg Algorythm, see SetTrakingAlgorythm(char *alg) for explanation. |
| 2860 |
*/ |
*/ |
| 2861 |
PamTrack *PamLevel2::GetTrackImage(int it, char* alg) { |
PamTrack *PamLevel2::GetTrackImage(int it, const char* alg) { |
| 2862 |
|
|
| 2863 |
TString s(alg); |
TString s(alg); |
| 2864 |
if(!s.CompareTo("") || !s.CompareTo("STD"))return GetTrack(it); //old algorythm |
if(!s.CompareTo("") || !s.CompareTo("STD"))return GetTrackImageOld(it); //old algorythm |
| 2865 |
|
|
| 2866 |
|
|
| 2867 |
SortTracksNew(); |
SortTracksNew(); |
| 2879 |
PamTrack *temp = (PamTrack*) t[it]; |
PamTrack *temp = (PamTrack*) t[it]; |
| 2880 |
if (temp->GetTrkTrack()->HasImage()) { |
if (temp->GetTrkTrack()->HasImage()) { |
| 2881 |
return (PamTrack*)((*timage_nuc)[it]); //ok return the track |
return (PamTrack*)((*timage_nuc)[it]); //ok return the track |
| 2882 |
|
}else{ |
| 2883 |
|
return NULL; |
| 2884 |
} |
} |
| 2885 |
|
|
| 2886 |
} |
} |
| 2894 |
PamTrack *temp = (PamTrack*) t[it]; |
PamTrack *temp = (PamTrack*) t[it]; |
| 2895 |
if (temp->GetTrkTrack()->HasImage()) { |
if (temp->GetTrkTrack()->HasImage()) { |
| 2896 |
return (PamTrack*)((*timage)[it]); //ok return the track |
return (PamTrack*)((*timage)[it]); //ok return the track |
| 2897 |
|
}else{ |
| 2898 |
|
return NULL; |
| 2899 |
} |
} |
| 2900 |
} |
} |
| 2901 |
} |
} |
| 2902 |
|
|
| 2903 |
} |
} |
| 2904 |
|
|
| 2905 |
|
// cout << "PamTrack *PamLevel2::GetTrackImage("<<it<<","<<alg<<") -- wrong track number or unrecognised algorithm"<<endl; |
| 2906 |
|
|
| 2907 |
return NULL; |
return NULL; |
| 2908 |
|
|
| 3362 |
TChain *G = 0; |
TChain *G = 0; |
| 3363 |
|
|
| 3364 |
TChain *L = 0; |
TChain *L = 0; |
| 3365 |
|
TChain *P = 0; |
| 3366 |
|
|
| 3367 |
if (TRK2 || TRK1 || TRKh) |
if (TRK2 || TRK1 || TRKh) |
| 3368 |
T = new TChain("Tracker"); |
T = new TChain("Tracker"); |
| 3382 |
B = new TChain("OrbitalInfo"); |
B = new TChain("OrbitalInfo"); |
| 3383 |
if (GP) |
if (GP) |
| 3384 |
G = new TChain("h20"); |
G = new TChain("h20"); |
| 3385 |
|
if (PROC) |
| 3386 |
|
P = new TChain("ProcessingInfo"); |
| 3387 |
L = new TChain("SelectionList"); |
L = new TChain("SelectionList"); |
| 3388 |
|
|
| 3389 |
// loop over files and create chains |
// loop over files and create chains |
| 3411 |
B->Add(name); |
B->Add(name); |
| 3412 |
if (GP) |
if (GP) |
| 3413 |
G->Add(name); |
G->Add(name); |
| 3414 |
|
if (P) |
| 3415 |
|
P->Add(name); |
| 3416 |
if (SELLI == 1) |
if (SELLI == 1) |
| 3417 |
L->Add(name); |
L->Add(name); |
| 3418 |
}; |
}; |
| 3538 |
L->Delete(); |
L->Delete(); |
| 3539 |
}; |
}; |
| 3540 |
|
|
| 3541 |
|
//ProcessingInfo EM |
| 3542 |
|
if ( P && P->GetEntries() ){ |
| 3543 |
|
cout << "----------------------------------------------------" << endl; |
| 3544 |
|
cout << ">>> Found ProcessingInfo <<<" << endl; |
| 3545 |
|
// L->SetBranchAddress("RunEntry",&irun); |
| 3546 |
|
P->SetBranchAddress("ProcInfo", &proc_obj);//NEWNEW |
| 3547 |
|
proc_tree = P; |
| 3548 |
|
} else { |
| 3549 |
|
// proc_tree = new TChain("ProcessingInfo","Log of data processing"); |
| 3550 |
|
// proc_tree->Branch("ProcInfo", "ProcInfo", &proc_obj); |
| 3551 |
|
cout << "----------------------------------------------------" << endl; |
| 3552 |
|
cout << ">>> ProcessingInfo not found, PROC set to false and continue (not 10RED files?)<<<" << endl; |
| 3553 |
|
PROC = false; |
| 3554 |
|
} |
| 3555 |
// -------------------------------------------- |
// -------------------------------------------- |
| 3556 |
// return the pamela chain with all the friends |
// return the pamela chain with all the friends |
| 3557 |
// -------------------------------------------- |
// -------------------------------------------- |
| 3558 |
|
|
| 3559 |
pam_tree = Trout; |
pam_tree = Trout; |
|
|
|
| 3560 |
return Trout; |
return Trout; |
| 3561 |
} |
} |
| 3562 |
|
|
| 3878 |
* "NUCEXT" --> as "EXT", but for nuclei |
* "NUCEXT" --> as "EXT", but for nuclei |
| 3879 |
* "NUCEXTF" --> as "EXTF", but for nuclei |
* "NUCEXTF" --> as "EXTF", but for nuclei |
| 3880 |
*/ |
*/ |
| 3881 |
void PamLevel2::SetTrakingAlgorythm(char *alg){ |
// void PamLevel2::SetTrackingAlgorythm(const char *alg){ |
| 3882 |
|
|
| 3883 |
|
|
| 3884 |
TString s(alg); |
// TString s(alg); |
| 3885 |
if(s.Contains("NUC", TString::kIgnoreCase) && !NUC) |
// if(s.Contains("NUC", TString::kIgnoreCase) && !NUC) |
| 3886 |
cout << "Warning! NUC algorythm requested, but branches are missing"<<endl; |
// cout << "Warning! NUC algorythm requested, but branches are missing"<<endl; |
| 3887 |
if(s.Contains("EXT", TString::kIgnoreCase) && !EXT) |
// if(s.Contains("EXT", TString::kIgnoreCase) && !EXT) |
| 3888 |
cout << "Warning! EXT algorythm requested, but branches are missing"<<endl;; |
// cout << "Warning! EXT algorythm requested, but branches are missing"<<endl;; |
| 3889 |
|
|
| 3890 |
trkAlg = alg; |
// trkAlg = alg; |
| 3891 |
|
|
| 3892 |
}; |
// }; |
| 3893 |
char* PamLevel2::GetTrakingAlgorythm(){ |
// const char* PamLevel2::GetTrackingAlgorythm(){ |
| 3894 |
|
|
| 3895 |
|
|
| 3896 |
cout<<endl<<" Implemented tracking algorythm: "; |
// cout<<endl<<" Implemented tracking algorythm: "; |
| 3897 |
cout<<endl<<" \"\" or \"STD\" --> take the output of the standard tracking algorythm"; |
// cout<<endl<<" \"\" or \"STD\" --> take the output of the standard tracking algorythm"; |
| 3898 |
cout<<endl<<" \"NUC\" --> take the output of the standard tracking algorythm for nuclei cluster selection"; |
// cout<<endl<<" \"NUC\" --> take the output of the standard tracking algorythm for nuclei cluster selection"; |
| 3899 |
cout<<endl<<" \"EXT\" --> in case the standard tracking algorythm has not found any track,"; |
// cout<<endl<<" \"EXT\" --> in case the standard tracking algorythm has not found any track,"; |
| 3900 |
cout<<endl<<" take the output of the extended one"; |
// cout<<endl<<" take the output of the extended one"; |
| 3901 |
cout<<endl<<" \"EXTF\" --> force the extended tracking algorythm"; |
// cout<<endl<<" \"EXTF\" --> force the extended tracking algorythm"; |
| 3902 |
cout<<endl<<" \"NUCEXT\" --> as \"EXT\", but for nuclei "; |
// cout<<endl<<" \"NUCEXT\" --> as \"EXT\", but for nuclei "; |
| 3903 |
cout<<endl<<" \"NUCEXTF\" --> as \"EXTF\", but for nuclei"; |
// cout<<endl<<" \"NUCEXTF\" --> as \"EXTF\", but for nuclei"; |
| 3904 |
|
|
| 3905 |
cout<<endl; |
// cout<<endl; |
| 3906 |
cout<<" <<Currently set algorythm>> "<<trkAlg<<endl; |
// cout<<" <<Currently set algorythm>> "<<trkAlg<<endl; |
| 3907 |
cout<<endl; |
// cout<<endl; |
| 3908 |
|
|
| 3909 |
return trkAlg; |
// return trkAlg; |
| 3910 |
}; |
// }; |
| 3911 |
|
|
| 3912 |
|
|
| 3913 |
|
|
| 4648 |
// cout << "Checking file: "<<f->GetName()<<endl; |
// cout << "Checking file: "<<f->GetName()<<endl; |
| 4649 |
if (!f || f->IsZombie()) { |
if (!f || f->IsZombie()) { |
| 4650 |
cout << "File: " << f->GetName() << " Non valid root file" << endl; |
cout << "File: " << f->GetName() << " Non valid root file" << endl; |
| 4651 |
|
fDiscarded = true; |
| 4652 |
return; |
return; |
| 4653 |
} |
} |
| 4654 |
|
|
| 4855 |
TFile *f = new TFile(name.Data()); |
TFile *f = new TFile(name.Data()); |
| 4856 |
if (!f || f->IsZombie()) { |
if (!f || f->IsZombie()) { |
| 4857 |
cout << "File: " << f->GetName() << " discarded ---- Non valid root file" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Non valid root file" << endl; |
| 4858 |
|
fDiscarded = true; |
| 4859 |
return false; |
return false; |
| 4860 |
} |
} |
| 4861 |
// cout << "Get list of keys: "<<f<<endl; |
// cout << "Get list of keys: "<<f<<endl; |
| 4894 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4895 |
cout << "File: " << f->GetName() << " discarded ---- SelectionList tree has " << nevt |
cout << "File: " << f->GetName() << " discarded ---- SelectionList tree has " << nevt |
| 4896 |
<< " events instead of " << nev << endl; |
<< " events instead of " << nev << endl; |
| 4897 |
|
fDiscarded = true; |
| 4898 |
return false; |
return false; |
| 4899 |
} |
} |
| 4900 |
nev = nevt; |
nev = nevt; |
| 4909 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4910 |
cout << "File: " << f->GetName() << " discarded ---- Trigger tree has " << nevt << " events instead of " |
cout << "File: " << f->GetName() << " discarded ---- Trigger tree has " << nevt << " events instead of " |
| 4911 |
<< nev << endl; |
<< nev << endl; |
| 4912 |
|
fDiscarded = true; |
| 4913 |
return false; |
return false; |
| 4914 |
} |
} |
| 4915 |
nev = nevt; |
nev = nevt; |
| 4923 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4924 |
cout << "File: " << f->GetName() << " discarded ---- ToF tree has " << nevt << " events instead of " << nev |
cout << "File: " << f->GetName() << " discarded ---- ToF tree has " << nevt << " events instead of " << nev |
| 4925 |
<< endl; |
<< endl; |
| 4926 |
|
fDiscarded = true; |
| 4927 |
return false; |
return false; |
| 4928 |
} |
} |
| 4929 |
nev = nevt; |
nev = nevt; |
| 4937 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4938 |
cout << "File: " << f->GetName() << " discarded ---- S4 tree has " << nevt << " events instead of " << nev |
cout << "File: " << f->GetName() << " discarded ---- S4 tree has " << nevt << " events instead of " << nev |
| 4939 |
<< endl; |
<< endl; |
| 4940 |
|
fDiscarded = true; |
| 4941 |
return false; |
return false; |
| 4942 |
} |
} |
| 4943 |
nev = nevt; |
nev = nevt; |
| 4952 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4953 |
cout << "File: " << f->GetName() << " discarded ---- NeutronD tree has " << nevt << " events instead of " |
cout << "File: " << f->GetName() << " discarded ---- NeutronD tree has " << nevt << " events instead of " |
| 4954 |
<< nev << endl; |
<< nev << endl; |
| 4955 |
|
fDiscarded = true; |
| 4956 |
return false; |
return false; |
| 4957 |
} |
} |
| 4958 |
nev = nevt; |
nev = nevt; |
| 4966 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4967 |
cout << "File: " << f->GetName() << " discarded ---- Anticounter tree has " << nevt << " events instead of " |
cout << "File: " << f->GetName() << " discarded ---- Anticounter tree has " << nevt << " events instead of " |
| 4968 |
<< nev << endl; |
<< nev << endl; |
| 4969 |
|
fDiscarded = true; |
| 4970 |
return false; |
return false; |
| 4971 |
} |
} |
| 4972 |
nev = nevt; |
nev = nevt; |
| 4980 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4981 |
cout << "File: " << f->GetName() << " discarded ---- OrbitalInfo tree has " << nevt << " events instead of " |
cout << "File: " << f->GetName() << " discarded ---- OrbitalInfo tree has " << nevt << " events instead of " |
| 4982 |
<< nev << endl; |
<< nev << endl; |
| 4983 |
|
fDiscarded = true; |
| 4984 |
return false; |
return false; |
| 4985 |
} |
} |
| 4986 |
nev = nevt; |
nev = nevt; |
| 4994 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4995 |
cout << "File: " << f->GetName() << " discarded ---- Tracker tree has " << nevt << " events instead of " |
cout << "File: " << f->GetName() << " discarded ---- Tracker tree has " << nevt << " events instead of " |
| 4996 |
<< nev << endl; |
<< nev << endl; |
| 4997 |
|
fDiscarded = true; |
| 4998 |
return false; |
return false; |
| 4999 |
} |
} |
| 5000 |
nev = nevt; |
nev = nevt; |
| 5018 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 5019 |
cout << "File: " << f->GetName() << " discarded ---- Calorimeter tree has " << nevt << " events instead of " |
cout << "File: " << f->GetName() << " discarded ---- Calorimeter tree has " << nevt << " events instead of " |
| 5020 |
<< nev << endl; |
<< nev << endl; |
| 5021 |
|
fDiscarded = true; |
| 5022 |
return false; |
return false; |
| 5023 |
} |
} |
| 5024 |
nev = nevt; |
nev = nevt; |
| 5041 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 5042 |
cout << "File: " << f->GetName() << " discarded ---- h20 tree has " << nevt << " events instead of " << nev |
cout << "File: " << f->GetName() << " discarded ---- h20 tree has " << nevt << " events instead of " << nev |
| 5043 |
<< endl; |
<< endl; |
| 5044 |
|
fDiscarded = true; |
| 5045 |
return false; |
return false; |
| 5046 |
} |
} |
| 5047 |
nev = nevt; |
nev = nevt; |
| 5054 |
SELLI = (Int_t) SELLI__ok; |
SELLI = (Int_t) SELLI__ok; |
| 5055 |
if (SELLI == 0 && SELLI__ok) { |
if (SELLI == 0 && SELLI__ok) { |
| 5056 |
cout << "File: " << f->GetName() << " discarded ---- found SelectionList (it is not a full-event file)" << endl; |
cout << "File: " << f->GetName() << " discarded ---- found SelectionList (it is not a full-event file)" << endl; |
| 5057 |
|
fDiscarded = true; |
| 5058 |
return false; |
return false; |
| 5059 |
} |
} |
| 5060 |
if (SELLI == 1 && !SELLI__ok) { |
if (SELLI == 1 && !SELLI__ok) { |
| 5061 |
cout << "File: " << f->GetName() << " discarded ---- SelectionList missing" << endl; |
cout << "File: " << f->GetName() << " discarded ---- SelectionList missing" << endl; |
| 5062 |
|
fDiscarded = true; |
| 5063 |
return false; |
return false; |
| 5064 |
} |
} |
| 5065 |
|
|
| 5098 |
|
|
| 5099 |
if (CAL1 && !CAL1__ok) { |
if (CAL1 && !CAL1__ok) { |
| 5100 |
cout << "File: " << f->GetName() << " discarded ---- Missing CaloLevel1 branch" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing CaloLevel1 branch" << endl; |
| 5101 |
|
fDiscarded = true; |
| 5102 |
return false; |
return false; |
| 5103 |
}; |
}; |
| 5104 |
if (CAL2 && !CAL2__ok) { |
if (CAL2 && !CAL2__ok) { |
| 5105 |
cout << "File: " << f->GetName() << " discarded ---- Missing CaloLevel2 branch" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing CaloLevel2 branch" << endl; |
| 5106 |
|
fDiscarded = true; |
| 5107 |
return false; |
return false; |
| 5108 |
}; |
}; |
| 5109 |
if (TRK2 && !TRK2__ok) { |
if (TRK2 && !TRK2__ok) { |
| 5110 |
cout << "File: " << f->GetName() << " discarded ---- Missing TrkLevel2 branch" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing TrkLevel2 branch" << endl; |
| 5111 |
|
fDiscarded = true; |
| 5112 |
return false; |
return false; |
| 5113 |
}; |
}; |
| 5114 |
if (TRK1 && !TRK1__ok) { |
if (TRK1 && !TRK1__ok) { |
| 5115 |
cout << "File: " << f->GetName() << " discarded ---- Missing TrkLevel1 branch" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing TrkLevel1 branch" << endl; |
| 5116 |
|
fDiscarded = true; |
| 5117 |
return false; |
return false; |
| 5118 |
}; |
}; |
| 5119 |
if (TRKh && !TRKh__ok) { |
if (TRKh && !TRKh__ok) { |
| 5120 |
cout << "File: " << f->GetName() << " discarded ---- Missing TrkHough branch" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing TrkHough branch" << endl; |
| 5121 |
|
fDiscarded = true; |
| 5122 |
return false; |
return false; |
| 5123 |
}; |
}; |
| 5124 |
if (ORB && !ORB__ok) { |
if (ORB && !ORB__ok) { |
| 5125 |
cout << "File: " << f->GetName() << " discarded ---- Missing ORB tree" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing ORB tree" << endl; |
| 5126 |
|
fDiscarded = true; |
| 5127 |
return false; |
return false; |
| 5128 |
}; |
}; |
| 5129 |
if (AC && !AC__ok) { |
if (AC && !AC__ok) { |
| 5130 |
cout << "File: " << f->GetName() << " discarded ---- Missing AC tree" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing AC tree" << endl; |
| 5131 |
|
fDiscarded = true; |
| 5132 |
return false; |
return false; |
| 5133 |
}; |
}; |
| 5134 |
if (S4 && !S4__ok) { |
if (S4 && !S4__ok) { |
| 5135 |
cout << "File: " << f->GetName() << " discarded ---- Missing S4 tree" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing S4 tree" << endl; |
| 5136 |
|
fDiscarded = true; |
| 5137 |
return false; |
return false; |
| 5138 |
}; |
}; |
| 5139 |
if (TOF && !TOF__ok) { |
if (TOF && !TOF__ok) { |
| 5140 |
cout << "File: " << f->GetName() << " discarded ---- Missing ToF tree" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing ToF tree" << endl; |
| 5141 |
|
fDiscarded = true; |
| 5142 |
return false; |
return false; |
| 5143 |
}; |
}; |
| 5144 |
|
|
| 5145 |
if (ND && !ND__ok) { |
if (ND && !ND__ok) { |
| 5146 |
cout << "File: " << f->GetName() << " discarded ---- Missing ND tree" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing ND tree" << endl; |
| 5147 |
|
fDiscarded = true; |
| 5148 |
return false; |
return false; |
| 5149 |
}; |
}; |
| 5150 |
if (TRG && !TRG__ok) { |
if (TRG && !TRG__ok) { |
| 5151 |
cout << "File: " << f->GetName() << " discarded ---- Missing Trigger tree" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing Trigger tree" << endl; |
| 5152 |
|
fDiscarded = true; |
| 5153 |
return false; |
return false; |
| 5154 |
}; |
}; |
| 5155 |
if (GP && !GP__ok) { |
if (GP && !GP__ok) { |
| 5156 |
cout << "File: " << f->GetName() << " discarded ---- Missing h20 tree" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing h20 tree" << endl; |
| 5157 |
|
fDiscarded = true; |
| 5158 |
return false; |
return false; |
| 5159 |
}; |
}; |
| 5160 |
|
|
| 5254 |
// cout << i<< "\t | "<<GetRunInfo()->ID<<"\t "<<GetRunInfo()->NEVENTS<< "\t "<<GetRunInfo()->RUNHEADER_TIME<<" <---> "<<GetRunInfo()->RUNTRAILER_TIME<<endl; |
// cout << i<< "\t | "<<GetRunInfo()->ID<<"\t "<<GetRunInfo()->NEVENTS<< "\t "<<GetRunInfo()->RUNHEADER_TIME<<" <---> "<<GetRunInfo()->RUNTRAILER_TIME<<endl; |
| 5255 |
run_tree_clone->Fill(); |
run_tree_clone->Fill(); |
| 5256 |
} |
} |
| 5257 |
cout << "----------------------------------------------------" << endl; |
// |
| 5258 |
|
// replicate processinginfo tree |
| 5259 |
|
// |
| 5260 |
|
if ( PROC ){ // EMEMEM |
| 5261 |
|
proc_tree_clone = new TTree("ProcessingInfo","Log of data processing"); |
| 5262 |
|
proc_tree_clone->Branch("ProcInfo", "ProcInfo", GetPointerTo("ProcInfo")); |
| 5263 |
|
cout << "ProcessingInfo: branch ProcessingInfo" << endl; |
| 5264 |
|
// ------------------ |
| 5265 |
|
// replicate processinginfo tree |
| 5266 |
|
// ------------------ |
| 5267 |
|
// cout << "----------------------------------------------------"<<endl; |
| 5268 |
|
// cout << "irun\t | RUN\t NEVENTS\t absolute time"<<endl; |
| 5269 |
|
for (Int_t i = 0; i < proc_tree->GetEntries(); i++) { |
| 5270 |
|
proc_tree->GetEntry(i); |
| 5271 |
|
// cout << i<< "\t | "<<endl; |
| 5272 |
|
proc_tree_clone->Fill(); |
| 5273 |
|
} |
| 5274 |
|
if ( SELLI != 2 ){ |
| 5275 |
|
proc_obj->runID = 0; |
| 5276 |
|
TTimeStamp *dt = new TTimeStamp(); |
| 5277 |
|
proc_obj->date = dt->AsString(); |
| 5278 |
|
delete dt; |
| 5279 |
|
proc_obj->commandLine = Form("PamelaLevel2 was called: CAL2 %i CAL1 %i CAL0 %i TRK2 %i TRK1 %i TRKh %i TRK0 %i TOF %i TOF0 %i TRG %i \n S4 %i ND %i AC %i ORB %i GP %i EXT %i NUC %i RUN %i ISGP %i SELLI %i \n Custom string = %s",CAL2,CAL1,CAL0,TRK2,TRK1,TRKh,TRK0,TOF,TOF0,TRG,S4,ND,AC,ORB,GP,EXT,NUC,RUN,ISGP,SELLI,customString.Data()); |
| 5280 |
|
proc_obj->outputFilename = ofile->GetName(); |
| 5281 |
|
proc_obj->localDir = gSystem->WorkingDirectory(); |
| 5282 |
|
proc_obj->uname = gSystem->GetFromPipe("uname -a"); |
| 5283 |
|
if (!dbc || (dbc && !dbc->IsConnected())) SetDBConnection(); |
| 5284 |
|
proc_obj->DB = Form("mysql://%s/%s",dbc->GetHost(),dbc->GetDB()); |
| 5285 |
|
dbc->Close(); |
| 5286 |
|
proc_tree_clone->Fill(); |
| 5287 |
|
} |
| 5288 |
|
cout << "----------------------------------------------------" << endl; |
| 5289 |
|
} |
| 5290 |
// ------------------------------------ |
// ------------------------------------ |
| 5291 |
// add branch with dead and live times |
// add branch with dead and live times |
| 5292 |
// ------------------------------------ |
// ------------------------------------ |
| 5477 |
if (!name.CompareTo(na)) |
if (!name.CompareTo(na)) |
| 5478 |
return sel_tree_clone; |
return sel_tree_clone; |
| 5479 |
} |
} |
| 5480 |
|
if (proc_tree_clone && PROC) { |
| 5481 |
|
TString na = proc_tree_clone->GetName(); |
| 5482 |
|
if (!name.CompareTo(na)) |
| 5483 |
|
return proc_tree_clone; |
| 5484 |
|
} |
| 5485 |
return NULL; |
return NULL; |
| 5486 |
|
|
| 5487 |
} |
} |
| 5501 |
for (Int_t i = 0; i < NCLONES; i++) { |
for (Int_t i = 0; i < NCLONES; i++) { |
| 5502 |
if (pam_tree_clone[i]) { |
if (pam_tree_clone[i]) { |
| 5503 |
cout << pam_tree_clone[i]->GetName() << endl; |
cout << pam_tree_clone[i]->GetName() << endl; |
| 5504 |
pam_tree_clone[i]->Write(); |
pam_tree_clone[i]->Write(pam_tree_clone[i]->GetName(),TObject::kOverwrite); |
| 5505 |
}; |
}; |
| 5506 |
} |
} |
| 5507 |
|
|
| 5508 |
|
if ( PROC ){//EMEMEMEM |
| 5509 |
|
proc_tree_clone->Write("ProcessingInfo",TObject::kOverwrite); |
| 5510 |
|
} |
| 5511 |
cout << "+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+" << endl; |
cout << "+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+" << endl; |
| 5512 |
|
|
| 5513 |
} |
} |