306 ofstream SiFileOut(xml_file_name.
Data(), ios::out);
308 SiFileOut <<
"<StationSet>\n";
313 cout <<
"istation = " << istation <<
": -----------------------------\n";
315 SiFileOut <<
"<!-- Station " << istation <<
" -->\n";
317 SiFileOut <<
"\t<Station";
321 SiFileOut <<
" rotAngleDeg=\"" <<
"0.0" <<
"\"";
322 SiFileOut <<
" rotCenterX=\"" <<
"0.0" <<
"\"";
323 SiFileOut <<
" rotCenterY=\"" <<
"0.0" <<
"\"";
329 cout <<
" imodule = " << imodule <<
"\n";
331 SiFileOut <<
"\t\t<!-- module " << imodule <<
" -->\n";
333 SiFileOut <<
"\t\t<Module";
336 SiFileOut <<
" xShift=\"" << 0.0 <<
"\"";
337 SiFileOut <<
" yShift=\"" << 0.0 <<
"\"";
338 SiFileOut <<
" zShift=\"" <<
ZModuleShifts[istation][imodule] <<
"\"";
369 Bool_t isDeadZone_UpLayer =
false;
370 Bool_t isDeadZone_LowLayer =
false;
375 Int_t firstStripNumber_UpLayer[2];
376 Int_t firstStripNumber_LowLayer[2];
418 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
419 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
428 isDeadZone_UpLayer =
false;
429 isDeadZone_LowLayer =
true;
490 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
491 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
500 isDeadZone_UpLayer =
false;
501 isDeadZone_LowLayer =
true;
568 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
569 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
578 isDeadZone_UpLayer =
true;
579 isDeadZone_LowLayer =
false;
646 for (
Int_t ilayer = 0; ilayer < 2; ++ilayer) {
647 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
656 isDeadZone_UpLayer =
true;
657 isDeadZone_LowLayer =
false;
679 cout <<
" Orig_UpLayer[0](x:y) = ( " << xOrig_UpLayer[0] <<
" : " << yOrig_UpLayer[0] <<
" )\n";
680 cout <<
" Orig_LowLayer[0](x:y) = ( " << xOrig_LowLayer[0] <<
" : " << yOrig_LowLayer[0] <<
" )\n";
681 cout <<
" Orig_UpLayer[1](x:y) = ( " << xOrig_UpLayer[1] <<
" : " << yOrig_UpLayer[1] <<
" )\n";
682 cout <<
" Orig_LowLayer[1](x:y) = ( " << xOrig_LowLayer[1] <<
" : " << yOrig_LowLayer[1] <<
" )\n";
686 cout <<
" Size_UpLayer[0](dx:dy) = ( " << xSize_UpLayer[0] <<
" : " << ySize_UpLayer[0] <<
" )\n";
687 cout <<
" Size_LowLayer[0](dx:dy) = ( " << xSize_LowLayer[0] <<
" : " << ySize_LowLayer[0] <<
" )\n";
688 cout <<
" Size_UpLayer[1](dx:dy) = ( " << xSize_UpLayer[1] <<
" : " << ySize_UpLayer[1] <<
" )\n";
689 cout <<
" Size_LowLayer[1](dx:dy) = ( " << xSize_LowLayer[1] <<
" : " << ySize_LowLayer[1] <<
" )\n";
693 cout <<
" LBorder_UpLayer[0](x:y) = ( " << xLBorder_UpLayer[0] <<
" : " << yLBorder_UpLayer[0] <<
" )\n";
694 cout <<
" RBorder_UpLayer[0](x:y) = ( " << xRBorder_UpLayer[0] <<
" : " << yRBorder_UpLayer[0] <<
" )\n";
696 cout <<
" LBorder_LowLayer[0](x:y) = ( " << xLBorder_LowLayer[0] <<
" : " << yLBorder_LowLayer[0]
698 cout <<
" RBorder_LowLayer[0](x:y) = ( " << xRBorder_LowLayer[0] <<
" : " << yRBorder_LowLayer[0]
702 cout <<
" LBorder_UpLayer[1](x:y) = ( " << xLBorder_UpLayer[1] <<
" : " << yLBorder_UpLayer[1] <<
" )\n";
703 cout <<
" RBorder_UpLayer[1](x:y) = ( " << xRBorder_UpLayer[1] <<
" : " << yRBorder_UpLayer[1] <<
" )\n";
705 cout <<
" LBorder_LowLayer[1](x:y) = ( " << xLBorder_LowLayer[1] <<
" : " << yLBorder_LowLayer[1]
707 cout <<
" RBorder_LowLayer[1](x:y) = ( " << xRBorder_LowLayer[1] <<
" : " << yRBorder_LowLayer[1]
712 cout <<
" DeadZone[0]:\n";
713 cout <<
" p0(x:y) = ( " << xDeadZone[0][0] <<
" : " << yDeadZone[0][0] <<
" )\n";
714 cout <<
" p1(x:y) = ( " << xDeadZone[0][1] <<
" : " << yDeadZone[0][1] <<
" )\n";
715 cout <<
" p2(x:y) = ( " << xDeadZone[0][2] <<
" : " << yDeadZone[0][2] <<
" )\n";
718 cout <<
" DeadZone[1]:\n";
719 cout <<
" p0(x:y) = ( " << xDeadZone[1][0] <<
" : " << yDeadZone[1][0] <<
" )\n";
720 cout <<
" p1(x:y) = ( " << xDeadZone[1][1] <<
" : " << yDeadZone[1][1] <<
" )\n";
721 cout <<
" p2(x:y) = ( " << xDeadZone[1][2] <<
" : " << yDeadZone[1][2] <<
" )\n";
725 cout <<
" stripDirection[0] = ";
727 cout <<
"LeftToRight\n";
729 cout <<
"RightToLeft\n";
730 cout <<
" stripDirection[1] = ";
732 cout <<
"LeftToRight\n";
734 cout <<
"RightToLeft\n";
738 cout <<
" pitchValue[0] = " << pitchValue[0] <<
"\n";
739 cout <<
" pitchValue[1] = " << pitchValue[1] <<
"\n";
743 cout <<
" stripAngle[0] = " << stripAngle[0] <<
"\n";
744 cout <<
" stripAngle[1] = " << stripAngle[1] <<
"\n";
748 cout <<
" firstStripNumber_UpLayer[0] = " << firstStripNumber_UpLayer[0] <<
"\n";
749 cout <<
" firstStripNumber_LowLayer[0] = " << firstStripNumber_LowLayer[0] <<
"\n";
750 cout <<
" firstStripNumber_UpLayer[1] = " << firstStripNumber_UpLayer[1] <<
"\n";
751 cout <<
" firstStripNumber_LowLayer[1] = " << firstStripNumber_LowLayer[1] <<
"\n";
759 SiFileOut <<
"\t\t\t<Layer";
760 SiFileOut <<
" zoneID=\"" <<
"0" <<
"\"";
761 SiFileOut <<
" type=\"" <<
"lower" <<
"\"";
762 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_UpLayer[1] <<
"\"";
763 SiFileOut <<
" stripAngle=\"" << stripAngle[1] <<
"\"";
764 SiFileOut <<
" pitch=\"" << pitchValue[1] <<
"\"";
765 SiFileOut <<
" xorig=\"" << xOrig_UpLayer[1] <<
"\"";
766 SiFileOut <<
" yorig=\"" << yOrig_UpLayer[1] <<
"\"";
767 SiFileOut <<
" xsize=\"" << xSize_UpLayer[1] <<
"\"";
768 SiFileOut <<
" ysize=\"" << ySize_UpLayer[1] <<
"\"";
769 SiFileOut <<
" stripDirection=\"";
771 SiFileOut <<
"LeftToRight\"";
773 SiFileOut <<
"RightToLeft\"";
774 SiFileOut <<
" lxborder=\"" << xLBorder_UpLayer[1] <<
"\"";
775 SiFileOut <<
" lyborder=\"" << yLBorder_UpLayer[1] <<
"\"";
776 SiFileOut <<
" rxborder=\"" << xRBorder_UpLayer[1] <<
"\"";
777 SiFileOut <<
" ryborder=\"" << yRBorder_UpLayer[1] <<
"\"";
780 if (isDeadZone_UpLayer ==
true) {
782 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
783 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
784 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
785 SiFileOut <<
" x=\"" << xDeadZone[1][ipoint] <<
"\"";
786 SiFileOut <<
" y=\"" << yDeadZone[1][ipoint] <<
"\"";
787 SiFileOut <<
" />\n";
789 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
791 SiFileOut <<
"</Layer>\n";
795 SiFileOut <<
"\t\t\t<Layer";
796 SiFileOut <<
" zoneID=\"" <<
"0" <<
"\"";
797 SiFileOut <<
" type=\"" <<
"lower" <<
"\"";
798 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_LowLayer[1] <<
"\"";
799 SiFileOut <<
" stripAngle=\"" << stripAngle[1] <<
"\"";
800 SiFileOut <<
" pitch=\"" << pitchValue[1] <<
"\"";
801 SiFileOut <<
" xorig=\"" << xOrig_LowLayer[1] <<
"\"";
802 SiFileOut <<
" yorig=\"" << yOrig_LowLayer[1] <<
"\"";
803 SiFileOut <<
" xsize=\"" << xSize_LowLayer[1] <<
"\"";
804 SiFileOut <<
" ysize=\"" << ySize_LowLayer[1] <<
"\"";
805 SiFileOut <<
" stripDirection=\"";
807 SiFileOut <<
"LeftToRight\"";
809 SiFileOut <<
"RightToLeft\"";
810 SiFileOut <<
" lxborder=\"" << xLBorder_LowLayer[1] <<
"\"";
811 SiFileOut <<
" lyborder=\"" << yLBorder_LowLayer[1] <<
"\"";
812 SiFileOut <<
" rxborder=\"" << xRBorder_LowLayer[1] <<
"\"";
813 SiFileOut <<
" ryborder=\"" << yRBorder_LowLayer[1] <<
"\"";
816 if (isDeadZone_LowLayer ==
true) {
818 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
819 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
820 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
821 SiFileOut <<
" x=\"" << xDeadZone[1][ipoint] <<
"\"";
822 SiFileOut <<
" y=\"" << yDeadZone[1][ipoint] <<
"\"";
823 SiFileOut <<
" />\n";
825 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
827 SiFileOut <<
"</Layer>\n";
831 SiFileOut <<
"\t\t\t<Layer";
832 SiFileOut <<
" zoneID=\"" <<
"1" <<
"\"";
833 SiFileOut <<
" type=\"" <<
"upper" <<
"\"";
834 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_UpLayer[0] <<
"\"";
835 SiFileOut <<
" stripAngle=\"" << stripAngle[0] <<
"\"";
836 SiFileOut <<
" pitch=\"" << pitchValue[0] <<
"\"";
837 SiFileOut <<
" xorig=\"" << xOrig_UpLayer[0] <<
"\"";
838 SiFileOut <<
" yorig=\"" << yOrig_UpLayer[0] <<
"\"";
839 SiFileOut <<
" xsize=\"" << xSize_UpLayer[0] <<
"\"";
840 SiFileOut <<
" ysize=\"" << ySize_UpLayer[0] <<
"\"";
841 SiFileOut <<
" stripDirection=\"";
843 SiFileOut <<
"LeftToRight\"";
845 SiFileOut <<
"RightToLeft\"";
846 SiFileOut <<
" lxborder=\"" << xLBorder_UpLayer[0] <<
"\"";
847 SiFileOut <<
" lyborder=\"" << yLBorder_UpLayer[0] <<
"\"";
848 SiFileOut <<
" rxborder=\"" << xRBorder_UpLayer[0] <<
"\"";
849 SiFileOut <<
" ryborder=\"" << yRBorder_UpLayer[0] <<
"\"";
852 if (isDeadZone_UpLayer ==
true) {
854 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
855 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
856 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
857 SiFileOut <<
" x=\"" << xDeadZone[0][ipoint] <<
"\"";
858 SiFileOut <<
" y=\"" << yDeadZone[0][ipoint] <<
"\"";
859 SiFileOut <<
" />\n";
861 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
863 SiFileOut <<
"</Layer>\n";
867 SiFileOut <<
"\t\t\t<Layer";
868 SiFileOut <<
" zoneID=\"" <<
"1" <<
"\"";
869 SiFileOut <<
" type=\"" <<
"upper" <<
"\"";
870 SiFileOut <<
" firstStripNumber=\"" << firstStripNumber_LowLayer[0] <<
"\"";
871 SiFileOut <<
" stripAngle=\"" << stripAngle[0] <<
"\"";
872 SiFileOut <<
" pitch=\"" << pitchValue[0] <<
"\"";
873 SiFileOut <<
" xorig=\"" << xOrig_LowLayer[0] <<
"\"";
874 SiFileOut <<
" yorig=\"" << yOrig_LowLayer[0] <<
"\"";
875 SiFileOut <<
" xsize=\"" << xSize_LowLayer[0] <<
"\"";
876 SiFileOut <<
" ysize=\"" << ySize_LowLayer[0] <<
"\"";
877 SiFileOut <<
" stripDirection=\"";
879 SiFileOut <<
"LeftToRight\"";
881 SiFileOut <<
"RightToLeft\"";
882 SiFileOut <<
" lxborder=\"" << xLBorder_LowLayer[0] <<
"\"";
883 SiFileOut <<
" lyborder=\"" << yLBorder_LowLayer[0] <<
"\"";
884 SiFileOut <<
" rxborder=\"" << xRBorder_LowLayer[0] <<
"\"";
885 SiFileOut <<
" ryborder=\"" << yRBorder_LowLayer[0] <<
"\"";
888 if (isDeadZone_LowLayer ==
true) {
890 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
891 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
892 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
893 SiFileOut <<
" x=\"" << xDeadZone[0][ipoint] <<
"\"";
894 SiFileOut <<
" y=\"" << yDeadZone[0][ipoint] <<
"\"";
895 SiFileOut <<
" />\n";
897 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
899 SiFileOut <<
"</Layer>\n";
902 SiFileOut <<
"\t\t</Module>\n";
921 xOrig[0] = xOrig_LowLayer[0];
922 xOrig[1] = xOrig_LowLayer[1];
923 yOrig[0] = yOrig_LowLayer[0];
924 yOrig[1] = yOrig_LowLayer[1];
925 xSize[0] = xSize_LowLayer[0];
926 xSize[1] = xSize_LowLayer[1];
927 ySize[0] = ySize_LowLayer[0];
928 ySize[1] = ySize_LowLayer[1];
929 xLBorder[0] = xLBorder_LowLayer[0];
930 xLBorder[1] = xLBorder_LowLayer[1];
931 yLBorder[0] = yLBorder_LowLayer[0];
932 yLBorder[1] = yLBorder_LowLayer[1];
933 xRBorder[0] = xRBorder_LowLayer[0];
934 xRBorder[1] = xRBorder_LowLayer[1];
935 yRBorder[0] = yRBorder_LowLayer[0];
936 yRBorder[1] = yRBorder_LowLayer[1];
937 isDeadZone = isDeadZone_LowLayer;
940 xOrig[0] = xOrig_UpLayer[0];
941 xOrig[1] = xOrig_UpLayer[1];
942 yOrig[0] = yOrig_UpLayer[0];
943 yOrig[1] = yOrig_UpLayer[1];
944 xSize[0] = xSize_UpLayer[0];
945 xSize[1] = xSize_UpLayer[1];
946 ySize[0] = ySize_UpLayer[0];
947 ySize[1] = ySize_UpLayer[1];
948 xLBorder[0] = xLBorder_UpLayer[0];
949 xLBorder[1] = xLBorder_UpLayer[1];
950 yLBorder[0] = yLBorder_UpLayer[0];
951 yLBorder[1] = yLBorder_UpLayer[1];
952 xRBorder[0] = xRBorder_UpLayer[0];
953 xRBorder[1] = xRBorder_UpLayer[1];
954 yRBorder[0] = yRBorder_UpLayer[0];
955 yRBorder[1] = yRBorder_UpLayer[1];
956 isDeadZone = isDeadZone_UpLayer;
960 SiFileOut <<
"\t\t\t<Layer";
961 SiFileOut <<
" zoneID=\"" <<
"0" <<
"\"";
962 SiFileOut <<
" type=\"" <<
"lower" <<
"\"";
963 SiFileOut <<
" firstStripNumber=\"" << 0 <<
"\"";
964 SiFileOut <<
" stripAngle=\"" << stripAngle[1] <<
"\"";
965 SiFileOut <<
" pitch=\"" << pitchValue[1] <<
"\"";
966 SiFileOut <<
" xorig=\"" << xOrig[1] <<
"\"";
967 SiFileOut <<
" yorig=\"" << yOrig[1] <<
"\"";
968 SiFileOut <<
" xsize=\"" << xSize[1] <<
"\"";
969 SiFileOut <<
" ysize=\"" << ySize[1] <<
"\"";
970 SiFileOut <<
" stripDirection=\"";
972 SiFileOut <<
"LeftToRight\"";
974 SiFileOut <<
"RightToLeft\"";
975 SiFileOut <<
" lxborder=\"" << xLBorder[1] <<
"\"";
976 SiFileOut <<
" lyborder=\"" << yLBorder[1] <<
"\"";
977 SiFileOut <<
" rxborder=\"" << xRBorder[1] <<
"\"";
978 SiFileOut <<
" ryborder=\"" << yRBorder[1] <<
"\"";
981 if (isDeadZone ==
true) {
983 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
984 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
985 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
986 SiFileOut <<
" x=\"" << xDeadZone[1][ipoint] <<
"\"";
987 SiFileOut <<
" y=\"" << yDeadZone[1][ipoint] <<
"\"";
988 SiFileOut <<
" />\n";
990 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
992 SiFileOut <<
"</Layer>\n";
996 SiFileOut <<
"\t\t\t<Layer";
997 SiFileOut <<
" zoneID=\"" <<
"1" <<
"\"";
998 SiFileOut <<
" type=\"" <<
"upper" <<
"\"";
999 SiFileOut <<
" firstStripNumber=\"" << 0 <<
"\"";
1000 SiFileOut <<
" stripAngle=\"" << stripAngle[0] <<
"\"";
1001 SiFileOut <<
" pitch=\"" << pitchValue[0] <<
"\"";
1002 SiFileOut <<
" xorig=\"" << xOrig[0] <<
"\"";
1003 SiFileOut <<
" yorig=\"" << yOrig[0] <<
"\"";
1004 SiFileOut <<
" xsize=\"" << xSize[0] <<
"\"";
1005 SiFileOut <<
" ysize=\"" << ySize[0] <<
"\"";
1006 SiFileOut <<
" stripDirection=\"";
1008 SiFileOut <<
"LeftToRight\"";
1010 SiFileOut <<
"RightToLeft\"";
1011 SiFileOut <<
" lxborder=\"" << xLBorder[0] <<
"\"";
1012 SiFileOut <<
" lyborder=\"" << yLBorder[0] <<
"\"";
1013 SiFileOut <<
" rxborder=\"" << xRBorder[0] <<
"\"";
1014 SiFileOut <<
" ryborder=\"" << yRBorder[0] <<
"\"";
1017 if (isDeadZone ==
true) {
1019 SiFileOut <<
"\t\t\t\t<DeadZone>\n";
1020 for (
Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1021 SiFileOut <<
"\t\t\t\t\t<DeadPoint";
1022 SiFileOut <<
" x=\"" << xDeadZone[0][ipoint] <<
"\"";
1023 SiFileOut <<
" y=\"" << yDeadZone[0][ipoint] <<
"\"";
1024 SiFileOut <<
" />\n";
1026 SiFileOut <<
"\t\t\t\t</DeadZone>\n\t\t\t";
1028 SiFileOut <<
"</Layer>\n";
1031 SiFileOut <<
"\t\t</Module>\n";
1036 SiFileOut <<
"\t</Station>\n";
1039 cout <<
"------------------------------------------------------------\n";
1042 SiFileOut <<
"</StationSet>\n";