Collect the particles which appeared in the volume for the first time

Hi Experts

I want to collect how many neutrons been created after the leader shield. My particlegun is mu+. And I create a ‘‘Physi_envelope’’ after the shield which I think it is a easy way to collect.(maybe not right?)

Unfortunately, I still can not understand the SD. So my running model is stepaction->eventaction->runaction

There are my cuts:
if(particle_name==“neutron” && ParentID == 0 && physics_volume == “Physi_envelope” )

But it is doesn’t work at all. :disappointed_relieved:

Would you please help me. Thank you very much.

Best wishes!