00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include "G4ScoringMessenger.hh"
00032 #include "G4ScoringManager.hh"
00033 #include "G4VScoringMesh.hh"
00034 #include "G4ScoringBox.hh"
00035 #include "G4ScoringCylinder.hh"
00036
00037 #include "G4UIdirectory.hh"
00038 #include "G4UIcmdWithoutParameter.hh"
00039 #include "G4UIcmdWithAnInteger.hh"
00040 #include "G4UIcmdWithAString.hh"
00041 #include "G4UIcmdWithABool.hh"
00042 #include "G4UIcmdWithADoubleAndUnit.hh"
00043 #include "G4UIcmdWith3VectorAndUnit.hh"
00044 #include "G4UIcommand.hh"
00045 #include "G4Tokenizer.hh"
00046 #include "G4UnitsTable.hh"
00047 #include "G4VScoreColorMap.hh"
00048
00049 G4ScoringMessenger::G4ScoringMessenger(G4ScoringManager* SManager)
00050 :fSMan(SManager)
00051 {
00052 G4UIparameter* param;
00053
00054 scoreDir = new G4UIdirectory("/score/");
00055 scoreDir->SetGuidance("Interactive scoring commands.");
00056
00057 listCmd = new G4UIcmdWithoutParameter("/score/list",this);
00058 listCmd->SetGuidance("List scoring worlds.");
00059
00060 dumpCmd = new G4UIcmdWithoutParameter("/score/dump",this);
00061 dumpCmd->SetGuidance("Dump results of scorers.");
00062
00063 verboseCmd = new G4UIcmdWithAnInteger("/score/verbose",this);
00064 verboseCmd->SetGuidance("Verbosity.");
00065 verboseCmd->SetGuidance(" 0) errors or warnings,");
00066 verboseCmd->SetGuidance(" 1) information with 0)");
00067
00068 meshDir = new G4UIdirectory("/score/mesh/");
00069 meshDir->SetGuidance(" Mesh processing commands.");
00070
00071 meshCreateDir = new G4UIdirectory("/score/create/");
00072 meshCreateDir->SetGuidance(" Mesh creation commands.");
00073
00074
00075 meshBoxCreateCmd = new G4UIcmdWithAString("/score/create/boxMesh",this);
00076 meshBoxCreateCmd->SetGuidance("Create scoring box mesh.");
00077 meshBoxCreateCmd->SetParameterName("MeshName",false);
00078
00079 meshCylinderCreateCmd = new G4UIcmdWithAString("/score/create/cylinderMesh",this);
00080 meshCylinderCreateCmd->SetGuidance("Create scoring mesh.");
00081 meshCylinderCreateCmd->SetParameterName("MeshName",false);
00082
00083
00084
00085
00086
00087 meshOpnCmd = new G4UIcmdWithAString("/score/open",this);
00088 meshOpnCmd->SetGuidance("Open scoring mesh.");
00089 meshOpnCmd->SetParameterName("MeshName",false);
00090
00091 meshClsCmd = new G4UIcmdWithoutParameter("/score/close",this);
00092 meshClsCmd->SetGuidance("Close scoring mesh.");
00093
00094
00095
00096
00097
00098 mBoxSizeCmd = new G4UIcmdWith3VectorAndUnit("/score/mesh/boxSize",this);
00099 mBoxSizeCmd->SetGuidance("Define size of the scoring mesh.");
00100 mBoxSizeCmd->SetGuidance("Dx Dy Dz unit");
00101 mBoxSizeCmd->SetParameterName("Di","Dj","Dk",false,false);
00102 mBoxSizeCmd->SetRange("Di>0. && Dj>0. && Dk>0.");
00103 mBoxSizeCmd->SetDefaultUnit("mm");
00104
00105 mCylinderSizeCmd = new G4UIcommand("/score/mesh/cylinderSize",this);
00106 mCylinderSizeCmd->SetGuidance("Define size of the scoring mesh.");
00107 mCylinderSizeCmd->SetGuidance("R Dz unit");
00108 param = new G4UIparameter("R",'d',false);
00109 param->SetParameterRange("R>0");
00110 mCylinderSizeCmd->SetParameter(param);
00111 param = new G4UIparameter("Dz",'d',false);
00112 param->SetParameterRange("Dz>0");
00113 mCylinderSizeCmd->SetParameter(param);
00114 param = new G4UIparameter("unit",'s',true);
00115 param->SetDefaultValue("mm");
00116 mCylinderSizeCmd->SetParameter(param);
00117
00118
00119 mBinCmd = new G4UIcommand("/score/mesh/nBin",this);
00120 mBinCmd->SetGuidance("Define segments of the scoring mesh.");
00121 mBinCmd->SetGuidance("[usage] /score/mesh/nBin");
00122 mBinCmd->SetGuidance(" In case of boxMesh, parameters are given in");
00123 mBinCmd->SetGuidance(" Ni :(int) Number of bins i (in x-axis) ");
00124 mBinCmd->SetGuidance(" Nj :(int) Number of bins j (in y-axis) ");
00125 mBinCmd->SetGuidance(" Nk :(int) Number of bins k (in z-axis) ");
00126 mBinCmd->SetGuidance(" In case of cylinderMesh, parameters are given in");
00127 mBinCmd->SetGuidance(" Nr :(int) Number of bins in radial axis ");
00128 mBinCmd->SetGuidance(" Nz :(int) Number of bins in z axis ");
00129 mBinCmd->SetGuidance(" Nphi:(int) Number of bins in phi axis ");
00130
00131
00132 param = new G4UIparameter("Ni",'i',false);
00133 param->SetDefaultValue("1");
00134 param->SetParameterRange("Ni>0");
00135 mBinCmd->SetParameter(param);
00136 param = new G4UIparameter("Nj",'i',false);
00137 param->SetDefaultValue("1");
00138 param->SetParameterRange("Nj>0");
00139 mBinCmd->SetParameter(param);
00140 param = new G4UIparameter("Nk",'i',false);
00141 param->SetDefaultValue("1");
00142 mBinCmd->SetParameter(param);
00143 param->SetParameterRange("Nk>0");
00144
00145
00146
00147
00148
00149 mTransDir = new G4UIdirectory("/score/mesh/translate/");
00150 mTransDir->SetGuidance("Mesh translation commands.");
00151
00152 mTResetCmd = new G4UIcmdWithoutParameter("/score/mesh/translate/reset",this);
00153 mTResetCmd->SetGuidance("Reset translated position of the scoring mesh.");
00154
00155 mTXyzCmd = new G4UIcmdWith3VectorAndUnit("/score/mesh/translate/xyz",this);
00156 mTXyzCmd->SetGuidance("Translate the scoring mesh.");
00157 mTXyzCmd->SetParameterName("X","Y","Z",false,false);
00158 mTXyzCmd->SetDefaultUnit("mm");
00159
00160 mRotDir = new G4UIdirectory("/score/mesh/rotate/");
00161 mRotDir->SetGuidance("Mesh rotation commands.");
00162
00163 mRResetCmd = new G4UIcmdWithoutParameter("/score/mesh/rotate/reset",this);
00164 mRResetCmd->SetGuidance("Reset rotation angles of the scoring mesh.");
00165
00166 mRotXCmd = new G4UIcmdWithADoubleAndUnit("/score/mesh/rotate/rotateX",this);
00167 mRotXCmd->SetGuidance("Rotate the scoring mesh in X axis.");
00168 mRotXCmd->SetParameterName("Rx",false);
00169 mRotXCmd->SetDefaultUnit("deg");
00170
00171 mRotYCmd = new G4UIcmdWithADoubleAndUnit("/score/mesh/rotate/rotateY",this);
00172 mRotYCmd->SetGuidance("Rotate the scoring mesh in Y axis.");
00173 mRotYCmd->SetParameterName("Ry",false);
00174 mRotYCmd->SetDefaultUnit("deg");
00175
00176 mRotZCmd = new G4UIcmdWithADoubleAndUnit("/score/mesh/rotate/rotateZ",this);
00177 mRotZCmd->SetGuidance("Rotate the scoring mesh in Z axis.");
00178 mRotZCmd->SetParameterName("Rz",false);
00179 mRotZCmd->SetDefaultUnit("deg");
00180
00181
00182
00183 drawCmd = new G4UIcommand("/score/drawProjection",this);
00184 drawCmd->SetGuidance("Draw projection(s) of scored quantities.");
00185 drawCmd->SetGuidance("Parameter <proj> specified which projection(s) to be drawn.");
00186 drawCmd->SetGuidance(" 100 : xy-plane, 010 : yz-plane, 001 : zx-plane -- default 111");
00187 drawCmd->SetGuidance(" 100 : N/A, 010 : z_phi-plane, 001 : r_phi-plane -- default 111");
00188 param = new G4UIparameter("meshName",'s',false);
00189 drawCmd->SetParameter(param);
00190 param = new G4UIparameter("psName",'s',false);
00191 drawCmd->SetParameter(param);
00192 param = new G4UIparameter("colorMapName",'s',true);
00193 param->SetDefaultValue("defaultLinearColorMap");
00194 drawCmd->SetParameter(param);
00195 param = new G4UIparameter("proj",'i',true);
00196 param->SetDefaultValue(111);
00197 drawCmd->SetParameter(param);
00198
00199
00200 drawColumnCmd = new G4UIcommand("/score/drawColumn",this);
00201 drawColumnCmd->SetGuidance("Draw a cell column.");
00202 drawColumnCmd->SetGuidance(" plane = 0 : x-y, 1: y-z, 2: z-x for box mesh");
00203 drawColumnCmd->SetGuidance(" 0 : z-phi, 1: r-phi, 2: r-z for cylinder mesh");
00204 param = new G4UIparameter("meshName",'s',false);
00205 drawColumnCmd->SetParameter(param);
00206 param = new G4UIparameter("psName",'s',false);
00207 drawColumnCmd->SetParameter(param);
00208 param = new G4UIparameter("plane",'i',false);
00209 param->SetParameterRange("plane>=0 && plane<=2");
00210 drawColumnCmd->SetParameter(param);
00211 param = new G4UIparameter("column",'i',false);
00212 drawColumnCmd->SetParameter(param);
00213 param = new G4UIparameter("colorMapName",'s',true);
00214 param->SetDefaultValue("defaultLinearColorMap");
00215 drawColumnCmd->SetParameter(param);
00216
00217 colorMapDir = new G4UIdirectory("/score/colorMap/");
00218 colorMapDir->SetGuidance("Color map commands.");
00219
00220 listColorMapCmd = new G4UIcmdWithoutParameter("/score/colorMap/listScoreColorMaps",this);
00221 listColorMapCmd->SetGuidance("List registered score color maps.");
00222
00223 floatMinMaxCmd = new G4UIcmdWithAString("/score/colorMap/floatMinMax",this);
00224 floatMinMaxCmd->SetGuidance("Min/Max of the color map is calculated accorging to the actual scores.");
00225 floatMinMaxCmd->SetParameterName("colorMapName",true,false);
00226 floatMinMaxCmd->SetDefaultValue("defaultLinearColorMap");
00227
00228 colorMapMinMaxCmd = new G4UIcommand("/score/colorMap/setMinMax",this);
00229 colorMapMinMaxCmd->SetGuidance("Define min/max value of the color map.");
00230 param = new G4UIparameter("colorMapMame",'s',true);
00231 param->SetDefaultValue("defaultLinearColorMap");
00232 colorMapMinMaxCmd->SetParameter(param);
00233 param = new G4UIparameter("minValue",'d',false);
00234 colorMapMinMaxCmd->SetParameter(param);
00235 param = new G4UIparameter("maxValue",'d',false);
00236 colorMapMinMaxCmd->SetParameter(param);
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259 dumpQtyToFileCmd = new G4UIcommand("/score/dumpQuantityToFile", this);
00260 dumpQtyToFileCmd->SetGuidance("Dump one scored quantity to file.");
00261 param = new G4UIparameter("meshName", 's', false);
00262 dumpQtyToFileCmd->SetParameter(param);
00263 param = new G4UIparameter("psName", 's', false);
00264 dumpQtyToFileCmd->SetParameter(param);
00265 param = new G4UIparameter("fileName", 's', false);
00266 dumpQtyToFileCmd->SetParameter(param);
00267 param = new G4UIparameter("option", 's', true);
00268 dumpQtyToFileCmd->SetParameter(param);
00269
00270
00271 dumpAllQtsToFileCmd = new G4UIcommand("/score/dumpAllQuantitiesToFile", this);
00272 dumpAllQtsToFileCmd->SetGuidance("Dump all quantities of the mesh to file.");
00273 param = new G4UIparameter("meshName", 's', false);
00274 dumpAllQtsToFileCmd->SetParameter(param);
00275 param = new G4UIparameter("fileName", 's', false);
00276 dumpAllQtsToFileCmd->SetParameter(param);
00277 param = new G4UIparameter("option", 's', true);
00278 dumpAllQtsToFileCmd->SetParameter(param);
00279
00280 }
00281
00282 G4ScoringMessenger::~G4ScoringMessenger()
00283 {
00284 delete listCmd;
00285 delete verboseCmd;
00286
00287 delete meshCreateDir;
00288 delete meshBoxCreateCmd;
00289 delete meshCylinderCreateCmd;
00290
00291
00292 delete meshOpnCmd;
00293
00294 delete meshClsCmd;
00295
00296 delete meshDir;
00297
00298 delete mBoxSizeCmd;
00299 delete mCylinderSizeCmd;
00300
00301
00302 delete mBinCmd;
00303
00304 delete mTResetCmd;
00305 delete mTXyzCmd;
00306 delete mTransDir;
00307 delete mRResetCmd;
00308 delete mRotXCmd;
00309 delete mRotYCmd;
00310 delete mRotZCmd;
00311 delete mRotDir;
00312
00313 delete chartCmd;
00314 delete dumpCmd;
00315 delete drawCmd;
00316 delete drawColumnCmd;
00317 delete listColorMapCmd;
00318 delete floatMinMaxCmd;
00319 delete colorMapMinMaxCmd;
00320 delete colorMapDir;
00321 delete dumpQtyToFileCmd;
00322 delete dumpAllQtsToFileCmd;
00323
00324 delete scoreDir;
00325 }
00326
00327 void G4ScoringMessenger::SetNewValue(G4UIcommand * command,G4String newVal)
00328 {
00329 if(command==listCmd) {
00330 fSMan->List();
00331 } else if(command==dumpCmd) {
00332 fSMan->Dump();
00333 } else if(command==drawCmd) {
00334 G4Tokenizer next(newVal);
00335 G4String meshName = next();
00336 G4String psName = next();
00337 G4String colorMapName = next();
00338 G4int axflg = StoI(next());
00339 fSMan->DrawMesh(meshName,psName,colorMapName,axflg);
00340 } else if(command==drawColumnCmd) {
00341 G4Tokenizer next(newVal);
00342 G4String meshName = next();
00343 G4String psName = next();
00344 G4int iPlane = StoI(next());
00345 G4int iColumn = StoI(next());
00346 G4String colorMapName = next();
00347 fSMan->DrawMesh(meshName,psName,iPlane,iColumn,colorMapName);
00348 } else if(command==chartCmd ){
00349 G4Tokenizer next(newVal);
00350 G4String meshName = next();
00351 G4String psName = next();
00352
00353 G4String scaleOption = next();
00354
00355
00356 } else if(command==dumpQtyToFileCmd) {
00357 G4Tokenizer next(newVal);
00358 G4String meshName = next();
00359 G4String psName = next();
00360 G4String fileName = next();
00361 G4String option = next("\n");
00362 fSMan->DumpQuantityToFile(meshName, psName, fileName, option);
00363 } else if(command==dumpAllQtsToFileCmd) {
00364 G4Tokenizer next(newVal);
00365 G4String meshName = next();
00366 G4String fileName = next();
00367 G4String option = next("\n");
00368 fSMan->DumpAllQuantitiesToFile(meshName, fileName, option);
00369 } else if(command==verboseCmd) {
00370 fSMan->SetVerboseLevel(verboseCmd->GetNewIntValue(newVal));
00371 } else if(command==meshBoxCreateCmd) {
00372 G4VScoringMesh* currentmesh = fSMan->GetCurrentMesh();
00373 if ( currentmesh ){
00374 G4cerr << "ERROR[" << meshBoxCreateCmd->GetCommandPath()
00375 << "] : Mesh <" << currentmesh->GetWorldName()
00376 << "> is still open. Close it first. Command ignored." << G4endl;
00377 } else {
00378
00379 G4VScoringMesh* mesh = fSMan->FindMesh(newVal);
00380 if ( !mesh ){
00381 mesh = new G4ScoringBox(newVal);
00382 fSMan->RegisterScoringMesh(mesh);
00383 }else{
00384 G4cerr << "ERROR[" << meshBoxCreateCmd->GetCommandPath()
00385 << "] : Scoring mesh <" << newVal
00386 << "> already exists. Command ignored." << G4endl;
00387 }
00388 }
00389 } else if(command==meshCylinderCreateCmd) {
00390 G4VScoringMesh* currentmesh = fSMan->GetCurrentMesh();
00391 if ( currentmesh ){
00392 G4cerr << "ERROR[" << meshBoxCreateCmd->GetCommandPath()
00393 << "] : Mesh <" << currentmesh->GetWorldName()
00394 << "> is still open. Close it first. Command ignored." << G4endl;
00395 } else {
00396
00397 G4VScoringMesh* mesh = fSMan->FindMesh(newVal);
00398 if ( !mesh ){
00399 mesh = new G4ScoringCylinder(newVal);
00400 fSMan->RegisterScoringMesh(mesh);
00401 }else{
00402 G4cerr << "ERROR[" << meshCylinderCreateCmd->GetCommandPath()
00403 << "] : Scoring mesh <" << newVal
00404 << "> already exists. Command ignored." << G4endl;
00405 }
00406 }
00407 } else if(command==listColorMapCmd) {
00408 fSMan->ListScoreColorMaps();
00409 } else if(command==floatMinMaxCmd) {
00410 G4VScoreColorMap* colorMap = fSMan->GetScoreColorMap(newVal);
00411 if(colorMap)
00412 { colorMap->SetFloatingMinMax(true); }
00413 else
00414 { G4cerr << "ERROR[" << floatMinMaxCmd->GetCommandPath()
00415 << "] : color map <" << newVal << "> is not defined. Command ignored."
00416 << G4endl;
00417 }
00418 } else if(command==colorMapMinMaxCmd) {
00419 G4Tokenizer next(newVal);
00420 G4String mapName = next();
00421 G4double minVal = StoD(next());
00422 G4double maxVal = StoD(next());
00423 G4VScoreColorMap* colorMap = fSMan->GetScoreColorMap(mapName);
00424 if(colorMap)
00425 { colorMap->SetFloatingMinMax(false);
00426 colorMap->SetMinMax(minVal,maxVal); }
00427 else
00428 { G4cerr << "ERROR[" << colorMapMinMaxCmd->GetCommandPath()
00429 << "] : color map <" << newVal << "> is not defined. Command ignored."
00430 << G4endl;
00431 }
00432 } else if(command==meshOpnCmd) {
00433 G4VScoringMesh* currentmesh = fSMan->GetCurrentMesh();
00434 if ( currentmesh ){
00435 G4cerr << "ERROR[" << meshOpnCmd->GetCommandPath()
00436 << "] : Mesh <" << currentmesh->GetWorldName() << "> is still open. Close it first. Command ignored." << G4endl;
00437 } else {
00438 G4VScoringMesh* mesh = fSMan->FindMesh(newVal);
00439 if ( !mesh ){
00440 G4cerr << "ERROR[" << meshOpnCmd->GetCommandPath()
00441 << "] : Scoring mesh <" << newVal << "> does not exist. Command ignored." << G4endl;
00442 } else {
00443 fSMan->SetCurrentMesh(mesh);
00444 }
00445 }
00446 } else if(command==meshClsCmd) {
00447 fSMan->CloseCurrentMesh();
00448 } else {
00449
00450
00451
00452 G4VScoringMesh* mesh = fSMan->GetCurrentMesh();
00453
00454
00455 if ( mesh ){
00456
00457 G4TokenVec token;
00458 FillTokenVec(newVal,token);
00459
00460
00461
00462
00463
00464
00465 if(command==mBoxSizeCmd) {
00466 MeshShape shape = mesh->GetShape();
00467 if ( shape == boxMesh ){
00468 G4ThreeVector size = mBoxSizeCmd->GetNew3VectorValue(newVal);
00469 G4double vsize[3];
00470 vsize[0] = size.x();
00471 vsize[1] = size.y();
00472 vsize[2] = size.z();
00473 mesh->SetSize(vsize);
00474 } else {
00475 G4cerr << "ERROR[" << mBoxSizeCmd->GetCommandPath()
00476 << "] : This mesh is not Box. Command ignored." << G4endl;
00477 }
00478 }else if(command==mCylinderSizeCmd) {
00479 MeshShape shape = mesh->GetShape();
00480 if ( shape == cylinderMesh ){
00481 G4double vsize[3];
00482 vsize[0] = StoD(token[0]);
00483 vsize[1] = StoD(token[1]);
00484 G4double unt = mCylinderSizeCmd->ValueOf(token[2]);
00485 vsize[0] *= unt;
00486 vsize[1] *= unt;
00487 vsize[2] = 0.0;
00488 mesh->SetSize(vsize);
00489 } else {
00490 G4cerr << "ERROR[" << mBoxSizeCmd->GetCommandPath()
00491 << "] : This mesh is not Box. Command ignored." << G4endl;
00492 }
00493 } else if(command==mBinCmd) {
00494 MeshBinCommand(mesh,token);
00495 } else if(command==mTResetCmd) {
00496 G4double centerPosition[3] ={ 0., 0., 0.};
00497 mesh->SetCenterPosition(centerPosition);
00498 } else if(command==mTXyzCmd) {
00499 G4ThreeVector xyz = mTXyzCmd->GetNew3VectorValue(newVal);
00500 G4double centerPosition[3];
00501 centerPosition[0] = xyz.x();
00502 centerPosition[1] = xyz.y();
00503 centerPosition[2] = xyz.z();
00504 mesh->SetCenterPosition(centerPosition);
00505 } else if(command==mRResetCmd) {
00506 } else if(command==mRotXCmd) {
00507 G4double value = mRotXCmd->GetNewDoubleValue(newVal);
00508 mesh->RotateX(value);
00509 } else if(command==mRotYCmd) {
00510 G4double value = mRotYCmd->GetNewDoubleValue(newVal);
00511 mesh->RotateY(value);
00512 } else if(command==mRotZCmd) {
00513 G4double value = mRotZCmd->GetNewDoubleValue(newVal);
00514 mesh->RotateZ(value);
00515 }
00516 }else{
00517 G4cerr << "ERROR: No mesh is currently open. Open/create a mesh first. Command ignored." << G4endl;
00518 }
00519 }
00520 }
00521
00522 G4String G4ScoringMessenger::GetCurrentValue(G4UIcommand * command)
00523 {
00524 G4String val;
00525 if(command==verboseCmd)
00526 { val = verboseCmd->ConvertToString(fSMan->GetVerboseLevel()); }
00527
00528 return val;
00529 }
00530
00531 void G4ScoringMessenger::FillTokenVec(G4String newValues, G4TokenVec& token){
00532
00533 G4Tokenizer next(newValues);
00534 G4String val;
00535 while ( !(val = next()).isNull() ) {
00536 token.push_back(val);
00537 }
00538 }
00539
00540
00541 void G4ScoringMessenger::MeshBinCommand(G4VScoringMesh* mesh,G4TokenVec& token){
00542 G4int Ni = StoI(token[0]);
00543 G4int Nj = StoI(token[1]);
00544 G4int Nk = StoI(token[2]);
00545 G4int nSegment[3];
00546
00547 if(dynamic_cast<G4ScoringBox*>(mesh)) {
00548 G4cout << ".... G4ScoringMessenger::MeshBinCommand - G4ScoringBox" << G4endl;
00549 nSegment[0] = Ni;
00550 nSegment[1] = Nj;
00551 nSegment[2] = Nk;
00552 } else if(dynamic_cast<G4ScoringCylinder*>(mesh)) {
00553 G4cout << ".... G4ScoringMessenger::MeshBinCommand - G4ScoringCylinder" << G4endl;
00554 nSegment[0] = Nj;
00555 nSegment[1] = Nk;
00556 nSegment[2] = Ni;
00557 } else {
00558 G4Exception("G4ScoringMessenger::MeshBinCommand()", "001", FatalException, "invalid mesh type");
00559 return;
00560 }
00561
00562 mesh->SetNumberOfSegments(nSegment);
00563 }
00564
00565