How to swtich off the hadronic ion interaction with target in Geant4 using VMC

I am using the Geant4 interfaced with VMC. Here is the geometry setup I am using

Using this setup, I am colliding Nickel ions on a nickel target using Geant4, and I am using
configuration command

geant4Settings->SetG4RunConfig(“geomRoot”, “QGSP_BERT_EMV+optical”, “stepLimiter+specialCuts”);

for the hadronic and electromagnetic processes.

However, by default, it includes the hadronic ion interaction of the beam on the target.
Now I want to only switch off the hardonic ion interaction happening with the target, only to avoid the production of hadronic events.

But, alongside this, I want to keep on the hadronic ion and hadronic interaction with all other detector systems and volumes. Is there any command that specifies the target area or name of the target material, and does the thing I wanted, or is there any UI command?

many thanks :slight_smile:

Hii @mkelsey

Do you have any idea on how to switch off a hadronic process in Geant4 for a particular volume or material?

Is there any UI command?

I’ve never used VMC. I don’t believe you can disable hadronic processes that way; they don’t have the same kind of per-region setup (not per volume) that EM processes have.

In principle, you could code up a G4WrapperProcess subclass, write a physics builder that finds the hadronic process you care about, and replace it with your wrapper. Then your wrapper’s PostStepDoIt() could include whatever checks on volume, material, etc. that you need.