305 ofstream SiFileOut(xml_file_name.
Data(), ios::out);
307 SiFileOut <<
"<StationSet>\n";
312 cout <<
"istation = " << istation <<
": -----------------------------\n";
314 SiFileOut <<
"<!-- Station " << istation <<
" -->\n";
316 SiFileOut <<
"\t<Station";
320 SiFileOut <<
" rotAngleDeg=\"" <<
"0.0" <<
"\"";
321 SiFileOut <<
" rotCenterX=\"" <<
"0.0" <<
"\"";
322 SiFileOut <<
" rotCenterY=\"" <<
"0.0" <<
"\"";
328 cout <<
" imodule = " << imodule <<
"\n";
330 SiFileOut <<
"\t\t<!-- module " << imodule <<
" -->\n";
332 SiFileOut <<
"\t\t<Module";
335 SiFileOut <<
" xShift=\"" << 0.0 <<
"\"";
336 SiFileOut <<
" yShift=\"" << 0.0 <<
"\"";
337 SiFileOut <<
" zShift=\"" <<
ZModuleShifts[istation][imodule] <<
"\"";
368 Bool_t isDeadZone_UpLayer =
false;
369 Bool_t isDeadZone_LowLayer =
false;
374 Int_t firstStripNumber_UpLayer[2];
375 Int_t firstStripNumber_LowLayer[2];
417 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
418 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
427 isDeadZone_UpLayer =
false;
428 isDeadZone_LowLayer =
true;
489 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
490 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
499 isDeadZone_UpLayer =
false;
500 isDeadZone_LowLayer =
true;
567 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
568 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
577 isDeadZone_UpLayer =
true;
578 isDeadZone_LowLayer =
false;
645 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
646 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
655 isDeadZone_UpLayer =
true;
656 isDeadZone_LowLayer =
false;
678 cout <<
" Orig_UpLayer[0](x:y) = ( " << xOrig_UpLayer[0] <<
" : " << yOrig_UpLayer[0] <<
" )\n";
679 cout <<
" Orig_LowLayer[0](x:y) = ( " << xOrig_LowLayer[0] <<
" : " << yOrig_LowLayer[0] <<
" )\n";
680 cout <<
" Orig_UpLayer[1](x:y) = ( " << xOrig_UpLayer[1] <<
" : " << yOrig_UpLayer[1] <<
" )\n";
681 cout <<
" Orig_LowLayer[1](x:y) = ( " << xOrig_LowLayer[1] <<
" : " << yOrig_LowLayer[1] <<
" )\n";
685 cout <<
" Size_UpLayer[0](dx:dy) = ( " << xSize_UpLayer[0] <<
" : " << ySize_UpLayer[0] <<
" )\n";
686 cout <<
" Size_LowLayer[0](dx:dy) = ( " << xSize_LowLayer[0] <<
" : " << ySize_LowLayer[0] <<
" )\n";
687 cout <<
" Size_UpLayer[1](dx:dy) = ( " << xSize_UpLayer[1] <<
" : " << ySize_UpLayer[1] <<
" )\n";
688 cout <<
" Size_LowLayer[1](dx:dy) = ( " << xSize_LowLayer[1] <<
" : " << ySize_LowLayer[1] <<
" )\n";
692 cout <<
" LBorder_UpLayer[0](x:y) = ( " << xLBorder_UpLayer[0] <<
" : " << yLBorder_UpLayer[0] <<
" )\n";
693 cout <<
" RBorder_UpLayer[0](x:y) = ( " << xRBorder_UpLayer[0] <<
" : " << yRBorder_UpLayer[0] <<
" )\n";
695 cout <<
" LBorder_LowLayer[0](x:y) = ( " << xLBorder_LowLayer[0] <<
" : " << yLBorder_LowLayer[0]
697 cout <<
" RBorder_LowLayer[0](x:y) = ( " << xRBorder_LowLayer[0] <<
" : " << yRBorder_LowLayer[0]
701 cout <<
" LBorder_UpLayer[1](x:y) = ( " << xLBorder_UpLayer[1] <<
" : " << yLBorder_UpLayer[1] <<
" )\n";
702 cout <<
" RBorder_UpLayer[1](x:y) = ( " << xRBorder_UpLayer[1] <<
" : " << yRBorder_UpLayer[1] <<
" )\n";
704 cout <<
" LBorder_LowLayer[1](x:y) = ( " << xLBorder_LowLayer[1] <<
" : " << yLBorder_LowLayer[1]
706 cout <<
" RBorder_LowLayer[1](x:y) = ( " << xRBorder_LowLayer[1] <<
" : " << yRBorder_LowLayer[1]
711 cout <<
" DeadZone[0]:\n";
712 cout <<
" p0(x:y) = ( " << xDeadZone[0][0] <<
" : " << yDeadZone[0][0] <<
" )\n";
713 cout <<
" p1(x:y) = ( " << xDeadZone[0][1] <<
" : " << yDeadZone[0][1] <<
" )\n";
714 cout <<
" p2(x:y) = ( " << xDeadZone[0][2] <<
" : " << yDeadZone[0][2] <<
" )\n";
717 cout <<
" DeadZone[1]:\n";
718 cout <<
" p0(x:y) = ( " << xDeadZone[1][0] <<
" : " << yDeadZone[1][0] <<
" )\n";
719 cout <<
" p1(x:y) = ( " << xDeadZone[1][1] <<
" : " << yDeadZone[1][1] <<
" )\n";
720 cout <<
" p2(x:y) = ( " << xDeadZone[1][2] <<
" : " << yDeadZone[1][2] <<
" )\n";
724 cout <<
" stripDirection[0] = ";
726 cout <<
"LeftToRight\n";
728 cout <<
"RightToLeft\n";
729 cout <<
" stripDirection[1] = ";
731 cout <<
"LeftToRight\n";
733 cout <<
"RightToLeft\n";
737 cout <<
" pitchValue[0] = " << pitchValue[0] <<
"\n";
738 cout <<
" pitchValue[1] = " << pitchValue[1] <<
"\n";
742 cout <<
" stripAngle[0] = " << stripAngle[0] <<
"\n";
743 cout <<
" stripAngle[1] = " << stripAngle[1] <<
"\n";
747 cout <<
" firstStripNumber_UpLayer[0] = " << firstStripNumber_UpLayer[0] <<
"\n";
748 cout <<
" firstStripNumber_LowLayer[0] = " << firstStripNumber_LowLayer[0] <<
"\n";
749 cout <<
" firstStripNumber_UpLayer[1] = " << firstStripNumber_UpLayer[1] <<
"\n";
750 cout <<
" firstStripNumber_LowLayer[1] = " << firstStripNumber_LowLayer[1] <<
"\n";
758 SiFileOut <<
"\t\t\t<Layer";
759 SiFileOut <<
" zoneID=\"" <<
"0" <<
"\"";
760 SiFileOut <<
" type=\"" <<
"lower" <<
"\"";
761 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_UpLayer[1] <<
"\"";
762 SiFileOut <<
" stripAngle=\"" << stripAngle[1] <<
"\"";
763 SiFileOut <<
" pitch=\"" << pitchValue[1] <<
"\"";
764 SiFileOut <<
" xorig=\"" << xOrig_UpLayer[1] <<
"\"";
765 SiFileOut <<
" yorig=\"" << yOrig_UpLayer[1] <<
"\"";
766 SiFileOut <<
" xsize=\"" << xSize_UpLayer[1] <<
"\"";
767 SiFileOut <<
" ysize=\"" << ySize_UpLayer[1] <<
"\"";
768 SiFileOut <<
" stripDirection=\"";
770 SiFileOut <<
"LeftToRight\"";
772 SiFileOut <<
"RightToLeft\"";
773 SiFileOut <<
" lxborder=\"" << xLBorder_UpLayer[1] <<
"\"";
774 SiFileOut <<
" lyborder=\"" << yLBorder_UpLayer[1] <<
"\"";
775 SiFileOut <<
" rxborder=\"" << xRBorder_UpLayer[1] <<
"\"";
776 SiFileOut <<
" ryborder=\"" << yRBorder_UpLayer[1] <<
"\"";
779 if (isDeadZone_UpLayer ==
true) {
781 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
782 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
783 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
784 SiFileOut <<
" x=\"" << xDeadZone[1][ipoint] <<
"\"";
785 SiFileOut <<
" y=\"" << yDeadZone[1][ipoint] <<
"\"";
786 SiFileOut <<
" />\n";
788 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
790 SiFileOut <<
"</Layer>\n";
794 SiFileOut <<
"\t\t\t<Layer";
795 SiFileOut <<
" zoneID=\"" <<
"0" <<
"\"";
796 SiFileOut <<
" type=\"" <<
"lower" <<
"\"";
797 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_LowLayer[1] <<
"\"";
798 SiFileOut <<
" stripAngle=\"" << stripAngle[1] <<
"\"";
799 SiFileOut <<
" pitch=\"" << pitchValue[1] <<
"\"";
800 SiFileOut <<
" xorig=\"" << xOrig_LowLayer[1] <<
"\"";
801 SiFileOut <<
" yorig=\"" << yOrig_LowLayer[1] <<
"\"";
802 SiFileOut <<
" xsize=\"" << xSize_LowLayer[1] <<
"\"";
803 SiFileOut <<
" ysize=\"" << ySize_LowLayer[1] <<
"\"";
804 SiFileOut <<
" stripDirection=\"";
806 SiFileOut <<
"LeftToRight\"";
808 SiFileOut <<
"RightToLeft\"";
809 SiFileOut <<
" lxborder=\"" << xLBorder_LowLayer[1] <<
"\"";
810 SiFileOut <<
" lyborder=\"" << yLBorder_LowLayer[1] <<
"\"";
811 SiFileOut <<
" rxborder=\"" << xRBorder_LowLayer[1] <<
"\"";
812 SiFileOut <<
" ryborder=\"" << yRBorder_LowLayer[1] <<
"\"";
815 if (isDeadZone_LowLayer ==
true) {
817 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
818 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
819 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
820 SiFileOut <<
" x=\"" << xDeadZone[1][ipoint] <<
"\"";
821 SiFileOut <<
" y=\"" << yDeadZone[1][ipoint] <<
"\"";
822 SiFileOut <<
" />\n";
824 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
826 SiFileOut <<
"</Layer>\n";
830 SiFileOut <<
"\t\t\t<Layer";
831 SiFileOut <<
" zoneID=\"" <<
"1" <<
"\"";
832 SiFileOut <<
" type=\"" <<
"upper" <<
"\"";
833 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_UpLayer[0] <<
"\"";
834 SiFileOut <<
" stripAngle=\"" << stripAngle[0] <<
"\"";
835 SiFileOut <<
" pitch=\"" << pitchValue[0] <<
"\"";
836 SiFileOut <<
" xorig=\"" << xOrig_UpLayer[0] <<
"\"";
837 SiFileOut <<
" yorig=\"" << yOrig_UpLayer[0] <<
"\"";
838 SiFileOut <<
" xsize=\"" << xSize_UpLayer[0] <<
"\"";
839 SiFileOut <<
" ysize=\"" << ySize_UpLayer[0] <<
"\"";
840 SiFileOut <<
" stripDirection=\"";
842 SiFileOut <<
"LeftToRight\"";
844 SiFileOut <<
"RightToLeft\"";
845 SiFileOut <<
" lxborder=\"" << xLBorder_UpLayer[0] <<
"\"";
846 SiFileOut <<
" lyborder=\"" << yLBorder_UpLayer[0] <<
"\"";
847 SiFileOut <<
" rxborder=\"" << xRBorder_UpLayer[0] <<
"\"";
848 SiFileOut <<
" ryborder=\"" << yRBorder_UpLayer[0] <<
"\"";
851 if (isDeadZone_UpLayer ==
true) {
853 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
854 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
855 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
856 SiFileOut <<
" x=\"" << xDeadZone[0][ipoint] <<
"\"";
857 SiFileOut <<
" y=\"" << yDeadZone[0][ipoint] <<
"\"";
858 SiFileOut <<
" />\n";
860 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
862 SiFileOut <<
"</Layer>\n";
866 SiFileOut <<
"\t\t\t<Layer";
867 SiFileOut <<
" zoneID=\"" <<
"1" <<
"\"";
868 SiFileOut <<
" type=\"" <<
"upper" <<
"\"";
869 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_LowLayer[0] <<
"\"";
870 SiFileOut <<
" stripAngle=\"" << stripAngle[0] <<
"\"";
871 SiFileOut <<
" pitch=\"" << pitchValue[0] <<
"\"";
872 SiFileOut <<
" xorig=\"" << xOrig_LowLayer[0] <<
"\"";
873 SiFileOut <<
" yorig=\"" << yOrig_LowLayer[0] <<
"\"";
874 SiFileOut <<
" xsize=\"" << xSize_LowLayer[0] <<
"\"";
875 SiFileOut <<
" ysize=\"" << ySize_LowLayer[0] <<
"\"";
876 SiFileOut <<
" stripDirection=\"";
878 SiFileOut <<
"LeftToRight\"";
880 SiFileOut <<
"RightToLeft\"";
881 SiFileOut <<
" lxborder=\"" << xLBorder_LowLayer[0] <<
"\"";
882 SiFileOut <<
" lyborder=\"" << yLBorder_LowLayer[0] <<
"\"";
883 SiFileOut <<
" rxborder=\"" << xRBorder_LowLayer[0] <<
"\"";
884 SiFileOut <<
" ryborder=\"" << yRBorder_LowLayer[0] <<
"\"";
887 if (isDeadZone_LowLayer ==
true) {
889 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
890 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
891 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
892 SiFileOut <<
" x=\"" << xDeadZone[0][ipoint] <<
"\"";
893 SiFileOut <<
" y=\"" << yDeadZone[0][ipoint] <<
"\"";
894 SiFileOut <<
" />\n";
896 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
898 SiFileOut <<
"</Layer>\n";
901 SiFileOut <<
"\t\t</Module>\n";
920 xOrig[0] = xOrig_LowLayer[0];
921 xOrig[1] = xOrig_LowLayer[1];
922 yOrig[0] = yOrig_LowLayer[0];
923 yOrig[1] = yOrig_LowLayer[1];
924 xSize[0] = xSize_LowLayer[0];
925 xSize[1] = xSize_LowLayer[1];
926 ySize[0] = ySize_LowLayer[0];
927 ySize[1] = ySize_LowLayer[1];
928 xLBorder[0] = xLBorder_LowLayer[0];
929 xLBorder[1] = xLBorder_LowLayer[1];
930 yLBorder[0] = yLBorder_LowLayer[0];
931 yLBorder[1] = yLBorder_LowLayer[1];
932 xRBorder[0] = xRBorder_LowLayer[0];
933 xRBorder[1] = xRBorder_LowLayer[1];
934 yRBorder[0] = yRBorder_LowLayer[0];
935 yRBorder[1] = yRBorder_LowLayer[1];
936 isDeadZone = isDeadZone_LowLayer;
939 xOrig[0] = xOrig_UpLayer[0];
940 xOrig[1] = xOrig_UpLayer[1];
941 yOrig[0] = yOrig_UpLayer[0];
942 yOrig[1] = yOrig_UpLayer[1];
943 xSize[0] = xSize_UpLayer[0];
944 xSize[1] = xSize_UpLayer[1];
945 ySize[0] = ySize_UpLayer[0];
946 ySize[1] = ySize_UpLayer[1];
947 xLBorder[0] = xLBorder_UpLayer[0];
948 xLBorder[1] = xLBorder_UpLayer[1];
949 yLBorder[0] = yLBorder_UpLayer[0];
950 yLBorder[1] = yLBorder_UpLayer[1];
951 xRBorder[0] = xRBorder_UpLayer[0];
952 xRBorder[1] = xRBorder_UpLayer[1];
953 yRBorder[0] = yRBorder_UpLayer[0];
954 yRBorder[1] = yRBorder_UpLayer[1];
955 isDeadZone = isDeadZone_UpLayer;
959 SiFileOut <<
"\t\t\t<Layer";
960 SiFileOut <<
" zoneID=\"" <<
"0" <<
"\"";
961 SiFileOut <<
" type=\"" <<
"lower" <<
"\"";
962 SiFileOut <<
" firstStripNumber=\"" << 0 <<
"\"";
963 SiFileOut <<
" stripAngle=\"" << stripAngle[1] <<
"\"";
964 SiFileOut <<
" pitch=\"" << pitchValue[1] <<
"\"";
965 SiFileOut <<
" xorig=\"" << xOrig[1] <<
"\"";
966 SiFileOut <<
" yorig=\"" << yOrig[1] <<
"\"";
967 SiFileOut <<
" xsize=\"" << xSize[1] <<
"\"";
968 SiFileOut <<
" ysize=\"" << ySize[1] <<
"\"";
969 SiFileOut <<
" stripDirection=\"";
971 SiFileOut <<
"LeftToRight\"";
973 SiFileOut <<
"RightToLeft\"";
974 SiFileOut <<
" lxborder=\"" << xLBorder[1] <<
"\"";
975 SiFileOut <<
" lyborder=\"" << yLBorder[1] <<
"\"";
976 SiFileOut <<
" rxborder=\"" << xRBorder[1] <<
"\"";
977 SiFileOut <<
" ryborder=\"" << yRBorder[1] <<
"\"";
980 if (isDeadZone ==
true) {
982 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
983 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
984 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
985 SiFileOut <<
" x=\"" << xDeadZone[1][ipoint] <<
"\"";
986 SiFileOut <<
" y=\"" << yDeadZone[1][ipoint] <<
"\"";
987 SiFileOut <<
" />\n";
989 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
991 SiFileOut <<
"</Layer>\n";
995 SiFileOut <<
"\t\t\t<Layer";
996 SiFileOut <<
" zoneID=\"" <<
"1" <<
"\"";
997 SiFileOut <<
" type=\"" <<
"upper" <<
"\"";
998 SiFileOut <<
" firstStripNumber=\"" << 0 <<
"\"";
999 SiFileOut <<
" stripAngle=\"" << stripAngle[0] <<
"\"";
1000 SiFileOut <<
" pitch=\"" << pitchValue[0] <<
"\"";
1001 SiFileOut <<
" xorig=\"" << xOrig[0] <<
"\"";
1002 SiFileOut <<
" yorig=\"" << yOrig[0] <<
"\"";
1003 SiFileOut <<
" xsize=\"" << xSize[0] <<
"\"";
1004 SiFileOut <<
" ysize=\"" << ySize[0] <<
"\"";
1005 SiFileOut <<
" stripDirection=\"";
1007 SiFileOut <<
"LeftToRight\"";
1009 SiFileOut <<
"RightToLeft\"";
1010 SiFileOut <<
" lxborder=\"" << xLBorder[0] <<
"\"";
1011 SiFileOut <<
" lyborder=\"" << yLBorder[0] <<
"\"";
1012 SiFileOut <<
" rxborder=\"" << xRBorder[0] <<
"\"";
1013 SiFileOut <<
" ryborder=\"" << yRBorder[0] <<
"\"";
1016 if (isDeadZone ==
true) {
1018 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
1019 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1020 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
1021 SiFileOut <<
" x=\"" << xDeadZone[0][ipoint] <<
"\"";
1022 SiFileOut <<
" y=\"" << yDeadZone[0][ipoint] <<
"\"";
1023 SiFileOut <<
" />\n";
1025 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
1027 SiFileOut <<
"</Layer>\n";
1030 SiFileOut <<
"\t\t</Module>\n";
1035 SiFileOut <<
"\t</Station>\n";
1038 cout <<
"------------------------------------------------------------\n";
1041 SiFileOut <<
"</StationSet>\n";