Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4EmExtraPhysics.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27//---------------------------------------------------------------------------
28//
29// ClassName: G4EmExtraPhysics
30//
31// Author: 2002 J.P. Wellisch
32//
33// Modified:
34//
35// 10.11.2005 V.Ivanchenko edit to provide a standard
36// 19.06.2006 V.Ivanchenko add mu-nuclear process
37// 16.10.2012 A.Ribon: renamed G4EmExtraBertiniPhysics as G4EmExtraPhysics
38// 10.04.2014 A.Dotti: Add MT functionality for messenger
39// 24.04.2014 A.Ribon: switched on muon-nuclear by default
40// 29.01.2018 V.Grichine, adding neutrinos
41// 07.05.2019 V.Grichine, adding muon neutrino nucleus interactions
42// 03.11.2022 V. Grichne update for tau-neutrino nucleus processes
43// 19.11.2024 D.M.Wright: Removed function ConstructLENDGammaNuclear since
44// its functionality was moved to G4HadronPhysicsLEND
45// Also fiedx bug that prevented LEND photonuclear process
46// when G4GammaGeneralProcess was present
47//
48///////////////////////////////////////////////////////////////
49
50#include "G4EmExtraPhysics.hh"
51
52#include "G4SystemOfUnits.hh"
53
55#include "G4ParticleTable.hh"
56#include "G4Gamma.hh"
57#include "G4Electron.hh"
58#include "G4Positron.hh"
59#include "G4MuonPlus.hh"
60#include "G4MuonMinus.hh"
61
62#include "G4Proton.hh"
63#include "G4AntiProton.hh"
64#include "G4PionPlus.hh"
65#include "G4PionMinus.hh"
66#include "G4GenericIon.hh"
67
72#include "G4TheoFSGenerator.hh"
74#include "G4QGSModel.hh"
78#include "G4CascadeInterface.hh"
80
81#include "G4HadronPhysicsLEND.hh" // used to access const maxLEND_Energy
82
84#include "G4AnnihiToMuPair.hh"
85#include "G4eeToHadrons.hh"
87
91
93#include "G4LossTableManager.hh"
95#include "G4GammaNuclearXS.hh"
96
99#include "G4BuilderType.hh"
101
102// factory
104//
106
107//////////////////////////////////////
108
110 G4VPhysicsConstructor("G4GammaLeptoNuclearPhys"),
111 fGNLowEnergyLimit(200*CLHEP::MeV),
112 verbose(ver)
113{
114 theMessenger = new G4EmMessenger(this);
116 if (verbose > 1) G4cout << "### G4EmExtraPhysics" << G4endl;
117}
118
122
124{
125 delete theMessenger;
126}
127
129{
130 synActivated = val;
131}
132
134{
135 synActivatedForAll = val;
136 if (synActivatedForAll) { synActivated = true; }
137}
138
140{
141 gnActivated = val;
142}
143
145{
146 gLENDActivated = val;
147 // LEND cannot be used with low-energy model
148 if (val) { fGNLowEnergyLimit = 0.0; }
149}
150
152{
153 eActivated = val;
154}
155
157{
158 munActivated = val;
159}
160
162{
163 gmumuActivated = val;
164}
165
167{
168 mmumuActivated = val;
169}
170
172{
173 pmumuActivated = val;
174}
175
177{
178 phadActivated = val;
179}
180
182{
183 if(val > 0.0) gmumuFactor = val;
184}
185
187{
188 if(val > 0.0) pmumuFactor = val;
189}
190
192{
193 if(val > 0.0) phadFactor = val;
194}
195
197{
198 fUseGammaNuclearXS = val;
199}
200
202{
203 // lowenergy model should not be applied at high energy
204 // no sense set this low limit below 1 MeV
205 if (val <= CLHEP::MeV) {
206 fGNLowEnergyLimit = 0.0;
207
208 } else if (val <= CLHEP::GeV) {
209 fGNLowEnergyLimit = val;
210 gLENDActivated = false;
211 }
212}
213
214/////////////////////////////////////////////////
215
224
226{
232
235
236 if (gnActivated) { ConstructGammaElectroNuclear(); }
237
238 if (munActivated) {
239 G4MuonNuclearProcess* muNucProcess = new G4MuonNuclearProcess();
240 G4MuonVDNuclearModel* muNucModel = new G4MuonVDNuclearModel();
241 muNucProcess->RegisterMe(muNucModel);
242 ph->RegisterProcess( muNucProcess, muonplus);
243 ph->RegisterProcess( muNucProcess, muonminus);
244 }
245 if (gmumuActivated) {
247 theGammaToMuMu->SetCrossSecFactor(gmumuFactor);
249 dynamic_cast<G4GammaGeneralProcess*>(emManager->GetGammaGeneralProcess());
250 if (nullptr != sp) {
251 sp->AddMMProcess(theGammaToMuMu);
252 } else {
253 ph->RegisterProcess(theGammaToMuMu, gamma);
254 }
255 }
256 if (mmumuActivated) {
257 auto proc = new G4MuonToMuonPairProduction();
258 ph->RegisterProcess(proc, muonplus);
259 ph->RegisterProcess(proc, muonminus);
260 }
261 if (pmumuActivated) {
262 G4AnnihiToMuPair* thePosiToMuMu = new G4AnnihiToMuPair();
263 thePosiToMuMu->SetCrossSecFactor(pmumuFactor);
264 ph->RegisterProcess(thePosiToMuMu, positron);
265 G4AnnihiToMuPair* thePosiToTauTau = new G4AnnihiToMuPair("AnnihiToTauPair");
266 thePosiToTauTau->SetCrossSecFactor(pmumuFactor);
267 ph->RegisterProcess(thePosiToTauTau, positron);
268 }
269 if (phadActivated) {
270 G4eeToHadrons* thePosiToHadrons = new G4eeToHadrons();
271 thePosiToHadrons->SetCrossSecFactor(phadFactor);
272 ph->RegisterProcess(thePosiToHadrons, positron);
273 }
274 if (synActivated) {
276 ph->RegisterProcess( theSynchRad, electron);
277 ph->RegisterProcess( theSynchRad, positron);
278 if (synActivatedForAll) {
279 ph->RegisterProcess( theSynchRad, muonplus);
280 ph->RegisterProcess( theSynchRad, muonminus);
281
282 ph->RegisterProcess( theSynchRad, G4Proton::Proton());
283 ph->RegisterProcess( theSynchRad, G4AntiProton::AntiProton());
284 ph->RegisterProcess( theSynchRad, G4PionPlus::PionPlus());
285 ph->RegisterProcess( theSynchRad, G4PionMinus::PionMinus());
286 ph->RegisterProcess( theSynchRad, G4GenericIon::GenericIon());
287 }
288 }
289}
290
291void G4EmExtraPhysics::ConstructGammaElectroNuclear()
292{
296
298 new G4HadronInelasticProcess( "photonNuclear", G4Gamma::Gamma() );
300 G4VCrossSectionDataSet* xs = nullptr;
301 if (fUseGammaNuclearXS) {
302 xs = xsreg->GetCrossSectionDataSet("GammaNuclearXS");
303 if (nullptr == xs) xs = new G4GammaNuclearXS();
304 } else {
305 xs = xsreg->GetCrossSectionDataSet("PhotoNuclearXS");
306 if (nullptr == xs) xs = new G4PhotoNuclearCrossSection();
307 }
308 gnuc->AddDataSet(xs);
309
310 G4QGSModel< G4GammaParticipants >* theStringModel =
311 new G4QGSModel< G4GammaParticipants >;
312 auto theStringDecay = new G4ExcitedStringDecay(new G4QGSMFragmentation());
313 theStringModel->SetFragmentationModel(theStringDecay);
314
315 auto theCascade = new G4GeneratorPrecompoundInterface();
316 auto theModel = new G4TheoFSGenerator();
317 theModel->SetTransport(theCascade);
318 theModel->SetHighEnergyGenerator(theStringModel);
319
320 // Bertini cascade for moderate energies
321 auto cascade = new G4CascadeInterface();
322
323 // added low-energy gamma nuclear model LEND disabled
324 if (fGNLowEnergyLimit > 0.0) {
325 G4LowEGammaNuclearModel* lemod = new G4LowEGammaNuclearModel();
326 lemod->SetMaxEnergy(fGNLowEnergyLimit);
327 gnuc->RegisterMe(lemod);
328 cascade->SetMinEnergy(fGNLowEnergyLimit - CLHEP::MeV);
329 }
330 cascade->SetMaxEnergy(param->GetMaxEnergyTransitionFTF_Cascade());
331 gnuc->RegisterMe(cascade);
332 theModel->SetMinEnergy(param->GetMinEnergyTransitionFTF_Cascade());
333 theModel->SetMaxEnergy(param->GetMaxEnergy());
334 gnuc->RegisterMe(theModel);
335
336 auto gproc =
337 dynamic_cast<G4GammaGeneralProcess*>(emManager->GetGammaGeneralProcess());
338
339 if (gproc != nullptr) {
340 gproc->AddHadProcess(gnuc);
341 } else {
342 ph->RegisterProcess(gnuc, G4Gamma::Gamma());
343 }
344 if (gLENDActivated) cascade->SetMinEnergy(maxLEND_Energy - overlapLEND_Energy);
345
346 if (eActivated) {
347 auto enuc = new G4ElectronNuclearProcess();
348 auto pnuc = new G4PositronNuclearProcess();
349 auto eModel = new G4ElectroVDNuclearModel();
350
351 enuc->RegisterMe(eModel);
352 pnuc->RegisterMe(eModel);
355 }
356}
@ bEmExtra
const G4double maxLEND_Energy
const G4double overlapLEND_Energy
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
void SetCrossSecFactor(G4double fac)
static G4AntiProton * AntiProton()
static G4CrossSectionDataSetRegistry * Instance()
static G4Electron * Electron()
Definition G4Electron.cc:91
void Synch(G4bool val)
void SynchAll(G4bool val)
void ElectroNuclear(G4bool val)
void LENDGammaNuclear(G4bool val)
void SetUseGammaNuclearXS(G4bool val)
void GammaToMuMuFactor(G4double val)
void ConstructProcess() override
void PositronToHadronsFactor(G4double val)
~G4EmExtraPhysics() override
void ConstructParticle() override
void GammaToMuMu(G4bool val)
void GammaNuclearLEModelLimit(G4double val)
void PositronToHadrons(G4bool val)
G4EmExtraPhysics(G4int ver=1)
void PositronToMuMu(G4bool val)
void GammaNuclear(G4bool val)
void MuonNuclear(G4bool val)
void PositronToMuMuFactor(G4double val)
void MuonToMuMu(G4bool val)
static G4Gamma * Gamma()
Definition G4Gamma.cc:81
static G4GenericIon * GenericIon()
void SetMaxEnergy(const G4double anEnergy)
static G4HadronicParameters * Instance()
G4double GetMinEnergyTransitionFTF_Cascade() const
G4double GetMaxEnergyTransitionFTF_Cascade() const
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
void RegisterMe(G4HadronicInteraction *a)
static G4LossTableManager * Instance()
G4VEmProcess * GetGammaGeneralProcess()
static G4MuonMinus * MuonMinus()
static G4MuonPlus * MuonPlus()
Definition G4MuonPlus.cc:98
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
static G4PhysicsListHelper * GetPhysicsListHelper()
static G4PionMinus * PionMinus()
static G4PionPlus * PionPlus()
Definition G4PionPlus.cc:93
static G4Positron * Positron()
Definition G4Positron.cc:90
static G4Proton * Proton()
Definition G4Proton.cc:90
void SetFragmentationModel(G4VStringFragmentation *aModel)
G4VPhysicsConstructor(const G4String &="")
void SetCrossSecFactor(G4double fac)