896 int dphi[6] = {-999,-999,-999,-999,-999,-999}, deta[6] = {-999,-999,-999,-999,-999,-999};
897 int clct[4] = {-999,-999,-999,-999}, cscid[4] = {-999,-999,-999,-999};
898 int phis[4] = {-999,-999,-999,-999},
etas[4] = {-999,-999,-999,-999}, mode_inv = 0;;
899 int FR[4] = {-999,-999,-999,-999};
901 float theta_angle = ((track.
theta)*0.2874016 + 8.5)*(3.14159265359/180);
902 float eta = (-1)*
log(
tan(theta_angle/2));
908 if(verbose)
cout<<
"Track eta = "<<eta<<
" and has hits in stations ";
911 for(
unsigned int s=8;
s<12;
s++){
912 if((stubs.find(
s)->second).
size() == 1){
915 if(verbose)
cout<<
"s= " <<
s <<
" " << endl;
918 if(verbose)
cout<<
"eta= " <<
etas[
s-8] <<
" " << endl;
919 phis[
s-8] = track.
phis[
x];
920 if(verbose)
cout<<
"phi= " << phis[
s-8] <<
" " << endl;
921 clct[
s-8] = (stubs.find(
s)->second)[0].getPattern();
922 if(verbose)
cout<<
"clct= " << clct[
s-8] <<
" " << endl;
923 cscid[
s-8] = (stubs.find(
s)->second)[0].Id();
924 if(verbose)
cout<<
"cscid= " << cscid[
s-8] <<
" " << endl;
926 if(verbose)
cout<<
s <<
" " << (stubs.find(
s)->second)[0].detId<CSCDetId>().station()<<
" " << phis[
s-8] << endl;;
928 const CSCChamber* layer = cscGeometry->
chamber((stubs.find(
s)->second)[0].detId<CSCDetId>());
934 int coord[5] = {586,686,815,924,1013};
935 for(
int i=0;
i<5;
i++){
937 if((fabs(glc.
z()) < (coord[
i] + 7)) && (fabs(glc.
z()) > (coord[
i] - 7)))
958 if(verbose)
cout <<
"\n Mode = " <<
mode <<
", inverted mode = " << mode_inv << endl;
964 for(
int d=0;
d<6;
d++){
969 if(phis[0] > 0 && phis[1] > 0){
970 dphi[0] = phis[1] - phis[0];
973 if(phis[0] > 0 && phis[2] > 0){
974 dphi[1] = phis[2] - phis[0];
977 if(phis[0] > 0 && phis[3] > 0){
978 dphi[2] = phis[3] - phis[0];
981 if(phis[1] > 0 && phis[2] > 0){
982 dphi[3] = phis[2] - phis[1];
985 if(phis[1] > 0 && phis[3] > 0){
986 dphi[4] = phis[3] - phis[1];
989 if(phis[2] > 0 && phis[3] > 0){
990 dphi[5] = phis[3] - phis[2];
998 float dPhi12__ = fabs(dphi[0]);
999 float eta__ =
getEta(eta, 5);
1000 float clct1__ =
getCLCT(clct[0]);
1001 float clct2__ =
getCLCT(clct[1]);
1004 cout <<
"Inverted mode 3 Track " << endl;
1005 cout << setw(10) <<
"dPhi12: " << dphi[0] << setw(10) << dPhi12__ << endl;
1006 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
1007 cout << setw(10) <<
"CLCT2: " << clct[1] << setw(10) << clct2__ << endl;
1008 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1012 float dPhi13__ = fabs(dphi[1]);
1013 float eta__ =
getEta(eta, 5);
1014 float clct1__ =
getCLCT(clct[0]);
1015 float clct3__ =
getCLCT(clct[2]);
1018 cout <<
"Inverted mode 5 Track " << endl;
1019 cout << setw(10) <<
"dPhi13: " << dphi[1] << setw(10) << dPhi13__ << endl;
1020 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
1021 cout << setw(10) <<
"CLCT3: " << clct[2] << setw(10) << clct3__ << endl;
1022 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1026 float dPhi14__ = fabs(dphi[2]);
1027 float eta__ =
getEta(eta, 5);
1028 float clct1__ =
getCLCT(clct[0]);
1029 float clct4__ =
getCLCT(clct[3]);
1032 cout <<
"Inverted mode 9 Track " << endl;
1033 cout << setw(10) <<
"dPhi14: " << dphi[2] << setw(10) << dPhi14__ << endl;
1034 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
1035 cout << setw(10) <<
"CLCT4: " << clct[3] << setw(10) << clct4__ << endl;
1036 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1040 float dPhi23__ = fabs(dphi[3]);
1041 float eta__ =
getEta(eta, 5);
1042 float clct2__ =
getCLCT(clct[1]);
1043 float clct3__ =
getCLCT(clct[2]);
1046 cout <<
"Inverted mode 9 Track " << endl;
1047 cout << setw(10) <<
"dPhi23: " << dphi[3] << setw(10) << dPhi23__ << endl;
1048 cout << setw(10) <<
"CLCT2: " << clct[1] << setw(10) << clct2__ << endl;
1049 cout << setw(10) <<
"CLCT3: " << clct[2] << setw(10) << clct3__ << endl;
1050 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1054 float dPhi24__ = fabs(dphi[4]);
1055 float eta__ =
getEta(eta, 5);
1056 float clct2__ =
getCLCT(clct[1]);
1057 float clct4__ =
getCLCT(clct[3]);
1060 cout <<
"Inverted mode 10 Track " << endl;
1061 cout << setw(10) <<
"dPhi24: " << dphi[4] << setw(10) << dPhi24__ << endl;
1062 cout << setw(10) <<
"CLCT2: " << clct[1] << setw(10) << clct2__ << endl;
1063 cout << setw(10) <<
"CLCT4: " << clct[3] << setw(10) << clct4__ << endl;
1064 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1068 float dPhi34__ = fabs(dphi[5]);
1069 float eta__ =
getEta(eta, 5);
1070 float clct3__ =
getCLCT(clct[2]);
1071 float clct4__ =
getCLCT(clct[3]);
1074 cout <<
"Inverted mode 12 Track " << endl;
1075 cout << setw(10) <<
"dPhi34: " << dphi[5] << setw(10) << dPhi34__ << endl;
1076 cout << setw(10) <<
"CLCT3: " << clct[2] << setw(10) << clct3__ << endl;
1077 cout << setw(10) <<
"CLCT4: " << clct[3] << setw(10) << clct4__ << endl;
1078 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1085 float eta__ =
getEta(eta, 5);
1086 float clct1__ =
getCLCT(clct[0]);
1088 cout <<
"Inverted mode 7 Track " << endl;
1089 cout << setw(10) <<
"dPhi12: " << dphi[0] << setw(10) << dPhi12__ << endl;
1090 cout << setw(10) <<
"dPhi23: " << dphi[3] << setw(10) << dPhi23__ << endl;
1091 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
1092 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1098 float eta__ =
getEta(eta, 5);
1099 float clct1__ =
getCLCT(clct[0]);
1101 cout <<
"Inverted mode 11 Track " << endl;
1102 cout << setw(10) <<
"dPhi12: " << dphi[0] << setw(10) << dPhi12__ << endl;
1103 cout << setw(10) <<
"dPhi24: " << dphi[4] << setw(10) << dPhi24__ << endl;
1104 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
1105 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1111 float eta__ =
getEta(eta, 5);
1112 float clct1__ =
getCLCT(clct[0]);
1114 cout <<
"Inverted mode 13 Track " << endl;
1115 cout << setw(10) <<
"dPhi13: " << dphi[1] << setw(10) << dPhi13__ << endl;
1116 cout << setw(10) <<
"dPhi34: " << dphi[5] << setw(10) << dPhi34__ << endl;
1117 cout << setw(10) <<
"CLCT1: " << clct[0] << setw(10) << clct1__ << endl;
1118 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1124 float eta__ =
getEta(eta, 5);
1125 float clct2__ =
getCLCT(clct[1]);
1127 cout <<
"Inverted mode 14 Track " << endl;
1128 cout << setw(10) <<
"dPhi23: " << dphi[3] << setw(10) << dPhi23__ << endl;
1129 cout << setw(10) <<
"dPhi34: " << dphi[5] << setw(10) << dPhi34__ << endl;
1130 cout << setw(10) <<
"CLCT2: " << clct[1] << setw(10) << clct2__ << endl;
1131 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1138 float eta__ =
getEta(eta, 5);
1141 cout <<
"Inverted mode 15 Track " << endl;
1142 cout << setw(10) <<
"dPhi12: " << dphi[0] << setw(10) << dPhi12__ << endl;
1143 cout << setw(10) <<
"dPhi23: " << dphi[3] << setw(10) << dPhi23__ << endl;
1144 cout << setw(10) <<
"dPhi34: " << dphi[5] << setw(10) << dPhi34__ << endl;
1145 cout << setw(10) <<
"eta : " << eta << setw(10) << eta__ << endl;
1149 float dPhi12 = dphi[0];
1150 float dPhi13 = dphi[1];
1151 float dPhi14 = dphi[2];
1152 float dPhi23 = dphi[3];
1153 float dPhi24 = dphi[4];
1154 float dPhi34 = dphi[5];
1155 float dTheta12 = deta[0];
1156 float dTheta13 = deta[1];
1157 float dTheta14 = deta[2];
1158 float dTheta23 = deta[3];
1159 float dTheta24 = deta[4];
1160 float dTheta34 = deta[5];
1162 float CLCT1 = clct[0];
1163 float CLCT2 = clct[1];
1164 float CLCT3 = clct[2];
1165 float CLCT4 = clct[3];
1171 unsigned long Address = 0x0;
1173 if (doComp && mode_inv==3)
1177 if (dPhi12<0) dPhi12Sign = -1;
1185 int dPhi12_ = fabs(dPhi12);
1186 int sign12_ = dPhi12Sign > 0 ? 1 : 0;
1189 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1190 CLCT1_ =
abs(CLCT1_);
1192 int CLCT2Sign_ = CLCT2_ > 0 ? 1 : 0;
1193 CLCT2_ =
abs(CLCT2_);
1197 int Mode_ = mode_inv;
1199 Address += ( dPhi12_ & ((1<<9)-1)) << (0);
1200 Address += ( sign12_ & ((1<<1)-1)) << (0+9);
1201 Address += ( dTheta12_ & ((1<<3)-1)) << (0+9+1);
1202 Address += ( CLCT1_ & ((1<<2)-1)) << (0+9+1+3);
1203 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1204 Address += ( CLCT2_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1205 Address += ( CLCT2Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1206 Address += ( FR1_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1207 Address += ( FR2_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1208 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1209 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1212 if (doComp && mode_inv==5)
1220 if (dPhi13<0) dPhi13Sign = -1;
1225 int dPhi13_ = fabs(dPhi13);
1226 int sign13_ = dPhi13Sign > 0 ? 1 : 0;
1229 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1230 CLCT1_ =
abs(CLCT1_);
1232 int CLCT3Sign_ = CLCT3_ > 0 ? 1 : 0;
1233 CLCT3_ =
abs(CLCT3_);
1237 int Mode_ = mode_inv;
1239 Address += ( dPhi13_ & ((1<<9)-1)) << (0);
1240 Address += ( sign13_ & ((1<<1)-1)) << (0+9);
1241 Address += ( dTheta13_ & ((1<<3)-1)) << (0+9+1);
1242 Address += ( CLCT1_ & ((1<<2)-1)) << (0+9+1+3);
1243 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1244 Address += ( CLCT3_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1245 Address += ( CLCT3Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1246 Address += ( FR1_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1247 Address += ( FR3_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1248 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1249 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1252 if (doComp && mode_inv==9)
1261 if (dPhi14<0) dPhi14Sign = -1;
1266 int dPhi14_ = fabs(dPhi14);
1267 int sign14_ = dPhi14Sign > 0 ? 1 : 0;
1270 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1271 CLCT1_ =
abs(CLCT1_);
1273 int CLCT4Sign_ = CLCT4_ > 0 ? 1 : 0;
1274 CLCT4_ =
abs(CLCT4_);
1278 int Mode_ = mode_inv;
1280 Address += ( dPhi14_ & ((1<<9)-1)) << (0);
1281 Address += ( sign14_ & ((1<<1)-1)) << (0+9);
1282 Address += ( dTheta14_ & ((1<<3)-1)) << (0+9+1);
1283 Address += ( CLCT1_ & ((1<<2)-1)) << (0+9+1+3);
1284 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1285 Address += ( CLCT4_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1286 Address += ( CLCT4Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1287 Address += ( FR1_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1288 Address += ( FR4_ & ((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==6)
1300 if (dPhi23<0) dPhi23Sign = -1;
1305 int dPhi23_ = fabs(dPhi23);
1306 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1309 int CLCT2Sign_ = CLCT2_ > 0 ? 1 : 0;
1310 CLCT2_ =
abs(CLCT2_);
1312 int CLCT3Sign_ = CLCT3_ > 0 ? 1 : 0;
1313 CLCT3_ =
abs(CLCT3_);
1317 int Mode_ = mode_inv;
1319 Address += ( dPhi23_ & ((1<<9)-1)) << (0);
1320 Address += ( sign23_ & ((1<<1)-1)) << (0+9);
1321 Address += ( dTheta23_ & ((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 += ( CLCT3_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1325 Address += ( CLCT3Sign_ & ((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 += ( FR3_ & ((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==10)
1339 if (dPhi24<0) dPhi24Sign = -1;
1344 int dPhi24_ = fabs(dPhi24);
1345 int sign24_ = dPhi24Sign > 0 ? 1 : 0;
1348 int CLCT2Sign_ = CLCT2_ > 0 ? 1 : 0;
1349 CLCT2_ =
abs(CLCT2_);
1351 int CLCT4Sign_ = CLCT4_ > 0 ? 1 : 0;
1352 CLCT4_ =
abs(CLCT4_);
1356 int Mode_ = mode_inv;
1358 Address += ( dPhi24_ & ((1<<9)-1)) << (0);
1359 Address += ( sign24_ & ((1<<1)-1)) << (0+9);
1360 Address += ( dTheta24_ & ((1<<3)-1)) << (0+9+1);
1361 Address += ( CLCT2_ & ((1<<2)-1)) << (0+9+1+3);
1362 Address += ( CLCT2Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1363 Address += ( CLCT4_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1364 Address += ( CLCT4Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1365 Address += ( FR2_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1366 Address += ( FR4_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1367 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1368 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1370 if (doComp && mode_inv==12)
1377 if (dPhi34<0) dPhi34Sign = -1;
1382 int dPhi34_ = fabs(dPhi34);
1383 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1386 int CLCT3Sign_ = CLCT3_ > 0 ? 1 : 0;
1387 CLCT3_ =
abs(CLCT3_);
1389 int CLCT4Sign_ = CLCT4_ > 0 ? 1 : 0;
1390 CLCT4_ =
abs(CLCT4_);
1394 int Mode_ = mode_inv;
1396 Address += ( dPhi34_ & ((1<<9)-1)) << (0);
1397 Address += ( sign34_ & ((1<<1)-1)) << (0+9);
1398 Address += ( dTheta34_ & ((1<<3)-1)) << (0+9+1);
1399 Address += ( CLCT3_ & ((1<<2)-1)) << (0+9+1+3);
1400 Address += ( CLCT3Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1401 Address += ( CLCT4_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1402 Address += ( CLCT4Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1403 Address += ( FR3_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1404 Address += ( FR4_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1405 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1406 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1409 if (doComp && mode_inv==7)
1417 if (dPhi12<0) dPhi12Sign = -1;
1418 if (dPhi23<0) dPhi23Sign = -1;
1425 int sign12_ = dPhi12Sign > 0 ? 1 : 0;
1426 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1429 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1430 CLCT1_ =
abs(CLCT1_);
1433 int Mode_ = mode_inv;
1435 Address += ( dPhi12_ & ((1<<7)-1)) << (0);
1436 Address += ( dPhi23_ & ((1<<5)-1)) << (0+7);
1437 Address += ( sign12_ & ((1<<1)-1)) << (0+7+5);
1438 Address += ( sign23_ & ((1<<1)-1)) << (0+7+5+1);
1439 Address += ( dTheta13_ & ((1<<3)-1)) << (0+7+5+1+1);
1440 Address += ( CLCT1_ & ((1<<2)-1)) << (0+7+5+1+1+3);
1441 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+7+5+1+1+3+2);
1442 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+1+1+3+2+1);
1443 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+1+1+3+2+1+1);
1444 Address += ( Mode_ & ((1<<4)-1)) << (0+7+5+1+1+3+2+1+1+5);
1447 if (doComp && mode_inv==11)
1454 if (dPhi12<0) dPhi12Sign = -1;
1455 if (dPhi24<0) dPhi24Sign = -1;
1461 int sign12_ = dPhi12Sign > 0 ? 1 : 0;
1462 int sign24_ = dPhi24Sign > 0 ? 1 : 0;
1465 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1466 CLCT1_ =
abs(CLCT1_);
1469 int Mode_ = mode_inv;
1471 Address += ( dPhi12_ & ((1<<7)-1)) << (0);
1472 Address += ( dPhi24_ & ((1<<5)-1)) << (0+7);
1473 Address += ( sign12_ & ((1<<1)-1)) << (0+7+5);
1474 Address += ( sign24_ & ((1<<1)-1)) << (0+7+5+1);
1475 Address += ( dTheta14_ & ((1<<3)-1)) << (0+7+5+1+1);
1476 Address += ( CLCT1_ & ((1<<2)-1)) << (0+7+5+1+1+3);
1477 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+7+5+1+1+3+2);
1478 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+1+1+3+2+1);
1479 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+1+1+3+2+1+1);
1480 Address += ( Mode_ & ((1<<4)-1)) << (0+7+5+1+1+3+2+1+1+5);
1482 if (doComp && mode_inv==13)
1489 if (dPhi13<0) dPhi13Sign = -1;
1490 if (dPhi34<0) dPhi34Sign = -1;
1496 int sign13_ = dPhi13Sign > 0 ? 1 : 0;
1497 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1500 int CLCT1Sign_ = CLCT1_ > 0 ? 1 : 0;
1501 CLCT1_ =
abs(CLCT1_);
1504 int Mode_ = mode_inv;
1506 Address += ( dPhi13_ & ((1<<7)-1)) << (0);
1507 Address += ( dPhi34_ & ((1<<5)-1)) << (0+7);
1508 Address += ( sign13_ & ((1<<1)-1)) << (0+7+5);
1509 Address += ( sign34_ & ((1<<1)-1)) << (0+7+5+1);
1510 Address += ( dTheta14_ & ((1<<3)-1)) << (0+7+5+1+1);
1511 Address += ( CLCT1_ & ((1<<2)-1)) << (0+7+5+1+1+3);
1512 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+7+5+1+1+3+2);
1513 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+1+1+3+2+1);
1514 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+1+1+3+2+1+1);
1515 Address += ( Mode_ & ((1<<4)-1)) << (0+7+5+1+1+3+2+1+1+5);
1518 if (doComp && mode_inv==14)
1526 if (dPhi23<0) dPhi23Sign = -1;
1527 if (dPhi34<0) dPhi34Sign = -1;
1533 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1534 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1537 int CLCT2Sign_ = CLCT2_ > 0 ? 1 : 0;
1538 CLCT2_ =
abs(CLCT2_);
1540 int Mode_ = mode_inv;
1542 Address += ( dPhi23_ & ((1<<7)-1)) << (0);
1543 Address += ( dPhi34_ & ((1<<6)-1)) << (0+7);
1544 Address += ( sign23_ & ((1<<1)-1)) << (0+7+6);
1545 Address += ( sign34_ & ((1<<1)-1)) << (0+7+6+1);
1546 Address += ( dTheta24_ & ((1<<3)-1)) << (0+7+6+1+1);
1547 Address += ( CLCT2_ & ((1<<2)-1)) << (0+7+6+1+1+3);
1548 Address += ( CLCT2Sign_ & ((1<<1)-1)) << (0+7+6+1+1+3+2);
1549 Address += ( eta_ & ((1<<5)-1)) << (0+7+6+1+1+3+2+1);
1550 Address += ( Mode_ & ((1<<4)-1)) << (0+7+6+1+1+3+2+1+5);
1553 if (doComp && mode_inv==15)
1559 if (dPhi12<0) dPhi12Sign = -1;
1560 if (dPhi23<0) dPhi23Sign = -1;
1561 if (dPhi34<0) dPhi34Sign = -1;
1563 dPhi23Sign *= dPhi12Sign;
1564 dPhi34Sign *= dPhi12Sign;
1571 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1572 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1575 int Mode_ = mode_inv;
1577 Address += ( dPhi12_ & ((1<<7)-1)) << 0;
1578 Address += ( dPhi23_ & ((1<<5)-1)) << (0+7);
1579 Address += ( dPhi34_ & ((1<<6)-1)) << (0+7+5);
1580 Address += ( sign23_ & ((1<<1)-1)) << (0+7+5+6);
1581 Address += ( sign34_ & ((1<<1)-1)) << (0+7+5+6+1);
1582 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+6+1+1);
1583 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+6+1+1+1);
1584 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)
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
std::map< unsigned, TriggerPrimitiveCollection > TriggerPrimitiveStationMap