98 void G4ScoreQuantityMessenger::FilterCommands()
105 filterDir->
SetGuidance(
" Scoring filter commands.");
108 fchargedCmd->
SetGuidance(
"Charged particle filter.");
112 fneutralCmd->
SetGuidance(
"Neutral particle filter.");
115 fkinECmd =
new G4UIcommand(
"/score/filter/kineticEnergy",
this);
117 fkinECmd->
SetGuidance(
"[usage] /score/filter/kineticEnergy fname Elow Ehigh unit");
118 fkinECmd->
SetGuidance(
" fname :(String) Filter Name ");
119 fkinECmd->
SetGuidance(
" Elow :(Double) Lower edge of kinetic energy");
120 fkinECmd->
SetGuidance(
" Ehigh :(Double) Higher edge of kinetic energy");
121 fkinECmd->
SetGuidance(
" unit :(String) unit of given kinetic energy");
135 fparticleCmd =
new G4UIcommand(
"/score/filter/particle",
this);
137 fparticleCmd->
SetGuidance(
"[usage] /score/filter/particle fname p0 .. pn");
138 fparticleCmd->
SetGuidance(
" fname :(String) Filter Name ");
139 fparticleCmd->
SetGuidance(
" p0 .. pn :(String) particle names");
148 fparticleKinECmd =
new G4UIcommand(
"/score/filter/particleWithKineticEnergy",
this);
149 fparticleKinECmd->
SetGuidance(
"Particle with kinetic energy filter.");
150 fparticleKinECmd->
SetGuidance(
"[usage] /score/filter/particleWithKineticEnergy fname Elow Ehigh unit p0 .. pn");
151 fparticleKinECmd->
SetGuidance(
" fname :(String) Filter Name ");
152 fparticleKinECmd->
SetGuidance(
" Elow :(Double) Lower edge of kinetic energy");
153 fparticleKinECmd->
SetGuidance(
" Ehigh :(Double) Higher edge of kinetic energy");
154 fparticleKinECmd->
SetGuidance(
" unit :(String) unit of given kinetic energy");
155 fparticleKinECmd->
SetGuidance(
" p0 .. pn :(String) particle names");
184 delete qPassCellFluxCmd;
188 delete qnOfSecondaryCmd;
190 delete qTrackLengthCmd;
191 delete qPassCellCurrCmd;
192 delete qPassTrackLengthCmd;
193 delete qFlatSurfCurrCmd;
194 delete qFlatSurfFluxCmd;
199 delete qNofCollisionCmd;
200 delete qPopulationCmd;
201 delete qTrackCountCmd;
202 delete qTerminationCmd;
203 delete qMinKinEAtGeneCmd;
205 delete qStepCheckerCmd;
212 delete fparticleKinECmd;
223 G4cerr <<
"ERROR : No mesh is currently open. Open/create a mesh first. Command ignored." <<
G4endl;
231 if(command==qTouchCmd) {
233 }
else if(command == qGetUnitCmd ){
235 }
else if(command == qSetUnitCmd ){
237 }
else if(command== qCellChgCmd) {
243 }
else if(command== qCellFluxCmd) {
261 }
else if(command== qPassCellFluxCmd) {
279 }
else if(command==qeDepCmd) {
285 }
else if(command== qdoseDepCmd) {
303 }
else if(command== qnOfStepCmd) {
309 }
else if(command== qnOfSecondaryCmd) {
314 }
else if(command== qTrackLengthCmd) {
323 }
else if(command== qPassCellCurrCmd){
329 }
else if(command== qPassTrackLengthCmd){
336 }
else if(command== qFlatSurfCurrCmd){
342 if (
StoB(token[3]) ){
349 }
else if(command== qFlatSurfFluxCmd){
354 if (
StoB(token[3]) ){
412 }
else if(command== qNofCollisionCmd){
418 }
else if(command== qPopulationCmd){
424 }
else if(command== qTrackCountCmd){
430 }
else if(command== qTerminationCmd){
437 }
else if(command== qMinKinEAtGeneCmd){
443 }
else if(command== qStepCheckerCmd){
452 }
else if(command== fchargedCmd){
457 <<
"] : Current quantity is not set. Set or touch a quantity first." <<
G4endl;
459 }
else if(command== fneutralCmd){
464 <<
"] : Current quantity is not set. Set or touch a quantity first." <<
G4endl;
466 }
else if(command== fkinECmd){
475 <<
"] : Current quantity is not set. Set or touch a quantity first." <<
G4endl;
477 }
else if(command== fparticleKinECmd){
482 <<
"] : Current quantity is not set. Set or touch a quantity first." <<
G4endl;
484 }
else if(command==fparticleCmd) {
489 <<
"] : Current quantity is not set. Set or touch a quantity first." <<
G4endl;
505 while ( !(val = next()).isNull() ) {
506 token.push_back(val);
517 std::vector<G4String> pnames;
518 for (
G4int i = 1; i<(
G4int)token.size(); i++){
519 pnames.push_back(token[i]);
533 for (
G4int i = 4; i < (
G4int)token.size(); i++){
534 filter->
add(token[i]);
544 <<
"] : Quantity name, \"" << psname <<
"\", is already existing." <<
G4endl;
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void GetNumberOfSegments(G4int nSegment[3])
void SetParameter(G4UIparameter *const newParameter)
void FParticleCommand(G4VScoringMesh *mesh, G4TokenVec &token)
void SetCylinderSize(G4double dr, G4double dz)
std::vector< G4String > G4TokenVec
G4bool FindPrimitiveScorer(const G4String &psname)
void SetPrimitiveScorer(G4VPrimitiveScorer *ps)
void SetCurrentPrimitiveScorer(const G4String &name)
virtual void SetUnit(const G4String &unit)
void SetNumberOfSegments(G4int nSeg[3])
void SetDefaultValue(const char *theDefaultValue)
void FillTokenVec(G4String newValues, G4TokenVec &token)
void SetCylinderSize(G4double dr, G4double dz)
void SetBoundaryFlag(G4bool flg=true)
void SetFilter(G4VSDFilter *filter)
G4ThreeVector GetSize() const
void DivideByArea(G4bool flg=true)
virtual void SetUnit(const G4String &unit)
void Weighted(G4bool flg=true)
void Weighted(G4bool flg=true)
void SetNullToCurrentPrimitiveScorer()
G4bool IsCurrentPrimitiveScorerNull()
virtual void SetUnit(const G4String &unit)
void SetCylinderSize(G4double dr, G4double dz)
static G4double GetValueOf(const G4String &)
void Weighted(G4bool flg=true)
G4GLOB_DLL std::ostream G4cout
void SetNumberOfSegments(G4int nSeg[3])
void Weighted(G4bool flg=true)
MeshShape GetShape() const
G4ScoreQuantityMessenger(G4ScoringManager *SManager)
void SetGuidance(const char *aGuidance)
virtual void SetUnit(const G4String &unit)
G4bool CheckMeshPS(G4VScoringMesh *mesh, G4String &psname)
G4String GetCurrentValue(G4UIcommand *)
const G4String & GetCommandPath() const
G4String DtoS(G4double a)
void SetCurrentPSUnit(const G4String &unit)
virtual void SetUnit(const G4String &unit)
void Weighted(G4bool flg=true)
G4VScoringMesh * GetCurrentMesh() const
void DivideByArea(G4bool flg=true)
G4double StoD(G4String s)
void SetNewValue(G4UIcommand *command, G4String newValues)
void FParticleWithEnergyCommand(G4VScoringMesh *mesh, G4TokenVec &token)
void MultiplyKineticEnergy(G4bool flg=true)
void Weighted(G4bool flg=true)
void Weighted(G4bool flg=true)
G4String GetCurrentPSUnit()
virtual void SetUnit(const G4String &unit)
virtual void SetUnit(const G4String &unit)
~G4ScoreQuantityMessenger()
static constexpr double ps
virtual void SetUnit(const G4String &unit)
virtual void SetUnit(const G4String &unit)
void Weighted(G4bool flg=true)
void Weighted(G4bool flg=true)
void add(const G4String &particleName)
void SetNumberOfSegments(G4int nSeg[3])
void DivideByVelocity(G4bool flg=true)
virtual void SetUnit(const G4String &unit)
G4GLOB_DLL std::ostream G4cerr