Big differences in muon generation between 11.0.4 and 11.1.1

I’m investigating the creation of muon pairs from high energy brehms photons. To this end, I’ve constructed a simple setup, where I have a gun, a block of tungsten and some tracker planes. For additional information I store the creation vertices of muons and pions created inside my converter block with this code in

G4int PDG = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
if (abs(PDG)==13 || abs(PDG)==211)
       if (aStep->GetTrack()->GetCurrentStepNumber()==1)
			histoManager->FillMuonPionInfo(aStep, event, 0, proc->GetProcessType()*10000+proc->GetProcessSubType());

where the integer 0 is for my bookkeeping, the proc->GetProcessType()*10000+proc->GetProcessSubType()) value gives me the process and its subtype in one integer and the corresponding function in histoManager is

void HistoManager::FillMuonPionInfo(const G4Step* aStep, G4int event, G4int status, G4int creationProcess)
	auto fAnalysisManager = G4AnalysisManager::Instance();

	//Fill the NTuple
	fAnalysisManager->FillNtupleIColumn(0, 0, aStep->GetTrack()->GetDefinition()->GetPDGEncoding());
	fAnalysisManager->FillNtupleIColumn(0, 1, event);
	fAnalysisManager->FillNtupleIColumn(0, 2, status);
	fAnalysisManager->FillNtupleIColumn(0, 3, aStep->GetTrack()->GetCurrentStepNumber());
	fAnalysisManager->FillNtupleIColumn(0, 4, creationProcess);

	auto stepPoint = aStep->GetTrack()->GetStep()->GetPreStepPoint();
	fAnalysisManager->FillNtupleDColumn(0, 5, stepPoint->GetGlobalTime());
	fAnalysisManager->FillNtupleDColumn(0, 6, aStep->GetTrack()->GetTotalEnergy());
	fAnalysisManager->FillNtupleDColumn(0, 7, stepPoint->GetMomentumDirection().x());
	fAnalysisManager->FillNtupleDColumn(0, 8, stepPoint->GetMomentumDirection().y());
	fAnalysisManager->FillNtupleDColumn(0, 9, stepPoint->GetMomentumDirection().z());

	fAnalysisManager->FillNtupleDColumn(0, 10, stepPoint->GetPosition().x());
	fAnalysisManager->FillNtupleDColumn(0, 11, stepPoint->GetPosition().y());
	fAnalysisManager->FillNtupleDColumn(0, 12, stepPoint->GetPosition().z());

    if ((status == 0) and (abs(aStep->GetTrack()->GetDefinition()->GetPDGEncoding()) == 13))

The code uses QGSP_BERT physics list and I enable muon creation in my macro file, pre-init with /physics_lists/em/GammaToMuons true.

The problem I encountered when moving from 11.0.4 to 11.1.1 is that the results are very, very different:

The sim results above are for 1e7 events, with cross section for muon creation enhanced by a factor of 1000.
The only difference between the results is compiling my code against GEANT4 v11.1.1 and v11.0.4!!! Has anyone an idea what was changed to create such large differences? If it helps, the warning G4GammaConversionToMuons::PostStepDoIt WARNING: in dSigxPlusGen, result=3.27683 > 1 is shown a lot more often when running the v11.1.1 code.

Any help is greatly appreciated! I’m stumped and would like to know which results I can trust :slight_smile:


Hello Kris,

thank you for the detailed post. Is it possible to make a Bugzilla bug report using text and plots you have shown. The reason of the problem is clearly connected with gamma general process approach, which we make default in 11.1, and we should find out a way to fix it asap.


Hi Vladimir,
thanks for the suggestion! I’ll indeed open a bug report. In the mean time, as I understand, the v11.0.4 code produces more reliable results, right?

hello Kris,

can you, please, try out 11.1.2 ? I believe the problem was in definition of biasing factor to cross section. By default it is 1, but you likely need something like 1000 in order to see muon pairs.


Hi Vladimir,

I’ve rerun the simulations, also using 11.1.2. However, I see the same effect: a lot less muons being created with the newer code, with a lot more pions instead. The message G4GammaConversionToMuons::PostStepDoIt WARNING: in dSigxPlusGen, result=3.27683 > 1 does not appear at all with 11.1.2, however.
Do you think the issue is caused only by the biasing factor? I could also try to run the simulations with a factor of 1, if you think this could provide more info.

Hi all,

I think I am seeing similar issue as well. I am trying to produce muon pairs from photons (photon energies of 4.4 GeV) using latest version of GEANT4 11.2 on lxplus. I use the standard “FTFP_BERT” physics list. I used the following commands for activating the muon photoproduction process

/physics_lists/em/GammaToMuons true
/physics_lists/em/GammaToMuonsFactor 1000 (or 1 or 100)

  1. Changing the factor did not give any change in muon pair yield. It seems the factor is not doing anything?
  2. For low 300 MeV photons I get much more muon pairs without biasing (using Factor =1).

I have done similar simulations few years ago with GEANT4 10.6 and the behavior with this version was as expected. With the 10.6 version I had to use Factor=1000 to see muon pairs ( photons energy=300 MeV, target 1cm graphite).

Could you please let me know if something in the behavior has changed?


Hello Armen,

we are working on patch, which should have the fix.