Message: Biasing already registered processes (from reference physics) Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Biasing already registered processes (from reference physics) 

Forum: Biasing and Scoring
Date: 10 Feb, 2017
From: Michael H. Kelsey <Michael H. Kelsey>

I would like to apply simple biasing (secondary particle splitting) to processes which have already been registered into the appropriate ProcessManagers. Specifically, my physics list uses G4EmPenelopePhysics to get a proper set of standard, reference processes and models. Then, I want to go through the process lists for gammas and electrons, and replace some of those processes with G4WrapperProcess versions.

I've confirmed that I properly instantiate each wrapper process, that it calls "RegisterProcess()" correctly with the underlying "analog" process pointer. Then I try to replace the process pointer with my new wrapper, thus:

  // Find the processes which involve atomic de-excitation
  G4ProcessVector* theProcs = particle->GetProcessManager()->GetProcessList();
  for (G4int i=0; i<theProcs->size(); i++) {
    G4VProcess* aProcess = (*theProcs)[i];

    // Look for specific processes, matching types instead of strings
    if (aProcess->GetProcessType() != fElectromagnetic) continue;
    if ( (aProcess->GetProcessSubType() == fPhotoElectricEffect) ||
	 (aProcess->GetProcessSubType() == fComptonScattering) ||
	 (aProcess->GetProcessSubType() == fIonisation) ) {
      wrapper = new CUG4WrapperFluoSplit(aProcess, FLUO_SPLIT);
      (*theProcs)[i] = wrapper;		// Replace base process with wrapper

This is done inside ConstructProcess(), immediately after calling back to the base G4VModularPhysicsList::ConstructProcess(). But during the run, my wrapper process never gets called! Instead, the underlying base processes still seem to be there and active.

Is what I'm trying to do just not allowed? Do I really have to copy the code and build the physics myself from scratch?

  -- Michael Kelsey

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Ok: Re: Biasing already registered processes (from reference physics)   (Michael H. Kelsey - 13 Feb, 2017)
 Add Message Add Message
to: "Biasing already registered processes (from reference physics)"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews