875 cout <<
"\nCreating XML configuration file...\n";
876 cout <<
" Configuration name: " << config_name <<
"\n";
877 cout <<
" Author: " << author <<
"\n";
878 cout <<
" Date created: " << date <<
"\n";
879 cout <<
" File path: " << FileName <<
"\n";
883 ofstream SiFileOut(FileName.
Data(), ios::out);
885 SiFileOut <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
895 \r\tA right-handed coordinates are used.\
896 \r\tIf you look at the FSD from the target:\
897 \r\t\tx-axis is directed to the left,\
898 \r\t\ty-axis - to the top,\
899 \r\t\tz-axis - to the FSD.\
902 SiFileOut <<
"<StationSet>\n";
907 cout <<
"istation = " << istation <<
": -----------------------------\n";
919 SiFileOut <<
"<!-- Station " << istation <<
" -->\n";
921 SiFileOut <<
"\t<Station";
925 SiFileOut <<
" rotAngleDeg=\""
928 SiFileOut <<
" rotCenterX=\""
931 SiFileOut <<
" rotCenterY=\""
939 cout <<
" imodule = " << imodule <<
"\n";
941 SiFileOut <<
"\t\t<!-- module " << imodule <<
" -->\n";
943 SiFileOut <<
"\t\t<Module";
946 SiFileOut <<
" xShift=\"" << 0.0 <<
"\"";
947 SiFileOut <<
" yShift=\"" << 0.0 <<
"\"";
948 SiFileOut <<
" zShift=\"" <<
ZModuleShifts[istation][imodule] <<
"\"";
1044 Bool_t isDeadZone_UpLayer =
false;
1045 Bool_t isDeadZone_LowLayer =
false;
1050 Int_t firstStripNumber_UpLayer[2];
1051 Int_t firstStripNumber_LowLayer[2];
1093 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
1094 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1095 xDeadZone[ilayer][ipoint] =
1097 yDeadZone[ilayer][ipoint] =
1105 isDeadZone_UpLayer =
false;
1106 isDeadZone_LowLayer =
true;
1171 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
1172 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1173 xDeadZone[ilayer][ipoint] =
1175 yDeadZone[ilayer][ipoint] =
1183 isDeadZone_UpLayer =
false;
1184 isDeadZone_LowLayer =
true;
1255 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
1256 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1257 xDeadZone[ilayer][ipoint] =
1259 yDeadZone[ilayer][ipoint] =
1267 isDeadZone_UpLayer =
true;
1268 isDeadZone_LowLayer =
false;
1343 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
1344 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1345 xDeadZone[ilayer][ipoint] =
1347 yDeadZone[ilayer][ipoint] =
1355 isDeadZone_UpLayer =
true;
1356 isDeadZone_LowLayer =
false;
1378 cout <<
" Orig_UpLayer[0](x:y) = ( " << xOrig_UpLayer[0] <<
" : " << yOrig_UpLayer[0] <<
" )\n";
1379 cout <<
" Orig_LowLayer[0](x:y) = ( " << xOrig_LowLayer[0] <<
" : " << yOrig_LowLayer[0] <<
" )\n";
1380 cout <<
" Orig_UpLayer[1](x:y) = ( " << xOrig_UpLayer[1] <<
" : " << yOrig_UpLayer[1] <<
" )\n";
1381 cout <<
" Orig_LowLayer[1](x:y) = ( " << xOrig_LowLayer[1] <<
" : " << yOrig_LowLayer[1] <<
" )\n";
1385 cout <<
" Size_UpLayer[0](dx:dy) = ( " << xSize_UpLayer[0] <<
" : " << ySize_UpLayer[0] <<
" )\n";
1386 cout <<
" Size_LowLayer[0](dx:dy) = ( " << xSize_LowLayer[0] <<
" : " << ySize_LowLayer[0] <<
" )\n";
1387 cout <<
" Size_UpLayer[1](dx:dy) = ( " << xSize_UpLayer[1] <<
" : " << ySize_UpLayer[1] <<
" )\n";
1388 cout <<
" Size_LowLayer[1](dx:dy) = ( " << xSize_LowLayer[1] <<
" : " << ySize_LowLayer[1] <<
" )\n";
1392 cout <<
" LBorder_UpLayer[0](x:y) = ( " << xLBorder_UpLayer[0] <<
" : " << yLBorder_UpLayer[0] <<
" )\n";
1393 cout <<
" RBorder_UpLayer[0](x:y) = ( " << xRBorder_UpLayer[0] <<
" : " << yRBorder_UpLayer[0] <<
" )\n";
1395 cout <<
" LBorder_LowLayer[0](x:y) = ( " << xLBorder_LowLayer[0] <<
" : " << yLBorder_LowLayer[0]
1397 cout <<
" RBorder_LowLayer[0](x:y) = ( " << xRBorder_LowLayer[0] <<
" : " << yRBorder_LowLayer[0]
1401 cout <<
" LBorder_UpLayer[1](x:y) = ( " << xLBorder_UpLayer[1] <<
" : " << yLBorder_UpLayer[1] <<
" )\n";
1402 cout <<
" RBorder_UpLayer[1](x:y) = ( " << xRBorder_UpLayer[1] <<
" : " << yRBorder_UpLayer[1] <<
" )\n";
1404 cout <<
" LBorder_LowLayer[1](x:y) = ( " << xLBorder_LowLayer[1] <<
" : " << yLBorder_LowLayer[1]
1406 cout <<
" RBorder_LowLayer[1](x:y) = ( " << xRBorder_LowLayer[1] <<
" : " << yRBorder_LowLayer[1]
1411 cout <<
" DeadZone[0]:\n";
1412 cout <<
" p0(x:y) = ( " << xDeadZone[0][0] <<
" : " << yDeadZone[0][0] <<
" )\n";
1413 cout <<
" p1(x:y) = ( " << xDeadZone[0][1] <<
" : " << yDeadZone[0][1] <<
" )\n";
1414 cout <<
" p2(x:y) = ( " << xDeadZone[0][2] <<
" : " << yDeadZone[0][2] <<
" )\n";
1417 cout <<
" DeadZone[1]:\n";
1418 cout <<
" p0(x:y) = ( " << xDeadZone[1][0] <<
" : " << yDeadZone[1][0] <<
" )\n";
1419 cout <<
" p1(x:y) = ( " << xDeadZone[1][1] <<
" : " << yDeadZone[1][1] <<
" )\n";
1420 cout <<
" p2(x:y) = ( " << xDeadZone[1][2] <<
" : " << yDeadZone[1][2] <<
" )\n";
1424 cout <<
" stripDirection[0] = ";
1426 cout <<
"LeftToRight\n";
1428 cout <<
"RightToLeft\n";
1429 cout <<
" stripDirection[1] = ";
1431 cout <<
"LeftToRight\n";
1433 cout <<
"RightToLeft\n";
1437 cout <<
" pitchValue[0] = " << pitchValue[0] <<
"\n";
1438 cout <<
" pitchValue[1] = " << pitchValue[1] <<
"\n";
1442 cout <<
" stripAngle[0] = " << stripAngle[0] <<
"\n";
1443 cout <<
" stripAngle[1] = " << stripAngle[1] <<
"\n";
1447 cout <<
" firstStripNumber_UpLayer[0] = " << firstStripNumber_UpLayer[0] <<
"\n";
1448 cout <<
" firstStripNumber_LowLayer[0] = " << firstStripNumber_LowLayer[0] <<
"\n";
1449 cout <<
" firstStripNumber_UpLayer[1] = " << firstStripNumber_UpLayer[1] <<
"\n";
1450 cout <<
" firstStripNumber_LowLayer[1] = " << firstStripNumber_LowLayer[1] <<
"\n";
1458 SiFileOut <<
"\t\t\t<Layer";
1459 SiFileOut <<
" zoneID=\""
1462 SiFileOut <<
" type=\""
1465 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_UpLayer[1] <<
"\"";
1466 SiFileOut <<
" stripAngle=\"" << stripAngle[1] <<
"\"";
1467 SiFileOut <<
" pitch=\"" << pitchValue[1] <<
"\"";
1468 SiFileOut <<
" xorig=\"" << xOrig_UpLayer[1] <<
"\"";
1469 SiFileOut <<
" yorig=\"" << yOrig_UpLayer[1] <<
"\"";
1470 SiFileOut <<
" xsize=\"" << xSize_UpLayer[1] <<
"\"";
1471 SiFileOut <<
" ysize=\"" << ySize_UpLayer[1] <<
"\"";
1472 SiFileOut <<
" stripDirection=\"";
1474 SiFileOut <<
"LeftToRight\"";
1476 SiFileOut <<
"RightToLeft\"";
1477 SiFileOut <<
" lxborder=\"" << xLBorder_UpLayer[1] <<
"\"";
1478 SiFileOut <<
" lyborder=\"" << yLBorder_UpLayer[1] <<
"\"";
1479 SiFileOut <<
" rxborder=\"" << xRBorder_UpLayer[1] <<
"\"";
1480 SiFileOut <<
" ryborder=\"" << yRBorder_UpLayer[1] <<
"\"";
1483 if (isDeadZone_UpLayer ==
true) {
1485 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
1486 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1487 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
1488 SiFileOut <<
" x=\"" << xDeadZone[1][ipoint] <<
"\"";
1489 SiFileOut <<
" y=\"" << yDeadZone[1][ipoint] <<
"\"";
1490 SiFileOut <<
" />\n";
1492 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
1494 SiFileOut <<
"</Layer>\n";
1498 SiFileOut <<
"\t\t\t<Layer";
1499 SiFileOut <<
" zoneID=\""
1502 SiFileOut <<
" type=\""
1505 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_LowLayer[1] <<
"\"";
1506 SiFileOut <<
" stripAngle=\"" << stripAngle[1] <<
"\"";
1507 SiFileOut <<
" pitch=\"" << pitchValue[1] <<
"\"";
1508 SiFileOut <<
" xorig=\"" << xOrig_LowLayer[1] <<
"\"";
1509 SiFileOut <<
" yorig=\"" << yOrig_LowLayer[1] <<
"\"";
1510 SiFileOut <<
" xsize=\"" << xSize_LowLayer[1] <<
"\"";
1511 SiFileOut <<
" ysize=\"" << ySize_LowLayer[1] <<
"\"";
1512 SiFileOut <<
" stripDirection=\"";
1514 SiFileOut <<
"LeftToRight\"";
1516 SiFileOut <<
"RightToLeft\"";
1517 SiFileOut <<
" lxborder=\"" << xLBorder_LowLayer[1] <<
"\"";
1518 SiFileOut <<
" lyborder=\"" << yLBorder_LowLayer[1] <<
"\"";
1519 SiFileOut <<
" rxborder=\"" << xRBorder_LowLayer[1] <<
"\"";
1520 SiFileOut <<
" ryborder=\"" << yRBorder_LowLayer[1] <<
"\"";
1523 if (isDeadZone_LowLayer ==
true) {
1525 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
1526 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1527 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
1528 SiFileOut <<
" x=\"" << xDeadZone[1][ipoint] <<
"\"";
1529 SiFileOut <<
" y=\"" << yDeadZone[1][ipoint] <<
"\"";
1530 SiFileOut <<
" />\n";
1532 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
1534 SiFileOut <<
"</Layer>\n";
1538 SiFileOut <<
"\t\t\t<Layer";
1539 SiFileOut <<
" zoneID=\""
1542 SiFileOut <<
" type=\""
1545 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_UpLayer[0] <<
"\"";
1546 SiFileOut <<
" stripAngle=\"" << stripAngle[0] <<
"\"";
1547 SiFileOut <<
" pitch=\"" << pitchValue[0] <<
"\"";
1548 SiFileOut <<
" xorig=\"" << xOrig_UpLayer[0] <<
"\"";
1549 SiFileOut <<
" yorig=\"" << yOrig_UpLayer[0] <<
"\"";
1550 SiFileOut <<
" xsize=\"" << xSize_UpLayer[0] <<
"\"";
1551 SiFileOut <<
" ysize=\"" << ySize_UpLayer[0] <<
"\"";
1552 SiFileOut <<
" stripDirection=\"";
1554 SiFileOut <<
"LeftToRight\"";
1556 SiFileOut <<
"RightToLeft\"";
1557 SiFileOut <<
" lxborder=\"" << xLBorder_UpLayer[0] <<
"\"";
1558 SiFileOut <<
" lyborder=\"" << yLBorder_UpLayer[0] <<
"\"";
1559 SiFileOut <<
" rxborder=\"" << xRBorder_UpLayer[0] <<
"\"";
1560 SiFileOut <<
" ryborder=\"" << yRBorder_UpLayer[0] <<
"\"";
1563 if (isDeadZone_UpLayer ==
true) {
1565 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
1566 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1567 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
1568 SiFileOut <<
" x=\"" << xDeadZone[0][ipoint] <<
"\"";
1569 SiFileOut <<
" y=\"" << yDeadZone[0][ipoint] <<
"\"";
1570 SiFileOut <<
" />\n";
1572 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
1574 SiFileOut <<
"</Layer>\n";
1578 SiFileOut <<
"\t\t\t<Layer";
1579 SiFileOut <<
" zoneID=\""
1582 SiFileOut <<
" type=\""
1585 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_LowLayer[0] <<
"\"";
1586 SiFileOut <<
" stripAngle=\"" << stripAngle[0] <<
"\"";
1587 SiFileOut <<
" pitch=\"" << pitchValue[0] <<
"\"";
1588 SiFileOut <<
" xorig=\"" << xOrig_LowLayer[0] <<
"\"";
1589 SiFileOut <<
" yorig=\"" << yOrig_LowLayer[0] <<
"\"";
1590 SiFileOut <<
" xsize=\"" << xSize_LowLayer[0] <<
"\"";
1591 SiFileOut <<
" ysize=\"" << ySize_LowLayer[0] <<
"\"";
1592 SiFileOut <<
" stripDirection=\"";
1594 SiFileOut <<
"LeftToRight\"";
1596 SiFileOut <<
"RightToLeft\"";
1597 SiFileOut <<
" lxborder=\"" << xLBorder_LowLayer[0] <<
"\"";
1598 SiFileOut <<
" lyborder=\"" << yLBorder_LowLayer[0] <<
"\"";
1599 SiFileOut <<
" rxborder=\"" << xRBorder_LowLayer[0] <<
"\"";
1600 SiFileOut <<
" ryborder=\"" << yRBorder_LowLayer[0] <<
"\"";
1603 if (isDeadZone_LowLayer ==
true) {
1605 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
1606 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1607 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
1608 SiFileOut <<
" x=\"" << xDeadZone[0][ipoint] <<
"\"";
1609 SiFileOut <<
" y=\"" << yDeadZone[0][ipoint] <<
"\"";
1610 SiFileOut <<
" />\n";
1612 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
1614 SiFileOut <<
"</Layer>\n";
1617 SiFileOut <<
"\t\t</Module>\n";
1636 xOrig[0] = xOrig_LowLayer[0];
1637 xOrig[1] = xOrig_LowLayer[1];
1638 yOrig[0] = yOrig_LowLayer[0];
1639 yOrig[1] = yOrig_LowLayer[1];
1640 xSize[0] = xSize_LowLayer[0];
1641 xSize[1] = xSize_LowLayer[1];
1642 ySize[0] = ySize_LowLayer[0];
1643 ySize[1] = ySize_LowLayer[1];
1644 xLBorder[0] = xLBorder_LowLayer[0];
1645 xLBorder[1] = xLBorder_LowLayer[1];
1646 yLBorder[0] = yLBorder_LowLayer[0];
1647 yLBorder[1] = yLBorder_LowLayer[1];
1648 xRBorder[0] = xRBorder_LowLayer[0];
1649 xRBorder[1] = xRBorder_LowLayer[1];
1650 yRBorder[0] = yRBorder_LowLayer[0];
1651 yRBorder[1] = yRBorder_LowLayer[1];
1652 isDeadZone = isDeadZone_LowLayer;
1655 xOrig[0] = xOrig_UpLayer[0];
1656 xOrig[1] = xOrig_UpLayer[1];
1657 yOrig[0] = yOrig_UpLayer[0];
1658 yOrig[1] = yOrig_UpLayer[1];
1659 xSize[0] = xSize_UpLayer[0];
1660 xSize[1] = xSize_UpLayer[1];
1661 ySize[0] = ySize_UpLayer[0];
1662 ySize[1] = ySize_UpLayer[1];
1663 xLBorder[0] = xLBorder_UpLayer[0];
1664 xLBorder[1] = xLBorder_UpLayer[1];
1665 yLBorder[0] = yLBorder_UpLayer[0];
1666 yLBorder[1] = yLBorder_UpLayer[1];
1667 xRBorder[0] = xRBorder_UpLayer[0];
1668 xRBorder[1] = xRBorder_UpLayer[1];
1669 yRBorder[0] = yRBorder_UpLayer[0];
1670 yRBorder[1] = yRBorder_UpLayer[1];
1671 isDeadZone = isDeadZone_UpLayer;
1675 SiFileOut <<
"\t\t\t<Layer";
1676 SiFileOut <<
" zoneID=\""
1679 SiFileOut <<
" type=\""
1682 SiFileOut <<
" firstStripNumber=\"" << 0 <<
"\"";
1683 SiFileOut <<
" stripAngle=\"" << stripAngle[1] <<
"\"";
1684 SiFileOut <<
" pitch=\"" << pitchValue[1] <<
"\"";
1685 SiFileOut <<
" xorig=\"" << xOrig[1] <<
"\"";
1686 SiFileOut <<
" yorig=\"" << yOrig[1] <<
"\"";
1687 SiFileOut <<
" xsize=\"" << xSize[1] <<
"\"";
1688 SiFileOut <<
" ysize=\"" << ySize[1] <<
"\"";
1689 SiFileOut <<
" stripDirection=\"";
1691 SiFileOut <<
"LeftToRight\"";
1693 SiFileOut <<
"RightToLeft\"";
1694 SiFileOut <<
" lxborder=\"" << xLBorder[1] <<
"\"";
1695 SiFileOut <<
" lyborder=\"" << yLBorder[1] <<
"\"";
1696 SiFileOut <<
" rxborder=\"" << xRBorder[1] <<
"\"";
1697 SiFileOut <<
" ryborder=\"" << yRBorder[1] <<
"\"";
1700 if (isDeadZone ==
true) {
1702 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
1703 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1704 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
1705 SiFileOut <<
" x=\"" << xDeadZone[1][ipoint] <<
"\"";
1706 SiFileOut <<
" y=\"" << yDeadZone[1][ipoint] <<
"\"";
1707 SiFileOut <<
" />\n";
1709 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
1711 SiFileOut <<
"</Layer>\n";
1715 SiFileOut <<
"\t\t\t<Layer";
1716 SiFileOut <<
" zoneID=\""
1719 SiFileOut <<
" type=\""
1722 SiFileOut <<
" firstStripNumber=\"" << 0 <<
"\"";
1723 SiFileOut <<
" stripAngle=\"" << stripAngle[0] <<
"\"";
1724 SiFileOut <<
" pitch=\"" << pitchValue[0] <<
"\"";
1725 SiFileOut <<
" xorig=\"" << xOrig[0] <<
"\"";
1726 SiFileOut <<
" yorig=\"" << yOrig[0] <<
"\"";
1727 SiFileOut <<
" xsize=\"" << xSize[0] <<
"\"";
1728 SiFileOut <<
" ysize=\"" << ySize[0] <<
"\"";
1729 SiFileOut <<
" stripDirection=\"";
1731 SiFileOut <<
"LeftToRight\"";
1733 SiFileOut <<
"RightToLeft\"";
1734 SiFileOut <<
" lxborder=\"" << xLBorder[0] <<
"\"";
1735 SiFileOut <<
" lyborder=\"" << yLBorder[0] <<
"\"";
1736 SiFileOut <<
" rxborder=\"" << xRBorder[0] <<
"\"";
1737 SiFileOut <<
" ryborder=\"" << yRBorder[0] <<
"\"";
1740 if (isDeadZone ==
true) {
1742 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
1743 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1744 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
1745 SiFileOut <<
" x=\"" << xDeadZone[0][ipoint] <<
"\"";
1746 SiFileOut <<
" y=\"" << yDeadZone[0][ipoint] <<
"\"";
1747 SiFileOut <<
" />\n";
1749 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
1751 SiFileOut <<
"</Layer>\n";
1754 SiFileOut <<
"\t\t</Module>\n";
1759 SiFileOut <<
"\t</Station>\n";
1762 cout <<
"------------------------------------------------------------\n";
1765 SiFileOut <<
"</StationSet>\n";