862 int dphi[6] = {-999,-999,-999,-999,-999,-999}, deta[6] = {-999,-999,-999,-999,-999,-999};
863 int clct[4] = {-999,-999,-999,-999}, cscid[4] = {-999,-999,-999,-999};
864 int phis[4] = {-999,-999,-999,-999},
etas[4] = {-999,-999,-999,-999}, mode_inv = 0;;
865 int FR[4] = {-999,-999,-999,-999};
867 float theta_angle = ((track.
theta)*0.2874016 + 8.5)*(3.14159265359/180);
868 float eta = (-1)*
log(
tan(theta_angle/2));
874 if(verbose)
cout<<
"Track eta = "<<eta<<
" and has hits in stations ";
877 for(
unsigned int s=8;
s<12;
s++){
878 if((stubs.find(
s)->second).
size() == 1){
881 if(verbose)
cout<<
"s= " <<
s <<
" " << endl;
884 if(verbose)
cout<<
"eta= " <<
etas[
s-8] <<
" " << endl;
885 phis[
s-8] = track.
phis[
x];
886 if(verbose)
cout<<
"phi= " << phis[
s-8] <<
" " << endl;
887 clct[
s-8] = (stubs.find(
s)->second)[0].getPattern();
888 if(verbose)
cout<<
"clct= " << clct[
s-8] <<
" " << endl;
889 cscid[
s-8] = (stubs.find(
s)->second)[0].Id();
890 if(verbose)
cout<<
"cscid= " << cscid[
s-8] <<
" " << endl;
892 if(verbose)
cout<<
s <<
" " << (stubs.find(
s)->second)[0].detId<CSCDetId>().station()<<
" " << phis[
s-8] << endl;;
894 const CSCChamber* layer = cscGeometry->chamber((stubs.find(
s)->second)[0].detId<CSCDetId>());
900 int coord[5] = {586,686,815,924,1013};
901 for(
int i=0;
i<5;
i++){
903 if((fabs(glc.
z()) < (coord[
i] + 7)) && (fabs(glc.
z()) > (coord[
i] - 7)))
924 if(verbose)
cout <<
"\n Mode = " <<
mode <<
", inverted mode = " << mode_inv << endl;
930 if(phis[0] > 0 && phis[1] > 0){
931 dphi[0] = phis[1] - phis[0];
934 if(phis[0] > 0 && phis[2] > 0){
935 dphi[1] = phis[2] - phis[0];
938 if(phis[0] > 0 && phis[3] > 0){
939 dphi[2] = phis[3] - phis[0];
942 if(phis[1] > 0 && phis[2] > 0){
943 dphi[3] = phis[2] - phis[1];
946 if(phis[1] > 0 && phis[3] > 0){
947 dphi[4] = phis[3] - phis[1];
950 if(phis[2] > 0 && phis[3] > 0){
951 dphi[5] = phis[3] - phis[2];
959 float dPhi12__ = fabs(dphi[0]);
960 float eta__ =
getEta(eta, 5);
961 float clct1__ =
getCLCT(clct[0]);
962 float clct2__ =
getCLCT(clct[1]);
965 cout <<
"Inverted mode 3 Track " << endl;
966 cout << setw(10) <<
"dPhi12: " << dphi[0] << setw(10) << dPhi12__ << endl;
967 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
968 cout << setw(10) <<
"CLCT2: " << clct[1] << setw(10) << clct2__ << endl;
969 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
973 float dPhi13__ = fabs(dphi[1]);
974 float eta__ =
getEta(eta, 5);
975 float clct1__ =
getCLCT(clct[0]);
976 float clct3__ =
getCLCT(clct[2]);
979 cout <<
"Inverted mode 5 Track " << endl;
980 cout << setw(10) <<
"dPhi13: " << dphi[1] << setw(10) << dPhi13__ << endl;
981 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
982 cout << setw(10) <<
"CLCT3: " << clct[2] << setw(10) << clct3__ << endl;
983 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
987 float dPhi14__ = fabs(dphi[2]);
988 float eta__ =
getEta(eta, 5);
989 float clct1__ =
getCLCT(clct[0]);
990 float clct4__ =
getCLCT(clct[3]);
993 cout <<
"Inverted mode 9 Track " << endl;
994 cout << setw(10) <<
"dPhi14: " << dphi[2] << setw(10) << dPhi14__ << endl;
995 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
996 cout << setw(10) <<
"CLCT4: " << clct[3] << setw(10) << clct4__ << endl;
997 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1001 float dPhi23__ = fabs(dphi[3]);
1002 float eta__ =
getEta(eta, 5);
1003 float clct2__ =
getCLCT(clct[1]);
1004 float clct3__ =
getCLCT(clct[2]);
1007 cout <<
"Inverted mode 9 Track " << endl;
1008 cout << setw(10) <<
"dPhi23: " << dphi[3] << setw(10) << dPhi23__ << endl;
1009 cout << setw(10) <<
"CLCT2: " << clct[1] << setw(10) << clct2__ << endl;
1010 cout << setw(10) <<
"CLCT3: " << clct[2] << setw(10) << clct3__ << endl;
1011 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1015 float dPhi24__ = fabs(dphi[4]);
1016 float eta__ =
getEta(eta, 5);
1017 float clct2__ =
getCLCT(clct[1]);
1018 float clct4__ =
getCLCT(clct[3]);
1021 cout <<
"Inverted mode 10 Track " << endl;
1022 cout << setw(10) <<
"dPhi24: " << dphi[4] << setw(10) << dPhi24__ << endl;
1023 cout << setw(10) <<
"CLCT2: " << clct[1] << setw(10) << clct2__ << endl;
1024 cout << setw(10) <<
"CLCT4: " << clct[3] << setw(10) << clct4__ << endl;
1025 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1029 float dPhi34__ = fabs(dphi[5]);
1030 float eta__ =
getEta(eta, 5);
1031 float clct3__ =
getCLCT(clct[2]);
1032 float clct4__ =
getCLCT(clct[3]);
1035 cout <<
"Inverted mode 12 Track " << endl;
1036 cout << setw(10) <<
"dPhi34: " << dphi[5] << setw(10) << dPhi34__ << endl;
1037 cout << setw(10) <<
"CLCT3: " << clct[2] << setw(10) << clct3__ << endl;
1038 cout << setw(10) <<
"CLCT4: " << clct[3] << setw(10) << clct4__ << endl;
1039 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1046 float eta__ =
getEta(eta, 5);
1047 float clct1__ =
getCLCT(clct[0]);
1049 cout <<
"Inverted mode 7 Track " << endl;
1050 cout << setw(10) <<
"dPhi12: " << dphi[0] << setw(10) << dPhi12__ << endl;
1051 cout << setw(10) <<
"dPhi23: " << dphi[3] << setw(10) << dPhi23__ << endl;
1052 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
1053 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1059 float eta__ =
getEta(eta, 5);
1060 float clct1__ =
getCLCT(clct[0]);
1062 cout <<
"Inverted mode 11 Track " << endl;
1063 cout << setw(10) <<
"dPhi12: " << dphi[0] << setw(10) << dPhi12__ << endl;
1064 cout << setw(10) <<
"dPhi24: " << dphi[4] << setw(10) << dPhi24__ << endl;
1065 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
1066 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1072 float eta__ =
getEta(eta, 5);
1073 float clct1__ =
getCLCT(clct[0]);
1075 cout <<
"Inverted mode 13 Track " << endl;
1076 cout << setw(10) <<
"dPhi13: " << dphi[1] << setw(10) << dPhi13__ << endl;
1077 cout << setw(10) <<
"dPhi34: " << dphi[5] << setw(10) << dPhi34__ << endl;
1078 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
1079 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1085 float eta__ =
getEta(eta, 5);
1086 float clct2__ =
getCLCT(clct[1]);
1088 cout <<
"Inverted mode 14 Track " << endl;
1089 cout << setw(10) <<
"dPhi23: " << dphi[3] << setw(10) << dPhi23__ << endl;
1090 cout << setw(10) <<
"dPhi34: " << dphi[5] << setw(10) << dPhi34__ << endl;
1091 cout << setw(10) <<
"CLCT2: " << clct[1] << setw(10) << clct2__ << endl;
1092 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1099 float eta__ =
getEta(eta, 5);
1102 cout <<
"Inverted mode 15 Track " << endl;
1103 cout << setw(10) <<
"dPhi12: " << dphi[0] << setw(10) << dPhi12__ << endl;
1104 cout << setw(10) <<
"dPhi23: " << dphi[3] << setw(10) << dPhi23__ << endl;
1105 cout << setw(10) <<
"dPhi34: " << dphi[5] << setw(10) << dPhi34__ << endl;
1106 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1110 float dPhi12 = dphi[0];
1111 float dPhi13 = dphi[1];
1112 float dPhi14 = dphi[2];
1113 float dPhi23 = dphi[3];
1114 float dPhi24 = dphi[4];
1115 float dPhi34 = dphi[5];
1116 float dTheta12 = deta[0];
1117 float dTheta13 = deta[1];
1118 float dTheta14 = deta[2];
1119 float dTheta23 = deta[3];
1120 float dTheta24 = deta[4];
1121 float dTheta34 = deta[5];
1123 float CLCT1 = clct[0];
1124 float CLCT2 = clct[1];
1125 float CLCT3 = clct[2];
1126 float CLCT4 = clct[3];
1132 unsigned long Address = 0x0;
1134 if (doComp && mode_inv==3)
1138 if (dPhi12<0) dPhi12Sign = -1;
1146 int dPhi12_ = fabs(dPhi12);
1147 int sign12_ = dPhi12Sign > 0 ? 1 : 0;
1150 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1151 CLCT1_ =
abs(CLCT1_);
1153 int CLCT2Sign_ = CLCT2_ > 0 ? 1 : 0;
1154 CLCT2_ =
abs(CLCT2_);
1158 int Mode_ = mode_inv;
1160 Address += ( dPhi12_ & ((1<<9)-1)) << (0);
1161 Address += ( sign12_ & ((1<<1)-1)) << (0+9);
1162 Address += ( dTheta12_ & ((1<<3)-1)) << (0+9+1);
1163 Address += ( CLCT1_ & ((1<<2)-1)) << (0+9+1+3);
1164 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1165 Address += ( CLCT2_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1166 Address += ( CLCT2Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1167 Address += ( FR1_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1168 Address += ( FR2_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1169 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1170 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1173 if (doComp && mode_inv==5)
1181 if (dPhi13<0) dPhi13Sign = -1;
1186 int dPhi13_ = fabs(dPhi13);
1187 int sign13_ = dPhi13Sign > 0 ? 1 : 0;
1190 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1191 CLCT1_ =
abs(CLCT1_);
1193 int CLCT3Sign_ = CLCT3_ > 0 ? 1 : 0;
1194 CLCT3_ =
abs(CLCT3_);
1198 int Mode_ = mode_inv;
1200 Address += ( dPhi13_ & ((1<<9)-1)) << (0);
1201 Address += ( sign13_ & ((1<<1)-1)) << (0+9);
1202 Address += ( dTheta13_ & ((1<<3)-1)) << (0+9+1);
1203 Address += ( CLCT1_ & ((1<<2)-1)) << (0+9+1+3);
1204 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1205 Address += ( CLCT3_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1206 Address += ( CLCT3Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1207 Address += ( FR1_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1208 Address += ( FR3_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1209 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1210 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1213 if (doComp && mode_inv==9)
1222 if (dPhi14<0) dPhi14Sign = -1;
1227 int dPhi14_ = fabs(dPhi14);
1228 int sign14_ = dPhi14Sign > 0 ? 1 : 0;
1231 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1232 CLCT1_ =
abs(CLCT1_);
1234 int CLCT4Sign_ = CLCT4_ > 0 ? 1 : 0;
1235 CLCT4_ =
abs(CLCT4_);
1239 int Mode_ = mode_inv;
1241 Address += ( dPhi14_ & ((1<<9)-1)) << (0);
1242 Address += ( sign14_ & ((1<<1)-1)) << (0+9);
1243 Address += ( dTheta14_ & ((1<<3)-1)) << (0+9+1);
1244 Address += ( CLCT1_ & ((1<<2)-1)) << (0+9+1+3);
1245 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1246 Address += ( CLCT4_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1247 Address += ( CLCT4Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1248 Address += ( FR1_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1249 Address += ( FR4_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1250 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1251 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1253 if (doComp && mode_inv==6)
1261 if (dPhi23<0) dPhi23Sign = -1;
1266 int dPhi23_ = fabs(dPhi23);
1267 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1270 int CLCT2Sign_ = CLCT2_ > 0 ? 1 : 0;
1271 CLCT2_ =
abs(CLCT2_);
1273 int CLCT3Sign_ = CLCT3_ > 0 ? 1 : 0;
1274 CLCT3_ =
abs(CLCT3_);
1278 int Mode_ = mode_inv;
1280 Address += ( dPhi23_ & ((1<<9)-1)) << (0);
1281 Address += ( sign23_ & ((1<<1)-1)) << (0+9);
1282 Address += ( dTheta23_ & ((1<<3)-1)) << (0+9+1);
1283 Address += ( CLCT2_ & ((1<<2)-1)) << (0+9+1+3);
1284 Address += ( CLCT2Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1285 Address += ( CLCT3_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1286 Address += ( CLCT3Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1287 Address += ( FR2_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1288 Address += ( FR3_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1289 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1290 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1292 if (doComp && mode_inv==10)
1300 if (dPhi24<0) dPhi24Sign = -1;
1305 int dPhi24_ = fabs(dPhi24);
1306 int sign24_ = dPhi24Sign > 0 ? 1 : 0;
1309 int CLCT2Sign_ = CLCT2_ > 0 ? 1 : 0;
1310 CLCT2_ =
abs(CLCT2_);
1312 int CLCT4Sign_ = CLCT4_ > 0 ? 1 : 0;
1313 CLCT4_ =
abs(CLCT4_);
1317 int Mode_ = mode_inv;
1319 Address += ( dPhi24_ & ((1<<9)-1)) << (0);
1320 Address += ( sign24_ & ((1<<1)-1)) << (0+9);
1321 Address += ( dTheta24_ & ((1<<3)-1)) << (0+9+1);
1322 Address += ( CLCT2_ & ((1<<2)-1)) << (0+9+1+3);
1323 Address += ( CLCT2Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1324 Address += ( CLCT4_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1325 Address += ( CLCT4Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1326 Address += ( FR2_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1327 Address += ( FR4_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1328 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1329 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1331 if (doComp && mode_inv==12)
1338 if (dPhi34<0) dPhi34Sign = -1;
1343 int dPhi34_ = fabs(dPhi34);
1344 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1347 int CLCT3Sign_ = CLCT3_ > 0 ? 1 : 0;
1348 CLCT3_ =
abs(CLCT3_);
1350 int CLCT4Sign_ = CLCT4_ > 0 ? 1 : 0;
1351 CLCT4_ =
abs(CLCT4_);
1355 int Mode_ = mode_inv;
1357 Address += ( dPhi34_ & ((1<<9)-1)) << (0);
1358 Address += ( sign34_ & ((1<<1)-1)) << (0+9);
1359 Address += ( dTheta34_ & ((1<<3)-1)) << (0+9+1);
1360 Address += ( CLCT3_ & ((1<<2)-1)) << (0+9+1+3);
1361 Address += ( CLCT3Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1362 Address += ( CLCT4_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1363 Address += ( CLCT4Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1364 Address += ( FR3_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1365 Address += ( FR4_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1366 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1367 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1370 if (doComp && mode_inv==7)
1378 if (dPhi12<0) dPhi12Sign = -1;
1379 if (dPhi23<0) dPhi23Sign = -1;
1386 int sign12_ = dPhi12Sign > 0 ? 1 : 0;
1387 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1390 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1391 CLCT1_ =
abs(CLCT1_);
1394 int Mode_ = mode_inv;
1396 Address += ( dPhi12_ & ((1<<7)-1)) << (0);
1397 Address += ( dPhi23_ & ((1<<5)-1)) << (0+7);
1398 Address += ( sign12_ & ((1<<1)-1)) << (0+7+5);
1399 Address += ( sign23_ & ((1<<1)-1)) << (0+7+5+1);
1400 Address += ( dTheta13_ & ((1<<3)-1)) << (0+7+5+1+1);
1401 Address += ( CLCT1_ & ((1<<2)-1)) << (0+7+5+1+1+3);
1402 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+7+5+1+1+3+2);
1403 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+1+1+3+2+1);
1404 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+1+1+3+2+1+1);
1405 Address += ( Mode_ & ((1<<4)-1)) << (0+7+5+1+1+3+2+1+1+5);
1408 if (doComp && mode_inv==11)
1415 if (dPhi12<0) dPhi12Sign = -1;
1416 if (dPhi24<0) dPhi24Sign = -1;
1422 int sign12_ = dPhi12Sign > 0 ? 1 : 0;
1423 int sign24_ = dPhi24Sign > 0 ? 1 : 0;
1426 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1427 CLCT1_ =
abs(CLCT1_);
1430 int Mode_ = mode_inv;
1432 Address += ( dPhi12_ & ((1<<7)-1)) << (0);
1433 Address += ( dPhi24_ & ((1<<5)-1)) << (0+7);
1434 Address += ( sign12_ & ((1<<1)-1)) << (0+7+5);
1435 Address += ( sign24_ & ((1<<1)-1)) << (0+7+5+1);
1436 Address += ( dTheta14_ & ((1<<3)-1)) << (0+7+5+1+1);
1437 Address += ( CLCT1_ & ((1<<2)-1)) << (0+7+5+1+1+3);
1438 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+7+5+1+1+3+2);
1439 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+1+1+3+2+1);
1440 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+1+1+3+2+1+1);
1441 Address += ( Mode_ & ((1<<4)-1)) << (0+7+5+1+1+3+2+1+1+5);
1443 if (doComp && mode_inv==13)
1450 if (dPhi13<0) dPhi13Sign = -1;
1451 if (dPhi34<0) dPhi34Sign = -1;
1457 int sign13_ = dPhi13Sign > 0 ? 1 : 0;
1458 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1461 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1462 CLCT1_ =
abs(CLCT1_);
1465 int Mode_ = mode_inv;
1467 Address += ( dPhi13_ & ((1<<7)-1)) << (0);
1468 Address += ( dPhi34_ & ((1<<6)-1)) << (0+7);
1469 Address += ( sign13_ & ((1<<1)-1)) << (0+7+5);
1470 Address += ( sign34_ & ((1<<1)-1)) << (0+7+5+1);
1471 Address += ( dTheta14_ & ((1<<3)-1)) << (0+7+5+1+1);
1472 Address += ( CLCT1_ & ((1<<2)-1)) << (0+7+5+1+1+3);
1473 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+7+5+1+1+3+2);
1474 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+1+1+3+2+1);
1475 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+1+1+3+2+1+1);
1476 Address += ( Mode_ & ((1<<4)-1)) << (0+7+5+1+1+3+2+1+1+5);
1479 if (doComp && mode_inv==14)
1487 if (dPhi23<0) dPhi23Sign = -1;
1488 if (dPhi34<0) dPhi34Sign = -1;
1494 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1495 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1498 int CLCT2Sign_ = CLCT2_ > 0 ? 1 : 0;
1499 CLCT2_ =
abs(CLCT2_);
1501 int Mode_ = mode_inv;
1503 Address += ( dPhi23_ & ((1<<7)-1)) << (0);
1504 Address += ( dPhi34_ & ((1<<6)-1)) << (0+7);
1505 Address += ( sign23_ & ((1<<1)-1)) << (0+7+6);
1506 Address += ( sign34_ & ((1<<1)-1)) << (0+7+6+1);
1507 Address += ( dTheta24_ & ((1<<3)-1)) << (0+7+6+1+1);
1508 Address += ( CLCT2_ & ((1<<2)-1)) << (0+7+6+1+1+3);
1509 Address += ( CLCT2Sign_ & ((1<<1)-1)) << (0+7+6+1+1+3+2);
1510 Address += ( eta_ & ((1<<5)-1)) << (0+7+6+1+1+3+2+1);
1511 Address += ( Mode_ & ((1<<4)-1)) << (0+7+6+1+1+3+2+1+5);
1514 if (doComp && mode_inv==15)
1520 if (dPhi12<0) dPhi12Sign = -1;
1521 if (dPhi23<0) dPhi23Sign = -1;
1522 if (dPhi34<0) dPhi34Sign = -1;
1524 if (dPhi12Sign==-1 && dPhi23Sign==-1 && dPhi34Sign==-1)
1525 { dPhi12Sign=1;dPhi23Sign=1;dPhi34Sign=1;}
1526 else if (dPhi12Sign==-1 && dPhi23Sign==1 && dPhi34Sign==1)
1527 { dPhi12Sign=1;dPhi23Sign=-1;dPhi34Sign=-1;}
1528 else if (dPhi12Sign==-1 && dPhi23Sign==-1 && dPhi34Sign==1)
1529 { dPhi12Sign=1;dPhi23Sign=1;dPhi34Sign=-1;}
1530 else if (dPhi12Sign==-1 && dPhi23Sign==1 && dPhi34Sign==-1)
1531 { dPhi12Sign=1;dPhi23Sign=-1;dPhi34Sign=1;}
1537 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1538 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1541 int Mode_ = mode_inv;
1543 Address += ( dPhi12_ & ((1<<7)-1)) << 0;
1544 Address += ( dPhi23_ & ((1<<5)-1)) << (0+7);
1545 Address += ( dPhi34_ & ((1<<6)-1)) << (0+7+5);
1546 Address += ( sign23_ & ((1<<1)-1)) << (0+7+5+6);
1547 Address += ( sign34_ & ((1<<1)-1)) << (0+7+5+6+1);
1548 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+6+1+1);
1549 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+6+1+1+1);
1550 Address += ( Mode_ & ((1<<4)-1)) << (0+7+5+6+1+1+1+5);
const TriggerPrimitiveStationMap & getStubs() const
static int getEtaInt(float eta, int bits=5)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
static float getEta(float eta, int bits=5)
std::vector< int > thetas
static float getCLCT(float clct)
static float getdTheta(float dTheta)
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
static float getNLBdPhi(float dPhi, int bits, int max=512)
static int getNLBdPhiBin(float dPhi, int bits, int max=512)
std::map< unsigned, TriggerPrimitiveCollection > TriggerPrimitiveStationMap
tuple size
Write out results.