554 |
use_CAL && |
use_CAL && |
555 |
calo2_obj->npcfit[1] > 15 && //no. of fit planes on Y view |
calo2_obj->npcfit[1] > 15 && //no. of fit planes on Y view |
556 |
calo2_obj->varcfit[1] < 1000. && //fit variance on Y view |
calo2_obj->varcfit[1] < 1000. && //fit variance on Y view |
557 |
|
cp && ci && |
558 |
true){ |
true){ |
559 |
|
|
560 |
|
|
576 |
cout << "void PamLevel2::SortTracks(TString how): how= "<<how<<" but ToFLevel2 not loaded !!!"; |
cout << "void PamLevel2::SortTracks(TString how): how= "<<how<<" but ToFLevel2 not loaded !!!"; |
577 |
return; |
return; |
578 |
}; |
}; |
579 |
if( use_TOF ){ |
if( use_TOF && op && oi ){ |
580 |
|
|
581 |
Int_t nphit_p =0; |
Int_t nphit_p =0; |
582 |
Int_t nphit_i =0; |
Int_t nphit_i =0; |
970 |
|
|
971 |
cout<<endl<<" Number of entries: "<<Trout->GetEntries()<<endl<<endl; |
cout<<endl<<" Number of entries: "<<Trout->GetEntries()<<endl<<endl; |
972 |
|
|
|
pam_tree = (TChain*)Trout; |
|
|
|
|
973 |
return Trout; |
return Trout; |
974 |
|
|
975 |
} |
} |
998 |
// char *fullpath; |
// char *fullpath; |
999 |
// const char *fullpath; |
// const char *fullpath; |
1000 |
|
|
1001 |
// if input file list is given: |
// if no input file list is given: |
1002 |
if ( flisttxt != "" ){ |
if ( flisttxt != "" ){ |
1003 |
|
|
1004 |
// if( !gSystem->IsFileInIncludePath(flisttxt,&fullpath) ){ |
// if( !gSystem->IsFileInIncludePath(flisttxt,&fullpath) ){ |
1008 |
// } |
// } |
1009 |
// flisttxt = fullpath; |
// flisttxt = fullpath; |
1010 |
|
|
|
if ( !flisttxt.EndsWith(".root") ){ |
|
1011 |
flisttxt = gSystem->ConcatFileName(gSystem->DirName(flisttxt),gSystem->BaseName(flisttxt)); |
flisttxt = gSystem->ConcatFileName(gSystem->DirName(flisttxt),gSystem->BaseName(flisttxt)); |
1012 |
|
|
1013 |
if( !gSystem->ChangeDirectory(ddir) ){ |
if( !gSystem->ChangeDirectory(ddir) ){ |
1048 |
// }; |
// }; |
1049 |
}; |
}; |
1050 |
in.close(); |
in.close(); |
1051 |
} else { |
|
|
char *fullpath = gSystem->ConcatFileName(gSystem->DirName(flisttxt),gSystem->BaseName(flisttxt)); |
|
|
contents->Add(new TSystemFile(fullpath,gSystem->DirName(fullpath)));// add file to the list |
|
|
delete fullpath; |
|
|
}; |
|
1052 |
}else{ |
}else{ |
1053 |
|
|
1054 |
cout << "No input file list given."<<endl; |
cout << "No input file list given."<<endl; |
1498 |
R->SetBranchAddress("SoftInfo", GetPointerTo("SoftInfo")); // Emiliano |
R->SetBranchAddress("SoftInfo", GetPointerTo("SoftInfo")); // Emiliano |
1499 |
cout << "Software : set branch address SoftInfo"<<endl; // Emiliano |
cout << "Software : set branch address SoftInfo"<<endl; // Emiliano |
1500 |
} |
} |
|
|
|
|
run_tree = (TChain*)R; |
|
|
|
|
1501 |
return R; |
return R; |
1502 |
|
|
1503 |
} |
} |
1520 |
if(SELLI==0){ |
if(SELLI==0){ |
1521 |
if ( irun < 0 ){ |
if ( irun < 0 ){ |
1522 |
irun = 0; |
irun = 0; |
1523 |
run->GetEntry(0); |
run->GetEntry(irun); |
1524 |
runfirstentry = 0ULL; |
runfirstentry = 0ULL; |
1525 |
runlastentry += (ULong64_t)(this->GetRunInfo()->NEVENTS) - 1ULL; |
runlastentry += (ULong64_t)(this->GetRunInfo()->NEVENTS) - 1ULL; |
1526 |
|
return(true); |
1527 |
}; |
}; |
1528 |
|
|
1529 |
if( !GetOrbitalInfo() ){ |
if( !GetOrbitalInfo() ){ |
1542 |
}; |
}; |
1543 |
|
|
1544 |
// |
// |
1545 |
if ( irun == oldrun || irun >= run->GetEntries() ) return(false); |
if |
1546 |
|
( irun == oldrun || irun >= run->GetEntries() ) return(false); |
1547 |
// |
// |
1548 |
// printf(" iev %llu irun %i nevents %u 1st %llu last %llu \n",iev,irun,this->GetRunInfo()->NEVENTS,(ULong64_t)runfirstentry,(ULong64_t)runlastentry); |
// printf(" iev %llu irun %i nevents %u 1st %llu last %llu \n",iev,irun,this->GetRunInfo()->NEVENTS,(ULong64_t)runfirstentry,(ULong64_t)runlastentry); |
1549 |
// |
// |
2353 |
Int_t PamLevel2::GetEntry(Int_t iee){ |
Int_t PamLevel2::GetEntry(Int_t iee){ |
2354 |
|
|
2355 |
if(!pam_tree){ |
if(!pam_tree){ |
2356 |
cout << " Int_t PamLevel2::GetEntry(Int_t) -- ERROR -- level2 trees not loaded"<<endl; |
cout << " Int_t PamLevel2::GetEntry(Int_t) -- ERROR -- level2 trees not loeaded"<<endl; |
2357 |
|
return 0; |
2358 |
|
} |
2359 |
|
if(!run_tree ){ |
2360 |
|
cout << " Int_t PamLevel2::GetEntry(Int_t) -- ERROR -- run tree not loeaded"<<endl; |
2361 |
return 0; |
return 0; |
2362 |
} |
} |
2363 |
|
|
2366 |
ii = iee; |
ii = iee; |
2367 |
if( !pam_tree->GetEntry(ii) ) return 0; |
if( !pam_tree->GetEntry(ii) ) return 0; |
2368 |
//------------------------------- |
//------------------------------- |
|
|
|
|
if(!run_tree ){ |
|
|
cout << " Int_t PamLevel2::GetEntry(Int_t) -- ERROR -- run tree not loaded"<<endl; |
|
|
return 0; |
|
|
} |
|
|
|
|
2369 |
ii = iee; |
ii = iee; |
2370 |
Bool_t UPDATED = UpdateRunInfo(run_tree,ii); |
Bool_t UPDATED = UpdateRunInfo(run_tree,ii); |
2371 |
if(SELLI==0)irunentry = iee-runfirstentry; |
if(SELLI==0)irunentry = iee-runfirstentry; |
2456 |
trk0_obj->Set(); |
trk0_obj->Set(); |
2457 |
}; |
}; |
2458 |
l0_tree->SetBranchAddress("Tracker" ,trk0_obj->GetPointerToTrackerEvent()); |
l0_tree->SetBranchAddress("Tracker" ,trk0_obj->GetPointerToTrackerEvent()); |
|
TrkParams::SetCalib(run_obj,dbc); |
|
2459 |
} |
} |
2460 |
//--------------------------------------------------- |
//--------------------------------------------------- |
2461 |
// CALORIMETER: |
// CALORIMETER: |
2470 |
|
|
2471 |
}; |
}; |
2472 |
|
|
2473 |
|
if(!dbc || (dbc && !dbc->IsConnected())){ |
2474 |
|
cout << " TTree* PamLevel2::GetYodaTree( ) -- no DB connected... hai fatto qualche cazzata "<<endl; |
2475 |
|
} |
2476 |
|
|
2477 |
|
TrkParams::SetCalib(run_obj,dbc); |
2478 |
|
|
2479 |
|
|
2480 |
// cout << l0_tree << endl; |
// cout << l0_tree << endl; |
2481 |
|
|
2482 |
return l0_tree; |
return l0_tree; |
2496 |
// --------------------------------- |
// --------------------------------- |
2497 |
Int_t quellagiusta = irunentry + run_obj->EV_FROM; |
Int_t quellagiusta = irunentry + run_obj->EV_FROM; |
2498 |
|
|
2499 |
|
// cout << " irun "<< irun << " irunentry "<< irunentry<<" run_obj->EV_FROM "<<run_obj->EV_FROM <<" quella giusta "<<quellagiusta << endl; |
2500 |
|
// cout << " iroot "<<iroot<<" run_obj->ID_ROOT_L0 "<<run_obj->ID_ROOT_L0<<endl; |
2501 |
|
// cout << " time "<< GetOrbitalInfo()->absTime << endl; |
2502 |
|
// cout << " trk_calib_used "<<run_obj->TRK_CALIB_USED<< endl; |
2503 |
|
|
2504 |
if( !GetOrbitalInfo() ){ |
if( !GetOrbitalInfo() ){ |
2505 |
cout << "Int_t PamLevel2::GetYodaEntry() -- ERROR -- missing OrbitalInfo "<<endl; |
cout << "Int_t PamLevel2::GetYodaEntry() -- ERROR -- missing OrbitalInfo "<<endl; |
2506 |
return 0; |
return 0; |
2520 |
Int_t answer = 0; |
Int_t answer = 0; |
2521 |
Int_t shift =0; |
Int_t shift =0; |
2522 |
do{ |
do{ |
2523 |
// if(shift>0){ |
if(shift>0){ |
2524 |
// cout << " level0 <--> level2 mismatch ( irun "<<irun<<" irunentry "<<irunentry<<" shift "<<shift<<" )"<<endl; |
cout << " level0 <--> level2 mismatch ( irun "<<irun<<" irunentry "<<irunentry<<" shift "<<shift<<" )"<<endl; |
2525 |
// } |
} |
2526 |
answer = GetYodaTree()->GetEntry(quellagiusta+shift); |
answer = l0_tree->GetEntry(quellagiusta+shift); |
2527 |
shift++; |
shift++; |
2528 |
if( !GetEventHeader() ){ |
if( !GetEventHeader() ){ |
2529 |
cout << "Int_t PamLevel2::GetYodaEntry() -- ERROR -- missing EventHeader "<<endl; |
cout << "Int_t PamLevel2::GetYodaEntry() -- ERROR -- missing EventHeader "<<endl; |
2530 |
return 0; |
return 0; |
2531 |
} |
} |
2532 |
// if( (quellagiusta+shift) == GetYodaTree()->GetEntries()+1 )cout << ">>> end of level0 tree <<<"<<endl; |
// if( (quellagiusta+shift) == l0_tree->GetEntries()+1 )cout << ">>> end of level0 tree <<<"<<endl; |
2533 |
}while( ( (UInt_t)(GetOrbitalInfo()->OBT) != (UInt_t)(GetEventHeader()->GetPscuHeader()->GetOrbitalTime()) || GetOrbitalInfo()->pkt_num != (UInt_t)(GetEventHeader()->GetPscuHeader()->GetCounter())) && (quellagiusta+shift) < (UInt_t)(GetYodaTree()->GetEntries()) ); |
// cout << " GetOrbitalInfo()->OBT "<< GetOrbitalInfo()->OBT << endl; |
2534 |
|
// cout << " GetEventHeader()->GetPscuHeader()->GetOrbitalTime() "<< GetEventHeader()->GetPscuHeader()->GetOrbitalTime() << endl; |
2535 |
|
// cout << " GetOrbitalInfo()->pkt_num "<< GetOrbitalInfo()->pkt_num << endl; |
2536 |
|
// cout << " GetEventHeader()->GetPscuHeader()->GetCounter() "<< GetEventHeader()->GetPscuHeader()->GetCounter() << endl; |
2537 |
|
|
2538 |
|
}while( ( GetOrbitalInfo()->OBT != (UInt_t)(GetEventHeader()->GetPscuHeader()->GetOrbitalTime()) || GetOrbitalInfo()->pkt_num != (UInt_t)(GetEventHeader()->GetPscuHeader()->GetCounter())) && (quellagiusta+shift) < GetYodaTree()->GetEntries() ); |
2539 |
|
|
2540 |
// cout << "LA ENTRY GIUSTA E`: "<<quellagiusta<<" (spero...)"<<endl; |
// cout << "LA ENTRY GIUSTA E`: "<<quellagiusta<<" (spero...)"<<endl; |
2541 |
// return GetYodaTree()->GetEntry(quellagiusta); |
// return GetYodaTree()->GetEntry(quellagiusta); |