Problem 2216

Summary: TrackLength scorer does not work with optional boolean flags
Product: Geant4 Reporter: asai
Component: digits_hits/utilsAssignee: aso
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: 10.6   
Hardware: All   
OS: All   

Description asai 2020-01-20 20:39:37 CET
trackLength [qname] [wflag] [kflag] [vflag] [unit] 

Track length scorer.
[usage] /score/quantity/trackLength qname wflag kflag vflag unit
qname :(String) scorer name
wflag :(Bool) weighted
kflag :(Bool) multiply kinetic energy
vflag :(Bool) divide by velocity
unit :(String) unit

Available at all Geant4 states. 

I have found though that if either the kflag or vflag is set to true the simulation cannot run. It will request different units, though those units are not available in the units table. 

If kflag = true, vflag = false units requested become MeV_(lengthUnit)
If kflag = true, vflag = true units requested become MeV_second
If kflag = false, vflag = false units requested become second
Comment 1 aso 2020-02-14 01:10:12 CET
  The command for trackLength scorer in command-based scorer set its default unit
as "mm". Thus the command only accepts units of length category.
  To fix the bug, the command in the messenger is changed to set 
as default value in string format, mm, second MeV_mm, MeV_second etc., 
which will be checked and set as the unit inside trackLength soccer.
  The bug is fixed and will be included in next release.