| 145 |
dbc = 0; |
dbc = 0; |
| 146 |
|
|
| 147 |
prevshift = 0; |
prevshift = 0; |
| 148 |
|
maxshift = 10; //EMILIANO |
| 149 |
|
|
| 150 |
run_tree = NULL; |
run_tree = NULL; |
| 151 |
run_tree_clone = NULL; |
run_tree_clone = NULL; |
| 963 |
if ( nphit_p != nphit_i ){ |
if ( nphit_p != nphit_i ){ |
| 964 |
totp_score += nphit_p; |
totp_score += nphit_p; |
| 965 |
toti_score += nphit_i; |
toti_score += nphit_i; |
| 966 |
|
tp_score+=nphit_p; |
| 967 |
|
ti_score+=nphit_i; |
| 968 |
}; |
}; |
| 969 |
if ( nphit_p > nphit_i) tp_score++; |
// if ( nphit_p > nphit_i) tp_score+=nphit_p; |
| 970 |
else if( nphit_p < nphit_i) ti_score++; |
// else if( nphit_p < nphit_i) ti_score+=nphit_i; |
| 971 |
else ;//niente |
// else ;//niente |
| 972 |
}; |
}; |
| 973 |
}; |
}; |
| 974 |
// cout << "TOF "<<tp_score<<ti_score<<endl; |
// cout << "TOF "<<tp_score<<ti_score<<endl; |
| 1034 |
ts = ti;//its image!! |
ts = ti;//its image!! |
| 1035 |
cs = ci; |
cs = ci; |
| 1036 |
os = oi; |
os = oi; |
| 1037 |
|
Int_t totis = toti_score; |
| 1038 |
|
|
| 1039 |
ti = tp;//its image!! |
ti = tp;//its image!! |
| 1040 |
ci = cp; |
ci = cp; |
| 1044 |
cp = cs; |
cp = cs; |
| 1045 |
op = os; |
op = os; |
| 1046 |
|
|
| 1047 |
|
toti_score = totp_score; |
| 1048 |
|
totp_score = totis; |
| 1049 |
|
|
| 1050 |
|
|
| 1051 |
}else { |
}else { |
| 1052 |
|
|
| 1076 |
new(ttimage[i]) PamTrack(ti,ci,oi); |
new(ttimage[i]) PamTrack(ti,ci,oi); |
| 1077 |
|
|
| 1078 |
((PamTrack*)(ttsorted[i]))->SetPScore(totp_score); |
((PamTrack*)(ttsorted[i]))->SetPScore(totp_score); |
| 1079 |
|
((PamTrack*)(ttsorted[i]))->SetIScore(toti_score); |
| 1080 |
|
((PamTrack*)(ttimage[i]))->SetPScore(totp_score); |
| 1081 |
((PamTrack*)(ttimage[i]))->SetIScore(toti_score); |
((PamTrack*)(ttimage[i]))->SetIScore(toti_score); |
| 1082 |
}; |
}; |
| 1083 |
|
|
| 1976 |
// |
// |
| 1977 |
// check if we have already called once GetEntry, if not call it |
// check if we have already called once GetEntry, if not call it |
| 1978 |
// |
// |
| 1979 |
cout << "Bool_t PamLevel2::UpdateRunInfo(TChain *run, Long64_t iev) --- NON FUNZIONA BENISSIMO.... "<<endl; |
cout << "Bool_t PamLevel2::UpdateRunInfo(TChain *run, Long64_t iev) --- ATTENZIONE --- NON E` MANTENUTA!!!!!!!.... "<<endl; |
| 1980 |
if(!run){ |
if(!run){ |
| 1981 |
cout << "Bool_t PamLevel2::UpdateRunInfo(TChain *run, ULong64_t iev) -- ERROR -- missing RunInfo tree "<<endl; |
cout << "Bool_t PamLevel2::UpdateRunInfo(TChain *run, ULong64_t iev) -- ERROR -- missing RunInfo tree "<<endl; |
| 1982 |
return(false); |
return(false); |
| 2162 |
}; |
}; |
| 2163 |
|
|
| 2164 |
// ----------------------------------------------------------------------- |
// ----------------------------------------------------------------------- |
| 2165 |
// if it is simulation, assigh abstime by hand (temporaneo!!!) |
// if it is simulation, assign abstime by hand (temporaneo!!!) |
| 2166 |
// ----------------------------------------------------------------------- |
// ----------------------------------------------------------------------- |
| 2167 |
if(ISGP){ |
if(ISGP){ |
| 2168 |
abstime = GetRunInfo()->RUNHEADER_TIME; // BARBATRUCCO |
abstime = GetRunInfo()->RUNHEADER_TIME; // BARBATRUCCO |
| 2187 |
obt <= GetRunInfo()->RUNTRAILER_OBT) |
obt <= GetRunInfo()->RUNTRAILER_OBT) |
| 2188 |
) |
) |
| 2189 |
|| GetRunInfo()->NEVENTS==0 |
|| GetRunInfo()->NEVENTS==0 |
| 2190 |
|| !(irunentry < GetRunInfo()->NEVENTS-1-prevshift) |
// || !(irunentry < GetRunInfo()->NEVENTS-1-prevshift) // ERRORE!!! fa saltare i run con 1 evento |
| 2191 |
|
|| !(irunentry <= GetRunInfo()->NEVENTS-1-prevshift) |
| 2192 |
) |
) |
| 2193 |
&& irun < run_tree->GetEntries() ){ |
&& irun < run_tree->GetEntries() ){ |
| 2194 |
|
|
| 2195 |
|
// - - - - - - - - - - - - - |
| 2196 |
|
// irunentry = position of current entry, relative to the run |
| 2197 |
|
// prevshift = shift needed to synchronize l0 and l2 data (nested events) |
| 2198 |
|
// - - - - - - - - - - - - - |
| 2199 |
|
|
| 2200 |
// ----------------------------------------- |
// ----------------------------------------- |
| 2201 |
// store dead and live-time of previous run |
// store dead and live-time of previous run |
| 3296 |
//=================================== |
//=================================== |
| 3297 |
if(!dbc || (dbc && !dbc->IsConnected())){ |
if(!dbc || (dbc && !dbc->IsConnected())){ |
| 3298 |
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl; |
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl; |
| 3299 |
cout<<"Connecting to DB"<<endl; |
cout<<"Re-connecting to DB"<<endl; |
| 3300 |
cout<<"HOST "<<host<<endl; |
cout<<"HOST "<<host<<endl; |
| 3301 |
cout<<"USER "<<user<<endl; |
cout<<"USER "<<user<<endl; |
| 3302 |
cout<<"PSW "<<psw<<endl; |
cout<<"PSW "<<psw<<endl; |
| 3355 |
cout << "PamLevel2::GetYodaTree() --- level0 TOF not implemented "<<endl; |
cout << "PamLevel2::GetYodaTree() --- level0 TOF not implemented "<<endl; |
| 3356 |
} |
} |
| 3357 |
|
|
| 3358 |
|
dbc->Close(); |
| 3359 |
|
|
| 3360 |
|
|
| 3361 |
}; |
}; |
| 3362 |
|
|
| 3363 |
if(!dbc || (dbc && !dbc->IsConnected())){ |
// if(!dbc || (dbc && !dbc->IsConnected())){ |
| 3364 |
cout << " TTree* PamLevel2::GetYodaTree( ) -- no DB connected... hai fatto qualche cazzata "<<endl; |
// cout << " TTree* PamLevel2::GetYodaTree( ) -- no DB connected... hai fatto qualche cazzata "<<endl; |
| 3365 |
} |
// } |
| 3366 |
|
|
| 3367 |
if ( TRK0 ){ |
if ( TRK0 ){ |
| 3368 |
TrkParams::Load(6); |
TrkParams::Load(6); |
| 3376 |
}; |
}; |
| 3377 |
} |
} |
| 3378 |
|
|
| 3379 |
|
|
| 3380 |
// cout << l0_tree << endl; |
// cout << l0_tree << endl; |
|
|
|
| 3381 |
return l0_tree; |
return l0_tree; |
| 3382 |
|
|
| 3383 |
} |
} |
| 3438 |
Int_t answer = 0; |
Int_t answer = 0; |
| 3439 |
Int_t shift =0; |
Int_t shift =0; |
| 3440 |
// printf(" siamo qui %i %i \n",shift,prevshift); |
// printf(" siamo qui %i %i \n",shift,prevshift); |
| 3441 |
Int_t maxshift = 10; |
// Int_t maxshift = 50; // EMILIANO |
| 3442 |
do{ |
do{ |
| 3443 |
if(shift>0){ |
if(shift>0){ |
| 3444 |
cout << " PKTNUM L2 --- "<< pktn << " --- L0 --- "<< GetEventHeader()->GetPscuHeader()->GetCounter()<<endl; |
cout << " PKTNUM L2 --- "<< pktn << " --- L0 --- "<< GetEventHeader()->GetPscuHeader()->GetCounter()<<endl; |