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
00032
00033
00034
00035
00036 #include "G4ScoreQuantityMessenger.hh"
00037 #include "G4ScoringManager.hh"
00038 #include "G4VScoringMesh.hh"
00039
00040 #include "G4PSCellCharge3D.hh"
00041 #include "G4PSCellFlux3D.hh"
00042 #include "G4PSPassageCellFlux3D.hh"
00043 #include "G4PSEnergyDeposit3D.hh"
00044 #include "G4PSDoseDeposit3D.hh"
00045 #include "G4PSNofStep3D.hh"
00046 #include "G4PSNofSecondary3D.hh"
00047
00048 #include "G4PSTrackLength3D.hh"
00049 #include "G4PSPassageCellCurrent3D.hh"
00050 #include "G4PSPassageTrackLength3D.hh"
00051 #include "G4PSFlatSurfaceCurrent3D.hh"
00052 #include "G4PSFlatSurfaceFlux3D.hh"
00053 #include "G4PSSphereSurfaceCurrent3D.hh"
00054 #include "G4PSSphereSurfaceFlux3D.hh"
00055 #include "G4PSCylinderSurfaceCurrent3D.hh"
00056 #include "G4PSCylinderSurfaceFlux3D.hh"
00057 #include "G4PSNofCollision3D.hh"
00058 #include "G4PSPopulation3D.hh"
00059 #include "G4PSTrackCounter3D.hh"
00060 #include "G4PSTermination3D.hh"
00061
00062 #include "G4SDChargedFilter.hh"
00063 #include "G4SDNeutralFilter.hh"
00064 #include "G4SDKineticEnergyFilter.hh"
00065 #include "G4SDParticleFilter.hh"
00066 #include "G4SDParticleWithEnergyFilter.hh"
00067
00068 #include "G4UIdirectory.hh"
00069 #include "G4UIcmdWithoutParameter.hh"
00070 #include "G4UIcmdWithAnInteger.hh"
00071 #include "G4UIcmdWithAString.hh"
00072 #include "G4UIcmdWithABool.hh"
00073 #include "G4UIcmdWithADoubleAndUnit.hh"
00074 #include "G4UIcmdWith3VectorAndUnit.hh"
00075 #include "G4UIcommand.hh"
00076 #include "G4Tokenizer.hh"
00077 #include "G4UnitsTable.hh"
00078
00079 void G4ScoreQuantityMessenger::QuantityCommands()
00080 {
00081 G4UIparameter* param;
00082
00083
00084
00085 quantityDir = new G4UIdirectory("/score/quantity/");
00086 quantityDir->SetGuidance("Scoring quantity of the mesh.");
00087
00088 qTouchCmd= new G4UIcmdWithAString("/score/quantity/touch",this);
00089 qTouchCmd->SetGuidance("Assign previously defined quantity to the current quantity.");
00090 qTouchCmd->SetParameterName("qname",false);
00091
00092 qGetUnitCmd = new G4UIcmdWithoutParameter("/score/quantity/get/unit",this);
00093 qGetUnitCmd->SetGuidance("Print output unit of the current quantity.");
00094
00095 qSetUnitCmd = new G4UIcmdWithAString("/score/quantity/set/unit",this);
00096 qSetUnitCmd->SetGuidance("Set output unit of the current quantity.");
00097 qSetUnitCmd->SetParameterName("unit",false);
00098
00099
00100 qeDepCmd = new G4UIcommand("/score/quantity/energyDeposit",this);
00101 qeDepCmd->SetGuidance("Energy deposit scorer.");
00102 qeDepCmd->
00103 SetGuidance("[usage] /score/quantiy/energyDeposit qname unit");
00104 qeDepCmd->SetGuidance(" qname :(String) scorer name");
00105 qeDepCmd->SetGuidance(" unit :(String) unit");
00106 param = new G4UIparameter("qname",'s',false);
00107 qeDepCmd->SetParameter(param);
00108 param = new G4UIparameter("unit",'s',true);
00109 param->SetDefaultValue("MeV");
00110 qeDepCmd->SetParameter(param);
00111
00112 qCellChgCmd = new G4UIcommand("/score/quantity/cellCharge",this);
00113 qCellChgCmd->SetGuidance("Cell charge scorer.");
00114 qCellChgCmd->
00115 SetGuidance("[usage] /score/quantiy/cellCharge qname unit");
00116 qCellChgCmd->SetGuidance(" qname :(String) scorer name");
00117 qCellChgCmd->SetGuidance(" unit :(String) unit");
00118 param = new G4UIparameter("qname",'s',false);
00119 qCellChgCmd->SetParameter(param);
00120 param = new G4UIparameter("unit",'s',true);
00121 param->SetDefaultValue("e+");
00122 qCellChgCmd->SetParameter(param);
00123
00124 qCellFluxCmd = new G4UIcommand("/score/quantity/cellFlux",this);
00125 qCellFluxCmd->SetGuidance("Cell flux scorer.");
00126 qCellFluxCmd->
00127 SetGuidance("[usage] /score/quantiy/cellFlux qname unit");
00128 qCellFluxCmd->SetGuidance(" qname :(String) scorer name");
00129 qCellFluxCmd->SetGuidance(" unit :(String) unit");
00130 param = new G4UIparameter("qname",'s',false);
00131 qCellFluxCmd->SetParameter(param);
00132 param = new G4UIparameter("unit",'s',true);
00133 param->SetDefaultValue("percm2");
00134 qCellFluxCmd->SetParameter(param);
00135
00136 qPassCellFluxCmd = new G4UIcommand("/score/quantity/passageCellFlux",this);
00137 qPassCellFluxCmd->SetGuidance("Passage cell flux scorer");
00138 qPassCellFluxCmd->
00139 SetGuidance("[usage] /score/quantiy/passageCellFlux qname unit");
00140 qPassCellFluxCmd->SetGuidance(" qname :(String) scorer name");
00141 qPassCellFluxCmd->SetGuidance(" unit :(String) unit");
00142 param = new G4UIparameter("qname",'s',false);
00143 qPassCellFluxCmd->SetParameter(param);
00144 param = new G4UIparameter("unit",'s',true);
00145 param->SetDefaultValue("percm2");
00146 qPassCellFluxCmd->SetParameter(param);
00147
00148 qdoseDepCmd = new G4UIcommand("/score/quantity/doseDeposit",this);
00149 qdoseDepCmd->SetGuidance("Dose deposit scorer.");
00150 qdoseDepCmd->
00151 SetGuidance("[usage] /score/quantiy/doseDeposit qname unit");
00152 qdoseDepCmd->SetGuidance(" qname :(String) scorer name");
00153 qdoseDepCmd->SetGuidance(" unit :(String) unit");
00154 param = new G4UIparameter("qname",'s',false);
00155 qdoseDepCmd->SetParameter(param);
00156 param = new G4UIparameter("unit",'s',true);
00157 param->SetDefaultValue("Gy");
00158 qdoseDepCmd->SetParameter(param);
00159
00160 qnOfStepCmd = new G4UIcommand("/score/quantity/nOfStep",this);
00161 qnOfStepCmd->SetGuidance("Number of step scorer.");
00162 qnOfStepCmd->
00163 SetGuidance("[usage] /score/quantiy/nOfStep qname");
00164 qnOfStepCmd->SetGuidance(" qname :(String) scorer name");
00165 param = new G4UIparameter("qname",'s',false);
00166 qnOfStepCmd->SetParameter(param);
00167
00168 qnOfSecondaryCmd = new G4UIcommand("/score/quantity/nOfSecondary",this);
00169 qnOfSecondaryCmd->SetGuidance("Number of secondary scorer.");
00170 qnOfSecondaryCmd->
00171 SetGuidance("[usage] /score/quantiy/nOfSecondary qname");
00172 qnOfSecondaryCmd->SetGuidance(" qname :(String) scorer name");
00173 param = new G4UIparameter("qname",'s',false);
00174 qnOfSecondaryCmd->SetParameter(param);
00175
00176 qTrackLengthCmd = new G4UIcommand("/score/quantity/trackLength",this);
00177 qTrackLengthCmd->SetGuidance("Track length scorer.");
00178 qTrackLengthCmd->
00179 SetGuidance("[usage] /score/quantiy/trackLength qname wflag kflag vflag unit");
00180 qTrackLengthCmd->SetGuidance(" qname :(String) scorer name");
00181 qTrackLengthCmd->SetGuidance(" wflag :(Bool) weighted");
00182 qTrackLengthCmd->SetGuidance(" kflag :(Bool) multiply kinetic energy");
00183 qTrackLengthCmd->SetGuidance(" vflag :(Bool) divide by velocity");
00184 qTrackLengthCmd->SetGuidance(" unit :(String) unit");
00185 param = new G4UIparameter("qname",'s',false);
00186 qTrackLengthCmd->SetParameter(param);
00187 param = new G4UIparameter("wflag",'b',true);
00188 param->SetDefaultValue("false");
00189 qTrackLengthCmd->SetParameter(param);
00190 param = new G4UIparameter("kflag",'b',true);
00191 param->SetDefaultValue("false");
00192 qTrackLengthCmd->SetParameter(param);
00193 param = new G4UIparameter("vflag",'b',true);
00194 param->SetDefaultValue("false");
00195 qTrackLengthCmd->SetParameter(param);
00196 param = new G4UIparameter("unit",'s',true);
00197 param->SetDefaultValue("mm");
00198 qTrackLengthCmd->SetParameter(param);
00199
00200 qPassCellCurrCmd = new G4UIcommand("/score/quantity/passageCellCurrent",this);
00201 qPassCellCurrCmd->SetGuidance("Passage cell current scorer.");
00202 qPassCellCurrCmd->
00203 SetGuidance("[usage] /score/quantiy/passageCellCurrent qname wflag");
00204
00205 qPassCellCurrCmd->SetGuidance(" qname :(String) scorer name");
00206 qPassCellCurrCmd->SetGuidance(" wflag :(Bool) weighted");
00207
00208 param = new G4UIparameter("qname",'s',false);
00209 qPassCellCurrCmd->SetParameter(param);
00210 param = new G4UIparameter("wflag",'b',true);
00211 param->SetDefaultValue("true");
00212 qPassCellCurrCmd->SetParameter(param);
00213
00214
00215
00216
00217 qPassTrackLengthCmd = new G4UIcommand("/score/quantity/passageTrackLength",this);
00218 qPassTrackLengthCmd->SetGuidance("Passage track length scorer.");
00219 qPassTrackLengthCmd->
00220 SetGuidance("[usage] /score/quantiy/passageTrackLength qname wflag unit");
00221 qPassTrackLengthCmd->SetGuidance(" qname :(String) scorer name");
00222 qPassTrackLengthCmd->SetGuidance(" wflag :(Bool) weighted");
00223 qPassTrackLengthCmd->SetGuidance(" unit :(Bool) unit");
00224 param = new G4UIparameter("qname",'s',false);
00225 qPassTrackLengthCmd->SetParameter(param);
00226 param = new G4UIparameter("wflag",'b',true);
00227 param->SetDefaultValue("true");
00228 qPassTrackLengthCmd->SetParameter(param);
00229 param = new G4UIparameter("unit",'s',true);
00230 param->SetDefaultValue("mm");
00231 qPassTrackLengthCmd->SetParameter(param);
00232
00233 qFlatSurfCurrCmd = new G4UIcommand("/score/quantity/flatSurfaceCurrent",this);
00234 qFlatSurfCurrCmd->SetGuidance("Flat surface current Scorer.");
00235 qFlatSurfCurrCmd->
00236 SetGuidance("[usage] /score/quantiy/flatSurfaceCurrent qname dflag wflag aflag unit");
00237 qFlatSurfCurrCmd->SetGuidance(" qname :(String) scorer name");
00238 qFlatSurfCurrCmd->SetGuidance(" dflag :(Int) direction flag");
00239 qFlatSurfCurrCmd->SetGuidance(" : 0 = Both In and Out");
00240 qFlatSurfCurrCmd->SetGuidance(" : 1 = In only");
00241 qFlatSurfCurrCmd->SetGuidance(" : 2 = Out only");
00242 qFlatSurfCurrCmd->SetGuidance(" wflag :(Bool) weighted");
00243 qFlatSurfCurrCmd->SetGuidance(" aflag :(Bool) divide by area");
00244 qFlatSurfCurrCmd->SetGuidance(" unit :(Bool) unit");
00245 param = new G4UIparameter("qname",'s',false);
00246 qFlatSurfCurrCmd->SetParameter(param);
00247 param = new G4UIparameter("dflag",'i',true);
00248 param->SetDefaultValue("0");
00249 qFlatSurfCurrCmd->SetParameter(param);
00250 param = new G4UIparameter("wflag",'b',true);
00251 param->SetDefaultValue("true");
00252 qFlatSurfCurrCmd->SetParameter(param);
00253 param = new G4UIparameter("aflag",'b',true);
00254 param->SetDefaultValue("true");
00255 qFlatSurfCurrCmd->SetParameter(param);
00256 param = new G4UIparameter("unit",'s',true);
00257 param->SetDefaultValue("percm2");
00258 qFlatSurfCurrCmd->SetParameter(param);
00259
00260 qFlatSurfFluxCmd = new G4UIcommand("/score/quantity/flatSurfaceFlux",this);
00261 qFlatSurfFluxCmd->SetGuidance("Flat surface flux scorer.");
00262 qFlatSurfFluxCmd->
00263 SetGuidance("[usage] /score/quantiy/flatSurfaceFlux qname dflag unit");
00264 qFlatSurfFluxCmd->SetGuidance(" qname :(String) scorer name");
00265 qFlatSurfFluxCmd->SetGuidance(" dflag :(Int) direction flag");
00266 qFlatSurfFluxCmd->SetGuidance(" : 0 = Both In and Out");
00267 qFlatSurfFluxCmd->SetGuidance(" : 1 = In only");
00268 qFlatSurfFluxCmd->SetGuidance(" : 2 = Out only");
00269 qFlatSurfFluxCmd->SetGuidance(" wflag :(Bool) weighted");
00270 qFlatSurfFluxCmd->SetGuidance(" aflag :(Bool) divide by area");
00271 qFlatSurfFluxCmd->SetGuidance(" unit :(String) unit");
00272 param = new G4UIparameter("qname",'s',false);
00273 qFlatSurfFluxCmd->SetParameter(param);
00274 param = new G4UIparameter("dflag",'i',true);
00275 param->SetDefaultValue("0");
00276 qFlatSurfFluxCmd->SetParameter(param);
00277 param = new G4UIparameter("wflag",'b',true);
00278 param->SetDefaultValue("true");
00279 qFlatSurfFluxCmd->SetParameter(param);
00280 param = new G4UIparameter("aflag",'b',true);
00281 param->SetDefaultValue("true");
00282 qFlatSurfFluxCmd->SetParameter(param);
00283 param = new G4UIparameter("unit",'s',true);
00284 param->SetDefaultValue("percm2");
00285 qFlatSurfFluxCmd->SetParameter(param);
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398 qNofCollisionCmd = new G4UIcommand("/score/quantity/nOfCollision",this);
00399 qNofCollisionCmd->SetGuidance("Number of collision scorer.");
00400 qNofCollisionCmd->
00401 SetGuidance("[usage] /score/quantiy/nOfCollision qname wflag");
00402 qNofCollisionCmd->SetGuidance(" qname :(String) scorer name");
00403 param = new G4UIparameter("qname",'s',false);
00404 qNofCollisionCmd->SetParameter(param);
00405 param = new G4UIparameter("wflag",'b',true);
00406 param->SetDefaultValue("false");
00407 qNofCollisionCmd->SetParameter(param);
00408
00409 qPopulationCmd = new G4UIcommand("/score/quantity/population",this);
00410 qPopulationCmd->SetGuidance("Population scorer.");
00411 qPopulationCmd->
00412 SetGuidance("[usage] /score/quantiy/population qname wflag");
00413 qPopulationCmd->SetGuidance(" qname :(String) scorer name");
00414 qPopulationCmd->SetGuidance(" wflag :(Bool) weighted");
00415 param = new G4UIparameter("qname",'s',false);
00416 qPopulationCmd->SetParameter(param);
00417 param = new G4UIparameter("wflag",'b',true);
00418 param->SetDefaultValue("false");
00419 qPopulationCmd->SetParameter(param);
00420
00421
00422 qTrackCountCmd = new G4UIcommand("/score/quantity/nOfTrack",this);
00423 qTrackCountCmd->SetGuidance("Number of track scorer.");
00424 qTrackCountCmd->
00425 SetGuidance("[usage] /score/quantiy/nOfTrack qname dflag wflag");
00426 qTrackCountCmd->SetGuidance(" qname :(String) scorer name");
00427 qTrackCountCmd->SetGuidance(" dflag :(Int) direction");
00428 qTrackCountCmd->SetGuidance(" : 0 = Both In and Out");
00429 qTrackCountCmd->SetGuidance(" : 1 = In only");
00430 qTrackCountCmd->SetGuidance(" : 2 = Out only");
00431 qTrackCountCmd->SetGuidance(" wflag :(Bool) weighted");
00432 param = new G4UIparameter("qname",'s',false);
00433 qTrackCountCmd->SetParameter(param);
00434 param = new G4UIparameter("dflag",'i',true);
00435 param->SetDefaultValue("0");
00436 qTrackCountCmd->SetParameter(param);
00437 param = new G4UIparameter("wflag",'b',true);
00438 param->SetDefaultValue("false");
00439 qTrackCountCmd->SetParameter(param);
00440
00441
00442 qTerminationCmd = new G4UIcommand("/score/quantity/nOfTerminatedTrack",this);
00443 qTerminationCmd->SetGuidance("Number of terminated tracks scorer.");
00444 qTerminationCmd->
00445 SetGuidance("[usage] /score/quantiy/nOfTerminatedTrack qname wflag");
00446 qTerminationCmd->SetGuidance(" qname :(String) scorer name");
00447 qTerminationCmd->SetGuidance(" wflag :(Bool) weighted");
00448 param = new G4UIparameter("qname",'s',false);
00449 qTerminationCmd->SetParameter(param);
00450 param = new G4UIparameter("wflag",'b',true);
00451 param->SetDefaultValue("false");
00452 qTerminationCmd->SetParameter(param);
00453
00454
00455 qMinKinEAtGeneCmd = new G4UIcommand("/score/quantity/minKinEAtGeneration",this);
00456 qMinKinEAtGeneCmd->SetGuidance("Min Kinetic Energy at Generation");
00457 qMinKinEAtGeneCmd->
00458 SetGuidance("[usage] /score/quantiy/minKinEAtGeneration qname");
00459 qMinKinEAtGeneCmd->SetGuidance(" qname :(String) scorer name");
00460 param = new G4UIparameter("qname",'s',false);
00461 qMinKinEAtGeneCmd->SetParameter(param);
00462
00463 qStepCheckerCmd = new G4UIcommand("/score/quantity/stepChecker",this);
00464 qStepCheckerCmd->SetGuidance("Display a comment when this PS is invoked");
00465 qStepCheckerCmd->
00466 SetGuidance("[usage] /score/quantiy/stepChecker qname");
00467 qStepCheckerCmd->SetGuidance(" qname :(String) scorer name");
00468 param = new G4UIparameter("qname",'s',false);
00469 qStepCheckerCmd->SetParameter(param);
00470
00471 }
00472