965 cout <<
"\nCreating XML configuration file...\n";
966 cout <<
" Configuration name: " << config_name <<
"\n";
967 cout <<
" Author: " << author <<
"\n";
968 cout <<
" Date created: " << date <<
"\n";
969 cout <<
" File path: " << FileName <<
"\n";
973 ofstream SiFileOut(FileName.
Data(), ios::out);
975 SiFileOut <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
985 \r\tA right-handed coordinates are used.\
986 \r\tIf you look at the FSD from the target:\
987 \r\t\tx-axis is directed to the left,\
988 \r\t\ty-axis - to the top,\
989 \r\t\tz-axis - to the FSD.\
992 SiFileOut <<
"<StationSet>\n";
997 cout <<
"istation = " << istation <<
": -----------------------------\n";
1009 SiFileOut <<
"<!-- Station " << istation <<
" -->\n";
1011 SiFileOut <<
"\t<Station";
1015 SiFileOut <<
" rotAngleDeg=\""
1018 SiFileOut <<
" rotCenterX=\""
1021 SiFileOut <<
" rotCenterY=\""
1029 cout <<
" imodule = " << imodule <<
"\n";
1031 SiFileOut <<
"\t\t<!-- module " << imodule <<
" -->\n";
1033 SiFileOut <<
"\t\t<Module";
1036 SiFileOut <<
" xShift=\"" << 0.0 <<
"\"";
1037 SiFileOut <<
" yShift=\"" << 0.0 <<
"\"";
1038 SiFileOut <<
" zShift=\"" <<
ZModuleShifts[istation][imodule] <<
"\"";
1134 Bool_t isDeadZone_UpLayer =
false;
1135 Bool_t isDeadZone_LowLayer =
false;
1140 Int_t firstStripNumber_UpLayer[2];
1141 Int_t firstStripNumber_LowLayer[2];
1183 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
1184 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1185 xDeadZone[ilayer][ipoint] =
1187 yDeadZone[ilayer][ipoint] =
1195 isDeadZone_UpLayer =
false;
1196 isDeadZone_LowLayer =
true;
1261 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
1262 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1263 xDeadZone[ilayer][ipoint] =
1265 yDeadZone[ilayer][ipoint] =
1273 isDeadZone_UpLayer =
false;
1274 isDeadZone_LowLayer =
true;
1345 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
1346 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1347 xDeadZone[ilayer][ipoint] =
1349 yDeadZone[ilayer][ipoint] =
1357 isDeadZone_UpLayer =
true;
1358 isDeadZone_LowLayer =
false;
1433 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
1434 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1435 xDeadZone[ilayer][ipoint] =
1437 yDeadZone[ilayer][ipoint] =
1445 isDeadZone_UpLayer =
true;
1446 isDeadZone_LowLayer =
false;
1468 cout <<
" Orig_UpLayer[0](x:y) = ( " << xOrig_UpLayer[0] <<
" : " << yOrig_UpLayer[0] <<
" )\n";
1469 cout <<
" Orig_LowLayer[0](x:y) = ( " << xOrig_LowLayer[0] <<
" : " << yOrig_LowLayer[0] <<
" )\n";
1470 cout <<
" Orig_UpLayer[1](x:y) = ( " << xOrig_UpLayer[1] <<
" : " << yOrig_UpLayer[1] <<
" )\n";
1471 cout <<
" Orig_LowLayer[1](x:y) = ( " << xOrig_LowLayer[1] <<
" : " << yOrig_LowLayer[1] <<
" )\n";
1475 cout <<
" Size_UpLayer[0](dx:dy) = ( " << xSize_UpLayer[0] <<
" : " << ySize_UpLayer[0] <<
" )\n";
1476 cout <<
" Size_LowLayer[0](dx:dy) = ( " << xSize_LowLayer[0] <<
" : " << ySize_LowLayer[0] <<
" )\n";
1477 cout <<
" Size_UpLayer[1](dx:dy) = ( " << xSize_UpLayer[1] <<
" : " << ySize_UpLayer[1] <<
" )\n";
1478 cout <<
" Size_LowLayer[1](dx:dy) = ( " << xSize_LowLayer[1] <<
" : " << ySize_LowLayer[1] <<
" )\n";
1482 cout <<
" LBorder_UpLayer[0](x:y) = ( " << xLBorder_UpLayer[0] <<
" : " << yLBorder_UpLayer[0] <<
" )\n";
1483 cout <<
" RBorder_UpLayer[0](x:y) = ( " << xRBorder_UpLayer[0] <<
" : " << yRBorder_UpLayer[0] <<
" )\n";
1485 cout <<
" LBorder_LowLayer[0](x:y) = ( " << xLBorder_LowLayer[0] <<
" : " << yLBorder_LowLayer[0]
1487 cout <<
" RBorder_LowLayer[0](x:y) = ( " << xRBorder_LowLayer[0] <<
" : " << yRBorder_LowLayer[0]
1491 cout <<
" LBorder_UpLayer[1](x:y) = ( " << xLBorder_UpLayer[1] <<
" : " << yLBorder_UpLayer[1] <<
" )\n";
1492 cout <<
" RBorder_UpLayer[1](x:y) = ( " << xRBorder_UpLayer[1] <<
" : " << yRBorder_UpLayer[1] <<
" )\n";
1494 cout <<
" LBorder_LowLayer[1](x:y) = ( " << xLBorder_LowLayer[1] <<
" : " << yLBorder_LowLayer[1]
1496 cout <<
" RBorder_LowLayer[1](x:y) = ( " << xRBorder_LowLayer[1] <<
" : " << yRBorder_LowLayer[1]
1501 cout <<
" DeadZone[0]:\n";
1502 cout <<
" p0(x:y) = ( " << xDeadZone[0][0] <<
" : " << yDeadZone[0][0] <<
" )\n";
1503 cout <<
" p1(x:y) = ( " << xDeadZone[0][1] <<
" : " << yDeadZone[0][1] <<
" )\n";
1504 cout <<
" p2(x:y) = ( " << xDeadZone[0][2] <<
" : " << yDeadZone[0][2] <<
" )\n";
1507 cout <<
" DeadZone[1]:\n";
1508 cout <<
" p0(x:y) = ( " << xDeadZone[1][0] <<
" : " << yDeadZone[1][0] <<
" )\n";
1509 cout <<
" p1(x:y) = ( " << xDeadZone[1][1] <<
" : " << yDeadZone[1][1] <<
" )\n";
1510 cout <<
" p2(x:y) = ( " << xDeadZone[1][2] <<
" : " << yDeadZone[1][2] <<
" )\n";
1514 cout <<
" stripDirection[0] = ";
1516 cout <<
"LeftToRight\n";
1518 cout <<
"RightToLeft\n";
1519 cout <<
" stripDirection[1] = ";
1521 cout <<
"LeftToRight\n";
1523 cout <<
"RightToLeft\n";
1527 cout <<
" pitchValue[0] = " << pitchValue[0] <<
"\n";
1528 cout <<
" pitchValue[1] = " << pitchValue[1] <<
"\n";
1532 cout <<
" stripAngle[0] = " << stripAngle[0] <<
"\n";
1533 cout <<
" stripAngle[1] = " << stripAngle[1] <<
"\n";
1537 cout <<
" firstStripNumber_UpLayer[0] = " << firstStripNumber_UpLayer[0] <<
"\n";
1538 cout <<
" firstStripNumber_LowLayer[0] = " << firstStripNumber_LowLayer[0] <<
"\n";
1539 cout <<
" firstStripNumber_UpLayer[1] = " << firstStripNumber_UpLayer[1] <<
"\n";
1540 cout <<
" firstStripNumber_LowLayer[1] = " << firstStripNumber_LowLayer[1] <<
"\n";
1548 SiFileOut <<
"\t\t\t<Layer";
1549 SiFileOut <<
" zoneID=\""
1552 SiFileOut <<
" type=\""
1555 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_UpLayer[1] <<
"\"";
1556 SiFileOut <<
" stripAngle=\"" << stripAngle[1] <<
"\"";
1557 SiFileOut <<
" pitch=\"" << pitchValue[1] <<
"\"";
1558 SiFileOut <<
" xorig=\"" << xOrig_UpLayer[1] <<
"\"";
1559 SiFileOut <<
" yorig=\"" << yOrig_UpLayer[1] <<
"\"";
1560 SiFileOut <<
" xsize=\"" << xSize_UpLayer[1] <<
"\"";
1561 SiFileOut <<
" ysize=\"" << ySize_UpLayer[1] <<
"\"";
1562 SiFileOut <<
" stripDirection=\"";
1564 SiFileOut <<
"LeftToRight\"";
1566 SiFileOut <<
"RightToLeft\"";
1567 SiFileOut <<
" lxborder=\"" << xLBorder_UpLayer[1] <<
"\"";
1568 SiFileOut <<
" lyborder=\"" << yLBorder_UpLayer[1] <<
"\"";
1569 SiFileOut <<
" rxborder=\"" << xRBorder_UpLayer[1] <<
"\"";
1570 SiFileOut <<
" ryborder=\"" << yRBorder_UpLayer[1] <<
"\"";
1573 if (isDeadZone_UpLayer ==
true) {
1575 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
1576 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1577 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
1578 SiFileOut <<
" x=\"" << xDeadZone[1][ipoint] <<
"\"";
1579 SiFileOut <<
" y=\"" << yDeadZone[1][ipoint] <<
"\"";
1580 SiFileOut <<
" />\n";
1582 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
1584 SiFileOut <<
"</Layer>\n";
1588 SiFileOut <<
"\t\t\t<Layer";
1589 SiFileOut <<
" zoneID=\""
1592 SiFileOut <<
" type=\""
1595 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_LowLayer[1] <<
"\"";
1596 SiFileOut <<
" stripAngle=\"" << stripAngle[1] <<
"\"";
1597 SiFileOut <<
" pitch=\"" << pitchValue[1] <<
"\"";
1598 SiFileOut <<
" xorig=\"" << xOrig_LowLayer[1] <<
"\"";
1599 SiFileOut <<
" yorig=\"" << yOrig_LowLayer[1] <<
"\"";
1600 SiFileOut <<
" xsize=\"" << xSize_LowLayer[1] <<
"\"";
1601 SiFileOut <<
" ysize=\"" << ySize_LowLayer[1] <<
"\"";
1602 SiFileOut <<
" stripDirection=\"";
1604 SiFileOut <<
"LeftToRight\"";
1606 SiFileOut <<
"RightToLeft\"";
1607 SiFileOut <<
" lxborder=\"" << xLBorder_LowLayer[1] <<
"\"";
1608 SiFileOut <<
" lyborder=\"" << yLBorder_LowLayer[1] <<
"\"";
1609 SiFileOut <<
" rxborder=\"" << xRBorder_LowLayer[1] <<
"\"";
1610 SiFileOut <<
" ryborder=\"" << yRBorder_LowLayer[1] <<
"\"";
1613 if (isDeadZone_LowLayer ==
true) {
1615 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
1616 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1617 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
1618 SiFileOut <<
" x=\"" << xDeadZone[1][ipoint] <<
"\"";
1619 SiFileOut <<
" y=\"" << yDeadZone[1][ipoint] <<
"\"";
1620 SiFileOut <<
" />\n";
1622 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
1624 SiFileOut <<
"</Layer>\n";
1628 SiFileOut <<
"\t\t\t<Layer";
1629 SiFileOut <<
" zoneID=\""
1632 SiFileOut <<
" type=\""
1635 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_UpLayer[0] <<
"\"";
1636 SiFileOut <<
" stripAngle=\"" << stripAngle[0] <<
"\"";
1637 SiFileOut <<
" pitch=\"" << pitchValue[0] <<
"\"";
1638 SiFileOut <<
" xorig=\"" << xOrig_UpLayer[0] <<
"\"";
1639 SiFileOut <<
" yorig=\"" << yOrig_UpLayer[0] <<
"\"";
1640 SiFileOut <<
" xsize=\"" << xSize_UpLayer[0] <<
"\"";
1641 SiFileOut <<
" ysize=\"" << ySize_UpLayer[0] <<
"\"";
1642 SiFileOut <<
" stripDirection=\"";
1644 SiFileOut <<
"LeftToRight\"";
1646 SiFileOut <<
"RightToLeft\"";
1647 SiFileOut <<
" lxborder=\"" << xLBorder_UpLayer[0] <<
"\"";
1648 SiFileOut <<
" lyborder=\"" << yLBorder_UpLayer[0] <<
"\"";
1649 SiFileOut <<
" rxborder=\"" << xRBorder_UpLayer[0] <<
"\"";
1650 SiFileOut <<
" ryborder=\"" << yRBorder_UpLayer[0] <<
"\"";
1653 if (isDeadZone_UpLayer ==
true) {
1655 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
1656 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1657 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
1658 SiFileOut <<
" x=\"" << xDeadZone[0][ipoint] <<
"\"";
1659 SiFileOut <<
" y=\"" << yDeadZone[0][ipoint] <<
"\"";
1660 SiFileOut <<
" />\n";
1662 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
1664 SiFileOut <<
"</Layer>\n";
1668 SiFileOut <<
"\t\t\t<Layer";
1669 SiFileOut <<
" zoneID=\""
1672 SiFileOut <<
" type=\""
1675 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_LowLayer[0] <<
"\"";
1676 SiFileOut <<
" stripAngle=\"" << stripAngle[0] <<
"\"";
1677 SiFileOut <<
" pitch=\"" << pitchValue[0] <<
"\"";
1678 SiFileOut <<
" xorig=\"" << xOrig_LowLayer[0] <<
"\"";
1679 SiFileOut <<
" yorig=\"" << yOrig_LowLayer[0] <<
"\"";
1680 SiFileOut <<
" xsize=\"" << xSize_LowLayer[0] <<
"\"";
1681 SiFileOut <<
" ysize=\"" << ySize_LowLayer[0] <<
"\"";
1682 SiFileOut <<
" stripDirection=\"";
1684 SiFileOut <<
"LeftToRight\"";
1686 SiFileOut <<
"RightToLeft\"";
1687 SiFileOut <<
" lxborder=\"" << xLBorder_LowLayer[0] <<
"\"";
1688 SiFileOut <<
" lyborder=\"" << yLBorder_LowLayer[0] <<
"\"";
1689 SiFileOut <<
" rxborder=\"" << xRBorder_LowLayer[0] <<
"\"";
1690 SiFileOut <<
" ryborder=\"" << yRBorder_LowLayer[0] <<
"\"";
1693 if (isDeadZone_LowLayer ==
true) {
1695 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
1696 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1697 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
1698 SiFileOut <<
" x=\"" << xDeadZone[0][ipoint] <<
"\"";
1699 SiFileOut <<
" y=\"" << yDeadZone[0][ipoint] <<
"\"";
1700 SiFileOut <<
" />\n";
1702 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
1704 SiFileOut <<
"</Layer>\n";
1707 SiFileOut <<
"\t\t</Module>\n";
1726 xOrig[0] = xOrig_LowLayer[0];
1727 xOrig[1] = xOrig_LowLayer[1];
1728 yOrig[0] = yOrig_LowLayer[0];
1729 yOrig[1] = yOrig_LowLayer[1];
1730 xSize[0] = xSize_LowLayer[0];
1731 xSize[1] = xSize_LowLayer[1];
1732 ySize[0] = ySize_LowLayer[0];
1733 ySize[1] = ySize_LowLayer[1];
1734 xLBorder[0] = xLBorder_LowLayer[0];
1735 xLBorder[1] = xLBorder_LowLayer[1];
1736 yLBorder[0] = yLBorder_LowLayer[0];
1737 yLBorder[1] = yLBorder_LowLayer[1];
1738 xRBorder[0] = xRBorder_LowLayer[0];
1739 xRBorder[1] = xRBorder_LowLayer[1];
1740 yRBorder[0] = yRBorder_LowLayer[0];
1741 yRBorder[1] = yRBorder_LowLayer[1];
1742 isDeadZone = isDeadZone_LowLayer;
1745 xOrig[0] = xOrig_UpLayer[0];
1746 xOrig[1] = xOrig_UpLayer[1];
1747 yOrig[0] = yOrig_UpLayer[0];
1748 yOrig[1] = yOrig_UpLayer[1];
1749 xSize[0] = xSize_UpLayer[0];
1750 xSize[1] = xSize_UpLayer[1];
1751 ySize[0] = ySize_UpLayer[0];
1752 ySize[1] = ySize_UpLayer[1];
1753 xLBorder[0] = xLBorder_UpLayer[0];
1754 xLBorder[1] = xLBorder_UpLayer[1];
1755 yLBorder[0] = yLBorder_UpLayer[0];
1756 yLBorder[1] = yLBorder_UpLayer[1];
1757 xRBorder[0] = xRBorder_UpLayer[0];
1758 xRBorder[1] = xRBorder_UpLayer[1];
1759 yRBorder[0] = yRBorder_UpLayer[0];
1760 yRBorder[1] = yRBorder_UpLayer[1];
1761 isDeadZone = isDeadZone_UpLayer;
1765 SiFileOut <<
"\t\t\t<Layer";
1766 SiFileOut <<
" zoneID=\""
1769 SiFileOut <<
" type=\""
1772 SiFileOut <<
" firstStripNumber=\"" << 0 <<
"\"";
1773 SiFileOut <<
" stripAngle=\"" << stripAngle[1] <<
"\"";
1774 SiFileOut <<
" pitch=\"" << pitchValue[1] <<
"\"";
1775 SiFileOut <<
" xorig=\"" << xOrig[1] <<
"\"";
1776 SiFileOut <<
" yorig=\"" << yOrig[1] <<
"\"";
1777 SiFileOut <<
" xsize=\"" << xSize[1] <<
"\"";
1778 SiFileOut <<
" ysize=\"" << ySize[1] <<
"\"";
1779 SiFileOut <<
" stripDirection=\"";
1781 SiFileOut <<
"LeftToRight\"";
1783 SiFileOut <<
"RightToLeft\"";
1784 SiFileOut <<
" lxborder=\"" << xLBorder[1] <<
"\"";
1785 SiFileOut <<
" lyborder=\"" << yLBorder[1] <<
"\"";
1786 SiFileOut <<
" rxborder=\"" << xRBorder[1] <<
"\"";
1787 SiFileOut <<
" ryborder=\"" << yRBorder[1] <<
"\"";
1790 if (isDeadZone ==
true) {
1792 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
1793 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1794 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
1795 SiFileOut <<
" x=\"" << xDeadZone[1][ipoint] <<
"\"";
1796 SiFileOut <<
" y=\"" << yDeadZone[1][ipoint] <<
"\"";
1797 SiFileOut <<
" />\n";
1799 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
1801 SiFileOut <<
"</Layer>\n";
1805 SiFileOut <<
"\t\t\t<Layer";
1806 SiFileOut <<
" zoneID=\""
1809 SiFileOut <<
" type=\""
1812 SiFileOut <<
" firstStripNumber=\"" << 0 <<
"\"";
1813 SiFileOut <<
" stripAngle=\"" << stripAngle[0] <<
"\"";
1814 SiFileOut <<
" pitch=\"" << pitchValue[0] <<
"\"";
1815 SiFileOut <<
" xorig=\"" << xOrig[0] <<
"\"";
1816 SiFileOut <<
" yorig=\"" << yOrig[0] <<
"\"";
1817 SiFileOut <<
" xsize=\"" << xSize[0] <<
"\"";
1818 SiFileOut <<
" ysize=\"" << ySize[0] <<
"\"";
1819 SiFileOut <<
" stripDirection=\"";
1821 SiFileOut <<
"LeftToRight\"";
1823 SiFileOut <<
"RightToLeft\"";
1824 SiFileOut <<
" lxborder=\"" << xLBorder[0] <<
"\"";
1825 SiFileOut <<
" lyborder=\"" << yLBorder[0] <<
"\"";
1826 SiFileOut <<
" rxborder=\"" << xRBorder[0] <<
"\"";
1827 SiFileOut <<
" ryborder=\"" << yRBorder[0] <<
"\"";
1830 if (isDeadZone ==
true) {
1832 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
1833 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1834 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
1835 SiFileOut <<
" x=\"" << xDeadZone[0][ipoint] <<
"\"";
1836 SiFileOut <<
" y=\"" << yDeadZone[0][ipoint] <<
"\"";
1837 SiFileOut <<
" />\n";
1839 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
1841 SiFileOut <<
"</Layer>\n";
1844 SiFileOut <<
"\t\t</Module>\n";
1849 SiFileOut <<
"\t</Station>\n";
1852 cout <<
"------------------------------------------------------------\n";
1855 SiFileOut <<
"</StationSet>\n";