Charge exchange processes are not registered in Hadr00 example with 50 GeV pions

Dear Experts,

I have experienced troubles in the finding charge-exchange processes with the G4ChargeExchange Physics list. As a base, I have chosen extended/hadronic/Hadr00 and Hadr01 examples. The incident particles are pi- with 50 GeV energy, I have tried to run the simulation with up to 10000 events.

The simulation was executed with the following parameters:
./Hadr00 QGSP_BERT

In order to check the proper work of code, I have added user stepping action that prints out the PreStepProcess, PostStepProcess and track creator process into G4cout for the secondaries with ParentID == 1. For primary particles code prints out only the PostStepProcess.

In the output I have not found any pi-ChargeEx process, neither for processes that defined step nor for the track creator processes. The dominating ones are hadElastic/pi-Inelastic.
I would like to separate the charge-exchange events, get the information about the products of
them and reconstruct the cross-section from simulation.

My implementation of stepping action is below:

void SteppingAction::UserSteppingAction(const G4Step* step)
    G4String proc_name = "none";
    if (step->GetTrack()){
         G4Track* track = step->GetTrack();
         if (track->GetNextVolume() == nullptr) return;

         G4int encoding = track->GetDynamicParticle()->GetDefinition()->GetPDGEncoding();
        if (track->GetParentID() == 0) { 
            G4cout << "Primary Particle: " << encoding << " PostProc: ";
            G4StepPoint* postPt = step->GetPostStepPoint();

            const G4VProcess* procPost = postPt->GetProcessDefinedStep();
            if (procPost) proc_name = procPost->GetProcessName();
            G4cout << proc_name << G4endl;
         if (track->GetParentID() == 1) {
            G4cout << "Particle: " << encoding << " PreProc: ";
            G4StepPoint* prePt = step->GetPreStepPoint();
            G4StepPoint* postPt = step->GetPostStepPoint();

            const G4VProcess* procPre = prePt->GetProcessDefinedStep();
            const G4VProcess* procPost = postPt->GetProcessDefinedStep();
            if (procPre) proc_name = procPre->GetProcessName();
            G4cout << proc_name << " PostProc: ";
            if (procPost) proc_name = procPost->GetProcessName();
            G4cout << proc_name << " Track creator proc: ";
            proc_name = track->GetCreatorProcess()->GetProcessName();
            G4cout << proc_name << G4endl;

In the main file, I have registered charge-exchange physics list as shown below:

  phys = factory.GetReferencePhysList(physName);
  phys->RegisterPhysics(new G4ChargeExchangePhysics());


From the starting output with /process/had/verbose 1 I can see that this specific physics list is actually registered, and the pi-ChargeEx process is recognized by Geant4:

                           Hadronic Processes for pi-
  Process: hadElastic
        Model:           hElasticGlauber: 0 eV  ---> 100 TeV
     Cr_sctns:  BarashenkovGlauberGribov: 0 eV  ---> 100 TeV
  Process: pi-Inelastic
        Model:                      QGSP: 12 GeV ---> 100 TeV
        Model:                      FTFP: 3 GeV ---> 25 GeV
        Model:            BertiniCascade: 0 eV  ---> 6 GeV
     Cr_sctns:  BarashenkovGlauberGribov: 0 eV  ---> 100 TeV
  Process: pi-ChargeEx
        Model:            ChargeExchange: 0 eV  ---> 100 TeV
     Cr_sctns:                          : 0 eV  ---> 100 TeV

Although the field with the name of cross sections is blank, I have found out that if I change the code of ChargeExchange physics list constructor and recompile Geant4, in the output Cr_sctns for pi-ChargeEx process will be identified correctly, so anyway the charge-exchange processes are registered correctly. This change is the new line with the name of cross-sections list after the line 90 in geant4/source/physics_lists/constructors/hadron_elastic/src/

/*90*/ auto xs = new G4ChargeExchangeXS();
//this line->  //xs->SetName("ChargeExchangeXS");
/*91*/  xs->SetEnergyLimit(fLowEnergyLimit);
/*92*/  xs->SetCrossSectionFactor(fXSFactor);

The same situation is for Hadr01 - I have not registered any charge exchange processes occurring.
Please, could you help me to find out what is wrong?
If any additional parts of code are necessary, I will provide them.

Thanks in advance,

_Geant4 Version: geant4-v11.2.2 multithreaded
_Operating System: Linux Mint 22 (on Win10 WSL)
_Compiler/Version: gcc 13.2.0
_CMake Version: 3.28.3

After some discussion, I have tried to scale cross section using SetCrossSectionFactor() method during the registration of physics into modular physics list. Below is the part of code I have added into

  phys = factory.GetReferencePhysList(physName);
  G4ChargeExchangePhysics* ceph = new G4ChargeExchangePhysics();


It has solved the problem, as now I see the pi-ChargeEx processes in the output. As an example, here is the part of output with the production of pi0 in pi- charge exchange reaction:

G4WT7 > Particle: 111 PreProc: none PostProc: Decay Track creator proc: pi-ChargeEx

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