Filtering trajectories by volume


I am trying to visualize only the trajectories of particles that hit a certain volume in my simulation (whose name is physPMT_detector). In my vis.mac file I have the following lines:

/vis/filtering/trajectories/attributeFilter-1/verbose true
/vis/filtering/trajectories/attributeFilter-1/setAttribute FVPath
/vis/filtering/trajectories/attributeFilter-1/addValue physWorld 0 physPMT_detector 6

Where physWorld 0 physPMT_detector 6 is the output of /vis/touchable/findPath physPMT_detector.

This raises a format error, as I suspect that /vis/filtering/trajectories/attributeFilter-1/addValue is expecting to receive a string. Does anyone know how to make this work?

Thanks in advance,



I think the command simply wants the name of the volume. If you look at the command guidance* it requires just a single argument. Try

/vis/filtering/trajectories/attributeFilter-1/addValue physPMT_detector

If this doesn’t work please get back and I will dig into it deeper.

Wait a minute…

There is

/vis/filtering/trajectories/encounteredVolumeFilter-0/add physPMT_detector

Please try that.


* Use the Qt Help button or

help /vis/filtering/trajectories/attributeFilter-1/addValue