Created attachment 812 [details] Muon and pion properties at generation for v11.0.4 and v11.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 SteppingAction.cc: 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()); fAnalysisManager->AddNtupleRow(0); if ((status == 0) and (abs(aStep->GetTrack()->GetDefinition()->GetPDGEncoding()) == 13)) createdMuonCount++; } 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, see attached plot. 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! The warning G4GammaConversionToMuons::PostStepDoIt WARNING: in dSigxPlusGen, result=3.27683 > 1 is shown a lot more often when running the v11.1.1 code. It was suggested this is an issue with the gamma general process.
Hello, by default, muon pair production process uses biasing factor 1. Using UI command or C++ interface to EM extra builder it is possible to enhance cross section of this rare process. In the both new public G4 versions in 11.1.p02 and 11.2beta ther is a fix of the gamma->mumu process within G4GeneralGammaProcess class, also improved initialisation printout for the cross section factor. Would it be possible to check these new versions? VI
There is no real bug but change a default enhancement factor to cross section. The default factor 1 cannot be changed, because: 1) it is a natural choice for all rare processes 2) this process in used now in gamma general process which is Geant4 default So, this report is closed. VI