45 structure_(structure),
46 seedingType_(seedingType) {
93 for ( std::vector<const Ring*>::iterator innerRing =
innerSeedRings_.begin();
98 for ( std::vector<const Ring*>::iterator outerRing =
outerSeedRings_.begin();
107 seed.first.push_back((*innerRing));
110 seed.second.push_back((*outerRing));
126 for ( std::vector<const Ring*>::iterator innerRing1 =
innerSeedRings1_.begin();
131 std::vector<std::pair<double,double> > linesInnerSeedRing1AndBS =
LinesThroughRingAndBS((*innerRing1));
133 for ( std::vector<const Ring*>::iterator innerRing2 =
innerSeedRings2_.begin();
141 std::vector<std::pair<double,double> > linesInnerSeedRing2AndBS =
LinesThroughRingAndBS((*innerRing2));
144 std::vector<std::pair<double,double> > linesInnerSeedRing1AndInnerSeedRing2 =
LinesThroughRings(*innerRing1,*innerRing2);
146 for ( std::vector<const Ring*>::iterator outerRing1 =
outerSeedRings1_.begin();
155 std::vector<std::pair<double,double> > linesOuterSeedRing1AndBS =
LinesThroughRingAndBS((*outerRing1));
156 std::vector<std::pair<double,double> > linesInnerSeedRing1AndOuterSeedRing1 =
LinesThroughRings(*innerRing1,*outerRing1);
157 std::vector<std::pair<double,double> > linesInnerSeedRing2AndOuterSeedRing1 =
LinesThroughRings(*innerRing2,*outerRing1);
163 seed.first.push_back((*innerRing1));
164 seed.first.push_back((*innerRing2));
167 seed.second.push_back((*outerRing1));
170 std::vector<const Ring*> outerRing2Candidates;
172 for ( std::vector<const Ring*>::iterator outerRing =
outerSeedRings_.begin();
181 if ( (*outerRing)->getindex() < (*outerRing1)->getindex() ) {
183 outerRing2Candidates.push_back((*outerRing));
189 unsigned int size = outerRing2Candidates.size();
192 seed.second.push_back(outerRing2Candidates[0]);
196 const Ring *selectedRing = 0;
197 double z_2 = ((*outerRing1)->getzmax()+(*outerRing1)->getzmin())/2;
198 double r_2 = ((*outerRing1)->getrmax()+(*outerRing1)->getrmin())/2;
199 double z_1 = ((*innerRing1)->getzmax()+(*innerRing1)->getzmin())/2;
200 double r_1 = ((*innerRing1)->getrmax()+(*innerRing1)->getrmin())/2;
202 double slope = (z_2-z_1) /(r_2-r_1);
203 double intercept = z_1 - slope * r_1;
204 double zDifference = 999;
205 for ( std::vector<const Ring*>::iterator
ring = outerRing2Candidates.begin();
206 ring != outerRing2Candidates.end();
208 double z = slope * (((*ring)->getrmax()+(*ring)->getrmin())/2) + intercept;
209 double diff =
std::abs(z-(((*ring)->getzmax()+(*ring)->getzmin())/2));
210 if ( diff < zDifference ) {
211 selectedRing = *
ring;
216 double slope = (r_2-r_1) /(z_2-z_1);
217 double intercept = r_1 - slope * z_1;
218 double rDifference = 999;
219 for ( std::vector<const Ring*>::iterator
ring = outerRing2Candidates.begin();
220 ring != outerRing2Candidates.end();
222 double r = slope * (((*ring)->getzmax()+(*ring)->getzmin())/2) + intercept;
223 double diff =
std::abs(r-(((*ring)->getrmax()+(*ring)->getrmin())/2));
224 if ( diff < rDifference ) {
225 selectedRing = *
ring;
230 seed.second.push_back(selectedRing);
237 tempSeed.first.push_back((*innerRing1));
238 tempSeed.second.push_back((*outerRing1));
295 unsigned int counter = 0, layer_min=0, layer_max=0, fw_bw_min=0, fw_bw_max=0, ext_int_min=0, ext_int_max=0, detector_min = 0, detector_max=0;
344 for (
unsigned int layer = layer_min; layer < layer_max; ++layer ) {
345 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
346 for (
unsigned int ext_int = ext_int_min; ext_int < ext_int_max; ++ext_int ) {
347 for (
unsigned int detector = detector_min; detector < detector_max; ++detector ) {
351 LogDebug(
"RoadSearch") <<
"collected TIB inner seed ring with index: " << temp_ring->
getindex();
357 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TIB inner seed rings";
364 unsigned int counter = 0;
366 unsigned int fw_bw_min =0, fw_bw_max = 0,wheel_min = 0, wheel_max = 0, ring_min=0, ring_max = 0;
398 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
399 for (
unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
400 for (
unsigned int ring = ring_min;
ring < ring_max; ++
ring ) {
404 LogDebug(
"RoadSearch") <<
"collected TID inner seed ring with index: " << temp_ring->
getindex();
409 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TID inner seed rings";
416 unsigned int counter = 0;
418 unsigned int fw_bw_min = 1;
419 unsigned int fw_bw_max = 1;
420 unsigned int wheel_min = 1;
421 unsigned int wheel_max = 9;
422 unsigned int ring_min[9];
423 unsigned int ring_max[9];
507 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
508 for (
unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
509 for (
unsigned int ring = ring_min[wheel];
ring < ring_max[wheel]; ++
ring ) {
513 LogDebug(
"RoadSearch") <<
"collected TEC inner seed ring with index: " << temp_ring->
getindex();
518 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TEC inner seed rings";
525 unsigned int counter = 0, layer_min=0, layer_max=0, rod_fw_bw_min=0, rod_fw_bw_max=0, detector_min=0, detector_max=0;
564 for (
unsigned int layer = layer_min; layer < layer_max; ++layer ) {
565 for (
unsigned int rod_fw_bw = rod_fw_bw_min; rod_fw_bw < rod_fw_bw_max; ++rod_fw_bw ) {
566 for (
unsigned int detector = detector_min; detector < detector_max; ++detector ) {
570 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
580 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
585 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
590 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
595 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
600 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
605 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
609 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TOB inner seed rings";
647 unsigned int counter = 0, layer_min=0, layer_max=0, fw_bw_min=0, fw_bw_max=0, ext_int_min=0, ext_int_max=0, detector_min=0, detector_max=0;
695 for (
unsigned int layer = layer_min; layer < layer_max; ++layer ) {
696 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
697 for (
unsigned int ext_int = ext_int_min; ext_int < ext_int_max; ++ext_int ) {
698 for (
unsigned int detector = detector_min; detector < detector_max; ++detector ) {
702 LogDebug(
"RoadSearch") <<
"collected TIB inner seed ring with index: " << temp_ring->
getindex();
708 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TIB inner seed rings";
715 unsigned int counter = 0;
717 unsigned int fw_bw_min = 0, fw_bw_max = 0, wheel_min=0, wheel_max = 0, ring_min=0, ring_max = 0;
749 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
750 for (
unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
751 for (
unsigned int ring = ring_min;
ring < ring_max; ++
ring ) {
755 LogDebug(
"RoadSearch") <<
"collected TID inner seed ring with index: " << temp_ring->
getindex();
760 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TID inner seed rings";
767 unsigned int counter = 0;
769 unsigned int fw_bw_min = 1;
770 unsigned int fw_bw_max = 1;
771 unsigned int wheel_min = 1;
772 unsigned int wheel_max = 4;
773 unsigned int ring_min[9];
774 unsigned int ring_max[9];
832 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
833 for (
unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
834 for (
unsigned int ring = ring_min[wheel];
ring < ring_max[wheel]; ++
ring ) {
838 LogDebug(
"RoadSearch") <<
"collected TEC inner seed ring with index: " << temp_ring->
getindex();
843 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TEC inner seed rings";
850 unsigned int counter = 0, layer_min=0, layer_max=0, rod_fw_bw_min=0, rod_fw_bw_max=0, detector_min=0, detector_max=0;
881 for (
unsigned int layer = layer_min; layer < layer_max; ++layer ) {
882 for (
unsigned int rod_fw_bw = rod_fw_bw_min; rod_fw_bw < rod_fw_bw_max; ++rod_fw_bw ) {
883 for (
unsigned int detector = detector_min; detector < detector_max; ++detector ) {
887 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
897 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
902 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
907 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
912 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
917 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
922 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
926 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TOB inner seed rings";
969 unsigned int counter = 0, layer_min = 0, layer_max=0, fw_bw_min=0, fw_bw_max=0, ext_int_min=0, ext_int_max=0, detector_min=0, detector_max=0;
1026 for (
unsigned int layer = layer_min; layer < layer_max; ++layer ) {
1027 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1028 for (
unsigned int ext_int = ext_int_min; ext_int < ext_int_max; ++ext_int ) {
1029 for (
unsigned int detector = detector_min; detector < detector_max; ++detector ) {
1033 LogDebug(
"RoadSearch") <<
"collected TIB inner seed ring with index: " << temp_ring->
getindex();
1039 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TIB inner seed rings";
1046 unsigned int counter = 0;
1048 unsigned int fw_bw_min = 0, fw_bw_max = 0, wheel_min=0, wheel_max = 0, ring_min = 0, ring_max = 0;
1080 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1081 for (
unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1082 for (
unsigned int ring = ring_min;
ring < ring_max; ++
ring ) {
1086 LogDebug(
"RoadSearch") <<
"collected TID inner seed ring with index: " << temp_ring->
getindex();
1091 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TID inner seed rings";
1098 unsigned int counter = 0;
1100 unsigned int fw_bw_min = 1;
1101 unsigned int fw_bw_max = 1;
1102 unsigned int wheel_min = 1;
1103 unsigned int wheel_max = 9;
1104 unsigned int ring_min[9];
1105 unsigned int ring_max[9];
1163 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1164 for (
unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1165 for (
unsigned int ring = ring_min[wheel];
ring < ring_max[wheel]; ++
ring ) {
1169 LogDebug(
"RoadSearch") <<
"collected TEC inner seed ring with index: " << temp_ring->
getindex();
1174 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TEC inner seed rings";
1181 unsigned int counter = 0, layer_min=0, layer_max=0, rod_fw_bw_min=0, rod_fw_bw_max=0, detector_min=0, detector_max=0;
1205 for (
unsigned int layer = layer_min; layer < layer_max; ++layer ) {
1206 for (
unsigned int rod_fw_bw = rod_fw_bw_min; rod_fw_bw < rod_fw_bw_max; ++rod_fw_bw ) {
1207 for (
unsigned int detector = detector_min; detector < detector_max; ++detector ) {
1211 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1221 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1226 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1231 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1236 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1241 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1246 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1250 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TOB inner seed rings";
1289 unsigned int counter = 0, layer_min=0, layer_max=0, fw_bw_min=0, fw_bw_max=0, ext_int_min=0, ext_int_max=0, detector_min=0, detector_max=0;
1301 for (
unsigned int layer = layer_min; layer < layer_max; ++layer ) {
1302 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1303 for (
unsigned int ext_int = ext_int_min; ext_int < ext_int_max; ++ext_int ) {
1304 for (
unsigned int detector = detector_min; detector < detector_max; ++detector ) {
1308 LogDebug(
"RoadSearch") <<
"collected TIB outer seed ring with index: " << temp_ring->
getindex();
1314 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TIB outer seed rings";
1321 unsigned int counter = 0, layer_min=0, layer_max=0, rod_fw_bw_min=0, rod_fw_bw_max=0, detector_min=0, detector_max=0;
1380 for (
unsigned int layer = layer_min; layer < layer_max; ++layer ) {
1381 for (
unsigned int rod_fw_bw = rod_fw_bw_min; rod_fw_bw < rod_fw_bw_max; ++rod_fw_bw ) {
1382 for (
unsigned int detector = detector_min; detector < detector_max; ++detector ) {
1386 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1396 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1401 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1406 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1411 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1416 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1421 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1426 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1431 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1435 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TOB outer seed rings";
1442 unsigned int counter = 0;
1446 unsigned int fw_bw_min = 1;
1447 unsigned int fw_bw_max = 3;
1448 unsigned int wheel_min = 1;
1449 unsigned int wheel_max = 8;
1451 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1452 for (
unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1459 LogDebug(
"RoadSearch") <<
"collected TEC outer seed ring with index: " << temp_ring->
getindex();
1467 unsigned int wheel_start = 8;
1469 unsigned int second_ring_min[10];
1470 unsigned int second_ring_max[10];
1473 second_ring_min[1] = 1;
1474 second_ring_max[1] = 8;
1476 second_ring_min[2] = 1;
1477 second_ring_max[2] = 8;
1479 second_ring_min[3] = 1;
1480 second_ring_max[3] = 8;
1482 second_ring_min[4] = 2;
1483 second_ring_max[4] = 8;
1485 second_ring_min[5] = 2;
1486 second_ring_max[5] = 8;
1488 second_ring_min[6] = 2;
1489 second_ring_max[6] = 8;
1491 second_ring_min[7] = 3;
1492 second_ring_max[7] = 8;
1494 second_ring_min[8] = 3;
1495 second_ring_max[8] = 8;
1497 second_ring_min[9] = 4;
1498 second_ring_max[9] = 8;
1500 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1501 for (
unsigned int wheel = wheel_start; wheel < wheel_max; ++wheel ) {
1502 for (
unsigned int second_ring = second_ring_min[wheel]; second_ring < second_ring_max[wheel]; ++second_ring ) {
1506 LogDebug(
"RoadSearch") <<
"collected TEC outer seed ring with index: " << temp_ring->
getindex();
1512 unsigned int fw_bw_min = 1;
1513 unsigned int fw_bw_max = 3;
1514 unsigned int wheel_min = 1;
1515 unsigned int wheel_max = 8;
1517 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1518 for (
unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1525 LogDebug(
"RoadSearch") <<
"collected TEC outer seed ring with index: " << temp_ring->
getindex();
1533 unsigned int wheel_start = 8;
1535 unsigned int second_ring_min[10];
1536 unsigned int second_ring_max[10];
1539 second_ring_min[1] = 1;
1540 second_ring_max[1] = 8;
1542 second_ring_min[2] = 1;
1543 second_ring_max[2] = 8;
1545 second_ring_min[3] = 1;
1546 second_ring_max[3] = 8;
1548 second_ring_min[4] = 2;
1549 second_ring_max[4] = 8;
1551 second_ring_min[5] = 2;
1552 second_ring_max[5] = 8;
1554 second_ring_min[6] = 2;
1555 second_ring_max[6] = 8;
1557 second_ring_min[7] = 3;
1558 second_ring_max[7] = 8;
1560 second_ring_min[8] = 3;
1561 second_ring_max[8] = 6;
1563 second_ring_min[9] = 4;
1564 second_ring_max[9] = 6;
1566 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1567 for (
unsigned int wheel = wheel_start; wheel < wheel_max; ++wheel ) {
1568 for (
unsigned int second_ring = second_ring_min[wheel]; second_ring < second_ring_max[wheel]; ++second_ring ) {
1572 LogDebug(
"RoadSearch") <<
"collected TEC outer seed ring with index: " << temp_ring->
getindex();
1577 unsigned int fw_bw_min = 2;
1578 unsigned int fw_bw_max = 3;
1579 unsigned int wheel_min = 1;
1580 unsigned int wheel_max = 10;
1581 unsigned int ring_min = 6;
1582 unsigned int ring_max = 8;
1584 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1585 for (
unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1586 for (
unsigned int ring = ring_min;
ring < ring_max; ++
ring ) {
1590 LogDebug(
"RoadSearch") <<
"collected TEC outer seed ring with index: " << temp_ring->
getindex();
1596 unsigned int fw_bw_min = 1;
1597 unsigned int fw_bw_max = 3;
1598 unsigned int wheel_min = 1;
1599 unsigned int wheel_max = 10;
1600 unsigned int ring_min = 6;
1601 unsigned int ring_max = 8;
1603 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1604 for (
unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1605 for (
unsigned int ring = ring_min;
ring < ring_max; ++
ring ) {
1609 LogDebug(
"RoadSearch") <<
"collected TEC outer seed ring with index: " << temp_ring->
getindex();
1616 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TEC outer seed rings";
1651 unsigned int counter = 0, layer_min=0, layer_max=0, fw_bw_min=0, fw_bw_max=0, ext_int_min=0, ext_int_max=0, detector_min=0, detector_max=0;
1663 for (
unsigned int layer = layer_min; layer < layer_max; ++layer ) {
1664 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1665 for (
unsigned int ext_int = ext_int_min; ext_int < ext_int_max; ++ext_int ) {
1666 for (
unsigned int detector = detector_min; detector < detector_max; ++detector ) {
1670 LogDebug(
"RoadSearch") <<
"collected TIB outer seed ring with index: " << temp_ring->
getindex();
1676 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TIB outer seed rings";
1683 unsigned int counter = 0, layer_min=0, layer_max=0, rod_fw_bw_min=0, rod_fw_bw_max=0, detector_min=0, detector_max=0;
1736 for (
unsigned int layer = layer_min; layer < layer_max; ++layer ) {
1737 for (
unsigned int rod_fw_bw = rod_fw_bw_min; rod_fw_bw < rod_fw_bw_max; ++rod_fw_bw ) {
1738 for (
unsigned int detector = detector_min; detector < detector_max; ++detector ) {
1742 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1752 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1757 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1762 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1767 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1772 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1777 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1782 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1787 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1792 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1797 LogDebug(
"RoadSearch") <<
"collected TOB outer seed ring with index: " << temp_ring->
getindex();
1801 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TOB outer seed rings";
1808 unsigned int counter = 0;
1812 unsigned int fw_bw_min = 1;
1813 unsigned int fw_bw_max = 3;
1814 unsigned int wheel_min = 1;
1815 unsigned int wheel_max = 9;
1817 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1818 for (
unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1822 LogDebug(
"RoadSearch") <<
"collected TEC outer seed ring with index: " << temp_ring->
getindex();
1830 unsigned int wheel_start = 9;
1832 unsigned int second_ring_min[10];
1833 unsigned int second_ring_max[10];
1836 second_ring_min[1] = 1;
1837 second_ring_max[1] = 8;
1839 second_ring_min[2] = 1;
1840 second_ring_max[2] = 8;
1842 second_ring_min[3] = 1;
1843 second_ring_max[3] = 8;
1845 second_ring_min[4] = 2;
1846 second_ring_max[4] = 8;
1848 second_ring_min[5] = 2;
1849 second_ring_max[5] = 8;
1851 second_ring_min[6] = 2;
1852 second_ring_max[6] = 8;
1854 second_ring_min[7] = 3;
1855 second_ring_max[7] = 8;
1857 second_ring_min[8] = 3;
1858 second_ring_max[8] = 8;
1860 second_ring_min[9] = 4;
1861 second_ring_max[9] = 8;
1863 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1864 for (
unsigned int wheel = wheel_start; wheel < wheel_max; ++wheel ) {
1865 for (
unsigned int second_ring = second_ring_min[wheel]; second_ring < second_ring_max[wheel]; ++second_ring ) {
1869 LogDebug(
"RoadSearch") <<
"collected TEC outer seed ring with index: " << temp_ring->
getindex();
1875 unsigned int fw_bw_min = 1;
1876 unsigned int fw_bw_max = 3;
1877 unsigned int wheel_min = 1;
1878 unsigned int wheel_max = 9;
1880 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1881 for (
unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1885 LogDebug(
"RoadSearch") <<
"collected TEC outer seed ring with index: " << temp_ring->
getindex();
1893 unsigned int wheel_start = 9;
1895 unsigned int second_ring_min[10];
1896 unsigned int second_ring_max[10];
1899 second_ring_min[1] = 1;
1900 second_ring_max[1] = 8;
1902 second_ring_min[2] = 1;
1903 second_ring_max[2] = 8;
1905 second_ring_min[3] = 1;
1906 second_ring_max[3] = 8;
1908 second_ring_min[4] = 2;
1909 second_ring_max[4] = 8;
1911 second_ring_min[5] = 2;
1912 second_ring_max[5] = 8;
1914 second_ring_min[6] = 2;
1915 second_ring_max[6] = 8;
1917 second_ring_min[7] = 3;
1918 second_ring_max[7] = 8;
1920 second_ring_min[8] = 3;
1921 second_ring_max[8] = 8;
1923 second_ring_min[9] = 4;
1924 second_ring_max[9] = 6;
1926 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1927 for (
unsigned int wheel = wheel_start; wheel < wheel_max; ++wheel ) {
1928 for (
unsigned int second_ring = second_ring_min[wheel]; second_ring < second_ring_max[wheel]; ++second_ring ) {
1932 LogDebug(
"RoadSearch") <<
"collected TEC outer seed ring with index: " << temp_ring->
getindex();
1937 unsigned int fw_bw_min = 2;
1938 unsigned int fw_bw_max = 3;
1939 unsigned int wheel_min = 1;
1940 unsigned int wheel_max = 10;
1941 unsigned int ring_min = 7;
1942 unsigned int ring_max = 8;
1944 for (
unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1945 for (
unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1946 for (
unsigned int ring = ring_min;
ring < ring_max; ++
ring ) {
1950 LogDebug(
"RoadSearch") <<
"collected TEC outer seed ring with index: " << temp_ring->
getindex();
1956 LogDebug(
"RoadSearch") <<
"collected " << counter <<
" TEC outer seed rings";
1979 if ( ring1DetIdTIB.layer() == ring2DetIdTIB.layer() ) {
1988 if ( ring1DetIdTOB.layer() == ring2DetIdTOB.layer() ) {
1997 if ( ring1DetIdTID.wheel() == ring2DetIdTID.wheel() ) {
2006 if ( ring1DetIdTEC.wheel() == ring2DetIdTEC.wheel() ) {
2015 if ( ring1DetIdPXB.layer() == ring2DetIdPXB.layer() ) {
2024 if ( ring1DetIdPXF.disk() == ring2DetIdPXF.disk() ) {
2073 std::vector<std::pair<double,double> >
result;
2078 for (
int ic1 = 0; ic1<4; ++ic1) {
2085 for (
int ib = 0; ib<2; ++ib) {
2086 double zb =
zBS_*(2*ib-1);
2087 result.push_back(std::pair<double,double>((z-zb)/r,zb));
2095 const Ring *ring2) {
2101 std::vector<std::pair<double,double> >
result;
2108 for (
int ic1 = 0; ic1<4; ++ic1) {
2115 for (
int ic2 = 0; ic2<4; ++ic2) {
2122 result.push_back(std::pair<double,double>((z2 - z1)/(r2 - r1),(r2*z1 - r1*z2)/(r2 - r1)));
2140 double zmax = -zmin;
2141 for (
int m=0;
m<2; ++
m) {
2143 for (std::vector<std::pair<double,double> >::iterator
line =
lines.begin();
2146 double z =
line->first*r +
line->second;
2147 if (zmin>z) zmin =
z;
2148 if (zmax<z) zmax =
z;
2164 std::vector<const Ring*> tempRings;
2167 std::vector<std::vector<std::pair<double,double> > >
lines;
2169 for ( std::vector<const Ring*>::iterator innerRing = seed.first.begin();
2170 innerRing != seed.first.end();
2175 for ( std::vector<const Ring*>::iterator outerRing = seed.second.begin();
2176 outerRing != seed.second.end();
2183 for ( std::vector<const Ring*>::iterator outerRing = seed.second.begin();
2184 outerRing != seed.second.end();
2193 bool compatible =
true;
2194 for ( std::vector<std::vector<std::pair<double,double> > >::iterator
line = lines.begin();
2195 line != lines.end();
2202 tempRings.push_back(&(
ring->second));
2219 for ( std::vector<const Ring*>::iterator
ring = seed.first.begin();
2220 ring != seed.first.end();
2222 result.first.push_back((*
ring));
2225 for ( std::vector<const Ring*>::iterator
ring = seed.second.begin();
2226 ring != seed.second.end();
2228 result.second.push_back((*
ring));
2254 unsigned int includedInner = 0;
2255 unsigned int includedOuter = 0;
2256 for ( std::vector<const Ring*>::iterator existingInnerRing = existingSeed.first.begin();
2257 existingInnerRing != existingSeed.first.end();
2258 ++existingInnerRing ) {
2259 bool ringIncluded =
false;
2260 for ( std::vector<const Ring*>::iterator innerRing = seed.first.begin();
2261 innerRing != seed.first.end();
2263 if ( (*existingInnerRing) == (*innerRing) ) {
2264 ringIncluded =
true;
2267 if ( ringIncluded ) {
2271 for ( std::vector<const Ring*>::iterator existingOuterRing = existingSeed.second.begin();
2272 existingOuterRing != existingSeed.second.end();
2273 ++existingOuterRing ) {
2274 bool ringIncluded =
false;
2275 for ( std::vector<const Ring*>::iterator outerRing = seed.second.begin();
2276 outerRing != seed.second.end();
2278 if ( (*existingOuterRing) == (*outerRing) ) {
2279 ringIncluded =
true;
2282 if ( ringIncluded ) {
2287 if ( includedInner == existingSeed.first.size() &&
2288 includedOuter == existingSeed.second.size() ) {
2306 for ( std::vector<const Ring*>::iterator innerSeedRing =
innerSeedRings_.begin();
2309 for ( Roads::RoadSet::iterator roadSetVector = input.second.begin();
2310 roadSetVector != input.second.end();
2312 for ( std::vector<const Ring*>::iterator roadSetRing = roadSetVector->begin();
2313 roadSetRing != roadSetVector->end();
2316 if ( (*innerSeedRing) == (*roadSetRing) ) {
2318 bool onSameLayer =
false;
2319 for ( std::vector<const Ring*>::iterator roadSeedRing = input.first.first.begin();
2320 roadSeedRing != input.first.first.end();
2326 if ( !onSameLayer ) {
2329 seed.first.push_back((*innerSeedRing));
2337 std::pair<Roads::RoadSeed, Roads::RoadSet>
result(seed,set);
2356 for ( std::vector<const Ring*>::iterator outerSeedRing =
outerSeedRings_.begin();
2359 for ( Roads::RoadSet::iterator roadSetVector = input.second.begin();
2360 roadSetVector != input.second.end();
2362 for ( std::vector<const Ring*>::iterator roadSetRing = roadSetVector->begin();
2363 roadSetRing != roadSetVector->end();
2366 if ( (*outerSeedRing) == (*roadSetRing) ) {
2368 bool onSameLayer =
false;
2369 for ( std::vector<const Ring*>::iterator roadSeedRing = input.first.second.begin();
2370 roadSeedRing != input.first.second.end();
2376 if ( !onSameLayer ) {
2379 seed.second.push_back((*outerSeedRing));
2385 std::pair<Roads::RoadSeed, Roads::RoadSet>
result(seed,set);
2405 unsigned int nRingsSet1 = 0;
2406 unsigned int nRingsSet2 = 0;
2407 for ( Roads::RoadSet::iterator vector1 = set1.begin();
2408 vector1 != set1.end();
2410 nRingsSet1 += vector1->size();
2413 for ( Roads::RoadSet::iterator vector2 = set2.begin();
2414 vector2 != set2.end();
2416 nRingsSet2 += vector2->size();
2420 if ( nRingsSet1 != nRingsSet2 ) {
2424 bool different =
false;
2425 for ( Roads::RoadSet::iterator vector1 = set1.begin();
2426 vector1 != set1.end();
2428 for ( std::vector<const Ring*>::iterator ring1 = vector1->begin();
2429 ring1 != vector1->end();
2431 bool included =
false;
2432 for ( Roads::RoadSet::iterator vector2 = set2.begin();
2433 vector2 != set2.end();
2435 for ( std::vector<const Ring*>::iterator ring2 = vector2->begin();
2436 ring2 != vector2->end();
2438 if ( (*ring1) == (*ring2) ) {
2464 std::vector<const Ring*>
tmp;
2465 tmp.push_back(reference);
2466 for (std::vector<const Ring*>::iterator
ring = ++input.begin();
2467 ring != input.end();
2470 reference = (*ring);
2471 tmp.push_back(reference);
2475 reference = (*ring);
2476 tmp.push_back(reference);
2480 if ( tmp.size() > 0 ) {
void insert(RoadSeed *seed, RoadSet *set)
const Ring * getTOBRing(unsigned int layer, unsigned int rod_fw_bw, unsigned int detector) const
RoadMap::iterator iterator
bool SameRoadSet(Roads::RoadSet set1, Roads::RoadSet set2)
Roads::RoadSeed CloneSeed(Roads::RoadSeed seed)
void collectOuterTOBSeedRings1()
void collectInnerSeedRings2()
RingMap::const_iterator const_iterator
void collectOuterTECSeedRings()
unsigned int getindex() const
void collectInnerTIDSeedRings1()
bool AddRoad(Roads::RoadSeed seed, Roads::RoadSet set)
void collectOuterSeedRings()
void collectInnerTECSeedRings()
static const double slope[3]
std::vector< const Ring * > innerSeedRings2_
void collectInnerTECSeedRings1()
void collectInnerSeedRings1()
void collectInnerTIDSeedRings2()
const Ring * getTIDRing(unsigned int fw_bw, unsigned int wheel, unsigned int ring) const
std::vector< std::vector< const Ring * > > RoadSet
uint32_t rawId() const
get the raw id
const Ring * getTIBRing(unsigned int layer, unsigned int fw_bw, unsigned int ext_int, unsigned int detector) const
void collectInnerTOBSeedRings()
Roads::RoadSet SortRingsIntoLayers(std::vector< const Ring * > input)
void collectOuterTIBSeedRings()
std::vector< const Ring * > innerSeedRings1_
std::vector< std::pair< double, double > > LinesThroughRings(const Ring *ring1, const Ring *ring2)
std::vector< std::pair< double, double > > LinesThroughRingAndBS(const Ring *ring)
GeometryStructure structure_
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void collectOuterTOBSeedRings()
Roads::RoadSet RingsCompatibleWithSeed(Roads::RoadSeed seed)
void erase(iterator entry)
std::pair< Roads::RoadSeed, Roads::RoadSet > AddInnerSeedRing(std::pair< Roads::RoadSeed, Roads::RoadSet > input)
void collectInnerTIBSeedRings()
std::pair< std::vector< const Ring * >, std::vector< const Ring * > > RoadSeed
void collectInnerTIBSeedRings1()
void collectOuterTECSeedRings1()
std::vector< const Ring * > outerSeedRings_
void collectInnerTOBSeedRings2()
void collectInnerTECSeedRings2()
void collectOuterTIBSeedRings1()
std::vector< std::vector< double > > tmp
std::vector< const Ring * > innerSeedRings_
RoadMap::size_type size() const
std::vector< const Ring * > outerSeedRings1_
bool RingsOnSameLayer(const Ring *ring1, const Ring *ring2)
bool CompatibleWithLines(std::vector< std::pair< double, double > > lines, const Ring *ring)
void collectInnerTIDSeedRings()
void collectInnerTOBSeedRings1()
std::pair< Roads::RoadSeed, Roads::RoadSet > AddOuterSeedRing(std::pair< Roads::RoadSeed, Roads::RoadSet > input)
bool RingInBarrel(const Ring *ring)
void collectInnerTIBSeedRings2()
const Ring * getTECRing(unsigned int fw_bw, unsigned int wheel, unsigned int ring) const
tuple size
Write out results.
void collectInnerSeedRings()
RoadMaker(const Rings *rings, GeometryStructure structure=FullDetector, SeedingType seedingType=FourRingSeeds)
void collectOuterSeedRings1()
void set(const std::string &name, int value)
set the flag, with a run-time name