555{
557
559
560
561
562
564 if(mesh == nullptr)
565 {
566 ed << "ERROR : No mesh is currently open. Open/create a mesh first. "
567 "Command ignored.";
569 return;
570 }
571
573
576
577
578 if(command == qTouchCmd)
579 {
581 }
582 else if(command == qGetUnitCmd)
583 {
585 }
586 else if(command == qSetUnitCmd)
587 {
589 }
590 else if(command == qCellChgCmd)
591 {
593 {
595 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
596 {
598 }
599 else
600 {
602 }
605 }
606 }
607 else if(command == qCellFluxCmd)
608 {
610 {
612 if(shape == MeshShape::box)
613 {
615 }
616 else if(shape == MeshShape::cylinder)
617 {
618 auto pps =
623 pps->SetNumberOfSegments(nSeg);
624 ps = pps;
625 }
626 else if(shape == MeshShape::realWorldLogVol)
627 {
628 ed << "Cell flux for real world volume is not yet supported. Command "
629 "ignored.";
631 return;
632 }
633 else if(shape == MeshShape::probe)
634 {
636 }
639 }
640 }
641 else if(command == qPassCellFluxCmd)
642 {
644 {
646 if(shape == MeshShape::box)
647 {
649 }
650 else if(shape == MeshShape::cylinder)
651 {
652 auto pps =
657 pps->SetNumberOfSegments(nSeg);
658 ps = pps;
659 }
660 else if(shape == MeshShape::realWorldLogVol)
661 {
662 ed << "Passing cell flux for real world volume is not yet supported. "
663 "Command ignored.";
665 return;
666 }
667 else if(shape == MeshShape::probe)
668 {
670 }
673 }
674 }
675 else if(command == qeDepCmd)
676 {
678 {
680 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
681 {
683 }
684 else
685 {
687 }
690 }
691 }
692 else if(command == qdoseDepCmd)
693 {
695 {
697 if(shape == MeshShape::box)
698 {
700 }
701 else if(shape == MeshShape::cylinder)
702 {
703 auto pps =
705 pps->SetUnit(token[1]);
709 pps->SetNumberOfSegments(nSeg);
710 ps = pps;
711 }
712 else if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
713 {
715 }
718 }
719 }
720 else if(command == qnOfStepCmd)
721 {
723 {
725 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
726 {
728 }
729 else
730 {
732 }
735 }
736 }
737 else if(command == qnOfSecondaryCmd)
738 {
740 {
742 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
743 {
745 }
746 else
747 {
749 }
751 }
752 }
753 else if(command == qTrackLengthCmd)
754 {
756 {
758 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
759 {
761 }
762 else
763 {
765 }
767 ps->MultiplyKineticEnergy(
StoB(token[2]));
768 ps->DivideByVelocity(
StoB(token[3]));
769 ps->SetUnit(token[4]);
771 }
772 }
773 else if(command == qPassCellCurrCmd)
774 {
776 {
778 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
779 {
781 }
782 else
783 {
785 }
788 }
789 }
790 else if(command == qPassTrackLengthCmd)
791 {
793 {
795 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
796 {
798 }
799 else
800 {
802 }
804 ps->SetUnit(token[2]);
806 }
807 }
808 else if(command == qFlatSurfCurrCmd)
809 {
811 {
813 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
814 {
817 }
818 else
819 {
821 }
823 ps->DivideByArea(
StoB(token[3]));
825 {
826 ps->SetUnit(token[4]);
827 }
828 else
829 {
830 ps->SetUnit("");
831 }
833 }
834 }
835 else if(command == qFlatSurfFluxCmd)
836 {
838 {
840 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
841 {
844 }
845 else
846 {
848 }
850 ps->DivideByArea(
StoB(token[3]));
852 {
853 ps->SetUnit(token[4]);
854 }
855 else
856 {
857 ps->SetUnit("");
858 }
860 }
861 }
862 else if(command == qVolFluxCmd)
863 {
865 {
867 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
868 {
871 }
872 else
873 {
875 }
878 }
879 }
880 else if(command == qNofCollisionCmd)
881 {
883 {
885 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
886 {
888 }
889 else
890 {
892 }
895 }
896 }
897 else if(command == qPopulationCmd)
898 {
900 {
902 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
903 {
905 }
906 else
907 {
909 }
912 }
913 }
914 else if(command == qTrackCountCmd)
915 {
917 {
919 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
920 {
923 }
924 else
925 {
927 }
930 }
931 }
932 else if(command == qTerminationCmd)
933 {
935 {
937 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
938 {
940 }
941 else
942 {
944 }
947 }
948 }
949 else if(command == qMinKinEAtGeneCmd)
950 {
952 {
954 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
955 {
957 }
958 else
959 {
961 }
964 }
965 }
966 else if(command == qStepCheckerCmd)
967 {
969 {
971 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
972 {
974 }
975 else
976 {
978 }
980 }
981
982
983
984
985 }
986 else if(command == fchargedCmd)
987 {
989 {
991 }
992 else
993 {
995 << "] : Current quantity is not set. Set or touch a quantity first.";
997 }
998 }
999 else if(command == fneutralCmd)
1000 {
1002 {
1004 }
1005 else
1006 {
1008 << "] : Current quantity is not set. Set or touch a quantity first.";
1010 }
1011 }
1012 else if(command == fkinECmd)
1013 {
1015 {
1022 }
1023 else
1024 {
1026 << "] : Current quantity is not set. Set or touch a quantity first.";
1028 }
1029 }
1030 else if(command == fparticleKinECmd)
1031 {
1033 {
1035 }
1036 else
1037 {
1039 << "] : Current quantity is not set. Set or touch a quantity first.";
1041 }
1042 }
1043 else if(command == fparticleCmd)
1044 {
1046 {
1048 }
1049 else
1050 {
1052 << "] : Current quantity is not set. Set or touch a quantity first.";
1054 }
1055 }
1056}
std::vector< G4String > G4TokenVec
G4GLOB_DLL std::ostream G4cout
virtual void SetUnit(const G4String &unit)
virtual void SetUnit(const G4String &unit)
virtual void SetUnit(const G4String &unit)
virtual void SetUnit(const G4String &unit)
void Weighted(G4bool flg=true)
void Weighted(G4bool flg=true)
virtual void SetUnit(const G4String &unit)
void Weighted(G4bool flg=true)
void SetBoundaryFlag(G4bool flg=true)
void Weighted(G4bool flg=true)
virtual void SetUnit(const G4String &unit)
void Weighted(G4bool flg=true)
void Weighted(G4bool flg=true)
void Weighted(G4bool flg=true)
void Weighted(G4bool flg=true)
void Weighted(G4bool flg=true)
void SetDivCos(G4bool val)
void FParticleWithEnergyCommand(G4VScoringMesh *mesh, G4TokenVec &token)
G4bool CheckMeshPS(G4VScoringMesh *mesh, G4String &psname, G4UIcommand *command)
void FillTokenVec(G4String newValues, G4TokenVec &token)
void FParticleCommand(G4VScoringMesh *mesh, G4TokenVec &token)
G4VScoringMesh * GetCurrentMesh() const
G4int StoI(const G4String &s)
G4ThreeVector GetSize() const
MeshShape GetShape() const
G4double GetStartAngle() const
void GetNumberOfSegments(G4int nSegment[3])
G4int GetCopyNumberLevel() const
void SetCurrentPSUnit(const G4String &unit)
void SetCurrentPrimitiveScorer(const G4String &name)
void SetPrimitiveScorer(G4VPrimitiveScorer *ps)
G4String GetCurrentPSUnit()
G4double GetAngleSpan() const
G4bool IsCurrentPrimitiveScorerNull()