| 239 |
il = indmax; |
il = indmax; |
| 240 |
ir = indmax; |
ir = indmax; |
| 241 |
for(Int_t i=1; i<nbad; i++){ |
for(Int_t i=1; i<nbad; i++){ |
| 242 |
if (ir == CLlength && il == 0)break; |
if (ir == CLlength-1 && il == 0)break; |
| 243 |
else if (ir == CLlength && il != 0)il--; |
else if (ir == CLlength-1 && il != 0)il--; |
| 244 |
else if (ir != CLlength && il == 0)ir++; |
else if (ir != CLlength-1 && il == 0)ir++; |
| 245 |
else{ |
else{ |
| 246 |
if(clsignal[il-1] > clsignal[ir+1])il--; |
if(clsignal[il-1] > clsignal[ir+1])il--; |
| 247 |
else ir++; |
else ir++; |
| 264 |
il = indmax; |
il = indmax; |
| 265 |
ir = indmax; |
ir = indmax; |
| 266 |
for(Int_t i=1; i<nbad; i++){ |
for(Int_t i=1; i<nbad; i++){ |
| 267 |
if (ir == CLlength && il == 0)break; |
if (ir == CLlength-1 && il == 0)break; |
| 268 |
else if (ir == CLlength && il != 0)il--; |
else if (ir == CLlength-1 && il != 0)il--; |
| 269 |
else if (ir != CLlength && il == 0)ir++; |
else if (ir != CLlength-1 && il == 0)ir++; |
| 270 |
else{ |
else{ |
| 271 |
if(clsignal[il-1] > clsignal[ir+1])il--; |
if(clsignal[il-1] > clsignal[ir+1])il--; |
| 272 |
else ir++; |
else ir++; |
| 291 |
cout << "Position of maximun "<< maxs <<endl; |
cout << "Position of maximun "<< maxs <<endl; |
| 292 |
cout << "Multiplicity "<< GetMultiplicity() <<endl; |
cout << "Multiplicity "<< GetMultiplicity() <<endl; |
| 293 |
cout << "Tot signal "<< GetSignal() << " (ADC channels)"<<endl ; |
cout << "Tot signal "<< GetSignal() << " (ADC channels)"<<endl ; |
| 294 |
cout << "Signal/Noise "<< GetSignalToNoise(); |
cout << "Signal/Noise "<< GetSignalToNoise()<<endl; |
| 295 |
cout <<endl<< "Strip signals "; |
cout << "COG "<< GetCOG(0)<<endl;; |
| 296 |
|
cout << "Strip signals "; |
| 297 |
for(Int_t i =0; i<CLlength; i++)cout << " " <<clsignal[i]; |
for(Int_t i =0; i<CLlength; i++)cout << " " <<clsignal[i]; |
| 298 |
cout <<endl<< "Strip sigmas "; |
cout <<endl<< "Strip sigmas "; |
| 299 |
for(Int_t i =0; i<CLlength; i++)cout << " " <<clsigma[i]; |
for(Int_t i =0; i<CLlength; i++)cout << " " <<clsigma[i]; |
| 468 |
for(int i=0; i<this->nclstr(); i++) ((TrkCluster *)t[i])->Dump(); |
for(int i=0; i<this->nclstr(); i++) ((TrkCluster *)t[i])->Dump(); |
| 469 |
|
|
| 470 |
} |
} |
| 471 |
|
/** |
| 472 |
|
* \brief Dump processing status |
| 473 |
|
*/ |
| 474 |
|
void TrkLevel1::StatusDump(int view){ |
| 475 |
|
cout << "DSP n. "<<view+1<<" (level1-)status: "<<hex<<showbase<<good[view]<<dec<<endl; |
| 476 |
|
}; |
| 477 |
|
/** |
| 478 |
|
* \brief Check event status |
| 479 |
|
* |
| 480 |
|
* Check the event status, according to a flag-mask given as input. |
| 481 |
|
* Return true if the view passes the check. |
| 482 |
|
* |
| 483 |
|
* @param view View number (0-11) |
| 484 |
|
* @param flagmask Mask of flags to check (eg. flagmask=0x111 no missing packet, |
| 485 |
|
* no crc error, no software alarm) |
| 486 |
|
* |
| 487 |
|
* @see TrkLevel2 class definition to know how the status flag is defined |
| 488 |
|
* |
| 489 |
|
*/ |
| 490 |
|
Bool_t TrkLevel1::StatusCheck(int view, int flagmask){ |
| 491 |
|
|
| 492 |
|
if( view<0 || view >= 12)return false; |
| 493 |
|
return !(good[view]&flagmask); |
| 494 |
|
|
| 495 |
|
}; |
| 496 |
|
|
| 497 |
|
|
| 498 |
//-------------------------------------- |
//-------------------------------------- |
| 499 |
// |
// |
| 500 |
// |
// |
| 532 |
t_cl->clsigma = new Float_t[t_cl->CLlength]; |
t_cl->clsigma = new Float_t[t_cl->CLlength]; |
| 533 |
t_cl->cladc = new Int_t[t_cl->CLlength]; |
t_cl->cladc = new Int_t[t_cl->CLlength]; |
| 534 |
t_cl->clbad = new Bool_t[t_cl->CLlength]; |
t_cl->clbad = new Bool_t[t_cl->CLlength]; |
| 535 |
|
|
| 536 |
Int_t index = 0; |
Int_t index = 0; |
| 537 |
for(Int_t is = from; is < to; is++ ){ |
for(Int_t is = from; is < to; is++ ){ |
| 538 |
t_cl->clsignal[index] = (Float_t) l1->clsignal[is]; |
t_cl->clsignal[index] = (Float_t) l1->clsignal[is]; |
| 909 |
* NB If the TrkLevel1 object is readout from a tree, and the |
* NB If the TrkLevel1 object is readout from a tree, and the |
| 910 |
* TrkLevel1::ProcessEvent(int pfa) is used to reprocess the event, attention |
* TrkLevel1::ProcessEvent(int pfa) is used to reprocess the event, attention |
| 911 |
* should be payed to the fact that single clusters (clusters not associated |
* should be payed to the fact that single clusters (clusters not associated |
| 912 |
* with any track) might not be stored. Full reprocessing should be done from |
* with any track) might not be stored. Full reprocessing should be done starting |
| 913 |
* level0 data. |
* from level0 data. |
| 914 |
*/ |
*/ |
| 915 |
int TrkLevel1::ProcessEvent(int pfa){ |
//int TrkLevel1::ProcessEvent(int pfa){ |
| 916 |
|
int TrkLevel1::ProcessEvent(){ |
| 917 |
|
|
| 918 |
// cout << "int TrkLevel1::ProcessEvent()" << endl; |
// cout << "int TrkLevel1::ProcessEvent()" << endl; |
| 919 |
TrkParams::Load( ); |
TrkParams::Load( ); |
| 922 |
GetLevel1Struct(); |
GetLevel1Struct(); |
| 923 |
|
|
| 924 |
// analysisflight_(&pfa); |
// analysisflight_(&pfa); |
| 925 |
TrkParams::SetPFA(pfa); |
// TrkParams::SetPFA(pfa); |
| 926 |
analysisflight_(); |
analysisflight_(); |
| 927 |
|
|
| 928 |
return 1; |
return 1; |