95void G4ScoreQuantityMessenger::FilterCommands()
102 filterDir->
SetGuidance(
" Scoring filter commands.");
105 fchargedCmd->
SetGuidance(
"Charged particle filter.");
109 fneutralCmd->
SetGuidance(
"Neutral particle filter.");
112 fkinECmd =
new G4UIcommand(
"/score/filter/kineticEnergy",
this);
114 fkinECmd->
SetGuidance(
"[usage] /score/filter/kineticEnergy fname Elow Ehigh unit");
115 fkinECmd->
SetGuidance(
" fname :(String) Filter Name ");
116 fkinECmd->
SetGuidance(
" Elow :(Double) Lower edge of kinetic energy");
117 fkinECmd->
SetGuidance(
" Ehigh :(Double) Higher edge of kinetic energy");
118 fkinECmd->
SetGuidance(
" unit :(String) unit of given kinetic energy");
132 fparticleCmd =
new G4UIcommand(
"/score/filter/particle",
this);
134 fparticleCmd->
SetGuidance(
"[usage] /score/filter/particle fname p0 .. pn");
135 fparticleCmd->
SetGuidance(
" fname :(String) Filter Name ");
136 fparticleCmd->
SetGuidance(
" p0 .. pn :(String) particle names");
145 fparticleKinECmd =
new G4UIcommand(
"/score/filter/particleWithKineticEnergy",
this);
146 fparticleKinECmd->
SetGuidance(
"Particle with kinetic energy filter.");
147 fparticleKinECmd->
SetGuidance(
"[usage] /score/filter/particleWithKineticEnergy fname Elow Ehigh unit p0 .. pn");
148 fparticleKinECmd->
SetGuidance(
" fname :(String) Filter Name ");
149 fparticleKinECmd->
SetGuidance(
" Elow :(Double) Lower edge of kinetic energy");
150 fparticleKinECmd->
SetGuidance(
" Ehigh :(Double) Higher edge of kinetic energy");
151 fparticleKinECmd->
SetGuidance(
" unit :(String) unit of given kinetic energy");
152 fparticleKinECmd->
SetGuidance(
" p0 .. pn :(String) particle names");
181 delete qPassCellFluxCmd;
185 delete qnOfSecondaryCmd;
187 delete qTrackLengthCmd;
188 delete qPassCellCurrCmd;
189 delete qPassTrackLengthCmd;
190 delete qFlatSurfCurrCmd;
191 delete qFlatSurfFluxCmd;
196 delete qNofCollisionCmd;
197 delete qPopulationCmd;
198 delete qTrackCountCmd;
199 delete qTerminationCmd;
200 delete qMinKinEAtGeneCmd;
202 delete qStepCheckerCmd;
209 delete fparticleKinECmd;
220 G4cerr <<
"ERROR : No mesh is currently open. Open/create a mesh first. Command ignored." <<
G4endl;
228 if(command==qTouchCmd) {
230 }
else if(command == qGetUnitCmd ){
232 }
else if(command == qSetUnitCmd ){
234 }
else if(command== qCellChgCmd) {
240 }
else if(command== qCellFluxCmd) {
258 }
else if(command== qPassCellFluxCmd) {
276 }
else if(command==qeDepCmd) {
282 }
else if(command== qdoseDepCmd) {
300 }
else if(command== qnOfStepCmd) {
305 }
else if(command== qnOfSecondaryCmd) {
310 }
else if(command== qTrackLengthCmd) {
319 }
else if(command== qPassCellCurrCmd){
326 }
else if(command== qPassTrackLengthCmd){
332 }
else if(command== qFlatSurfCurrCmd){
338 if (
StoB(token[3]) ){
345 }
else if(command== qFlatSurfFluxCmd){
350 if (
StoB(token[3]) ){
408 }
else if(command== qNofCollisionCmd){
414 }
else if(command== qPopulationCmd){
420 }
else if(command== qTrackCountCmd){
425 }
else if(command== qTerminationCmd){
432 }
else if(command== qMinKinEAtGeneCmd){
438 }
else if(command== qStepCheckerCmd){
447 }
else if(command== fchargedCmd){
452 <<
"] : Current quantity is not set. Set or touch a quantity first." <<
G4endl;
454 }
else if(command== fneutralCmd){
459 <<
"] : Current quantity is not set. Set or touch a quantity first." <<
G4endl;
461 }
else if(command== fkinECmd){
469 <<
"] : Current quantity is not set. Set or touch a quantity first." <<
G4endl;
471 }
else if(command== fparticleKinECmd){
476 <<
"] : Current quantity is not set. Set or touch a quantity first." <<
G4endl;
478 }
else if(command==fparticleCmd) {
483 <<
"] : Current quantity is not set. Set or touch a quantity first." <<
G4endl;
499 while ( !(val = next()).isNull() ) {
500 token.push_back(val);
511 std::vector<G4String> pnames;
512 for (
G4int i = 1; i<(
G4int)token.size(); i++){
513 pnames.push_back(token[i]);
527 for (
G4int i = 4; i < (
G4int)token.size(); i++){
528 filter->
add(token[i]);
538 <<
"] : Quantity name, \"" << psname <<
"\", is already existing." <<
G4endl;
std::vector< G4String > G4TokenVec
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT 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 Weighted(G4bool flg=true)
void SetCylinderSize(G4double dr, G4double dz)
void SetNumberOfSegments(G4int nSeg[3])
virtual void SetUnit(const G4String &unit)
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 add(const G4String &particleName)
G4bool CheckMeshPS(G4VScoringMesh *mesh, G4String &psname)
void FParticleWithEnergyCommand(G4VScoringMesh *mesh, G4TokenVec &token)
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)
G4String DtoS(G4double a)
G4double StoD(G4String s)
void SetDefaultValue(const char *theDefaultValue)
static G4double GetValueOf(const G4String &)
void SetFilter(G4VSDFilter *filter)
void SetNullToCurrentPrimitiveScorer()
G4ThreeVector GetSize() const
MeshShape GetShape() const
void GetNumberOfSegments(G4int nSegment[3])
void SetCurrentPSUnit(const G4String &unit)
void SetCurrentPrimitiveScorer(const G4String &name)
void SetPrimitiveScorer(G4VPrimitiveScorer *ps)
G4String GetCurrentPSUnit()
G4bool IsCurrentPrimitiveScorerNull()
G4bool FindPrimitiveScorer(const G4String &psname)