556{
558
560
561
562
563
564 G4VScoringMesh* mesh = fSMan->GetCurrentMesh();
565 if(mesh == nullptr)
566 {
567 ed << "ERROR : No mesh is currently open. Open/create a mesh first. "
568 "Command ignored.";
570 return;
571 }
572
574
577
578
579 if(command == qTouchCmd)
580 {
582 }
583 else if(command == qGetUnitCmd)
584 {
586 }
587 else if(command == qSetUnitCmd)
588 {
590 }
591 else if(command == qCellChgCmd)
592 {
594 {
595 G4PSCellCharge* ps = nullptr;
596 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
597 {
599 }
600 else
601 {
602 ps = new G4PSCellCharge3D(token[0]);
603 }
606 }
607 }
608 else if(command == qCellFluxCmd)
609 {
611 {
612 G4PSCellFlux* ps = nullptr;
613 if(shape == MeshShape::box)
614 {
615 ps = new G4PSCellFlux3D(token[0]);
616 }
617 else if(shape == MeshShape::cylinder)
618 {
619 auto pps =
620 new G4PSCellFluxForCylinder3D(token[0]);
624 pps->SetNumberOfSegments(nSeg);
625 ps = pps;
626 }
627 else if(shape == MeshShape::realWorldLogVol)
628 {
629 ed << "Cell flux for real world volume is not yet supported. Command "
630 "ignored.";
632 return;
633 }
634 else if(shape == MeshShape::probe)
635 {
636 ps = new G4PSCellFlux(token[0]);
637 }
641 }
642 }
643 else if(command == qPassCellFluxCmd)
644 {
646 {
647 G4PSPassageCellFlux* ps = nullptr;
648 if(shape == MeshShape::box)
649 {
650 ps = new G4PSPassageCellFlux3D(token[0]);
651 }
652 else if(shape == MeshShape::cylinder)
653 {
654 auto pps =
655 new G4PSPassageCellFluxForCylinder3D(token[0]);
659 pps->SetNumberOfSegments(nSeg);
660 ps = pps;
661 }
662 else if(shape == MeshShape::realWorldLogVol)
663 {
664 ed << "Passing cell flux for real world volume is not yet supported. "
665 "Command ignored.";
667 return;
668 }
669 else if(shape == MeshShape::probe)
670 {
671 ps = new G4PSPassageCellFlux(token[0]);
672 }
675 }
676 }
677 else if(command == qeDepCmd)
678 {
680 {
681 G4PSEnergyDeposit* ps = nullptr;
682 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
683 {
685 }
686 else
687 {
688 ps = new G4PSEnergyDeposit3D(token[0]);
689 }
692 }
693 }
694 else if(command == qdoseDepCmd)
695 {
697 {
698 G4PSDoseDeposit* ps = nullptr;
699 if(shape == MeshShape::box)
700 {
701 ps = new G4PSDoseDeposit3D(token[0]);
702 }
703 else if(shape == MeshShape::cylinder)
704 {
705 auto pps =
706 new G4PSDoseDepositForCylinder3D(token[0]);
707 pps->SetUnit(token[1]);
711 pps->SetNumberOfSegments(nSeg);
712 ps = pps;
713 }
714 else if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
715 {
717 }
720 }
721 }
722 else if(command == qnOfStepCmd)
723 {
725 {
726 G4PSNofStep* ps = nullptr;
727 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
728 {
730 }
731 else
732 {
733 ps = new G4PSNofStep3D(token[0]);
734 }
737 }
738 }
739 else if(command == qnOfSecondaryCmd)
740 {
742 {
743 G4PSNofSecondary* ps = nullptr;
744 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
745 {
747 }
748 else
749 {
750 ps = new G4PSNofSecondary3D(token[0]);
751 }
753 }
754 }
755 else if(command == qTrackLengthCmd)
756 {
758 {
759 G4PSTrackLength* ps = nullptr;
760 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
761 {
763 }
764 else
765 {
766 ps = new G4PSTrackLength3D(token[0]);
767 }
773 }
774 }
775 else if(command == qPassCellCurrCmd)
776 {
778 {
779 G4PSPassageCellCurrent* ps = nullptr;
780 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
781 {
783 }
784 else
785 {
786 ps = new G4PSPassageCellCurrent3D(token[0]);
787 }
790 }
791 }
792 else if(command == qPassTrackLengthCmd)
793 {
795 {
796 G4PSPassageTrackLength* ps = nullptr;
797 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
798 {
800 }
801 else
802 {
803 ps = new G4PSPassageTrackLength3D(token[0]);
804 }
808 }
809 }
810 else if(command == qFlatSurfCurrCmd)
811 {
813 {
814 G4PSFlatSurfaceCurrent* ps = nullptr;
815 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
816 {
817 ps =
new G4PSFlatSurfaceCurrent(token[0],
StoI(token[1]),
819 }
820 else
821 {
822 ps =
new G4PSFlatSurfaceCurrent3D(token[0],
StoI(token[1]));
823 }
827 {
829 }
830 else
831 {
833 }
835 }
836 }
837 else if(command == qFlatSurfFluxCmd)
838 {
840 {
841 G4PSFlatSurfaceFlux* ps = nullptr;
842 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
843 {
844 ps =
new G4PSFlatSurfaceFlux(token[0],
StoI(token[1]),
846 }
847 else
848 {
849 ps =
new G4PSFlatSurfaceFlux3D(token[0],
StoI(token[1]));
850 }
854 {
856 }
857 else
858 {
860 }
862 }
863 }
864 else if(command == qVolFluxCmd)
865 {
867 {
868 G4PSVolumeFlux* ps = nullptr;
869 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
870 {
871 ps =
new G4PSVolumeFlux(token[0],
StoI(token[2]),
873 }
874 else
875 {
876 ps =
new G4PSVolumeFlux3D(token[0],
StoI(token[2]));
877 }
880 }
881 }
882 else if(command == qNofCollisionCmd)
883 {
885 {
886 G4PSNofCollision* ps = nullptr;
887 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
888 {
890 }
891 else
892 {
893 ps = new G4PSNofCollision3D(token[0]);
894 }
897 }
898 }
899 else if(command == qPopulationCmd)
900 {
902 {
903 G4PSPopulation* ps = nullptr;
904 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
905 {
907 }
908 else
909 {
910 ps = new G4PSPopulation3D(token[0]);
911 }
914 }
915 }
916 else if(command == qTrackCountCmd)
917 {
919 {
920 G4PSTrackCounter* ps = nullptr;
921 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
922 {
923 ps =
new G4PSTrackCounter(token[0],
StoI(token[1]),
925 }
926 else
927 {
928 ps =
new G4PSTrackCounter3D(token[0],
StoI(token[1]));
929 }
932 }
933 }
934 else if(command == qTerminationCmd)
935 {
937 {
938 G4PSTermination* ps = nullptr;
939 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
940 {
942 }
943 else
944 {
945 ps = new G4PSTermination3D(token[0]);
946 }
949 }
950 }
951 else if(command == qMinKinEAtGeneCmd)
952 {
954 {
955 G4PSMinKinEAtGeneration* ps = nullptr;
956 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
957 {
959 }
960 else
961 {
962 ps = new G4PSMinKinEAtGeneration3D(token[0]);
963 }
966 }
967 }
968 else if(command == qStepCheckerCmd)
969 {
971 {
972 G4PSStepChecker* ps = nullptr;
973 if(shape == MeshShape::realWorldLogVol || shape == MeshShape::probe)
974 {
976 }
977 else
978 {
979 ps = new G4PSStepChecker3D(token[0]);
980 }
982 }
983
984
985
986
987 }
988 else if(command == fchargedCmd)
989 {
991 {
992 mesh->
SetFilter(
new G4SDChargedFilter(token[0]));
993 }
994 else
995 {
996 ed << "WARNING[" << fchargedCmd->GetCommandPath()
997 << "] : Current quantity is not set. Set or touch a quantity first.";
999 }
1000 }
1001 else if(command == fneutralCmd)
1002 {
1004 {
1005 mesh->
SetFilter(
new G4SDNeutralFilter(token[0]));
1006 }
1007 else
1008 {
1009 ed << "WARNING[" << fneutralCmd->GetCommandPath()
1010 << "] : Current quantity is not set. Set or touch a quantity first.";
1012 }
1013 }
1014 else if(command == fkinECmd)
1015 {
1017 {
1018 G4String&
name = token[0];
1023 new G4SDKineticEnergyFilter(name, elow * unitVal, ehigh * unitVal));
1024 }
1025 else
1026 {
1027 ed << "WARNING[" << fkinECmd->GetCommandPath()
1028 << "] : Current quantity is not set. Set or touch a quantity first.";
1030 }
1031 }
1032 else if(command == fparticleKinECmd)
1033 {
1035 {
1037 }
1038 else
1039 {
1040 ed << "WARNING[" << fparticleKinECmd->GetCommandPath()
1041 << "] : Current quantity is not set. Set or touch a quantity first.";
1043 }
1044 }
1045 else if(command == fparticleCmd)
1046 {
1048 {
1050 }
1051 else
1052 {
1053 ed << "WARNING[" << fparticleCmd->GetCommandPath()
1054 << "] : Current quantity is not set. Set or touch a quantity first.";
1056 }
1057 }
1058}
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 DivideByArea(G4bool flg=true)
void Weighted(G4bool flg=true)
virtual void SetUnit(const G4String &unit)
void Weighted(G4bool flg=true)
void DivideByArea(G4bool flg=true)
virtual void SetUnit(const G4String &unit)
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)
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)
virtual void SetUnit(const G4String &unit)
void MultiplyKineticEnergy(G4bool flg=true)
void Weighted(G4bool flg=true)
void DivideByVelocity(G4bool flg=true)
void SetDivCos(G4bool val)
void FParticleWithEnergyCommand(G4VScoringMesh *mesh, G4TokenVec &token)
G4bool CheckMeshPS(G4VScoringMesh *mesh, const G4String &psname, G4UIcommand *command)
void FillTokenVec(const G4String &newValues, G4TokenVec &token)
void FParticleCommand(G4VScoringMesh *mesh, G4TokenVec &token)
G4bool StoB(const G4String &s)
G4int StoI(const G4String &s)
void ScoreWeighted(G4bool flg=false)
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()