277 {+15.0, +15.0, -15.0, -15.0},
278 {+15.0, +15.0, -15.0, -15.0},
279 {+15.0, +15.0, -15.0, -15.0},
280 {+15.0, +15.0, -15.0, -15.0},
281 {+15.0, +15.0, -15.0, -15.0},
282 {+15.0, +15.0, -15.0, -15.0},
283 {+15.0, +15.0, -15.0, -15.0},
502 cout <<
"\nCreating XML configuration file...\n";
503 cout <<
" Configuration name: " << config_name <<
"\n";
504 cout <<
" Author: " << author <<
"\n";
505 cout <<
" Date created: " << date <<
"\n";
506 cout <<
" File path: " << FileName <<
"\n";
510 ofstream FileOut(FileName.
Data(), ios::out);
512 FileOut <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
522 \r\tA right-handed coordinates are used.\
523 \r\tIf you look at the GEMs from the target:\
524 \r\t\tx-axis is directed to the left,\
525 \r\t\ty-axis - to the top,\
526 \r\t\tz-axis - to the GEMs.\
529 FileOut <<
"<StationSet>\n";
536 FileOut <<
"<!-- Station " << istation <<
" -->\n";
538 FileOut <<
"\t<Station";
543 FileOut <<
" beamHole=\"" <<
HoleRadius <<
"\"";
551 FileOut <<
"\t\t<!-- module " << imodule <<
" -->\n";
553 FileOut <<
"\t\t<Module";
554 FileOut <<
" xShift=\"" <<
XModuleShifts[istation][imodule] <<
"\"";
555 FileOut <<
" yShift=\"" <<
YModuleShifts[istation][imodule] <<
"\"";
556 FileOut <<
" zShift=\"" <<
ZModuleShifts[istation][imodule] <<
"\"";
569 FileOut <<
"\t\t\t<Layer";
584 FileOut <<
" stripAngle=\"" << layer_angle <<
"\"";
589 if (imodule == 0 || imodule == 1)
591 if (imodule == 2 || imodule == 3)
608 if (imodule == 0 || imodule == 1) {
614 if (imodule == 2 || imodule == 3) {
695 FileOut <<
" xorig=\"" << xorig <<
"\"";
696 FileOut <<
" yorig=\"" << yorig <<
"\"";
697 FileOut <<
" xsize=\"" << xsize <<
"\"";
698 FileOut <<
" ysize=\"" << ysize <<
"\"";
701 FileOut <<
" stripDirection=\""
705 FileOut <<
" stripDirection=\""
711 Double_t lxborder = 0.0, lyborder = 0.0, rxborder = 0.0, ryborder = 0.0;
716 lyborder = yorig + ysize;
717 rxborder = xorig - xsize;
723 Int_t physicalModule;
725 physicalModule = imodule;
729 else if (imodule == 1)
731 else if (imodule == 2)
733 else if (imodule == 3)
736 physicalModule = imodule;
741 Double_t startX, startY, endX, endY;
759 lxborder = xorig - startX;
760 lyborder = yorig + ysize - startY;
761 rxborder = (xorig - xsize) + endX;
762 ryborder = yorig + endY;
765 lxborder = xorig - startX;
766 lyborder = yorig + startY;
767 rxborder = (xorig - xsize) + endX;
768 ryborder = yorig + endY;
773 lxborder = xorig - endX;
774 lyborder = yorig + endY;
775 rxborder = (xorig - xsize) + startX;
776 ryborder = yorig + ysize - startY;
779 lxborder = xorig - endX;
780 lyborder = yorig + ysize - endY;
781 rxborder = (xorig - xsize) + startX;
782 ryborder = yorig + ysize - startY;
791 lxborder = xorig - startX;
792 lyborder = yorig + ysize - startY;
793 rxborder = (xorig - xsize) + endX;
794 ryborder = yorig + endY;
797 lxborder = xorig - startX;
798 lyborder = yorig + ysize - startY;
799 rxborder = (xorig - xsize) + endX;
800 ryborder = yorig + ysize - endY;
805 lxborder = xorig - endX;
806 lyborder = yorig + endY;
807 rxborder = (xorig - xsize) + startX;
808 ryborder = yorig + ysize - startY;
811 lxborder = xorig - endX;
812 lyborder = yorig + endY;
813 rxborder = (xorig - xsize) + startX;
814 ryborder = yorig + startY;
823 lxborder = xorig - startX;
824 lyborder = yorig + startY;
825 rxborder = (xorig - xsize) + endX;
826 ryborder = yorig + ysize - endY;
829 lxborder = xorig - startX;
830 lyborder = yorig + ysize - startY;
831 rxborder = (xorig - xsize) + endX;
832 ryborder = yorig + ysize - endY;
837 lxborder = xorig - endX;
838 lyborder = yorig + ysize - endY;
839 rxborder = (xorig - xsize) + startX;
840 ryborder = yorig + startY;
843 lxborder = xorig - endX;
844 lyborder = yorig + endY;
845 rxborder = (xorig - xsize) + startX;
846 ryborder = yorig + startY;
855 lxborder = xorig - startX;
856 lyborder = yorig + startY;
857 rxborder = (xorig - xsize) + endX;
858 ryborder = yorig + ysize - endY;
861 lxborder = xorig - startX;
862 lyborder = yorig + startY;
863 rxborder = (xorig - xsize) + endX;
864 ryborder = yorig + endY;
869 lxborder = xorig - endX;
870 lyborder = yorig + ysize - endY;
871 rxborder = (xorig - xsize) + startX;
872 ryborder = yorig + startY;
875 lxborder = xorig - endX;
876 lyborder = yorig + ysize - endY;
877 rxborder = (xorig - xsize) + startX;
878 ryborder = yorig + ysize - startY;
885 FileOut <<
" lxborder=\"" << lxborder <<
"\"";
886 FileOut <<
" lyborder=\"" << lyborder <<
"\"";
887 FileOut <<
" rxborder=\"" << rxborder <<
"\"";
888 FileOut <<
" ryborder=\"" << ryborder <<
"\"";
900 rborder =
"RightBottom";
902 lborder =
"LeftBottom";
903 rborder =
"RightBottom";
907 lborder =
"LeftBottom";
908 rborder =
"RightTop";
911 rborder =
"RightTop";
920 rborder =
"RightBottom";
923 rborder =
"RightTop";
927 lborder =
"LeftBottom";
928 rborder =
"RightTop";
930 lborder =
"LeftBottom";
931 rborder =
"RightBottom";
939 lborder =
"LeftBottom";
940 rborder =
"RightTop";
943 rborder =
"RightTop";
948 rborder =
"RightBottom";
950 lborder =
"LeftBottom";
951 rborder =
"RightBottom";
959 lborder =
"LeftBottom";
960 rborder =
"RightTop";
962 lborder =
"LeftBottom";
963 rborder =
"RightBottom";
968 rborder =
"RightBottom";
971 rborder =
"RightTop";
977 FileOut <<
" lborder=\"" << lborder <<
"\"";
978 FileOut <<
" rborder=\"" << rborder <<
"\"";
990 FileOut <<
"\t\t\t\t<DeadZone>\n";
991 for (
Int_t ipoint = 0; ipoint < 4; ++ipoint) {
992 FileOut <<
"\t\t\t\t\t<DeadPoint";
997 FileOut <<
"\t\t\t\t</DeadZone>\n";
999 FileOut <<
"\t\t\t\t<DeadZone>\n";
1000 for (
Int_t ipoint = 0; ipoint < 4; ++ipoint) {
1001 FileOut <<
"\t\t\t\t\t<DeadPoint";
1011 FileOut <<
"\t\t\t\t</DeadZone>\n";
1014 FileOut <<
"\t\t\t\t<DeadZone>";
1015 FileOut <<
" <!-- hole -->\n";
1017 FileOut <<
"\t\t\t\t\t<DeadPoint";
1022 FileOut <<
"\t\t\t\t</DeadZone>\n";
1025 FileOut <<
"\t\t\t\t<DeadZone>";
1026 FileOut <<
" <!-- triangle -->\n";
1027 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1028 FileOut <<
"\t\t\t\t\t<DeadPoint";
1038 FileOut <<
"\t\t\t\t</DeadZone>\n";
1047 FileOut <<
"\t\t\t\t<DeadZone>\n";
1048 for (
Int_t ipoint = 0; ipoint < 4; ++ipoint) {
1049 FileOut <<
"\t\t\t\t\t<DeadPoint";
1054 FileOut <<
"\t\t\t\t</DeadZone>\n";
1056 FileOut <<
"\t\t\t\t<DeadZone>\n";
1057 for (
Int_t ipoint = 0; ipoint < 4; ++ipoint) {
1058 FileOut <<
"\t\t\t\t\t<DeadPoint";
1068 FileOut <<
"\t\t\t\t</DeadZone>\n";
1071 FileOut <<
"\t\t\t\t<DeadZone>";
1072 FileOut <<
" <!-- hole -->\n";
1074 FileOut <<
"\t\t\t\t\t<DeadPoint";
1079 FileOut <<
"\t\t\t\t</DeadZone>\n";
1082 FileOut <<
"\t\t\t\t<DeadZone>";
1083 FileOut <<
" <!-- triangle -->\n";
1084 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1085 FileOut <<
"\t\t\t\t\t<DeadPoint";
1095 FileOut <<
"\t\t\t\t</DeadZone>\n";
1104 FileOut <<
"\t\t\t\t<DeadZone>\n";
1105 for (
Int_t ipoint = 0; ipoint < 4; ++ipoint) {
1106 FileOut <<
"\t\t\t\t\t<DeadPoint";
1111 FileOut <<
"\t\t\t\t</DeadZone>\n";
1113 FileOut <<
"\t\t\t\t<DeadZone>\n";
1114 for (
Int_t ipoint = 0; ipoint < 4; ++ipoint) {
1115 FileOut <<
"\t\t\t\t\t<DeadPoint";
1125 FileOut <<
"\t\t\t\t</DeadZone>\n";
1128 FileOut <<
"\t\t\t\t<DeadZone>";
1129 FileOut <<
" <!-- hole -->\n";
1131 FileOut <<
"\t\t\t\t\t<DeadPoint";
1136 FileOut <<
"\t\t\t\t</DeadZone>\n";
1139 FileOut <<
"\t\t\t\t<DeadZone>";
1140 FileOut <<
" <!-- triangle -->\n";
1141 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1142 FileOut <<
"\t\t\t\t\t<DeadPoint";
1152 FileOut <<
"\t\t\t\t</DeadZone>\n";
1161 FileOut <<
"\t\t\t\t<DeadZone>\n";
1162 for (
Int_t ipoint = 0; ipoint < 4; ++ipoint) {
1163 FileOut <<
"\t\t\t\t\t<DeadPoint";
1168 FileOut <<
"\t\t\t\t</DeadZone>\n";
1170 FileOut <<
"\t\t\t\t<DeadZone>\n";
1171 for (
Int_t ipoint = 0; ipoint < 4; ++ipoint) {
1172 FileOut <<
"\t\t\t\t\t<DeadPoint";
1182 FileOut <<
"\t\t\t\t</DeadZone>\n";
1185 FileOut <<
"\t\t\t\t<DeadZone>";
1186 FileOut <<
" <!-- hole -->\n";
1188 FileOut <<
"\t\t\t\t\t<DeadPoint";
1193 FileOut <<
"\t\t\t\t</DeadZone>\n";
1196 FileOut <<
"\t\t\t\t<DeadZone>";
1197 FileOut <<
" <!-- triangle -->\n";
1198 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1199 FileOut <<
"\t\t\t\t\t<DeadPoint";
1209 FileOut <<
"\t\t\t\t</DeadZone>\n";
1216 FileOut <<
"\t\t\t</Layer>\n";
1218 FileOut <<
"\t\t</Module>\n";
1221 FileOut <<
"\t</Station>\n";
1227 FileOut <<
"</StationSet>\n";