Message: Process registration sequence Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Process registration sequence  

Forum: Physics List
Date: 04 May, 2016
From: Sergej Makovejev <Sergej Makovejev>

It would be great if someone could explain why the process registration sequence in ConstructProcess() is important. I use TestEm5 to illustrate the question.

In TestEm5 in PhysListEmStandard.cc in PhysListEmStandard::ConstructProcess():

if (particleName == "gamma") {
      ////ph->RegisterProcess(new G4RayleighScattering, particle);      
      ph->RegisterProcess(new G4PhotoElectricEffect, particle);      
      G4ComptonScattering* cs   = new G4ComptonScattering;
      cs->SetEmModel(new G4KleinNishinaModel());
      ph->RegisterProcess(cs, particle);
      ph->RegisterProcess(new G4GammaConversion, particle);
    }
In this case the photoelectric effect is registered first, then Compton, then the gamma conversion. Changing the sequence (for example as in the code below) affects the final simulation result.

if (particleName == "gamma") {
      ////ph->RegisterProcess(new G4RayleighScattering, particle);         
      G4ComptonScattering* cs   = new G4ComptonScattering;
      cs->SetEmModel(new G4KleinNishinaModel());
      ph->RegisterProcess(cs, particle);
      ph->RegisterProcess(new G4PhotoElectricEffect, particle);        
      ph->RegisterProcess(new G4GammaConversion, particle);
    }

Executing gammaSpectrum.mac and comparing the sum of gamma energy at the back (/analysis/h1/set 40) for two cases provides different results. Here the difference is about 1%, but I would like to understand the reason behind it. In my application I observed a difference of 20% just by changing the process sequence.

Cheers, Sergej

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

1 Idea: Re: Process registration sequence   (Vladimir Ivanchenko - 04 May, 2016)
(_ More: Re: Process registration sequence   (Alexey Solovyev - 07 May, 2016)
(_ Idea: Re: Process registration sequence   (Vladimir Ivanchenko - 15 Jun, 2016)
 Add Message Add Message
to: "Process registration sequence "

 Subscribe Subscribe

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


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]