Ways to visualizing only primary particles

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

Geant4 Version:
_Operating System:_MacOS
Compiler/Version:
CMake Version:


Hello I’m a beginner in geant4, and I have a question.
Until now, I have been visualizing the simulation with the following vis.mac file.


/vis/drawVolume

/vis/scene/add/trajectories
/vis/scene/add/hits

/vis/scene/add/axes

/vis/scene/endOfEventAction accumulate
/vis/scene/endOfRunAction accumulate


Are there any ways to visualize only primary particles? Not including secondary particles.
I mean I wanna visualize for the TrackID==1.

I appreciate your help.

Hi

Have a look at Trajectory Filtering — Book For Application Developers 11.3 documentation. “Track ID (ID)” (as printed just after the /vis/scene/add/trajectories command) is available for /vis/filtering/trajectories/create/attributeFilter.

Good luck
John

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.