895 int dphi[6] = {-999,-999,-999,-999,-999,-999}, deta[6] = {-999,-999,-999,-999,-999,-999};
896 int clct[4] = {-999,-999,-999,-999}, cscid[4] = {-999,-999,-999,-999};
897 int phis[4] = {-999,-999,-999,-999},
etas[4] = {-999,-999,-999,-999}, mode_inv = 0;;
898 int FR[4] = {-999,-999,-999,-999};
900 float theta_angle = ((track.
theta)*0.2874016 + 8.5)*(3.14159265359/180);
901 float eta = (-1)*
log(
tan(theta_angle/2));
907 if(verbose)
cout<<
"Track eta = "<<eta<<
" and has hits in stations ";
910 for(
unsigned int s=8;
s<12;
s++){
911 if((stubs.find(
s)->second).
size() == 1){
914 if(verbose)
cout<<
"s= " <<
s <<
" " << endl;
917 if(verbose)
cout<<
"eta= " <<
etas[
s-8] <<
" " << endl;
918 phis[
s-8] = track.
phis[
x];
919 if(verbose)
cout<<
"phi= " << phis[
s-8] <<
" " << endl;
920 clct[
s-8] = (stubs.find(
s)->second)[0].getPattern();
921 if(verbose)
cout<<
"clct= " << clct[
s-8] <<
" " << endl;
922 cscid[
s-8] = (stubs.find(
s)->second)[0].Id();
923 if(verbose)
cout<<
"cscid= " << cscid[
s-8] <<
" " << endl;
925 if(verbose)
cout<<
s <<
" " << (stubs.find(
s)->second)[0].detId<CSCDetId>().station()<<
" " << phis[
s-8] << endl;;
927 const CSCChamber* layer = cscGeometry->chamber((stubs.find(
s)->second)[0].detId<CSCDetId>());
933 int coord[5] = {586,686,815,924,1013};
934 for(
int i=0;
i<5;
i++){
936 if((fabs(glc.
z()) < (coord[
i] + 7)) && (fabs(glc.
z()) > (coord[
i] - 7)))
957 if(verbose)
cout <<
"\n Mode = " <<
mode <<
", inverted mode = " << mode_inv << endl;
963 for(
int d=0;
d<6;
d++){
968 if(phis[0] > 0 && phis[1] > 0){
969 dphi[0] = phis[1] - phis[0];
972 if(phis[0] > 0 && phis[2] > 0){
973 dphi[1] = phis[2] - phis[0];
976 if(phis[0] > 0 && phis[3] > 0){
977 dphi[2] = phis[3] - phis[0];
980 if(phis[1] > 0 && phis[2] > 0){
981 dphi[3] = phis[2] - phis[1];
984 if(phis[1] > 0 && phis[3] > 0){
985 dphi[4] = phis[3] - phis[1];
988 if(phis[2] > 0 && phis[3] > 0){
989 dphi[5] = phis[3] - phis[2];
997 float dPhi12__ = fabs(dphi[0]);
998 float eta__ =
getEta(eta, 5);
999 float clct1__ =
getCLCT(clct[0]);
1000 float clct2__ =
getCLCT(clct[1]);
1003 cout <<
"Inverted mode 3 Track " << endl;
1004 cout << setw(10) <<
"dPhi12: " << dphi[0] << setw(10) << dPhi12__ << endl;
1005 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
1006 cout << setw(10) <<
"CLCT2: " << clct[1] << setw(10) << clct2__ << endl;
1007 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1011 float dPhi13__ = fabs(dphi[1]);
1012 float eta__ =
getEta(eta, 5);
1013 float clct1__ =
getCLCT(clct[0]);
1014 float clct3__ =
getCLCT(clct[2]);
1017 cout <<
"Inverted mode 5 Track " << endl;
1018 cout << setw(10) <<
"dPhi13: " << dphi[1] << setw(10) << dPhi13__ << endl;
1019 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
1020 cout << setw(10) <<
"CLCT3: " << clct[2] << setw(10) << clct3__ << endl;
1021 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1025 float dPhi14__ = fabs(dphi[2]);
1026 float eta__ =
getEta(eta, 5);
1027 float clct1__ =
getCLCT(clct[0]);
1028 float clct4__ =
getCLCT(clct[3]);
1031 cout <<
"Inverted mode 9 Track " << endl;
1032 cout << setw(10) <<
"dPhi14: " << dphi[2] << setw(10) << dPhi14__ << endl;
1033 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
1034 cout << setw(10) <<
"CLCT4: " << clct[3] << setw(10) << clct4__ << endl;
1035 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1039 float dPhi23__ = fabs(dphi[3]);
1040 float eta__ =
getEta(eta, 5);
1041 float clct2__ =
getCLCT(clct[1]);
1042 float clct3__ =
getCLCT(clct[2]);
1045 cout <<
"Inverted mode 9 Track " << endl;
1046 cout << setw(10) <<
"dPhi23: " << dphi[3] << setw(10) << dPhi23__ << endl;
1047 cout << setw(10) <<
"CLCT2: " << clct[1] << setw(10) << clct2__ << endl;
1048 cout << setw(10) <<
"CLCT3: " << clct[2] << setw(10) << clct3__ << endl;
1049 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1053 float dPhi24__ = fabs(dphi[4]);
1054 float eta__ =
getEta(eta, 5);
1055 float clct2__ =
getCLCT(clct[1]);
1056 float clct4__ =
getCLCT(clct[3]);
1059 cout <<
"Inverted mode 10 Track " << endl;
1060 cout << setw(10) <<
"dPhi24: " << dphi[4] << setw(10) << dPhi24__ << endl;
1061 cout << setw(10) <<
"CLCT2: " << clct[1] << setw(10) << clct2__ << endl;
1062 cout << setw(10) <<
"CLCT4: " << clct[3] << setw(10) << clct4__ << endl;
1063 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1067 float dPhi34__ = fabs(dphi[5]);
1068 float eta__ =
getEta(eta, 5);
1069 float clct3__ =
getCLCT(clct[2]);
1070 float clct4__ =
getCLCT(clct[3]);
1073 cout <<
"Inverted mode 12 Track " << endl;
1074 cout << setw(10) <<
"dPhi34: " << dphi[5] << setw(10) << dPhi34__ << endl;
1075 cout << setw(10) <<
"CLCT3: " << clct[2] << setw(10) << clct3__ << endl;
1076 cout << setw(10) <<
"CLCT4: " << clct[3] << setw(10) << clct4__ << endl;
1077 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1084 float eta__ =
getEta(eta, 5);
1085 float clct1__ =
getCLCT(clct[0]);
1087 cout <<
"Inverted mode 7 Track " << endl;
1088 cout << setw(10) <<
"dPhi12: " << dphi[0] << setw(10) << dPhi12__ << endl;
1089 cout << setw(10) <<
"dPhi23: " << dphi[3] << setw(10) << dPhi23__ << endl;
1090 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
1091 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1097 float eta__ =
getEta(eta, 5);
1098 float clct1__ =
getCLCT(clct[0]);
1100 cout <<
"Inverted mode 11 Track " << endl;
1101 cout << setw(10) <<
"dPhi12: " << dphi[0] << setw(10) << dPhi12__ << endl;
1102 cout << setw(10) <<
"dPhi24: " << dphi[4] << setw(10) << dPhi24__ << endl;
1103 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
1104 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1110 float eta__ =
getEta(eta, 5);
1111 float clct1__ =
getCLCT(clct[0]);
1113 cout <<
"Inverted mode 13 Track " << endl;
1114 cout << setw(10) <<
"dPhi13: " << dphi[1] << setw(10) << dPhi13__ << endl;
1115 cout << setw(10) <<
"dPhi34: " << dphi[5] << setw(10) << dPhi34__ << endl;
1116 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
1117 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1123 float eta__ =
getEta(eta, 5);
1124 float clct2__ =
getCLCT(clct[1]);
1126 cout <<
"Inverted mode 14 Track " << endl;
1127 cout << setw(10) <<
"dPhi23: " << dphi[3] << setw(10) << dPhi23__ << endl;
1128 cout << setw(10) <<
"dPhi34: " << dphi[5] << setw(10) << dPhi34__ << endl;
1129 cout << setw(10) <<
"CLCT2: " << clct[1] << setw(10) << clct2__ << endl;
1130 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1137 float eta__ =
getEta(eta, 5);
1140 cout <<
"Inverted mode 15 Track " << endl;
1141 cout << setw(10) <<
"dPhi12: " << dphi[0] << setw(10) << dPhi12__ << endl;
1142 cout << setw(10) <<
"dPhi23: " << dphi[3] << setw(10) << dPhi23__ << endl;
1143 cout << setw(10) <<
"dPhi34: " << dphi[5] << setw(10) << dPhi34__ << endl;
1144 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1148 float dPhi12 = dphi[0];
1149 float dPhi13 = dphi[1];
1150 float dPhi14 = dphi[2];
1151 float dPhi23 = dphi[3];
1152 float dPhi24 = dphi[4];
1153 float dPhi34 = dphi[5];
1154 float dTheta12 = deta[0];
1155 float dTheta13 = deta[1];
1156 float dTheta14 = deta[2];
1157 float dTheta23 = deta[3];
1158 float dTheta24 = deta[4];
1159 float dTheta34 = deta[5];
1161 float CLCT1 = clct[0];
1162 float CLCT2 = clct[1];
1163 float CLCT3 = clct[2];
1164 float CLCT4 = clct[3];
1170 unsigned long Address = 0x0;
1172 if (doComp && mode_inv==3)
1176 if (dPhi12<0) dPhi12Sign = -1;
1184 int dPhi12_ = fabs(dPhi12);
1185 int sign12_ = dPhi12Sign > 0 ? 1 : 0;
1188 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1189 CLCT1_ =
abs(CLCT1_);
1191 int CLCT2Sign_ = CLCT2_ > 0 ? 1 : 0;
1192 CLCT2_ =
abs(CLCT2_);
1196 int Mode_ = mode_inv;
1198 Address += ( dPhi12_ & ((1<<9)-1)) << (0);
1199 Address += ( sign12_ & ((1<<1)-1)) << (0+9);
1200 Address += ( dTheta12_ & ((1<<3)-1)) << (0+9+1);
1201 Address += ( CLCT1_ & ((1<<2)-1)) << (0+9+1+3);
1202 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1203 Address += ( CLCT2_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1204 Address += ( CLCT2Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1205 Address += ( FR1_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1206 Address += ( FR2_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1207 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1208 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1211 if (doComp && mode_inv==5)
1219 if (dPhi13<0) dPhi13Sign = -1;
1224 int dPhi13_ = fabs(dPhi13);
1225 int sign13_ = dPhi13Sign > 0 ? 1 : 0;
1228 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1229 CLCT1_ =
abs(CLCT1_);
1231 int CLCT3Sign_ = CLCT3_ > 0 ? 1 : 0;
1232 CLCT3_ =
abs(CLCT3_);
1236 int Mode_ = mode_inv;
1238 Address += ( dPhi13_ & ((1<<9)-1)) << (0);
1239 Address += ( sign13_ & ((1<<1)-1)) << (0+9);
1240 Address += ( dTheta13_ & ((1<<3)-1)) << (0+9+1);
1241 Address += ( CLCT1_ & ((1<<2)-1)) << (0+9+1+3);
1242 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1243 Address += ( CLCT3_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1244 Address += ( CLCT3Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1245 Address += ( FR1_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1246 Address += ( FR3_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1247 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1248 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1251 if (doComp && mode_inv==9)
1260 if (dPhi14<0) dPhi14Sign = -1;
1265 int dPhi14_ = fabs(dPhi14);
1266 int sign14_ = dPhi14Sign > 0 ? 1 : 0;
1269 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1270 CLCT1_ =
abs(CLCT1_);
1272 int CLCT4Sign_ = CLCT4_ > 0 ? 1 : 0;
1273 CLCT4_ =
abs(CLCT4_);
1277 int Mode_ = mode_inv;
1279 Address += ( dPhi14_ & ((1<<9)-1)) << (0);
1280 Address += ( sign14_ & ((1<<1)-1)) << (0+9);
1281 Address += ( dTheta14_ & ((1<<3)-1)) << (0+9+1);
1282 Address += ( CLCT1_ & ((1<<2)-1)) << (0+9+1+3);
1283 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1284 Address += ( CLCT4_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1285 Address += ( CLCT4Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1286 Address += ( FR1_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1287 Address += ( FR4_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1288 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1289 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1291 if (doComp && mode_inv==6)
1299 if (dPhi23<0) dPhi23Sign = -1;
1304 int dPhi23_ = fabs(dPhi23);
1305 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1308 int CLCT2Sign_ = CLCT2_ > 0 ? 1 : 0;
1309 CLCT2_ =
abs(CLCT2_);
1311 int CLCT3Sign_ = CLCT3_ > 0 ? 1 : 0;
1312 CLCT3_ =
abs(CLCT3_);
1316 int Mode_ = mode_inv;
1318 Address += ( dPhi23_ & ((1<<9)-1)) << (0);
1319 Address += ( sign23_ & ((1<<1)-1)) << (0+9);
1320 Address += ( dTheta23_ & ((1<<3)-1)) << (0+9+1);
1321 Address += ( CLCT2_ & ((1<<2)-1)) << (0+9+1+3);
1322 Address += ( CLCT2Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1323 Address += ( CLCT3_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1324 Address += ( CLCT3Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1325 Address += ( FR2_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1326 Address += ( FR3_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1327 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1328 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1330 if (doComp && mode_inv==10)
1338 if (dPhi24<0) dPhi24Sign = -1;
1343 int dPhi24_ = fabs(dPhi24);
1344 int sign24_ = dPhi24Sign > 0 ? 1 : 0;
1347 int CLCT2Sign_ = CLCT2_ > 0 ? 1 : 0;
1348 CLCT2_ =
abs(CLCT2_);
1350 int CLCT4Sign_ = CLCT4_ > 0 ? 1 : 0;
1351 CLCT4_ =
abs(CLCT4_);
1355 int Mode_ = mode_inv;
1357 Address += ( dPhi24_ & ((1<<9)-1)) << (0);
1358 Address += ( sign24_ & ((1<<1)-1)) << (0+9);
1359 Address += ( dTheta24_ & ((1<<3)-1)) << (0+9+1);
1360 Address += ( CLCT2_ & ((1<<2)-1)) << (0+9+1+3);
1361 Address += ( CLCT2Sign_ & ((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 += ( FR2_ & ((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);
1369 if (doComp && mode_inv==12)
1376 if (dPhi34<0) dPhi34Sign = -1;
1381 int dPhi34_ = fabs(dPhi34);
1382 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1385 int CLCT3Sign_ = CLCT3_ > 0 ? 1 : 0;
1386 CLCT3_ =
abs(CLCT3_);
1388 int CLCT4Sign_ = CLCT4_ > 0 ? 1 : 0;
1389 CLCT4_ =
abs(CLCT4_);
1393 int Mode_ = mode_inv;
1395 Address += ( dPhi34_ & ((1<<9)-1)) << (0);
1396 Address += ( sign34_ & ((1<<1)-1)) << (0+9);
1397 Address += ( dTheta34_ & ((1<<3)-1)) << (0+9+1);
1398 Address += ( CLCT3_ & ((1<<2)-1)) << (0+9+1+3);
1399 Address += ( CLCT3Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1400 Address += ( CLCT4_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1401 Address += ( CLCT4Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1402 Address += ( FR3_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1403 Address += ( FR4_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1404 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1405 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1408 if (doComp && mode_inv==7)
1416 if (dPhi12<0) dPhi12Sign = -1;
1417 if (dPhi23<0) dPhi23Sign = -1;
1424 int sign12_ = dPhi12Sign > 0 ? 1 : 0;
1425 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1428 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1429 CLCT1_ =
abs(CLCT1_);
1432 int Mode_ = mode_inv;
1434 Address += ( dPhi12_ & ((1<<7)-1)) << (0);
1435 Address += ( dPhi23_ & ((1<<5)-1)) << (0+7);
1436 Address += ( sign12_ & ((1<<1)-1)) << (0+7+5);
1437 Address += ( sign23_ & ((1<<1)-1)) << (0+7+5+1);
1438 Address += ( dTheta13_ & ((1<<3)-1)) << (0+7+5+1+1);
1439 Address += ( CLCT1_ & ((1<<2)-1)) << (0+7+5+1+1+3);
1440 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+7+5+1+1+3+2);
1441 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+1+1+3+2+1);
1442 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+1+1+3+2+1+1);
1443 Address += ( Mode_ & ((1<<4)-1)) << (0+7+5+1+1+3+2+1+1+5);
1446 if (doComp && mode_inv==11)
1453 if (dPhi12<0) dPhi12Sign = -1;
1454 if (dPhi24<0) dPhi24Sign = -1;
1460 int sign12_ = dPhi12Sign > 0 ? 1 : 0;
1461 int sign24_ = dPhi24Sign > 0 ? 1 : 0;
1464 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1465 CLCT1_ =
abs(CLCT1_);
1468 int Mode_ = mode_inv;
1470 Address += ( dPhi12_ & ((1<<7)-1)) << (0);
1471 Address += ( dPhi24_ & ((1<<5)-1)) << (0+7);
1472 Address += ( sign12_ & ((1<<1)-1)) << (0+7+5);
1473 Address += ( sign24_ & ((1<<1)-1)) << (0+7+5+1);
1474 Address += ( dTheta14_ & ((1<<3)-1)) << (0+7+5+1+1);
1475 Address += ( CLCT1_ & ((1<<2)-1)) << (0+7+5+1+1+3);
1476 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+7+5+1+1+3+2);
1477 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+1+1+3+2+1);
1478 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+1+1+3+2+1+1);
1479 Address += ( Mode_ & ((1<<4)-1)) << (0+7+5+1+1+3+2+1+1+5);
1481 if (doComp && mode_inv==13)
1488 if (dPhi13<0) dPhi13Sign = -1;
1489 if (dPhi34<0) dPhi34Sign = -1;
1495 int sign13_ = dPhi13Sign > 0 ? 1 : 0;
1496 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1499 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1500 CLCT1_ =
abs(CLCT1_);
1503 int Mode_ = mode_inv;
1505 Address += ( dPhi13_ & ((1<<7)-1)) << (0);
1506 Address += ( dPhi34_ & ((1<<5)-1)) << (0+7);
1507 Address += ( sign13_ & ((1<<1)-1)) << (0+7+5);
1508 Address += ( sign34_ & ((1<<1)-1)) << (0+7+5+1);
1509 Address += ( dTheta14_ & ((1<<3)-1)) << (0+7+5+1+1);
1510 Address += ( CLCT1_ & ((1<<2)-1)) << (0+7+5+1+1+3);
1511 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+7+5+1+1+3+2);
1512 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+1+1+3+2+1);
1513 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+1+1+3+2+1+1);
1514 Address += ( Mode_ & ((1<<4)-1)) << (0+7+5+1+1+3+2+1+1+5);
1517 if (doComp && mode_inv==14)
1525 if (dPhi23<0) dPhi23Sign = -1;
1526 if (dPhi34<0) dPhi34Sign = -1;
1532 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1533 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1536 int CLCT2Sign_ = CLCT2_ > 0 ? 1 : 0;
1537 CLCT2_ =
abs(CLCT2_);
1539 int Mode_ = mode_inv;
1541 Address += ( dPhi23_ & ((1<<7)-1)) << (0);
1542 Address += ( dPhi34_ & ((1<<6)-1)) << (0+7);
1543 Address += ( sign23_ & ((1<<1)-1)) << (0+7+6);
1544 Address += ( sign34_ & ((1<<1)-1)) << (0+7+6+1);
1545 Address += ( dTheta24_ & ((1<<3)-1)) << (0+7+6+1+1);
1546 Address += ( CLCT2_ & ((1<<2)-1)) << (0+7+6+1+1+3);
1547 Address += ( CLCT2Sign_ & ((1<<1)-1)) << (0+7+6+1+1+3+2);
1548 Address += ( eta_ & ((1<<5)-1)) << (0+7+6+1+1+3+2+1);
1549 Address += ( Mode_ & ((1<<4)-1)) << (0+7+6+1+1+3+2+1+5);
1552 if (doComp && mode_inv==15)
1558 if (dPhi12<0) dPhi12Sign = -1;
1559 if (dPhi23<0) dPhi23Sign = -1;
1560 if (dPhi34<0) dPhi34Sign = -1;
1562 dPhi23Sign *= dPhi12Sign;
1563 dPhi34Sign *= dPhi12Sign;
1570 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1571 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1574 int Mode_ = mode_inv;
1576 Address += ( dPhi12_ & ((1<<7)-1)) << 0;
1577 Address += ( dPhi23_ & ((1<<5)-1)) << (0+7);
1578 Address += ( dPhi34_ & ((1<<6)-1)) << (0+7+5);
1579 Address += ( sign23_ & ((1<<1)-1)) << (0+7+5+6);
1580 Address += ( sign34_ & ((1<<1)-1)) << (0+7+5+6+1);
1581 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+6+1+1);
1582 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+6+1+1+1);
1583 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)
std::vector< std::vector< int > > deltas
static int getNLBdPhiBin(float dPhi, int bits, int max=512)
std::map< unsigned, TriggerPrimitiveCollection > TriggerPrimitiveStationMap
tuple size
Write out results.