678 |
track.zm[i]=zm[i]; |
track.zm[i]=zm[i]; |
679 |
|
|
680 |
// --- temporaneo ---------------------------- |
// --- temporaneo ---------------------------- |
681 |
// andrebbe inserita la dimensione del sensore |
// float segment = 100.; |
682 |
float segment = 100.; |
// track.xm_a[i]=xm[i]; |
683 |
track.xm_a[i]=xm[i]; |
// track.xm_b[i]=xm[i]; |
684 |
track.xm_b[i]=xm[i]; |
// track.ym_a[i]=ym[i]; |
685 |
track.ym_a[i]=ym[i]; |
// track.ym_b[i]=ym[i]; |
686 |
track.ym_b[i]=ym[i]; |
// if( XGood(i) && !YGood(i) ){ |
687 |
if( XGood(i) && !YGood(i) ){ |
// track.ym_a[i] = track.ym_a[i]+segment; |
688 |
track.ym_a[i] = track.ym_a[i]+segment; |
// track.ym_b[i] = track.ym_b[i]-segment; |
689 |
track.ym_b[i] = track.ym_b[i]-segment; |
// }else if( !XGood(i) && YGood(i)){ |
690 |
}else if( !XGood(i) && YGood(i)){ |
// track.xm_a[i] = track.xm_a[i]+segment; |
691 |
track.xm_a[i] = track.xm_a[i]+segment; |
// track.xm_b[i] = track.xm_b[i]-segment; |
692 |
track.xm_b[i] = track.xm_b[i]-segment; |
// } |
|
} |
|
693 |
// --- temporaneo ---------------------------- |
// --- temporaneo ---------------------------- |
694 |
|
|
695 |
|
if( XGood(i) || YGood(i) ){ |
696 |
|
double segment = 2.;//cm |
697 |
|
// NB: i parametri di allineamento hanno una notazione particolare!!! |
698 |
|
// sensor = 0 (hybrid side), 1 |
699 |
|
// ladder = 0-2 (increasing x) |
700 |
|
// plane = 0-5 (from bottom to top!!!) |
701 |
|
int is = (int)GetSensor(i); if(i==5)is=1-is; |
702 |
|
int ip = 5-i; |
703 |
|
int il = (int)GetLadder(i); |
704 |
|
|
705 |
|
double omega = 0.; |
706 |
|
double beta = 0.; |
707 |
|
double gamma = 0.; |
708 |
|
if( |
709 |
|
(is < 0 || is > 1 || ip < 0 || ip > 5 || il < 0 || il > 2) && |
710 |
|
true){ |
711 |
|
// se il piano risulta colpito, ladder e sensore devono essere |
712 |
|
// assegnati correttamente |
713 |
|
cout << " void TrkTrack::FillMiniStruct(cMini2track&) --- WARNING --- sensor not defined, cannot read alignment parameters "<<endl; |
714 |
|
cout << " is ip il = "<<is<<" "<<ip<<" "<<il<<endl; |
715 |
|
}else{ |
716 |
|
omega = alignparameters_.omega[is][il][ip]; |
717 |
|
beta = alignparameters_.beta[is][il][ip]; |
718 |
|
gamma = alignparameters_.gamma[is][il][ip]; |
719 |
|
} |
720 |
|
|
721 |
|
if( XGood(i) && !YGood(i) ){ |
722 |
|
track.xm_a[i] = xm[i] - omega * segment; |
723 |
|
track.ym_a[i] = ym[i] + segment; |
724 |
|
// track.zm_a[i] = zm[i] + beta * segment;//not used yet |
725 |
|
track.xm_b[i] = xm[i] + omega * segment; |
726 |
|
track.ym_b[i] = ym[i] - segment; |
727 |
|
// track.zm_b[i] = zm[i] - beta * segment;//not used yet |
728 |
|
}else if( !XGood(i) && YGood(i) ){ |
729 |
|
track.xm_a[i] = xm[i] + segment; |
730 |
|
track.ym_a[i] = ym[i] + omega * segment; |
731 |
|
// track.zm_a[i] = zm[i] - gamma * segment;//not used yet |
732 |
|
track.xm_b[i] = xm[i] - segment; |
733 |
|
track.ym_b[i] = ym[i] - omega * segment; |
734 |
|
// track.zm_b[i] = zm[i] + gamma * segment;//not used yet |
735 |
|
} |
736 |
|
} |
737 |
|
|
738 |
track.resx[i]=resx[i]; |
track.resx[i]=resx[i]; |
739 |
track.resy[i]=resy[i]; |
track.resy[i]=resy[i]; |
740 |
track.tailx[i]=tailx[i]; |
track.tailx[i]=tailx[i]; |
741 |
track.taily[i]=taily[i]; |
track.taily[i]=taily[i]; |
1041 |
}; |
}; |
1042 |
|
|
1043 |
/** |
/** |
1044 |
* Method to retrieve the ladder (0-4, increasing x) traversed by the track on this plane. |
* Method to retrieve the ladder (0-2, increasing x) traversed by the track on this plane. |
1045 |
* If no ladder is traversed (dead area) the metod retuns -1. |
* If no ladder is traversed (dead area) the metod retuns -1. |
1046 |
* @param ip Tracker plane (0-5) |
* @param ip Tracker plane (0-5) |
1047 |
*/ |
*/ |
1064 |
/** |
/** |
1065 |
* \brief Method to include a x-cluster to the track. |
* \brief Method to include a x-cluster to the track. |
1066 |
* @param ip Tracker plane (0-5) |
* @param ip Tracker plane (0-5) |
1067 |
* @param clid Cluster ID (0,1,...) |
* @param clid Cluster ID (0 = no-cluster, 1,2,... otherwise ) |
1068 |
* @param is Sensor (0-1, increasing y) |
* @param il Ladder (0-2, increasing x, -1 if no sensitive area is hit) |
1069 |
|
* @param is Sensor (0-1, increasing y, -1 if no sensitive area is hit) |
1070 |
|
* @param bad True if the cluster contains bad strips |
1071 |
* @see Fit(double pfixed, int& fail, int iprint, int froml1) |
* @see Fit(double pfixed, int& fail, int iprint, int froml1) |
1072 |
*/ |
*/ |
1073 |
void TrkTrack::SetXGood(int ip, int clid, int is){ |
void TrkTrack::SetXGood(int ip, int clid, int il, int is, bool bad){ |
1074 |
int il=0; //ladder (temporary) |
// int il=0; //ladder (temporary) |
1075 |
bool bad=false; //ladder (temporary) |
// bool bad=false; //ladder (temporary) |
1076 |
xgood[ip]=il*100000000+is*10000000+clid; |
if(ip<0||ip>5||clid<0||il<-1||il>2||is<-1||is>1) |
1077 |
|
cout << " void TrkTrack::SetXGood(int,int,int,int,bool) --> MA SEI DI COCCIO?!?!"<<endl; |
1078 |
|
xgood[ip]=(il+1)*100000000+(is+1)*10000000+clid; |
1079 |
if(bad)xgood[ip]=-xgood[ip]; |
if(bad)xgood[ip]=-xgood[ip]; |
1080 |
}; |
}; |
1081 |
/** |
/** |
1082 |
* \brief Method to include a y-cluster to the track. |
* \brief Method to include a y-cluster to the track. |
1083 |
* @param ip Tracker plane (0-5) |
* @param ip Tracker plane (0-5) |
1084 |
* @param clid Cluster ID (0,1,...) |
* @param clid Cluster ID (0 = no-cluster, 1,2,... otherwise ) |
1085 |
* @param is Sensor (0-1) |
* @param il Ladder (0-2, increasing x, -1 if no sensitive area is hit) |
1086 |
|
* @param is Sensor (0-1, increasing y, -1 if no sensitive area is hit) |
1087 |
|
* @param bad True if the cluster contains bad strips |
1088 |
* @see Fit(double pfixed, int& fail, int iprint, int froml1) |
* @see Fit(double pfixed, int& fail, int iprint, int froml1) |
1089 |
*/ |
*/ |
1090 |
void TrkTrack::SetYGood(int ip, int clid, int is){ |
void TrkTrack::SetYGood(int ip, int clid, int il, int is, bool bad){ |
1091 |
int il=0; //ladder (temporary) |
// int il=0; //ladder (temporary) |
1092 |
bool bad=false; //ladder (temporary) |
// bool bad=false; //ladder (temporary) |
1093 |
ygood[ip]=il*100000000+is*10000000+clid; |
if(ip<0||ip>5||clid<0||il<-1||il>2||is<-1||is>1) |
1094 |
|
cout << " void TrkTrack::SetYGood(int,int,int,int,bool) --> MA SEI DI COCCIO?!?!"<<endl; |
1095 |
|
ygood[ip]=(il+1)*100000000+(is+1)*10000000+clid; |
1096 |
if(bad)ygood[ip]=-ygood[ip]; |
if(bad)ygood[ip]=-ygood[ip]; |
1097 |
}; |
}; |
1098 |
|
|