Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4ScoringMessenger.cc
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4ScoringMessenger.cc 108220 2018-01-19 15:06:38Z gcosmo $
28 //
29 // ---------------------------------------------------------------------
30 
31 #include "G4ScoringMessenger.hh"
32 #include "G4ScoringManager.hh"
33 #include "G4VScoringMesh.hh"
34 #include "G4ScoringBox.hh"
35 #include "G4ScoringCylinder.hh"
36 
37 #include "G4UIdirectory.hh"
39 #include "G4UIcmdWithAnInteger.hh"
40 #include "G4UIcmdWithAString.hh"
41 #include "G4UIcmdWithABool.hh"
44 #include "G4UIcommand.hh"
45 #include "G4Tokenizer.hh"
46 #include "G4UnitsTable.hh"
47 #include "G4VScoreColorMap.hh"
48 
50 :fSMan(SManager)
51 {
52  G4UIparameter* param;
53 
54  scoreDir = new G4UIdirectory("/score/");
55  scoreDir->SetGuidance("Interactive scoring commands.");
56 
57  listCmd = new G4UIcmdWithoutParameter("/score/list",this);
58  listCmd->SetGuidance("List scoring worlds.");
59 
60  dumpCmd = new G4UIcmdWithoutParameter("/score/dump",this);
61  dumpCmd->SetGuidance("Dump results of scorers.");
62 
63  verboseCmd = new G4UIcmdWithAnInteger("/score/verbose",this);
64  verboseCmd->SetGuidance("Verbosity.");
65  verboseCmd->SetGuidance(" 0) errors or warnings,");
66  verboseCmd->SetGuidance(" 1) information with 0)");
67 
68  meshDir = new G4UIdirectory("/score/mesh/");
69  meshDir->SetGuidance(" Mesh processing commands.");
70 
71  meshCreateDir = new G4UIdirectory("/score/create/");
72  meshCreateDir->SetGuidance(" Mesh creation commands.");
73  //
74  // Mesh commands
75  meshBoxCreateCmd = new G4UIcmdWithAString("/score/create/boxMesh",this);
76  meshBoxCreateCmd->SetGuidance("Create scoring box mesh.");
77  meshBoxCreateCmd->SetParameterName("MeshName",false);
78  //
79  meshCylinderCreateCmd = new G4UIcmdWithAString("/score/create/cylinderMesh",this);
80  meshCylinderCreateCmd->SetGuidance("Create scoring mesh.");
81  meshCylinderCreateCmd->SetParameterName("MeshName",false);
82  //
83 // meshSphereCreateCmd = new G4UIcmdWithAString("/score/create/sphereMesh",this);
84 // meshSphereCreateCmd->SetGuidance("Create scoring mesh.");
85 // meshSphereCreateCmd->SetParameterName("MeshName",false);
86  //
87  meshOpnCmd = new G4UIcmdWithAString("/score/open",this);
88  meshOpnCmd->SetGuidance("Open scoring mesh.");
89  meshOpnCmd->SetParameterName("MeshName",false);
90  //
91  meshClsCmd = new G4UIcmdWithoutParameter("/score/close",this);
92  meshClsCmd->SetGuidance("Close scoring mesh.");
93  //
94 // meshActCmd = new G4UIcmdWithABool("/score/mesh/activate",this);
95 // meshActCmd->SetGuidance("Activate scoring mesh.");
96 // meshActCmd->SetParameterName("MeshName",false);
97  //
98  mBoxSizeCmd = new G4UIcmdWith3VectorAndUnit("/score/mesh/boxSize",this);
99  mBoxSizeCmd->SetGuidance("Define size of the scoring mesh.");
100  mBoxSizeCmd->SetGuidance("Dx Dy Dz unit");
101  mBoxSizeCmd->SetParameterName("Di","Dj","Dk",false,false);
102  mBoxSizeCmd->SetRange("Di>0. && Dj>0. && Dk>0.");
104  //
105  mCylinderSizeCmd = new G4UIcommand("/score/mesh/cylinderSize",this);
106  mCylinderSizeCmd->SetGuidance("Define size of the scoring mesh.");
107  mCylinderSizeCmd->SetGuidance("R Dz unit");
108  param = new G4UIparameter("R",'d',false);
109  param->SetParameterRange("R>0");
111  param = new G4UIparameter("Dz",'d',false);
112  param->SetParameterRange("Dz>0");
114  param = new G4UIparameter("unit",'s',true);
115  param->SetDefaultValue("mm");
117  //
118  // Division command
119  mBinCmd = new G4UIcommand("/score/mesh/nBin",this);
120  mBinCmd->SetGuidance("Define segments of the scoring mesh.");
121  mBinCmd->SetGuidance("[usage] /score/mesh/nBin");
122  mBinCmd->SetGuidance(" In case of boxMesh, parameters are given in");
123  mBinCmd->SetGuidance(" Ni :(int) Number of bins i (in x-axis) ");
124  mBinCmd->SetGuidance(" Nj :(int) Number of bins j (in y-axis) ");
125  mBinCmd->SetGuidance(" Nk :(int) Number of bins k (in z-axis) ");
126  mBinCmd->SetGuidance(" In case of cylinderMesh, parameters are given in");
127  mBinCmd->SetGuidance(" Nr :(int) Number of bins in radial axis ");
128  mBinCmd->SetGuidance(" Nz :(int) Number of bins in z axis ");
129  mBinCmd->SetGuidance(" Nphi:(int) Number of bins in phi axis ");
130  //mBinCmd->SetGuidance(" Axis:(int) Axis of division ");
131 // mBinCmd->SetGuidance(" P1..Pn-1 :(double) \"paramter from P1 to Pn-1 for division.\"");
132  param = new G4UIparameter("Ni",'i',false);
133  param->SetDefaultValue("1");
134  param->SetParameterRange("Ni>0");
135  mBinCmd->SetParameter(param);
136  param = new G4UIparameter("Nj",'i',false);
137  param->SetDefaultValue("1");
138  param->SetParameterRange("Nj>0");
139  mBinCmd->SetParameter(param);
140  param = new G4UIparameter("Nk",'i',false);
141  param->SetDefaultValue("1");
142  mBinCmd->SetParameter(param);
143  param->SetParameterRange("Nk>0");
144  //param = new G4UIparameter("Axis",'i',true);
145  //param->SetDefaultValue("3");
146  //mBinCmd->SetParameter(param);
147  //
148  // Placement command
149  mTransDir = new G4UIdirectory("/score/mesh/translate/");
150  mTransDir->SetGuidance("Mesh translation commands.");
151  //
152  mTResetCmd = new G4UIcmdWithoutParameter("/score/mesh/translate/reset",this);
153  mTResetCmd->SetGuidance("Reset translated position of the scoring mesh.");
154  //
155  mTXyzCmd = new G4UIcmdWith3VectorAndUnit("/score/mesh/translate/xyz",this);
156  mTXyzCmd->SetGuidance("Translate the scoring mesh.");
157  mTXyzCmd->SetParameterName("X","Y","Z",false,false);
158  mTXyzCmd->SetDefaultUnit("mm");
159  //
160  mRotDir = new G4UIdirectory("/score/mesh/rotate/");
161  mRotDir->SetGuidance("Mesh rotation commands.");
162  //
163  mRResetCmd = new G4UIcmdWithoutParameter("/score/mesh/rotate/reset",this);
164  mRResetCmd->SetGuidance("Reset rotation angles of the scoring mesh.");
165  //
166  mRotXCmd = new G4UIcmdWithADoubleAndUnit("/score/mesh/rotate/rotateX",this);
167  mRotXCmd->SetGuidance("Rotate the scoring mesh in X axis.");
168  mRotXCmd->SetParameterName("Rx",false);
169  mRotXCmd->SetDefaultUnit("deg");
170  //
171  mRotYCmd = new G4UIcmdWithADoubleAndUnit("/score/mesh/rotate/rotateY",this);
172  mRotYCmd->SetGuidance("Rotate the scoring mesh in Y axis.");
173  mRotYCmd->SetParameterName("Ry",false);
174  mRotYCmd->SetDefaultUnit("deg");
175  //
176  mRotZCmd = new G4UIcmdWithADoubleAndUnit("/score/mesh/rotate/rotateZ",this);
177  mRotZCmd->SetGuidance("Rotate the scoring mesh in Z axis.");
178  mRotZCmd->SetParameterName("Rz",false);
179  mRotZCmd->SetDefaultUnit("deg");
180  //
181 
182  // Draw Scoring result
183  drawCmd = new G4UIcommand("/score/drawProjection",this);
184  drawCmd->SetGuidance("Draw projection(s) of scored quantities.");
185  drawCmd->SetGuidance("Parameter <proj> specified which projection(s) to be drawn.");
186  drawCmd->SetGuidance(" 100 : xy-plane, 010 : yz-plane, 001 : zx-plane -- default 111");
187  drawCmd->SetGuidance(" 100 : N/A, 010 : z_phi-plane, 001 : r_phi-plane -- default 111");
188  param = new G4UIparameter("meshName",'s',false);
189  drawCmd->SetParameter(param);
190  param = new G4UIparameter("psName",'s',false);
191  drawCmd->SetParameter(param);
192  param = new G4UIparameter("colorMapName",'s',true);
193  param->SetDefaultValue("defaultLinearColorMap");
194  drawCmd->SetParameter(param);
195  param = new G4UIparameter("proj",'i',true);
196  param->SetDefaultValue(111);
197  drawCmd->SetParameter(param);
198  drawCmd->SetToBeBroadcasted(false);
199 
200  // Draw column
201  drawColumnCmd = new G4UIcommand("/score/drawColumn",this);
202  drawColumnCmd->SetGuidance("Draw a cell column.");
203  drawColumnCmd->SetGuidance(" plane = 0 : x-y, 1: y-z, 2: z-x for box mesh");
204  drawColumnCmd->SetGuidance(" 0 : z-phi, 1: r-phi, 2: r-z for cylinder mesh");
205  param = new G4UIparameter("meshName",'s',false);
206  drawColumnCmd->SetParameter(param);
207  param = new G4UIparameter("psName",'s',false);
208  drawColumnCmd->SetParameter(param);
209  param = new G4UIparameter("plane",'i',false);
210  param->SetParameterRange("plane>=0 && plane<=2");
211  drawColumnCmd->SetParameter(param);
212  param = new G4UIparameter("column",'i',false);
213  drawColumnCmd->SetParameter(param);
214  param = new G4UIparameter("colorMapName",'s',true);
215  param->SetDefaultValue("defaultLinearColorMap");
216  drawColumnCmd->SetParameter(param);
218 
219  colorMapDir = new G4UIdirectory("/score/colorMap/");
220  colorMapDir->SetGuidance("Color map commands.");
221 
222  listColorMapCmd = new G4UIcmdWithoutParameter("/score/colorMap/listScoreColorMaps",this);
223  listColorMapCmd->SetGuidance("List registered score color maps.");
225 
226  floatMinMaxCmd = new G4UIcmdWithAString("/score/colorMap/floatMinMax",this);
227  floatMinMaxCmd->SetGuidance("Min/Max of the color map is calculated accorging to the actual scores.");
228  floatMinMaxCmd->SetParameterName("colorMapName",true,false);
229  floatMinMaxCmd->SetDefaultValue("defaultLinearColorMap");
231 
232  colorMapMinMaxCmd = new G4UIcommand("/score/colorMap/setMinMax",this);
233  colorMapMinMaxCmd->SetGuidance("Define min/max value of the color map.");
234  param = new G4UIparameter("colorMapMame",'s',true);
235  param->SetDefaultValue("defaultLinearColorMap");
237  param = new G4UIparameter("minValue",'d',false);
239  param = new G4UIparameter("maxValue",'d',false);
242 
243  /*
244  chartCmd = new G4UIcommand("/score/drawChart",this);
245  chartCmd->SetGuidance("Draw color chart on the screen.");
246  chartCmd->SetGuidance("[usage] /score/drawChart");
247  chartCmd->SetGuidance(" mesh :(String) Mesh name.");
248  chartCmd->SetGuidance(" psname :(String) PS name.");
249  chartCmd->SetGuidance(" On/Off :(boolean) On or Off the color chart.");
250  chartCmd->SetGuidance(" scale :(String) default=linear, or log ");
251  param = new G4UIparameter("meshName",'s',false);
252  chartCmd->SetParameter(param);
253  param = new G4UIparameter("psName",'s',false);
254  chartCmd->SetParameter(param);
255  param = new G4UIparameter("On",'s',true);
256  param->SetDefaultValue("true");
257  chartCmd->SetParameter(param);
258  param = new G4UIparameter("scale",'s',true);
259  param->SetDefaultValue("linear");
260  chartCmd->SetParameter(param);
261  */
262 
263  // Dump a scored quantity
264  dumpQtyToFileCmd = new G4UIcommand("/score/dumpQuantityToFile", this);
265  dumpQtyToFileCmd->SetGuidance("Dump one scored quantity to file.");
266  param = new G4UIparameter("meshName", 's', false);
268  param = new G4UIparameter("psName", 's', false);
270  param = new G4UIparameter("fileName", 's', false);
272  param = new G4UIparameter("option", 's', true);
275 
276  // Dump all scored quantities
277  dumpAllQtsToFileCmd = new G4UIcommand("/score/dumpAllQuantitiesToFile", this);
278  dumpAllQtsToFileCmd->SetGuidance("Dump all quantities of the mesh to file.");
279  param = new G4UIparameter("meshName", 's', false);
281  param = new G4UIparameter("fileName", 's', false);
283  param = new G4UIparameter("option", 's', true);
286 
287 }
288 
290 {
291  delete listCmd;
292  delete verboseCmd;
293  //
294  delete meshCreateDir;
295  delete meshBoxCreateCmd;
296  delete meshCylinderCreateCmd;
297 // delete meshSphereCreateCmd;
298  //
299  delete meshOpnCmd;
300  //
301  delete meshClsCmd;
302 // delete meshActCmd;
303  delete meshDir;
304  //
305  delete mBoxSizeCmd;
306  delete mCylinderSizeCmd;
307 // delete mSphereSizeCmd;
308  //
309  delete mBinCmd;
310  //
311  delete mTResetCmd;
312  delete mTXyzCmd;
313  delete mTransDir;
314  delete mRResetCmd;
315  delete mRotXCmd;
316  delete mRotYCmd;
317  delete mRotZCmd;
318  delete mRotDir;
319  //
320  //delete chartCmd;
321  delete dumpCmd;
322  delete drawCmd;
323  delete drawColumnCmd;
324  delete listColorMapCmd;
325  delete floatMinMaxCmd;
326  delete colorMapMinMaxCmd;
327  delete colorMapDir;
328  delete dumpQtyToFileCmd;
329  delete dumpAllQtsToFileCmd;
330  //
331  delete scoreDir;
332 }
333 
335 {
336  if(command==listCmd) {
337  fSMan->List();
338  } else if(command==dumpCmd) {
339  fSMan->Dump();
340  } else if(command==drawCmd) {
341  G4Tokenizer next(newVal);
342  G4String meshName = next();
343  G4String psName = next();
344  G4String colorMapName = next();
345  G4int axflg = StoI(next());
346  fSMan->DrawMesh(meshName,psName,colorMapName,axflg);
347  } else if(command==drawColumnCmd) {
348  G4Tokenizer next(newVal);
349  G4String meshName = next();
350  G4String psName = next();
351  G4int iPlane = StoI(next());
352  G4int iColumn = StoI(next());
353  G4String colorMapName = next();
354  fSMan->DrawMesh(meshName,psName,iPlane,iColumn,colorMapName);
355 // } else if(command==chartCmd ){
356 // G4Tokenizer next(newVal);
357 // G4String meshName = next();
358 // G4String psName = next();
359 // //G4bool onFlag = StoB(next());
360 // G4String scaleOption = next();
361 // fSMan->DrawChart(meshName,psName,onFlag,scaleOption);
362 
363  } else if(command==dumpQtyToFileCmd) {
364  G4Tokenizer next(newVal);
365  G4String meshName = next();
366  G4String psName = next();
367  G4String fileName = next();
368  G4String option = next("\n");
369  fSMan->DumpQuantityToFile(meshName, psName, fileName, option);
370  } else if(command==dumpAllQtsToFileCmd) {
371  G4Tokenizer next(newVal);
372  G4String meshName = next();
373  G4String fileName = next();
374  G4String option = next("\n");
375  fSMan->DumpAllQuantitiesToFile(meshName, fileName, option);
376  } else if(command==verboseCmd) {
378  } else if(command==meshBoxCreateCmd) {
379  G4VScoringMesh* currentmesh = fSMan->GetCurrentMesh();
380  if ( currentmesh ){
382  ed << "ERROR[" << meshBoxCreateCmd->GetCommandPath()
383  << "] : Mesh <" << currentmesh->GetWorldName()
384  << "> is still open. Close it first. Command ignored.";
385  command->CommandFailed(ed);
386  } else {
387 
388  G4VScoringMesh* mesh = fSMan->FindMesh(newVal);
389  if ( !mesh ){
390  mesh = new G4ScoringBox(newVal);
391  fSMan->RegisterScoringMesh(mesh);
392  }else{
394  ed << "ERROR[" << meshBoxCreateCmd->GetCommandPath()
395  << "] : Scoring mesh <" << newVal
396  << "> already exists. Command ignored.";
397  command->CommandFailed(ed);
398  }
399  }
400  } else if(command==meshCylinderCreateCmd) {
401  G4VScoringMesh* currentmesh = fSMan->GetCurrentMesh();
402  if ( currentmesh ){
404  ed << "ERROR[" << meshCylinderCreateCmd->GetCommandPath()
405  << "] : Mesh <" << currentmesh->GetWorldName()
406  << "> is still open. Close it first. Command ignored.";
407  command->CommandFailed(ed);
408  } else {
409 
410  G4VScoringMesh* mesh = fSMan->FindMesh(newVal);
411  if ( !mesh ){
412  mesh = new G4ScoringCylinder(newVal);
413  fSMan->RegisterScoringMesh(mesh);
414  }else{
416  ed << "ERROR[" << meshCylinderCreateCmd->GetCommandPath()
417  << "] : Scoring mesh <" << newVal
418  << "> already exists. Command ignored.";
419  command->CommandFailed(ed);
420  }
421  }
422  } else if(command==listColorMapCmd) {
424  } else if(command==floatMinMaxCmd) {
425  G4VScoreColorMap* colorMap = fSMan->GetScoreColorMap(newVal);
426  if(colorMap)
427  { colorMap->SetFloatingMinMax(true); }
428  else
429  {
431  ed << "ERROR[" << floatMinMaxCmd->GetCommandPath()
432  << "] : color map <" << newVal << "> is not defined. Command ignored." ;
433  command->CommandFailed(ed);
434  }
435  } else if(command==colorMapMinMaxCmd) {
436  G4Tokenizer next(newVal);
437  G4String mapName = next();
438  G4double minVal = StoD(next());
439  G4double maxVal = StoD(next());
440  G4VScoreColorMap* colorMap = fSMan->GetScoreColorMap(mapName);
441  if(colorMap)
442  { colorMap->SetFloatingMinMax(false);
443  colorMap->SetMinMax(minVal,maxVal); }
444  else
445  {
447  ed << "ERROR[" << colorMapMinMaxCmd->GetCommandPath()
448  << "] : color map <" << newVal << "> is not defined. Command ignored."
449  << G4endl;
450  command->CommandFailed(ed);
451  }
452  } else if(command==meshOpnCmd) {
453  G4VScoringMesh* currentmesh = fSMan->GetCurrentMesh();
454  if ( currentmesh ){
456  ed << "ERROR[" << meshOpnCmd->GetCommandPath()
457  << "] : Mesh <" << currentmesh->GetWorldName()
458  << "> is still open. Close it first. Command ignored.";
459  command->CommandFailed(ed);
460  } else {
461  G4VScoringMesh* mesh = fSMan->FindMesh(newVal);
462  if ( !mesh ){
464  ed << "ERROR[" << meshOpnCmd->GetCommandPath()
465  << "] : Scoring mesh <" << newVal << "> does not exist. Command ignored.";
466  command->CommandFailed(ed);
467  } else {
468  fSMan->SetCurrentMesh(mesh);
469  }
470  }
471  } else if(command==meshClsCmd) {
473  } else {
474  //
475  // Get Current Mesh
476  //
478  //
479  // Commands for Current Mesh
480  if ( mesh ){
481  // Tokens
482  G4TokenVec token;
483  FillTokenVec(newVal,token);
484  //
485  // Mesh Geometry
486  //
487 // if(command==meshActCmd) {
488 // mesh->Activate(meshActCmd->GetNewBoolValue(newVal));
489 // } else
490  if(command==mBoxSizeCmd) {
491  MeshShape shape = mesh->GetShape();
492  if ( shape == boxMesh ){
494  G4double vsize[3];
495  vsize[0] = size.x();
496  vsize[1] = size.y();
497  vsize[2] = size.z();
498  mesh->SetSize(vsize);
499  } else {
501  ed << "ERROR[" << mBoxSizeCmd->GetCommandPath()
502  << "] : This mesh is not Box. Command ignored.";
503  command->CommandFailed(ed);
504  }
505  }else if(command==mCylinderSizeCmd) {
506  MeshShape shape = mesh->GetShape();
507  if ( shape == cylinderMesh ){
508  G4double vsize[3];
509  vsize[0] = StoD(token[0]);
510  vsize[1] = StoD(token[1]);
511  G4double unt = mCylinderSizeCmd->ValueOf(token[2]);
512  vsize[0] *= unt;
513  vsize[1] *= unt;
514  vsize[2] = 0.0;
515  mesh->SetSize(vsize);
516  } else {
518  ed << "ERROR[" << mBoxSizeCmd->GetCommandPath()
519  << "] : This mesh is not Box. Command ignored.";
520  command->CommandFailed(ed);
521  }
522  } else if(command==mBinCmd) {
523  MeshBinCommand(mesh,token);
524  } else if(command==mTResetCmd) {
525  G4double centerPosition[3] ={ 0., 0., 0.};
526  mesh->SetCenterPosition(centerPosition);
527  } else if(command==mTXyzCmd) {
529  G4double centerPosition[3];
530  centerPosition[0] = xyz.x();
531  centerPosition[1] = xyz.y();
532  centerPosition[2] = xyz.z();
533  mesh->SetCenterPosition(centerPosition);
534  } else if(command==mRResetCmd) {
535  } else if(command==mRotXCmd) {
537  mesh->RotateX(value);
538  } else if(command==mRotYCmd) {
540  mesh->RotateY(value);
541  } else if(command==mRotZCmd) {
543  mesh->RotateZ(value);
544  }
545  }else{
547  ed << "ERROR: No mesh is currently open. Open/create a mesh first. Command ignored.";
548  command->CommandFailed(ed);
549  }
550  }
551 }
552 
554 {
555  G4String val;
556  if(command==verboseCmd)
558 
559  return val;
560 }
561 
563 
564  G4Tokenizer next(newValues);
565  G4String val;
566  while ( !(val = next()).isNull() ) { // Loop checking 12.18.2015 M.Asai
567  token.push_back(val);
568  }
569 }
570 
571 
573  G4int Ni = StoI(token[0]);
574  G4int Nj = StoI(token[1]);
575  G4int Nk = StoI(token[2]);
576  G4int nSegment[3];
577 
578  if(dynamic_cast<G4ScoringBox*>(mesh)) {
579  G4cout << ".... G4ScoringMessenger::MeshBinCommand - G4ScoringBox" << G4endl;
580  nSegment[0] = Ni;
581  nSegment[1] = Nj;
582  nSegment[2] = Nk;
583  } else if(dynamic_cast<G4ScoringCylinder*>(mesh)) {
584  G4cout << ".... G4ScoringMessenger::MeshBinCommand - G4ScoringCylinder" << G4endl;
585  nSegment[0] = Nj;
586  nSegment[1] = Nk;
587  nSegment[2] = Ni;
588  } else {
589  G4Exception("G4ScoringMessenger::MeshBinCommand()", "001", FatalException, "invalid mesh type");
590  return;
591  }
592  //
593  mesh->SetNumberOfSegments(nSegment);
594 }
595 
596 
static G4double ValueOf(const char *unitName)
Definition: G4UIcommand.cc:311
G4UIcommand * drawColumnCmd
G4int StoI(G4String s)
G4UIdirectory * meshDir
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
G4UIcmdWithADoubleAndUnit * mRotZCmd
void SetCurrentMesh(G4VScoringMesh *scm)
void List() const
G4UIcommand * mCylinderSizeCmd
void CommandFailed(G4int errCode, G4ExceptionDescription &ed)
Definition: G4UIcommand.hh:202
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:45
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetNumberOfSegments(G4int nSegment[3])
G4UIcmdWithADoubleAndUnit * mRotYCmd
G4UIcmdWithoutParameter * dumpCmd
G4ScoringManager * fSMan
const G4String & GetWorldName() const
G4UIcmdWithAString * meshBoxCreateCmd
G4UIdirectory * mRotDir
#define G4endl
Definition: G4ios.hh:61
G4VScoreColorMap * GetScoreColorMap(const G4String &mapName)
void SetVerboseLevel(G4int vl)
std::vector< G4String > G4TokenVec
void RotateY(G4double delta)
double z() const
G4String GetCurrentValue(G4UIcommand *command)
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetDefaultValue(const char *defVal)
MeshShape GetShape() const
G4UIcmdWithAString * meshOpnCmd
G4UIdirectory * scoreDir
void SetParameterRange(const char *theRange)
G4int GetVerboseLevel() const
void SetParameter(G4UIparameter *const newParameter)
Definition: G4UIcommand.hh:152
void DrawMesh(const G4String &meshName, const G4String &psName, const G4String &colorMapName, G4int axflg=111)
void RotateZ(G4double delta)
G4VScoringMesh * GetCurrentMesh() const
G4UIdirectory * meshCreateDir
void SetDefaultValue(const char *theDefaultValue)
static G4double GetNewDoubleValue(const char *paramString)
void DumpAllQuantitiesToFile(const G4String &meshName, const G4String &fileName, const G4String &option="")
double G4double
Definition: G4Types.hh:76
G4UIcommand * dumpQtyToFileCmd
const XML_Char int const XML_Char * value
Definition: expat.h:331
G4UIcmdWithoutParameter * mTResetCmd
MeshShape
G4UIcmdWithAnInteger * verboseCmd
void MeshBinCommand(G4VScoringMesh *mesh, G4TokenVec &token)
G4UIcommand * colorMapMinMaxCmd
G4UIcmdWithAString * floatMinMaxCmd
const G4String & GetCommandPath() const
Definition: G4UIcommand.hh:139
G4UIdirectory * mTransDir
G4UIcmdWithADoubleAndUnit * mRotXCmd
G4UIcmdWith3VectorAndUnit * mBoxSizeCmd
G4UIcmdWithoutParameter * meshClsCmd
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:374
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.hh:65
void SetSize(G4double size[3])
int G4int
Definition: G4Types.hh:78
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIdirectory * colorMapDir
static G4int GetNewIntValue(const char *paramString)
G4double StoD(G4String s)
G4UIcmdWithoutParameter * mRResetCmd
G4GLOB_DLL std::ostream G4cout
double x() const
G4UIcmdWithoutParameter * listCmd
void DumpQuantityToFile(const G4String &meshName, const G4String &psName, const G4String &fileName, const G4String &option="")
G4ScoringMessenger(G4ScoringManager *SManager)
void Dump() const
G4UIcmdWith3VectorAndUnit * mTXyzCmd
void SetCenterPosition(G4double centerPosition[3])
void FillTokenVec(G4String newValues, G4TokenVec &token)
double y() const
void SetDefaultUnit(const char *defUnit)
G4UIcmdWithoutParameter * listColorMapCmd
static G4ThreeVector GetNew3VectorValue(const char *paramString)
G4VScoringMesh * FindMesh(G4VHitsCollection *map)
void SetNewValue(G4UIcommand *command, G4String newValues)
G4UIcmdWithAString * meshCylinderCreateCmd
void RotateX(G4double delta)
G4UIcommand * dumpAllQtsToFileCmd
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
void SetFloatingMinMax(G4bool vl=true)
void SetToBeBroadcasted(G4bool val)
Definition: G4UIcommand.hh:184
void RegisterScoringMesh(G4VScoringMesh *scm)
void SetMinMax(G4double minVal, G4double maxVal)
void SetDefaultUnit(const char *defUnit)