436{
438
439 if(command==listCmd) {
441 } else if(command==dumpCmd) {
443 } else if(command==drawCmd) {
449 fSMan->
DrawMesh(meshName,psName,colorMapName,axflg);
450 } else if(command==drawColumnCmd) {
457 fSMan->
DrawMesh(meshName,psName,iPlane,iColumn,colorMapName);
458
459
460
461
462
463
464
465
466 } else if(command==dumpQtyToFileCmd) {
472 auto mesh = fSMan->
FindMesh(meshName);
473 if(!mesh)
474 {
476 ed << "Mesh name <" << meshName << "> is not found. Command ignored.";
478 return;
479 }
481 } else if(command==dumpQtyWithFactorCmd) {
488 auto mesh = fSMan->
FindMesh(meshName);
489 if(!mesh)
490 {
492 ed << "Mesh name <" << meshName << "> is not found. Command ignored.";
494 return;
495 }
499 } else if(command==dumpAllQtsToFileCmd) {
504 auto mesh = fSMan->
FindMesh(meshName);
505 if(!mesh)
506 {
508 ed << "Mesh name <" << meshName << "> is not found. Command ignored.";
510 return;
511 }
513 } else if(command==dumpAllQtsWithFactorCmd) {
519 auto mesh = fSMan->
FindMesh(meshName);
520 if(!mesh)
521 {
523 ed << "Mesh name <" << meshName << "> is not found. Command ignored.";
525 return;
526 }
530 } else if(command==fill1DCmd) {
532 } else if(command==verboseCmd) {
534 } else if(command==meshBoxCreateCmd) {
536 if ( currentmesh ){
540 << "> is still open. Close it first. Command ignored.";
542 } else {
543
545 if ( !mesh ){
548 }else{
551 << "] : Scoring mesh <" << newVal
552 << "> already exists. Command ignored.";
554 }
555 }
556 } else if(command==meshCylinderCreateCmd) {
558 if ( currentmesh ){
562 << "> is still open. Close it first. Command ignored.";
564 } else {
565
567 if ( !mesh ){
570 }else{
573 << "] : Scoring mesh <" << newVal
574 << "> already exists. Command ignored.";
576 }
577 }
578 } else if(command==meshRWLogVolCreateCmd) {
580 if ( mesh ){
584 << "> is still open. Close it first. Command ignored.";
586 }
587 else
588 {
593 if ( !mesh ){
597 }else{
600 << "] : Scoring mesh <" << meshName << "> already exists. Command ignored.";
602 }
603 }
604 } else if(command==probeCreateCmd) {
606 if ( mesh ){
610 << "> is still open. Close it first. Command ignored.";
612 }
613 else
614 {
621 if(!mesh)
622 {
625 }
626 else
627 {
630 << "] : Mesh name <" << qname << "> already exists. Use another name.";
632 }
633 }
634 } else if(command==probeMatCmd || command==probeLocateCmd) {
636 if(!mesh)
637 {
639 ed << "ERROR : No mesh is currently open. Open/create a mesh first. Command ignored.";
641 return;
642 }
643 if(mesh->
GetShape() != MeshShape::probe)
644 {
646 ed << "ERROR : Inconsistent mesh type. Close current mesh and open Scoring Probe.";
648 return;
649 }
650
651 if(command==probeMatCmd)
652 {
654 if(!succ)
655 {
657 ed << "Material <" << newVal << "> is not defind in G4NistManager. Command is ignored.\n"
658 << "Use /material/nist/listMaterials command to see the available materials.";
660 return;
661 }
662 }
663 else if(command==probeLocateCmd)
664 {
667 }
668 } else if(command==listColorMapCmd) {
670 } else if(command==floatMinMaxCmd) {
672 if(colorMap)
674 else
675 {
678 << "] : color map <" << newVal << "> is not defined. Command ignored." ;
680 }
681 } else if(command==colorMapMinMaxCmd) {
687 if(colorMap)
690 else
691 {
694 << "] : color map <" << newVal << "> is not defined. Command ignored."
697 }
698 } else if(command==meshOpnCmd) {
700 if ( currentmesh ){
704 << "> is still open. Close it first. Command ignored.";
706 } else {
708 if ( !mesh ){
711 << "] : Scoring mesh <" << newVal << "> does not exist. Command ignored.";
713 } else {
715 }
716 }
717 } else if(command==meshClsCmd) {
719 } else {
720
721
722
724
725
726 if ( mesh ){
728 if ( shape == MeshShape::realWorldLogVol ) {
731 << "] : Number of mesh command cannot be set for this type of mesh. Command ignored.";
733 } else {
734
735
738
739
740
741
742
743
744 if(command==mBoxSizeCmd) {
745 if ( shape == MeshShape::box){
752 } else {
755 << "] : This mesh is not Box. Command ignored.";
757 }
758 }else if(command==mCylinderSizeCmd) {
759 if ( shape == MeshShape::cylinder ){
761 vsize[0] =
StoD(token[0]);
762 vsize[1] =
StoD(token[1]);
764 vsize[0] *= unt;
765 vsize[1] *= unt;
766 vsize[2] = 0.0;
768 } else {
771 << "] : This mesh is not Box. Command ignored.";
773 }
774 } else if(command==mBinCmd) {
776 } else if(command==mTResetCmd) {
777 G4double centerPosition[3] ={ 0., 0., 0.};
779 } else if(command==mTXyzCmd) {
782 centerPosition[0] = xyz.
x();
783 centerPosition[1] = xyz.
y();
784 centerPosition[2] = xyz.
z();
786
787 } else if(command==mRotXCmd) {
790 } else if(command==mRotYCmd) {
793 } else if(command==mRotZCmd) {
796 }
797 }
798 }else{
800 ed << "ERROR: No mesh is currently open. Open/create a mesh first. Command ignored.";
802 }
803 }
804}
std::vector< G4String > G4TokenVec
void RegisterScoringMesh(G4VScoringMesh *scm)
void SetVerboseLevel(G4int vl)
G4VScoreColorMap * GetScoreColorMap(const G4String &mapName)
void DumpAllQuantitiesToFile(const G4String &meshName, const G4String &fileName, const G4String &option="")
G4VScoringMesh * FindMesh(G4VHitsCollection *map)
void SetCurrentMesh(G4VScoringMesh *scm)
void DrawMesh(const G4String &meshName, const G4String &psName, const G4String &colorMapName, G4int axflg=111)
void SetFactor(G4double val=1.0)
G4VScoringMesh * GetCurrentMesh() const
void ListScoreColorMaps()
void DumpQuantityToFile(const G4String &meshName, const G4String &psName, const G4String &fileName, const G4String &option="")
void FillTokenVec(G4String newValues, G4TokenVec &token)
void MeshBinCommand(G4VScoringMesh *mesh, G4TokenVec &token)
void Fill1D(G4UIcommand *cmd, G4String newValues)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
static G4int GetNewIntValue(const char *paramString)
static G4double ValueOf(const char *unitName)
const G4String & GetCommandPath() const
G4double StoD(G4String s)
void SetMinMax(G4double minVal, G4double maxVal)
void SetFloatingMinMax(G4bool vl=true)
MeshShape GetShape() const
void RotateY(G4double delta)
const G4String & GetWorldName() const
void SetCenterPosition(G4double centerPosition[3])
void SetCopyNumberLevel(G4int val)
void RotateX(G4double delta)
void SetSize(G4double size[3])
void RotateZ(G4double delta)