21 1.5, 2.0, 2.5, 3.0, 3.5, 4.0,
22 4.5, 5.0, 6.0, 7.0, 8.0, 10.0, 12.0, 14.0,
23 16.0, 18.0, 20.0, 25.0, 30.0, 35.0, 40.0, 45.0,
24 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 120.0, 140.0 };
78 {-999,-999,-999,-999,-999,-999},
82 {-999,-999,-999,-999,-999,-999},
88 {3,5,10,13,-999,-999},
92 const char *
dirSchemeC =
"L1Trigger/L1TMuon/data/emtf_luts/ModeVariables/trees";
98 const int dPhiNLBMap_5bit_256Max[32] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 23, 25, 28, 31, 34, 39, 46, 55, 68, 91, 136};
100 const int dPhiNLBMap_6bit_256Max[64] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 42, 43, 45, 47, 49, 51, 53, 56, 58, 61, 65, 68, 73, 78, 83, 89, 97, 106, 116, 129, 145, 166, 193, 232};
102 const int dPhiNLBMap_7bit_256Max[128] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 82, 83, 84, 86, 87, 88, 90, 91, 93, 94, 96, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 118, 120, 123, 125, 128, 131, 134, 138, 141, 145, 149, 153, 157, 161, 166, 171, 176, 182, 188, 194, 201, 209, 217, 225, 235, 245};
106 const int dPhiNLBMap_7bit_512Max[256] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 83, 84, 86, 87, 89, 91, 92, 94, 96, 98, 100, 102, 105, 107, 110, 112, 115, 118, 121, 124, 127, 131, 135, 138, 143, 147, 152, 157, 162, 168, 174, 181, 188, 196, 204, 214, 224, 235, 247, 261, 276, 294, 313, 336, 361, 391, 427, 470};
108 const int dPhiNLBMap_8bit_512Max[256] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 164, 165, 166, 167, 168, 170, 171, 172, 174, 175, 176, 178, 179, 180, 182, 183, 185, 186, 188, 190, 191, 193, 194, 196, 198, 200, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 225, 228, 230, 232, 235, 237, 240, 242, 245, 248, 250, 253, 256, 259, 262, 265, 268, 272, 275, 278, 282, 285, 289, 293, 297, 300, 305, 309, 313, 317, 322, 327, 331, 336, 341, 347, 352, 358, 363, 369, 375, 382, 388, 395, 402, 410, 417, 425, 433, 442, 450, 460, 469, 479, 490, 500};
112 { 0 , 1 , 2 , 4 , 5 , 7 , 9 , 11 , 13 , 15 , 18 , 21 , 24 , 28 , 32 , 37 , 41 , 47 , 53 , 60 , 67 , 75 , 84 , 94 , 105 , 117 , 131 , 145 , 162 , 180 , 200 , 222};
117 { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 8 , 9 , 10 , 11 , 12 , 14 , 15 , 16 , 17 , 19 , 20 , 21 , 23 , 24 , 26 , 27 , 29 , 30 , 32 , 33 , 35 , 37 , 38 , 40 , 42 , 44 , 45 , 47 , 49 , 51 , 53 , 55 , 57 , 59 , 61 , 63 , 65 , 67 , 70 , 72 , 74 , 77 , 79 , 81 , 84 , 86 , 89 , 92 , 94 , 97 , 100 , 103 , 105 , 108 , 111 , 114 , 117 , 121 , 124 , 127 , 130 , 134 , 137 , 141 , 144 , 148 , 151 , 155 , 159 , 163 , 167 , 171 , 175 , 179 , 183 , 188 , 192 , 197 , 201 , 206 , 210 , 215 , 220 , 225 , 230 , 235 , 241 , 246 , 251 , 257 , 263 , 268 , 274 , 280 , 286 , 292 , 299 , 305 , 312 , 318 , 325 , 332 , 339 , 346 , 353 , 361 , 368 , 376 , 383 , 391 , 399 , 408 , 416 , 425 , 433 , 442 , 451 , 460 , 469 , 479 , 489 };
122 { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 27 , 28 , 29 , 30 , 31 , 32 , 33 , 35 , 36 , 37 , 38 , 39 , 40 , 42 , 43 , 44 , 45 , 46 , 48 , 49 , 50 , 51 , 53 , 54 , 55 , 56 , 58 , 59 , 60 , 61 , 63 , 64 , 65 , 67 , 68 , 69 , 70 , 72 , 73 , 74 , 76 , 77 , 79 , 80 , 81 , 83 , 84 , 85 , 87 , 88 , 90 , 91 , 92 , 94 , 95 , 97 , 98 , 100 , 101 , 103 , 104 , 105 , 107 , 108 , 110 , 111 , 113 , 115 , 116 , 118 , 119 , 121 , 122 , 124 , 125 , 127 , 129 , 130 , 132 , 133 , 135 , 137 , 138 , 140 , 141 , 143 , 145 , 146 , 148 , 150 , 151 , 153 , 155 , 157 , 158 , 160 , 162 , 163 , 165 , 167 , 169 , 171 , 172 , 174 , 176 , 178 , 180 , 181 , 183 , 185 , 187 , 189 , 191 , 192 , 194 , 196 , 198 , 200 , 202 , 204 , 206 , 208 , 210 , 212 , 214 , 216 , 218 , 220 , 222 , 224 , 226 , 228 , 230 , 232 , 234 , 236 , 238 , 240 , 242 , 244 , 246 , 249 , 251 , 253 , 255 , 257 , 259 , 261 , 264 , 266 , 268 , 270 , 273 , 275 , 277 , 279 , 282 , 284 , 286 , 289 , 291 , 293 , 296 , 298 , 300 , 303 , 305 , 307 , 310 , 312 , 315 , 317 , 320 , 322 , 324 , 327 , 329 , 332 , 334 , 337 , 340 , 342 , 345 , 347 , 350 , 352 , 355 , 358 , 360 , 363 , 366 , 368 , 371 , 374 , 376 , 379 , 382 , 385 , 387 , 390 , 393 , 396 , 398 , 401 , 404 , 407 , 410 , 413 , 416 , 419 , 421 , 424 , 427 , 430 , 433 , 436 , 439 , 442 , 445 , 448 , 451 , 454 , 457 , 461 , 464 , 467 , 470 , 473 , 476 , 479 , 483 };
139 for (
int edge=0; edge<(1<<
bits)-1; edge++)
149 for (
int edge=0; edge<(1<<
bits)-1; edge++)
159 for (
int edge=0; edge<(1<<
bits)-1; edge++)
172 for (
int edge=0; edge<(1<<
bits)-1; edge++)
182 for (
int edge=0; edge<(1<<
bits)-1; edge++)
191 if (dPhi>=
max) dPhi_ =
max;
192 return (sign_ * dPhi_);
199 int dPhiBin_= (1<<
bits)-1;
209 for (
int edge=0; edge<(1<<
bits)-1; edge++)
218 for (
int edge=0; edge<(1<<
bits)-1; edge++)
227 for (
int edge=0; edge<(1<<
bits)-1; edge++)
239 for (
int edge=0; edge<(1<<
bits)-1; edge++)
248 for (
int edge=0; edge<(1<<
bits)-1; edge++)
263 int dPhi_= (1<<
bits)-1;
265 if (dPhiBin>(1<<bits)-1)
266 dPhiBin = (1<<bits)-1;
295 else if ((
int)clct==9)
297 else if ((
int)clct==8)
299 else if ((
int)clct==7)
301 else if ((
int)clct==6)
303 else if ((
int)clct==5)
305 else if ((
int)clct==4)
307 else if ((
int)clct==3)
309 else if ((
int)clct==2)
331 return (sign_ * clct_);
373 int etaInt = (fabs(eta) - 0.9)*(32.0/(1.6))-0.5;
374 etaInt = (etaInt>>
shift)<<shift;
376 eta_ = 0.9 + (etaInt + 0.5)*(1.6/32.0);
389 int etaInt = (fabs(eta) - 0.9)*(32.0/(1.6))-0.5;
390 etaInt = (etaInt>>
shift);
397 if (etaBin>((1<<5)-1))
404 int etaInt_ = etaBin <<
shift;
405 float eta_ = 0.9 + (etaInt_ + 0.5)*(1.6/32.0);
417 int ModeVariables[13][6];
420 for (
int i=0;
i<13;
i++)
421 for (
int j=0;
j<6;
j++)
433 int dphi[6] = {-999,-999,-999,-999,-999,-999}, deta[6] = {-999,-999,-999,-999,-999,-999};
434 int clct[4] = {-999,-999,-999,-999}, cscid[4] = {-999,-999,-999,-999};
435 int phis[4] = {-999,-999,-999,-999},
etas[4] = {-999,-999,-999,-999},
mode = 0;;
436 int FR[4] = {-999,-999,-999,-999};
439 float dPhi12 = dphi[0];
440 float dPhi13 = dphi[1];
441 float dPhi14 = dphi[2];
442 float dPhi23 = dphi[3];
443 float dPhi24 = dphi[4];
444 float dPhi34 = dphi[5];
445 float dEta12 = deta[0];
446 float dEta13 = deta[1];
447 float dEta14 = deta[2];
448 float dEta23 = deta[3];
449 float dEta24 = deta[4];
450 float dEta34 = deta[5];
452 float CLCT1 = clct[0];
453 float CLCT2 = clct[1];
454 float CLCT3 = clct[2];
455 float CLCT4 = clct[3];
461 mode = (Address >> (30-4)) & ((1<<4)-1);
466 if (verbose)
std::cout <<
"PtAssignment:getPt: decoding, Mode = " <<
mode << std::endl;
470 int dPhi12_ = (Address >> (0)) & ((1<<9)-1);
471 float sign12 = (Address >> (0+9)) & ((1<<1)-1);
472 dEta12 = (Address >> (0+9+1)) & ((1<<3)-1);
473 CLCT1 = (Address >> (0+9+1+2)) & ((1<<2)-1);
474 float CLCT1Sign= (Address >> (0+9+1+2+3)) & ((1<<1)-1);
475 CLCT2 = (Address >> (0+9+1+2+3+1)) & ((1<<2)-1);
476 float CLCT2Sign= (Address >> (0+9+1+2+3+1+2)) & ((1<<1)-1);
477 FR1 = (Address >> (0+9+1+2+3+1+2+1)) & ((1<<1)-1);
478 FR2 = (Address >> (0+9+1+2+3+1+2+1+1)) & ((1<<1)-1);
479 int TrackEta_ = (Address >> (0+9+1+2+3+1+2+1+1+1)) & ((1<<5)-1);
484 if (sign12 == 0) dPhi12 = -1*dPhi12;
485 if (CLCT1Sign == 0) CLCT1 = -1*CLCT1;
486 if (CLCT2Sign == 0) CLCT2 = -1*CLCT2;
488 if (verbose)
std::cout <<
"PtAssignment:getPt: decoding, Addess = 0x" << hex << Address << std::endl;
489 if (verbose)
std::cout <<
"PtAssignment:getPt: decoding, dPhi12 = " <<
dec << dPhi12_ << std::endl;
495 int dPhi13_ = (Address >> (0)) & ((1<<9)-1);
496 float sign13 = (Address >> (0+9)) & ((1<<1)-1);
497 dEta13 = (Address >> (0+9+1)) & ((1<<3)-1);
498 CLCT1 = (Address >> (0+9+1+2)) & ((1<<2)-1);
499 float CLCT1Sign= (Address >> (0+9+1+2+3)) & ((1<<1)-1);
500 CLCT3 = (Address >> (0+9+1+2+3+1)) & ((1<<2)-1);
501 float CLCT3Sign= (Address >> (0+9+1+2+3+1+2)) & ((1<<1)-1);
502 FR1 = (Address >> (0+9+1+2+3+1+2+1)) & ((1<<1)-1);
503 FR3 = (Address >> (0+9+1+2+3+1+2+1+1)) & ((1<<1)-1);
504 int TrackEta_ = (Address >> (0+9+1+2+3+1+2+1+1+1)) & ((1<<5)-1);
509 if (sign13 == 0) dPhi13 = -1*dPhi13;
510 if (CLCT1Sign == 0) CLCT1 = -1*CLCT1;
511 if (CLCT3Sign == 0) CLCT3 = -1*CLCT3;
516 int dPhi14_ = (Address >> (0)) & ((1<<9)-1);
517 float sign14 = (Address >> (0+9)) & ((1<<1)-1);
518 dEta14 = (Address >> (0+9+1)) & ((1<<3)-1);
519 CLCT1 = (Address >> (0+9+1+2)) & ((1<<2)-1);
520 float CLCT1Sign= (Address >> (0+9+1+2+3)) & ((1<<1)-1);
521 CLCT4 = (Address >> (0+9+1+2+3+1)) & ((1<<2)-1);
522 float CLCT4Sign= (Address >> (0+9+1+2+3+1+2)) & ((1<<1)-1);
523 FR1 = (Address >> (0+9+1+2+3+1+2+1)) & ((1<<1)-1);
524 FR4 = (Address >> (0+9+1+2+3+1+2+1+1)) & ((1<<1)-1);
525 int TrackEta_ = (Address >> (0+9+1+2+3+1+2+1+1+1)) & ((1<<5)-1);
530 if (sign14 == 0) dPhi14 = -1*dPhi14;
531 if (CLCT1Sign == 0) CLCT1 = -1*CLCT1;
532 if (CLCT4Sign == 0) CLCT4 = -1*CLCT4;
537 int dPhi23_ = (Address >> (0)) & ((1<<9)-1);
538 float sign23 = (Address >> (0+9)) & ((1<<1)-1);
539 dEta23 = (Address >> (0+9+1)) & ((1<<3)-1);
540 CLCT2 = (Address >> (0+9+1+2)) & ((1<<2)-1);
541 float CLCT2Sign= (Address >> (0+9+1+2+3)) & ((1<<1)-1);
542 CLCT3 = (Address >> (0+9+1+2+3+1)) & ((1<<2)-1);
543 float CLCT3Sign= (Address >> (0+9+1+2+3+1+2)) & ((1<<1)-1);
544 FR2 = (Address >> (0+9+1+2+3+1+2+1)) & ((1<<1)-1);
545 FR3 = (Address >> (0+9+1+2+3+1+2+1+1)) & ((1<<1)-1);
546 int TrackEta_ = (Address >> (0+9+1+2+3+1+2+1+1+1)) & ((1<<5)-1);
551 if (sign23 == 0) dPhi23 = -1*dPhi23;
552 if (CLCT2Sign == 0) CLCT2 = -1*CLCT2;
553 if (CLCT3Sign == 0) CLCT3 = -1*CLCT3;
557 int dPhi24_ = (Address >> (0)) & ((1<<9)-1);
558 float sign24 = (Address >> (0+9)) & ((1<<1)-1);
559 dEta24 = (Address >> (0+9+1)) & ((1<<3)-1);
560 CLCT2 = (Address >> (0+9+1+2)) & ((1<<2)-1);
561 float CLCT2Sign= (Address >> (0+9+1+2+3)) & ((1<<1)-1);
562 CLCT4 = (Address >> (0+9+1+2+3+1)) & ((1<<2)-1);
563 float CLCT4Sign= (Address >> (0+9+1+2+3+1+2)) & ((1<<1)-1);
564 FR2 = (Address >> (0+9+1+2+3+1+2+1)) & ((1<<1)-1);
565 FR4 = (Address >> (0+9+1+2+3+1+2+1+1)) & ((1<<1)-1);
566 int TrackEta_ = (Address >> (0+9+1+2+3+1+2+1+1+1)) & ((1<<5)-1);
571 if (sign24 == 0) dPhi24 = -1*dPhi24;
572 if (CLCT2Sign == 0) CLCT2 = -1*CLCT2;
573 if (CLCT4Sign == 0) CLCT4 = -1*CLCT4;
577 int dPhi34_ = (Address >> (0)) & ((1<<9)-1);
578 float sign34 = (Address >> (0+9)) & ((1<<1)-1);
579 dEta34 = (Address >> (0+9+1)) & ((1<<3)-1);
580 CLCT3 = (Address >> (0+9+1+2)) & ((1<<2)-1);
581 float CLCT3Sign= (Address >> (0+9+1+2+3)) & ((1<<1)-1);
582 CLCT4 = (Address >> (0+9+1+2+3+1)) & ((1<<2)-1);
583 float CLCT4Sign= (Address >> (0+9+1+2+3+1+2)) & ((1<<1)-1);
584 FR3 = (Address >> (0+9+1+2+3+1+2+1)) & ((1<<1)-1);
585 FR4 = (Address >> (0+9+1+2+3+1+2+1+1)) & ((1<<1)-1);
586 int TrackEta_ = (Address >> (0+9+1+2+3+1+2+1+1+1)) & ((1<<5)-1);
591 if (sign34 == 0) dPhi34 = -1*dPhi34;
592 if (CLCT3Sign == 0) CLCT3 = -1*CLCT3;
593 if (CLCT4Sign == 0) CLCT4 = -1*CLCT4;
597 int dPhi12_ = (Address >> (0)) & ((1<<7)-1);
598 int dPhi23_ = (Address >> (0+7)) & ((1<<5)-1);
599 float sign12 = (Address >> (0+7+5)) & ((1<<1)-1);
600 float sign23 = (Address >> (0+7+5+1)) & ((1<<1)-1);
601 dEta13 = (Address >> (0+7+5+1+1)) & ((1<<3)-1);
602 CLCT1 = (Address >> (0+7+5+1+1+3)) & ((1<<2)-1);
603 float CLCT1Sign= (Address >> (0+7+5+1+1+3+2)) & ((1<<1)-1);
604 FR1 = (Address >> (0+7+5+1+1+3+2+1)) & ((1<<1)-1);
605 int TrackEta_ = (Address >> (0+7+5+1+1+3+2+1+1)) & ((1<<5)-1);
615 if (sign12 == 0) dPhi12 = -1*dPhi12;
616 if (sign23 == 0) dPhi23 = -1*dPhi23;
617 if (CLCT1Sign == 0) CLCT1 = -1*CLCT1;
621 int dPhi12_ = (Address >> (0)) & ((1<<7)-1);
622 int dPhi24_ = (Address >> (0+7)) & ((1<<5)-1);
623 float sign12 = (Address >> (0+7+5)) & ((1<<1)-1);
624 float sign24 = (Address >> (0+7+5+1)) & ((1<<1)-1);
625 dEta14 = (Address >> (0+7+5+1+1)) & ((1<<3)-1);
626 CLCT1 = (Address >> (0+7+5+1+1+3)) & ((1<<2)-1);
627 float CLCT1Sign= (Address >> (0+7+5+1+1+3+2)) & ((1<<1)-1);
628 FR1 = (Address >> (0+7+5+1+1+3+2+1)) & ((1<<1)-1);
629 int TrackEta_ = (Address >> (0+7+5+1+1+3+2+1+1)) & ((1<<5)-1);
635 if (sign12 == 0) dPhi12 = -1*dPhi12;
636 if (sign24 == 0) dPhi24 = -1*dPhi24;
637 if (CLCT1Sign == 0) CLCT1 = -1*CLCT1;
641 int dPhi13_ = (Address >> (0)) & ((1<<7)-1);
642 int dPhi34_ = (Address >> (0+7)) & ((1<<5)-1);
643 float sign13 = (Address >> (0+7+5)) & ((1<<1)-1);
644 float sign34 = (Address >> (0+7+5+1)) & ((1<<1)-1);
645 dEta14 = (Address >> (0+7+5+1+1)) & ((1<<3)-1);
646 CLCT1 = (Address >> (0+7+5+1+1+3)) & ((1<<2)-1);
647 float CLCT1Sign= (Address >> (0+7+5+1+1+3+2)) & ((1<<1)-1);
648 FR1 = (Address >> (0+7+5+1+1+3+2+1)) & ((1<<1)-1);
649 int TrackEta_ = (Address >> (0+7+5+1+1+3+2+1+1)) & ((1<<5)-1);
655 if (sign13 == 0) dPhi13 = -1*dPhi13;
656 if (sign34 == 0) dPhi34 = -1*dPhi34;
657 if (CLCT1Sign == 0) CLCT1 = -1*CLCT1;
661 int dPhi23_ = (Address >> (0)) & ((1<<7)-1);
662 int dPhi34_ = (Address >> (0+7)) & ((1<<6)-1);
663 float sign23 = (Address >> (0+7+6)) & ((1<<1)-1);
664 float sign34 = (Address >> (0+7+6+1)) & ((1<<1)-1);
665 dEta24 = (Address >> (0+7+6+1+1)) & ((1<<3)-1);
666 CLCT2 = (Address >> (0+7+5+1+1+3)) & ((1<<2)-1);
667 float CLCT2Sign= (Address >> (0+7+6+1+1+3+2)) & ((1<<1)-1);
668 int TrackEta_ = (Address >> (0+7+6+1+1+3+2+1)) & ((1<<5)-1);
674 if (sign23 == 0) dPhi23 = -1*dPhi23;
675 if (sign34 == 0) dPhi34 = -1*dPhi34;
676 if (CLCT2Sign == 0) CLCT2 = -1*CLCT2;
680 int dPhi12_ = (Address >> (0)) & ((1<<7)-1);
681 int dPhi23_ = (Address >> (0+7)) & ((1<<5)-1);
682 int dPhi34_ = (Address >> (0+7+5)) & ((1<<6)-1);
683 int sign23 = (Address >> (0+7+5+6)) & ((1<<1)-1);
684 int sign34 = (Address >> (0+7+5+6+1)) & ((1<<1)-1);
685 FR1 = (Address >> (0+7+5+6+1+1)) & ((1<<1)-1);
686 int TrackEta_ = (Address >> (0+7+5+6+1+1+1)) & ((1<<5)-1);
693 if (sign23 == 0) dPhi23 = -1*dPhi23;
694 if (sign34 == 0) dPhi34 = -1*dPhi34;
701 cout <<
"Mode 15: " << hex << Address <<
" " <<
dec << dPhi12 <<
" " << dPhi23 <<
" " << dPhi34 <<
" " <<
" " << FR1 <<
" " << TrackEta <<
" " <<
dec << endl;
703 cout <<
"Mode 14: " << hex << Address <<
" " <<
dec << dPhi23 <<
" " << dPhi34 <<
" " <<
" " <<
" " << TrackEta <<
" " <<
dec << endl;
705 cout <<
"Mode 13: " << hex << Address <<
" " <<
dec << dPhi13 <<
" " << dPhi34 <<
" " <<
" " << FR1 <<
" " << TrackEta <<
" " <<
dec << endl;
707 cout <<
"Mode 11: " << hex << Address <<
" " <<
dec << dPhi12 <<
" " << dPhi24 <<
" " <<
" " << FR1 <<
" " << TrackEta <<
" " <<
dec << endl;
709 cout <<
"Mode 7: " << hex << Address <<
" " <<
dec << dPhi12 <<
" " << dPhi23 <<
" " <<
" " << FR1 <<
" " << TrackEta <<
" " <<
dec << endl;
711 cout <<
"Mode 3: " << hex << Address <<
" " <<
dec << dPhi12 <<
" " <<
" " << FR1 <<
" " << TrackEta <<
" " <<
dec << endl;
739 for(
int f=0;
f<4;
f++){
740 std::cout<<
"\nphis["<<
f<<
"] = "<<phis[
f]<<
" and etas = "<<
etas[
f]<<std::endl;
741 std::cout<<
"\nclct["<<
f<<
"] = "<<clct[
f]<<
" and cscid = "<<cscid[
f]<<std::endl;
745 std::cout<<
"\ndphi["<<u<<
"] = "<<dphi[u]<<
" and deta = "<<deta[u]<<std::endl;
755 int size[13] = {5,0,5,5,5,0,5,5,5,5,5,4,4};
756 int Variables[24] = {dphi[0], dphi[1], dphi[2], dphi[3], dphi[4], dphi[5], deta[0], deta[1], deta[2], deta[3], deta[4], deta[5],
757 clct[0], clct[1], clct[2], clct[3], cscid[0], cscid[1], cscid[2], cscid[3], FR[0], FR[1], FR[2], FR[3]};
766 int goodMode =
false;
767 int allowedModes[11] = {3,5,9,6,10,12,7,11,13,14,15};
768 for (
int i=0;
i<11;
i++)
769 if (allowedModes[
i] ==
mode)
776 for(
int i=3;
i<16;
i++){
785 std::stringstream
ss;
786 ss << dir <<
"/" <<
mode;
788 forest-> loadForestFromXML(ss.str().c_str(),64);
790 std::vector<Double_t> Data;
793 for(
int y=0;
y<size[mode-3];
y++){
795 Data.push_back(Variables[ModeVariables[mode-3][
y]]);
796 if(verbose)
std::cout<<
"Generalized Variables "<<
y<<
" "<<Variables[ModeVariables[mode-3][
y]]<<
"\n";
800 std::cout<<
"Data.size() = "<<Data.size()<<
"\n";
805 Event *
event =
new Event();
808 std::vector<Event*> vevent;
809 vevent.push_back(
event);
813 float OpT = vevent[0]->predictedValue;
817 if (MpT<0.0) MpT = 1.0;
818 if (MpT>200.0) MpT = 200.0;
829 BDTPt__ =
getMaxPT(BDTPt, fabs(TrackEta), dPhi12, 0*dPhi23, 0*dPhi34, 95);
832 BDTPt__ =
getMaxPT(BDTPt, fabs(TrackEta), 0*dPhi12, dPhi23, 0*dPhi34, 95);
835 BDTPt__ =
getMaxPT(BDTPt, fabs(TrackEta), 0*dPhi12, 0*dPhi23, dPhi34, 95);
838 BDTPt__ =
getMaxPT(BDTPt, fabs(TrackEta), dPhi12, dPhi23, 0*dPhi34, 95);
841 BDTPt__ =
getMaxPT(BDTPt, fabs(TrackEta), dPhi12, 0*dPhi23, 0*dPhi34, 95);
844 BDTPt__ =
getMaxPT(BDTPt, fabs(TrackEta), 0*dPhi12, 0*dPhi23, dPhi34, 95);
847 BDTPt__ =
getMaxPT(BDTPt, fabs(TrackEta), 0*dPhi12, dPhi23, dPhi34, 95);
850 BDTPt__ =
getMaxPT(BDTPt, fabs(TrackEta), dPhi12, dPhi23, dPhi34, 95);
852 cout <<
"getMaxPT: eta = " << TrackEta <<
", old = " << BDTPt <<
" , new = " << BDTPt__ << endl;
868 for (
unsigned long i=0;
i<((1<<26)-1);
i++)
872 float BDTPt1 = fabs(
getPt(
i));
874 if (BDTPt1>140.0) BDTPt1 = 139.9999;
986 int dphi[6] = {-999,-999,-999,-999,-999,-999}, deta[6] = {-999,-999,-999,-999,-999,-999};
987 int clct[4] = {-999,-999,-999,-999}, cscid[4] = {-999,-999,-999,-999};
988 int phis[4] = {-999,-999,-999,-999},
etas[4] = {-999,-999,-999,-999},
mode = 0;;
989 int FR[4] = {-999,-999,-999,-999};
991 float theta_angle = ((track.
theta)*0.2851562 + 8.5)*(3.14159265359/180);
992 float eta = (-1)*
log(
tan(theta_angle/2));
998 if(verbose)
std::cout<<
"Track eta = "<<eta<<
" and has hits in stations ";
1001 for(
unsigned int s=8;
s<12;
s++){
1002 if((stubs.find(
s)->second).
size() == 1){
1005 if(verbose)
std::cout<<
"s= " <<
s <<
" " << endl;
1006 etas[
s-8] = (fabs((stubs.find(
s)->second)[0].getCMSGlobalEta()) + 0.9)/(0.0125);
1008 phis[
s-8] = track.
phis[
x];
1009 if(verbose)
std::cout<<
"phi= " << phis[
s-8] <<
" " << endl;
1010 clct[
s-8] = (stubs.find(
s)->second)[0].getPattern();
1011 if(verbose)
std::cout<<
"clct= " << clct[
s-8] <<
" " << endl;
1012 cscid[
s-8] = (stubs.find(
s)->second)[0].Id();
1013 if(verbose)
std::cout<<
"cscid= " << cscid[
s-8] <<
" " << endl;
1015 if(verbose)
std::cout<<
s <<
" " << (stubs.find(
s)->second)[0].detId<CSCDetId>().station()<<
" " << phis[
s-8] << endl;;
1017 const CSCChamber* layer = cscGeometry->chamber((stubs.find(
s)->second)[0].detId<CSCDetId>());
1023 int coord[5] = {586,686,815,924,1013};
1024 for(
int i=0;
i<5;
i++){
1026 if((fabs(glc.
z()) < (coord[
i] + 7)) && (fabs(glc.
z()) > (coord[
i] - 7)))
1034 case 1:
mode |= 1;
break;
1035 case 2:
mode |= 2;
break;
1036 case 3:
mode |= 4;
break;
1037 case 4:
mode |= 8;
break;
1050 if(phis[0] > 0 && phis[1] > 0){
1051 dphi[0] = phis[1] - phis[0];
1054 if(phis[0] > 0 && phis[2] > 0){
1055 dphi[1] = phis[2] - phis[0];
1058 if(phis[0] > 0 && phis[3] > 0){
1059 dphi[2] = phis[3] - phis[0];
1062 if(phis[1] > 0 && phis[2] > 0){
1063 dphi[3] = phis[2] - phis[1];
1066 if(phis[1] > 0 && phis[3] > 0){
1067 dphi[4] = phis[3] - phis[1];
1070 if(phis[2] > 0 && phis[3] > 0){
1071 dphi[5] = phis[3] - phis[2];
1079 float dPhi12__ = fabs(dphi[0]);
1080 float eta__ =
getEta(eta, 5);
1081 float clct1__ =
getCLCT(clct[0]);
1082 float clct2__ =
getCLCT(clct[1]);
1086 std::cout << std::setw(10) <<
"dPhi12: " << dphi[0] << std::setw(10) << dPhi12__ << std::endl;
1087 std::cout << std::setw(10) <<
"CLCT1: " << clct[0] << std::setw(10) << clct1__ << std::endl;
1088 std::cout << std::setw(10) <<
"CLCT2: " << clct[1] << std::setw(10) << clct2__ << std::endl;
1089 std::cout << std::setw(10) <<
"eta : " << eta << std::setw(10) << eta__ << std::endl;
1093 float dPhi13__ = fabs(dphi[1]);
1094 float eta__ =
getEta(eta, 5);
1095 float clct1__ =
getCLCT(clct[0]);
1096 float clct3__ =
getCLCT(clct[2]);
1100 std::cout << std::setw(10) <<
"dPhi13: " << dphi[1] << std::setw(10) << dPhi13__ << std::endl;
1101 std::cout << std::setw(10) <<
"CLCT1: " << clct[0] << std::setw(10) << clct1__ << std::endl;
1102 std::cout << std::setw(10) <<
"CLCT3: " << clct[2] << std::setw(10) << clct3__ << std::endl;
1103 std::cout << std::setw(10) <<
"eta : " << eta << std::setw(10) << eta__ << std::endl;
1107 float dPhi14__ = fabs(dphi[2]);
1108 float eta__ =
getEta(eta, 5);
1109 float clct1__ =
getCLCT(clct[0]);
1110 float clct4__ =
getCLCT(clct[3]);
1114 std::cout << std::setw(10) <<
"dPhi14: " << dphi[2] << std::setw(10) << dPhi14__ << std::endl;
1115 std::cout << std::setw(10) <<
"CLCT1: " << clct[0] << std::setw(10) << clct1__ << std::endl;
1116 std::cout << std::setw(10) <<
"CLCT4: " << clct[3] << std::setw(10) << clct4__ << std::endl;
1117 std::cout << std::setw(10) <<
"eta : " << eta << std::setw(10) << eta__ << std::endl;
1121 float dPhi23__ = fabs(dphi[3]);
1122 float eta__ =
getEta(eta, 5);
1123 float clct2__ =
getCLCT(clct[1]);
1124 float clct3__ =
getCLCT(clct[2]);
1128 std::cout << std::setw(10) <<
"dPhi23: " << dphi[3] << std::setw(10) << dPhi23__ << std::endl;
1129 std::cout << std::setw(10) <<
"CLCT2: " << clct[1] << std::setw(10) << clct2__ << std::endl;
1130 std::cout << std::setw(10) <<
"CLCT3: " << clct[2] << std::setw(10) << clct3__ << std::endl;
1131 std::cout << std::setw(10) <<
"eta : " << eta << std::setw(10) << eta__ << std::endl;
1135 float dPhi24__ = fabs(dphi[4]);
1136 float eta__ =
getEta(eta, 5);
1137 float clct2__ =
getCLCT(clct[1]);
1138 float clct4__ =
getCLCT(clct[3]);
1142 std::cout << std::setw(10) <<
"dPhi24: " << dphi[4] << std::setw(10) << dPhi24__ << std::endl;
1143 std::cout << std::setw(10) <<
"CLCT2: " << clct[1] << std::setw(10) << clct2__ << std::endl;
1144 std::cout << std::setw(10) <<
"CLCT4: " << clct[3] << std::setw(10) << clct4__ << std::endl;
1145 std::cout << std::setw(10) <<
"eta : " << eta << std::setw(10) << eta__ << std::endl;
1149 float dPhi34__ = fabs(dphi[5]);
1150 float eta__ =
getEta(eta, 5);
1151 float clct3__ =
getCLCT(clct[2]);
1152 float clct4__ =
getCLCT(clct[3]);
1156 std::cout << std::setw(10) <<
"dPhi34: " << dphi[5] << std::setw(10) << dPhi34__ << std::endl;
1157 std::cout << std::setw(10) <<
"CLCT3: " << clct[2] << std::setw(10) << clct3__ << std::endl;
1158 std::cout << std::setw(10) <<
"CLCT4: " << clct[3] << std::setw(10) << clct4__ << std::endl;
1159 std::cout << std::setw(10) <<
"eta : " << eta << std::setw(10) << eta__ << std::endl;
1166 float eta__ =
getEta(eta, 5);
1167 float clct1__ =
getCLCT(clct[0]);
1170 std::cout << std::setw(10) <<
"dPhi12: " << dphi[0] << std::setw(10) << dPhi12__ << std::endl;
1171 std::cout << std::setw(10) <<
"dPhi23: " << dphi[3] << std::setw(10) << dPhi23__ << std::endl;
1172 std::cout << std::setw(10) <<
"CLCT1: " << clct[0] << std::setw(10) << clct1__ << std::endl;
1173 std::cout << std::setw(10) <<
"eta : " << eta << std::setw(10) << eta__ << std::endl;
1179 float eta__ =
getEta(eta, 5);
1180 float clct1__ =
getCLCT(clct[0]);
1183 std::cout << std::setw(10) <<
"dPhi12: " << dphi[0] << std::setw(10) << dPhi12__ << std::endl;
1184 std::cout << std::setw(10) <<
"dPhi24: " << dphi[4] << std::setw(10) << dPhi24__ << std::endl;
1185 std::cout << std::setw(10) <<
"CLCT1: " << clct[0] << std::setw(10) << clct1__ << std::endl;
1186 std::cout << std::setw(10) <<
"eta : " << eta << std::setw(10) << eta__ << std::endl;
1192 float eta__ =
getEta(eta, 5);
1193 float clct1__ =
getCLCT(clct[0]);
1196 std::cout << std::setw(10) <<
"dPhi13: " << dphi[1] << std::setw(10) << dPhi13__ << std::endl;
1197 std::cout << std::setw(10) <<
"dPhi34: " << dphi[5] << std::setw(10) << dPhi34__ << std::endl;
1198 std::cout << std::setw(10) <<
"CLCT1: " << clct[0] << std::setw(10) << clct1__ << std::endl;
1199 std::cout << std::setw(10) <<
"eta : " << eta << std::setw(10) << eta__ << std::endl;
1205 float eta__ =
getEta(eta, 5);
1206 float clct2__ =
getCLCT(clct[1]);
1209 std::cout << std::setw(10) <<
"dPhi23: " << dphi[3] << std::setw(10) << dPhi23__ << std::endl;
1210 std::cout << std::setw(10) <<
"dPhi34: " << dphi[5] << std::setw(10) << dPhi34__ << std::endl;
1211 std::cout << std::setw(10) <<
"CLCT2: " << clct[1] << std::setw(10) << clct2__ << std::endl;
1212 std::cout << std::setw(10) <<
"eta : " << eta << std::setw(10) << eta__ << std::endl;
1219 float eta__ =
getEta(eta, 5);
1223 std::cout << std::setw(10) <<
"dPhi12: " << dphi[0] << std::setw(10) << dPhi12__ << std::endl;
1224 std::cout << std::setw(10) <<
"dPhi23: " << dphi[3] << std::setw(10) << dPhi23__ << std::endl;
1225 std::cout << std::setw(10) <<
"dPhi34: " << dphi[5] << std::setw(10) << dPhi34__ << std::endl;
1226 std::cout << std::setw(10) <<
"eta : " << eta << std::setw(10) << eta__ << std::endl;
1230 float dPhi12 = dphi[0];
1231 float dPhi13 = dphi[1];
1232 float dPhi14 = dphi[2];
1233 float dPhi23 = dphi[3];
1234 float dPhi24 = dphi[4];
1235 float dPhi34 = dphi[5];
1236 float dEta12 = deta[0];
1237 float dEta13 = deta[1];
1238 float dEta14 = deta[2];
1239 float dEta23 = deta[3];
1240 float dEta24 = deta[4];
1241 float dEta34 = deta[5];
1243 float CLCT1 = clct[0];
1244 float CLCT2 = clct[1];
1245 float CLCT3 = clct[2];
1246 float CLCT4 = clct[3];
1252 unsigned long Address = 0x0;
1262 if (dPhi12<0) dPhi12Sign = -1;
1263 if (CLCT1<0) CLCT1Sign = -1;
1264 if (CLCT2<0) CLCT2Sign = -1;
1267 int dPhi12_ = fabs(dPhi12);
1268 int sign12_ = dPhi12Sign > 0 ? 1 : 0;
1269 int dEta12_ =
getdEta(dEta12);
1270 int CLCT1_ =
getCLCT(fabs(CLCT1));
1271 int CLCT1Sign_ = CLCT1Sign > 0 ? 1 : 0;
1272 int CLCT2_ =
getCLCT(fabs(CLCT2));
1273 int CLCT2Sign_ = CLCT2Sign > 0 ? 1 : 0;
1279 Address += ( dPhi12_ & ((1<<9)-1)) << (0);
1280 Address += ( sign12_ & ((1<<1)-1)) << (0+9);
1281 Address += ( dEta12_ & ((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 += ( CLCT2_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1285 Address += ( CLCT2Sign_ & ((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 += ( FR2_ & ((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);
1300 if (dPhi13<0) dPhi13Sign = -1;
1301 if (CLCT1<0) CLCT1Sign = -1;
1302 if (CLCT3<0) CLCT3Sign = -1;
1305 int dPhi13_ = fabs(dPhi13);
1306 int sign13_ = dPhi13Sign > 0 ? 1 : 0;
1307 int dEta13_ =
getdEta(dEta13);
1308 int CLCT1_ =
getCLCT(fabs(CLCT1));
1309 int CLCT1Sign_ = CLCT1Sign > 0 ? 1 : 0;
1310 int CLCT3_ =
getCLCT(fabs(CLCT3));
1311 int CLCT3Sign_ = CLCT3Sign > 0 ? 1 : 0;
1317 Address += ( dPhi13_ & ((1<<9)-1)) << (0);
1318 Address += ( sign13_ & ((1<<1)-1)) << (0+9);
1319 Address += ( dEta13_ & ((1<<3)-1)) << (0+9+1);
1320 Address += ( CLCT1_ & ((1<<2)-1)) << (0+9+1+3);
1321 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1322 Address += ( CLCT3_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1323 Address += ( CLCT3Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1324 Address += ( FR1_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1325 Address += ( FR3_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1326 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1327 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1338 if (dPhi14<0) dPhi14Sign = -1;
1339 if (CLCT1<0) CLCT1Sign = -1;
1340 if (CLCT4<0) CLCT4Sign = -1;
1343 int dPhi14_ = fabs(dPhi14);
1344 int sign14_ = dPhi14Sign > 0 ? 1 : 0;
1345 int dEta14_ =
getdEta(dEta14);
1346 int CLCT1_ =
getCLCT(fabs(CLCT1));
1347 int CLCT1Sign_ = CLCT1Sign > 0 ? 1 : 0;
1348 int CLCT4_ =
getCLCT(fabs(CLCT4));
1349 int CLCT4Sign_ = CLCT4Sign > 0 ? 1 : 0;
1355 Address += ( dPhi14_ & ((1<<9)-1)) << (0);
1356 Address += ( sign14_ & ((1<<1)-1)) << (0+9);
1357 Address += ( dEta14_ & ((1<<3)-1)) << (0+9+1);
1358 Address += ( CLCT1_ & ((1<<2)-1)) << (0+9+1+3);
1359 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1360 Address += ( CLCT4_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1361 Address += ( CLCT4Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1362 Address += ( FR1_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1363 Address += ( FR4_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1364 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1365 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1375 if (dPhi23<0) dPhi23Sign = -1;
1376 if (CLCT2<0) CLCT2Sign = -1;
1377 if (CLCT3<0) CLCT3Sign = -1;
1380 int dPhi23_ = fabs(dPhi23);
1381 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1382 int dEta23_ =
getdEta(dEta23);
1383 int CLCT2_ =
getCLCT(fabs(CLCT2));
1384 int CLCT2Sign_ = CLCT2Sign > 0 ? 1 : 0;
1385 int CLCT3_ =
getCLCT(fabs(CLCT3));
1386 int CLCT3Sign_ = CLCT3Sign > 0 ? 1 : 0;
1392 Address += ( dPhi23_ & ((1<<9)-1)) << (0);
1393 Address += ( sign23_ & ((1<<1)-1)) << (0+9);
1394 Address += ( dEta23_ & ((1<<3)-1)) << (0+9+1);
1395 Address += ( CLCT2_ & ((1<<2)-1)) << (0+9+1+3);
1396 Address += ( CLCT2Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1397 Address += ( CLCT3_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1398 Address += ( CLCT3Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1399 Address += ( FR2_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1400 Address += ( FR3_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1401 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1402 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1412 if (dPhi24<0) dPhi24Sign = -1;
1413 if (CLCT2<0) CLCT2Sign = -1;
1414 if (CLCT4<0) CLCT4Sign = -1;
1417 int dPhi24_ = fabs(dPhi24);
1418 int sign24_ = dPhi24Sign > 0 ? 1 : 0;
1419 int dEta24_ =
getdEta(dEta24);
1420 int CLCT2_ =
getCLCT(fabs(CLCT2));
1421 int CLCT2Sign_ = CLCT2Sign > 0 ? 1 : 0;
1422 int CLCT4_ =
getCLCT(fabs(CLCT4));
1423 int CLCT4Sign_ = CLCT4Sign > 0 ? 1 : 0;
1429 Address += ( dPhi24_ & ((1<<9)-1)) << (0);
1430 Address += ( sign24_ & ((1<<1)-1)) << (0+9);
1431 Address += ( dEta24_ & ((1<<3)-1)) << (0+9+1);
1432 Address += ( CLCT2_ & ((1<<2)-1)) << (0+9+1+3);
1433 Address += ( CLCT2Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1434 Address += ( CLCT4_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1435 Address += ( CLCT4Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1436 Address += ( FR2_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1437 Address += ( FR3_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1438 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1439 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1448 if (dPhi34<0) dPhi34Sign = -1;
1449 if (CLCT3<0) CLCT3Sign = -1;
1450 if (CLCT4<0) CLCT4Sign = -1;
1453 int dPhi34_ = fabs(dPhi34);
1454 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1455 int dEta34_ =
getdEta(dEta34);
1456 int CLCT3_ =
getCLCT(fabs(CLCT3));
1457 int CLCT3Sign_ = CLCT3Sign > 0 ? 1 : 0;
1458 int CLCT4_ =
getCLCT(fabs(CLCT4));
1459 int CLCT4Sign_ = CLCT4Sign > 0 ? 1 : 0;
1465 Address += ( dPhi34_ & ((1<<9)-1)) << (0);
1466 Address += ( sign34_ & ((1<<1)-1)) << (0+9);
1467 Address += ( dEta34_ & ((1<<3)-1)) << (0+9+1);
1468 Address += ( CLCT3_ & ((1<<2)-1)) << (0+9+1+3);
1469 Address += ( CLCT3Sign_ & ((1<<1)-1)) << (0+9+1+3+2);
1470 Address += ( CLCT4_ & ((1<<2)-1)) << (0+9+1+3+2+1);
1471 Address += ( CLCT4Sign_ & ((1<<1)-1)) << (0+9+1+3+2+1+2);
1472 Address += ( FR3_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1);
1473 Address += ( FR4_ & ((1<<1)-1)) << (0+9+1+3+2+1+2+1+1);
1474 Address += ( eta_ & ((1<<5)-1)) << (0+9+1+3+2+1+2+1+1+1);
1475 Address += ( Mode_ & ((1<<4)-1)) << (0+9+1+3+2+1+2+1+1+1+5);
1486 if (dPhi12<0) dPhi12Sign = -1;
1487 if (dPhi23<0) dPhi23Sign = -1;
1489 if (CLCT1<0) CLCT1Sign = -1;
1494 int sign12_ = dPhi12Sign > 0 ? 1 : 0;
1495 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1496 int dEta13_ =
getdEta(dEta13);
1497 int CLCT1_ =
getCLCT(fabs(CLCT1));
1498 int CLCT1Sign_ = CLCT1Sign > 0 ? 1 : 0;
1503 Address += ( dPhi12_ & ((1<<7)-1)) << (0);
1504 Address += ( dPhi23_ & ((1<<5)-1)) << (0+7);
1505 Address += ( sign12_ & ((1<<1)-1)) << (0+7+5);
1506 Address += ( sign23_ & ((1<<1)-1)) << (0+7+5+1);
1507 Address += ( dEta13_ & ((1<<3)-1)) << (0+7+5+1+1);
1508 Address += ( CLCT1_ & ((1<<2)-1)) << (0+7+5+1+1+3);
1509 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+7+5+1+1+3+2);
1510 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+1+1+3+2+1);
1511 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+1+1+3+2+1+1);
1512 Address += ( Mode_ & ((1<<4)-1)) << (0+7+5+1+1+3+2+1+1+5);
1522 if (dPhi12<0) dPhi12Sign = -1;
1523 if (dPhi24<0) dPhi24Sign = -1;
1524 if (CLCT1<0) CLCT1Sign = -1;
1529 int sign12_ = dPhi12Sign > 0 ? 1 : 0;
1530 int sign24_ = dPhi24Sign > 0 ? 1 : 0;
1531 int dEta14_ =
getdEta(dEta14);
1532 int CLCT1_ =
getCLCT(fabs(CLCT1));
1533 int CLCT1Sign_ = CLCT1Sign > 0 ? 1 : 0;
1538 Address += ( dPhi12_ & ((1<<7)-1)) << (0);
1539 Address += ( dPhi24_ & ((1<<5)-1)) << (0+7);
1540 Address += ( sign12_ & ((1<<1)-1)) << (0+7+5);
1541 Address += ( sign24_ & ((1<<1)-1)) << (0+7+5+1);
1542 Address += ( dEta14_ & ((1<<3)-1)) << (0+7+5+1+1);
1543 Address += ( CLCT1_ & ((1<<2)-1)) << (0+7+5+1+1+3);
1544 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+7+5+1+1+3+2);
1545 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+1+1+3+2+1);
1546 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+1+1+3+2+1+1);
1547 Address += ( Mode_ & ((1<<4)-1)) << (0+7+5+1+1+3+2+1+1+5);
1556 if (dPhi13<0) dPhi13Sign = -1;
1557 if (dPhi34<0) dPhi34Sign = -1;
1558 if (CLCT1<0) CLCT1Sign = -1;
1563 int sign13_ = dPhi13Sign > 0 ? 1 : 0;
1564 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1565 int dEta14_ =
getdEta(dEta14);
1566 int CLCT1_ =
getCLCT(fabs(CLCT1));
1567 int CLCT1Sign_ = CLCT1Sign > 0 ? 1 : 0;
1572 Address += ( dPhi13_ & ((1<<7)-1)) << (0);
1573 Address += ( dPhi34_ & ((1<<5)-1)) << (0+7);
1574 Address += ( sign13_ & ((1<<1)-1)) << (0+7+5);
1575 Address += ( sign34_ & ((1<<1)-1)) << (0+7+5+1);
1576 Address += ( dEta14_ & ((1<<3)-1)) << (0+7+5+1+1);
1577 Address += ( CLCT1_ & ((1<<2)-1)) << (0+7+5+1+1+3);
1578 Address += ( CLCT1Sign_ & ((1<<1)-1)) << (0+7+5+1+1+3+2);
1579 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+1+1+3+2+1);
1580 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+1+1+3+2+1+1);
1581 Address += ( Mode_ & ((1<<4)-1)) << (0+7+5+1+1+3+2+1+1+5);
1591 if (dPhi23<0) dPhi23Sign = -1;
1592 if (dPhi34<0) dPhi34Sign = -1;
1593 if (CLCT2<0) CLCT2Sign = -1;
1598 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1599 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1600 int dEta24_ =
getdEta(dEta24);
1601 int CLCT2_ =
getCLCT(fabs(CLCT2));
1602 int CLCT2Sign_ = CLCT2Sign > 0 ? 1 : 0;
1606 Address += ( dPhi23_ & ((1<<7)-1)) << (0);
1607 Address += ( dPhi34_ & ((1<<6)-1)) << (0+7);
1608 Address += ( sign23_ & ((1<<1)-1)) << (0+7+6);
1609 Address += ( sign34_ & ((1<<1)-1)) << (0+7+6+1);
1610 Address += ( dEta24_ & ((1<<3)-1)) << (0+7+6+1+1);
1611 Address += ( CLCT2_ & ((1<<2)-1)) << (0+7+6+1+1+3);
1612 Address += ( CLCT2Sign_ & ((1<<1)-1)) << (0+7+6+1+1+3+2);
1613 Address += ( eta_ & ((1<<5)-1)) << (0+7+6+1+1+3+2+1);
1614 Address += ( Mode_ & ((1<<4)-1)) << (0+7+6+1+1+3+2+1+5);
1623 if (dPhi12<0) dPhi12Sign = -1;
1624 if (dPhi23<0) dPhi23Sign = -1;
1625 if (dPhi34<0) dPhi34Sign = -1;
1627 if (dPhi12Sign==-1 && dPhi23Sign==-1 && dPhi34Sign==-1)
1628 { dPhi12Sign=1;dPhi23Sign=1;dPhi34Sign=1;}
1629 else if (dPhi12Sign==-1 && dPhi23Sign==1 && dPhi34Sign==1)
1630 { dPhi12Sign=1;dPhi23Sign=-1;dPhi34Sign=-1;}
1631 else if (dPhi12Sign==-1 && dPhi23Sign==-1 && dPhi34Sign==1)
1632 { dPhi12Sign=1;dPhi23Sign=1;dPhi34Sign=-1;}
1633 else if (dPhi12Sign==-1 && dPhi23Sign==1 && dPhi34Sign==-1)
1634 { dPhi12Sign=1;dPhi23Sign=-1;dPhi34Sign=1;}
1640 int sign23_ = dPhi23Sign > 0 ? 1 : 0;
1641 int sign34_ = dPhi34Sign > 0 ? 1 : 0;
1646 Address += ( dPhi12_ & ((1<<7)-1)) << 0;
1647 Address += ( dPhi23_ & ((1<<5)-1)) << (0+7);
1648 Address += ( dPhi34_ & ((1<<6)-1)) << (0+7+5);
1649 Address += ( sign23_ & ((1<<1)-1)) << (0+7+5+6);
1650 Address += ( sign34_ & ((1<<1)-1)) << (0+7+5+6+1);
1651 Address += ( FR1_ & ((1<<1)-1)) << (0+7+5+6+1+1);
1652 Address += ( eta_ & ((1<<5)-1)) << (0+7+5+6+1+1+1);
1653 Address += ( Mode_ & ((1<<4)-1)) << (0+7+5+6+1+1+1+5);
1656 return getPt(Address);
int getNLBdPhiBin(float dPhi, int bits, int max=512)
int ModeVariables_Scheme3[13][6]
const TriggerPrimitiveStationMap & getStubs() const
float getMaxPT(float ptHyp, Int_t eta, float dPhi12, float dPhi23, float dPhi34, int perCUT=100)
float getNLBdPhi(float dPhi, int bits, int max=512)
float getdPhiFromBin(int dPhiBin, int bits, int max=512)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
const int dPhiNLBMap_7bit_256Max[128]
int getEtaInt(float eta, int bits=5)
float getPt(unsigned long Address)
void predictEvents(std::vector< Event * > eventsp, unsigned int trees)
float getCLCT(float clct)
static const double pts[33]
float getdEta(float deta)
T x() const
Cartesian x coordinate.
const int dPhiNLBMap_7bit[128]
float CalculatePt(L1TMuon::InternalTrack track, const edm::EventSetup &es)
double dPhi(double phi1, double phi2)
const int dPhiNLBMap_5bit_256Max[32]
Tan< T >::type tan(const T &t)
const int dPhiNLBMap_8bit_512Max[256]
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
float getEtafromBin(int etaBin, int bits=5)
const int dPhiNLBMap_6bit_256Max[64]
static unsigned int const shift
float getEta(float eta, int bits=5)
std::map< unsigned, TriggerPrimitiveCollection > TriggerPrimitiveStationMap
const Double_t ptscale[31]
const int dPhiNLBMap_7bit_512Max[256]
const int dPhiNLBMap_8bit[256]
tuple size
Write out results.
const int dPhiNLBMap_5bit[32]