611 |
* |
* |
612 |
* @see TrkParams::SetPFA(int) |
* @see TrkParams::SetPFA(int) |
613 |
*/ |
*/ |
614 |
void TrkTrack::EvaluateClusterPositions(){ |
Bool_t TrkTrack::EvaluateClusterPositions(){ |
615 |
|
|
616 |
// cout << "void TrkTrack::GetClusterPositions() "<<endl; |
// cout << "void TrkTrack::GetClusterPositions() "<<endl; |
617 |
|
|
618 |
TrkParams::Load( ); |
TrkParams::Load( ); |
619 |
if( !TrkParams::IsLoaded() )return; |
if( !TrkParams::IsLoaded() )return false; |
620 |
|
|
621 |
for(int ip=0; ip<6; ip++){ |
for(int ip=0; ip<6; ip++){ |
622 |
// cout << ip<<" ** "<<xm[ip]<<" / "<<ym[ip]<<endl;; |
// cout << ip<<" ** "<<xm[ip]<<" / "<<ym[ip]<<endl;; |
635 |
float bfy = 10*TrkParams::GetBY(v);//Tesla |
float bfy = 10*TrkParams::GetBY(v);//Tesla |
636 |
int ipp=ip+1; |
int ipp=ip+1; |
637 |
xyzpam_(&ipp,&icx,&icy,&ladder,&sensor,&ax,&ay,&bfx,&bfy); |
xyzpam_(&ipp,&icx,&icy,&ladder,&sensor,&ax,&ay,&bfx,&bfy); |
638 |
|
if(icx<0 || icy<0)return false; |
639 |
} |
} |
640 |
|
return true; |
641 |
} |
} |
642 |
/** |
/** |
643 |
* \brief Tracking method. It calls F77 mini routine. |
* \brief Tracking method. It calls F77 mini routine. |
675 |
|
|
676 |
extern cMini2track track_; |
extern cMini2track track_; |
677 |
fail = 0; |
fail = 0; |
678 |
|
|
679 |
FillMiniStruct(track_); |
FillMiniStruct(track_); |
680 |
|
|
681 |
if(froml1!=0)EvaluateClusterPositions(); |
if(froml1!=0){ |
682 |
|
if( !EvaluateClusterPositions() ){ |
683 |
|
cout << "void TrkTrack::Fit("<<pfixed<<","<<fail<<","<<iprint<<","<<froml1<<") --- ERROR evaluating cluster positions "<<endl; |
684 |
|
FillMiniStruct(track_) ; |
685 |
|
fail = 1; |
686 |
|
return; |
687 |
|
} |
688 |
|
}else{ |
689 |
|
FillMiniStruct(track_); |
690 |
|
} |
691 |
|
|
692 |
// if fit variables have been reset, evaluate the initial guess |
// if fit variables have been reset, evaluate the initial guess |
693 |
if(al[0]==-9999.&&al[1]==-9999.&&al[2]==-9999.&&al[3]==-9999.&&al[4]==-9999.)guess_(); |
if(al[0]==-9999.&&al[1]==-9999.&&al[2]==-9999.&&al[3]==-9999.&&al[4]==-9999.)guess_(); |
998 |
for(int i=0; i<nclsy(); i++) ((TrkSinglet *)sy[i])->Dump(); |
for(int i=0; i<nclsy(); i++) ((TrkSinglet *)sy[i])->Dump(); |
999 |
} |
} |
1000 |
} |
} |
1001 |
|
/** |
1002 |
|
* \brief Dump processing status |
1003 |
|
*/ |
1004 |
|
void TrkLevel2::StatusDump(int view){ |
1005 |
|
cout << "DSP n. "<<view+1<<" status: "<<hex<<good[view]<<endl; |
1006 |
|
}; |
1007 |
|
/** |
1008 |
|
* \brief Check event status |
1009 |
|
* |
1010 |
|
* Check the event status, according to a flag-mask given as input. |
1011 |
|
* Return true if the view passes the check. |
1012 |
|
* |
1013 |
|
* @param view View number (0-11) |
1014 |
|
* @param flagmask Mask of flags to check (eg. flagmask=0x111 no missing packet, |
1015 |
|
* no crc error, no software alarm) |
1016 |
|
* |
1017 |
|
* @see TrkLevel2 class definition to know how the status flag is defined |
1018 |
|
* |
1019 |
|
*/ |
1020 |
|
Bool_t TrkLevel2::StatusCheck(int view, int flagmask){ |
1021 |
|
|
1022 |
|
if( view<0 || view >= 12)return false; |
1023 |
|
return !(good[view]&flagmask); |
1024 |
|
|
1025 |
|
}; |
1026 |
|
|
1027 |
|
|
1028 |
//-------------------------------------- |
//-------------------------------------- |
1029 |
// |
// |
1030 |
// |
// |