Using multiple forms of trajectory visualization

I am interested in employing two different kinds of trajectory visualization at once. I know that I have the option to color trajectories by charge, particle ID, momentum, etc. but im interested in using multiple at once. In particular I am interested in drawing mostly by particle ID but specifically drawing photons by momentum. Is this possible? I’ve been looking into the /vis/modeling/trajectories/create/drawByAttribute command but have been unable to implement it effectively.

If it possible to layer drawing as ive described I would also be interested in only drawing the photons created by annihilation events while coloring them by momentum.

I know that it is possible to color trajectories by particle id, momentum, and creation process but im not sure if theres a way to effectively layer these.

Any help would be appreciated.

Quick answer: don’t know; I would have to investigate. But have a look at ‘/vis/filtering’ commands. They can be accumulated/layered as you put it. Are they any help?

Another quick answer…To use drawByAttribute you have to have the appropriate attributes available, of course. I think (from memory) if you ask for “rich” trajectories (/vis/scene/add/trajectories rich) you do get an attribute for creator process. (A list of attributes is printed just after invoking the command, or can be printed with /vis/list.)

I’ll just add a link to what John has mentioned: filtering in the user guide.
For instance, to filter by the creator process:

/vis/scene/add/trajectories rich
/vis/filtering/trajectories/attributeFilter-0/setAttribute CPN
/vis/filtering/trajectories/attributeFilter-0/addValue annihil

Other attributes available for G4RichTrajectory, as John wrote, can be checked with /vis/list.

Regarding the colouring by momentum, have a look at “Configure interval data”.