124void G4ScoreQuantityMessenger::FilterCommands()
131 filterDir->
SetGuidance(
" Scoring filter commands.");
134 fchargedCmd->
SetGuidance(
"Charged particle filter.");
138 fneutralCmd->
SetGuidance(
"Neutral particle filter.");
141 fkinECmd =
new G4UIcommand(
"/score/filter/kineticEnergy",
this);
143 fkinECmd->
SetGuidance(
"[usage] /score/filter/kineticEnergy fname Elow Ehigh unit");
144 fkinECmd->
SetGuidance(
" fname :(String) Filter Name ");
145 fkinECmd->
SetGuidance(
" Elow :(Double) Lower edge of kinetic energy");
146 fkinECmd->
SetGuidance(
" Ehigh :(Double) Higher edge of kinetic energy");
147 fkinECmd->
SetGuidance(
" unit :(String) unit of given kinetic energy");
161 fparticleCmd =
new G4UIcommand(
"/score/filter/particle",
this);
163 fparticleCmd->
SetGuidance(
"[usage] /score/filter/particle fname p0 .. pn");
164 fparticleCmd->
SetGuidance(
" fname :(String) Filter Name ");
165 fparticleCmd->
SetGuidance(
" p0 .. pn :(String) particle names");
174 fparticleKinECmd =
new G4UIcommand(
"/score/filter/particleWithKineticEnergy",
this);
175 fparticleKinECmd->
SetGuidance(
"Particle with kinetic energy filter.");
176 fparticleKinECmd->
SetGuidance(
"[usage] /score/filter/particleWithKineticEnergy fname Elow Ehigh unit p0 .. pn");
177 fparticleKinECmd->
SetGuidance(
" fname :(String) Filter Name ");
178 fparticleKinECmd->
SetGuidance(
" Elow :(Double) Lower edge of kinetic energy");
179 fparticleKinECmd->
SetGuidance(
" Ehigh :(Double) Higher edge of kinetic energy");
180 fparticleKinECmd->
SetGuidance(
" unit :(String) unit of given kinetic energy");
181 fparticleKinECmd->
SetGuidance(
" p0 .. pn :(String) particle names");
210 delete qPassCellFluxCmd;
214 delete qnOfSecondaryCmd;
216 delete qTrackLengthCmd;
217 delete qPassCellCurrCmd;
218 delete qPassTrackLengthCmd;
219 delete qFlatSurfCurrCmd;
220 delete qFlatSurfFluxCmd;
226 delete qNofCollisionCmd;
227 delete qPopulationCmd;
228 delete qTrackCountCmd;
229 delete qTerminationCmd;
230 delete qMinKinEAtGeneCmd;
232 delete qStepCheckerCmd;
239 delete fparticleKinECmd;
254 ed <<
"ERROR : No mesh is currently open. Open/create a mesh first. Command ignored.";
265 if(command==qTouchCmd) {
267 }
else if(command == qGetUnitCmd ){
269 }
else if(command == qSetUnitCmd ){
271 }
else if(command== qCellChgCmd) {
274 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
281 }
else if(command== qCellFluxCmd) {
284 if( shape==MeshShape::box ) {
286 }
else if( shape==MeshShape::cylinder ) {
294 }
else if(shape==MeshShape::realWorldLogVol) {
295 ed<<
"Cell flux for real world volume is not yet supported. Command ignored.";
298 }
else if(shape==MeshShape::probe) {
304 }
else if(command== qPassCellFluxCmd) {
307 if( shape==MeshShape::box ) {
309 }
else if( shape==MeshShape::cylinder ) {
317 }
else if(shape==MeshShape::realWorldLogVol) {
318 ed<<
"Passing cell flux for real world volume is not yet supported. Command ignored.";
321 }
else if(shape==MeshShape::probe) {
327 }
else if(command==qeDepCmd) {
330 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
337 }
else if(command== qdoseDepCmd) {
340 if( shape==MeshShape::box ) {
342 }
else if( shape==MeshShape::cylinder ) {
351 }
else if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe) {
357 }
else if(command== qnOfStepCmd) {
360 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
367 }
else if(command== qnOfSecondaryCmd) {
370 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
376 }
else if(command== qTrackLengthCmd) {
379 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
389 }
else if(command== qPassCellCurrCmd){
392 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
399 }
else if(command== qPassTrackLengthCmd){
402 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
410 }
else if(command== qFlatSurfCurrCmd){
413 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
419 if (
StoB(token[3]) ){
426 }
else if(command== qFlatSurfFluxCmd){
429 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
435 if (
StoB(token[3]) ){
442 }
else if(command== qVolFluxCmd) {
445 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
504 }
else if(command== qNofCollisionCmd){
507 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
514 }
else if(command== qPopulationCmd){
517 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
524 }
else if(command== qTrackCountCmd){
527 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
534 }
else if(command== qTerminationCmd){
537 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
545 }
else if(command== qMinKinEAtGeneCmd){
548 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
555 }
else if(command== qStepCheckerCmd){
558 if(shape==MeshShape::realWorldLogVol || shape==MeshShape::probe)
568 }
else if(command== fchargedCmd){
573 <<
"] : Current quantity is not set. Set or touch a quantity first.";
576 }
else if(command== fneutralCmd){
581 <<
"] : Current quantity is not set. Set or touch a quantity first.";
584 }
else if(command== fkinECmd){
593 <<
"] : Current quantity is not set. Set or touch a quantity first.";
596 }
else if(command== fparticleKinECmd){
601 <<
"] : Current quantity is not set. Set or touch a quantity first.";
604 }
else if(command==fparticleCmd) {
609 <<
"] : Current quantity is not set. Set or touch a quantity first.";
626 while ( !(val = next()).isNull() ) {
627 token.push_back(val);
638 std::vector<G4String> pnames;
639 for (
G4int i = 1; i<(
G4int)token.size(); i++){
640 pnames.push_back(token[i]);
654 for (
G4int i = 4; i < (
G4int)token.size(); i++){
655 filter->
add(token[i]);
667 <<
"] : Quantity name, \"" << psname <<
"\", is already existing.";
std::ostringstream G4ExceptionDescription
std::vector< G4String > G4TokenVec
G4GLOB_DLL std::ostream G4cout
virtual void SetUnit(const G4String &unit)
void SetNumberOfSegments(G4int nSeg[3])
void SetCylinderSize(G4double dr, G4double dz)
virtual void SetUnit(const G4String &unit)
void SetCylinderSize(G4double dr, G4double dz)
void SetNumberOfSegments(G4int nSeg[3])
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)
void SetCylinderSize(G4double dr, G4double dz)
void SetNumberOfSegments(G4int nSeg[3])
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 add(const G4String &particleName)
void FParticleWithEnergyCommand(G4VScoringMesh *mesh, G4TokenVec &token)
G4bool CheckMeshPS(G4VScoringMesh *mesh, G4String &psname, G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *)
void SetNewValue(G4UIcommand *command, G4String newValues)
G4ScoreQuantityMessenger(G4ScoringManager *SManager)
void FillTokenVec(G4String newValues, G4TokenVec &token)
~G4ScoreQuantityMessenger()
void FParticleCommand(G4VScoringMesh *mesh, G4TokenVec &token)
G4VScoringMesh * GetCurrentMesh() const
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
const G4String & GetCommandPath() const
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
void CommandFailed(G4int errCode, G4ExceptionDescription &ed)
G4String DtoS(G4double a)
G4double StoD(G4String s)
void SetDefaultValue(const char *theDefaultValue)
void SetDefaultUnit(const char *theDefaultUnit)
static G4double GetValueOf(const G4String &)
void SetFilter(G4VSDFilter *filter)
void SetNullToCurrentPrimitiveScorer()
G4ThreeVector GetSize() const
MeshShape GetShape() 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()
G4bool IsCurrentPrimitiveScorerNull()
G4bool FindPrimitiveScorer(const G4String &psname)