How to bias the gamma Nuclear process?


hi,

I hope to bias the gamma Nuclear process in my simulation. So I modified some codes from the example GB01.

the following is my some codes:

void GB01BOptrChangeCrossSection::StartRun()
{
  if (fSetup) {
    const G4ProcessManager* processManager = fParticleToBias->GetProcessManager();
    const G4BiasingProcessSharedData* sharedData =
      G4BiasingProcessInterface::GetSharedData(processManager);
    if (sharedData)  // -- sharedData tested, as is can happen a user attaches an operator to a                                                                
                     // -- volume but without defined BiasingProcessInterface processes.                                                                       
    {
      for (size_t i = 0; i < (sharedData->GetPhysicsBiasingProcessInterfaces()).size(); i++) {
        const G4BiasingProcessInterface* wrapperProcess =
          (sharedData->GetPhysicsBiasingProcessInterfaces())[i];
        G4String operationName =
          "XSchange-" + wrapperProcess>GetWrappedProcess()->GetProcessName();
        G4String process_name=wrapperProcess->GetWrappedProcess()->GetProcessName();
        if(process_name=="photonNuclear"||process_name=="BertiniCascade"||process_name=="GammaNPreco"){
        fChangeCrossSectionOperations[wrapperProcess] =
          new G4BOptnChangeCrossSection(operationName);}
      }
    }
    fSetup = false;
  }
}

I didn’t change others. So this part is OK?