Geant4 11.2.2
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//
44///////////////////////////////////////////////////////////////
45
46#include "G4EmExtraPhysics.hh"
47
48#include "G4SystemOfUnits.hh"
49
51#include "G4ParticleTable.hh"
52#include "G4Gamma.hh"
53#include "G4Electron.hh"
54#include "G4Positron.hh"
55#include "G4MuonPlus.hh"
56#include "G4MuonMinus.hh"
57
58#include "G4Proton.hh"
59#include "G4AntiProton.hh"
60#include "G4PionPlus.hh"
61#include "G4PionMinus.hh"
62#include "G4GenericIon.hh"
63
68#include "G4TheoFSGenerator.hh"
70#include "G4QGSModel.hh"
74#include "G4CascadeInterface.hh"
76
77#include "G4LENDorBERTModel.hh"
79
81#include "G4AnnihiToMuPair.hh"
82#include "G4eeToHadrons.hh"
84
88
90#include "G4LossTableManager.hh"
92#include "G4GammaNuclearXS.hh"
93
96#include "G4BuilderType.hh"
98
99// factory
101//
103
104//////////////////////////////////////
105
107 G4VPhysicsConstructor("G4GammaLeptoNuclearPhys"),
108 fGNLowEnergyLimit(200*CLHEP::MeV),
109 verbose(ver)
110{
111 theMessenger = new G4EmMessenger(this);
113 if (verbose > 1) G4cout << "### G4EmExtraPhysics" << G4endl;
114}
115
119
121{
122 delete theMessenger;
123}
124
126{
127 synActivated = val;
128}
129
131{
132 synActivatedForAll = val;
133 if (synActivatedForAll) { synActivated = true; }
134}
135
137{
138 gnActivated = val;
139}
140
142{
143 gLENDActivated = val;
144 // LEND cannot be used with low-energy model
145 if (val) { fGNLowEnergyLimit = 0.0; }
146}
147
149{
150 eActivated = val;
151}
152
154{
155 munActivated = val;
156}
157
159{
160 gmumuActivated = val;
161}
162
164{
165 mmumuActivated = val;
166}
167
169{
170 pmumuActivated = val;
171}
172
174{
175 phadActivated = val;
176}
177
179{
180 if(val > 0.0) gmumuFactor = val;
181}
182
184{
185 if(val > 0.0) pmumuFactor = val;
186}
187
189{
190 if(val > 0.0) phadFactor = val;
191}
192
194{
195 fUseGammaNuclearXS = val;
196}
197
199{
200 // lowenergy model should not be applied at high energy
201 // no sense set this low limit below 1 MeV
202 if (val <= CLHEP::MeV) {
203 fGNLowEnergyLimit = 0.0;
204
205 } else if (val <= CLHEP::GeV) {
206 fGNLowEnergyLimit = val;
207 gLENDActivated = false;
208 }
209}
210
211/////////////////////////////////////////////////
212
221
223{
229
232
233 if (gnActivated) { ConstructGammaElectroNuclear(); }
234
235 if (munActivated) {
236 G4MuonNuclearProcess* muNucProcess = new G4MuonNuclearProcess();
237 G4MuonVDNuclearModel* muNucModel = new G4MuonVDNuclearModel();
238 muNucProcess->RegisterMe(muNucModel);
239 ph->RegisterProcess( muNucProcess, muonplus);
240 ph->RegisterProcess( muNucProcess, muonminus);
241 }
242 if (gmumuActivated) {
244 theGammaToMuMu->SetCrossSecFactor(gmumuFactor);
246 dynamic_cast<G4GammaGeneralProcess*>(emManager->GetGammaGeneralProcess());
247 if (nullptr != sp) {
248 sp->AddMMProcess(theGammaToMuMu);
249 } else {
250 ph->RegisterProcess(theGammaToMuMu, gamma);
251 }
252 }
253 if (mmumuActivated) {
254 auto proc = new G4MuonToMuonPairProduction();
255 ph->RegisterProcess(proc, muonplus);
256 ph->RegisterProcess(proc, muonminus);
257 }
258 if (pmumuActivated) {
259 G4AnnihiToMuPair* thePosiToMuMu = new G4AnnihiToMuPair();
260 thePosiToMuMu->SetCrossSecFactor(pmumuFactor);
261 ph->RegisterProcess(thePosiToMuMu, positron);
262 G4AnnihiToMuPair* thePosiToTauTau = new G4AnnihiToMuPair("AnnihiToTauPair");
263 thePosiToTauTau->SetCrossSecFactor(pmumuFactor);
264 ph->RegisterProcess(thePosiToTauTau, positron);
265 }
266 if (phadActivated) {
267 G4eeToHadrons* thePosiToHadrons = new G4eeToHadrons();
268 thePosiToHadrons->SetCrossSecFactor(phadFactor);
269 ph->RegisterProcess(thePosiToHadrons, positron);
270 }
271 if (synActivated) {
273 ph->RegisterProcess( theSynchRad, electron);
274 ph->RegisterProcess( theSynchRad, positron);
275 if (synActivatedForAll) {
276 ph->RegisterProcess( theSynchRad, muonplus);
277 ph->RegisterProcess( theSynchRad, muonminus);
278
279 ph->RegisterProcess( theSynchRad, G4Proton::Proton());
280 ph->RegisterProcess( theSynchRad, G4AntiProton::AntiProton());
281 ph->RegisterProcess( theSynchRad, G4PionPlus::PionPlus());
282 ph->RegisterProcess( theSynchRad, G4PionMinus::PionMinus());
283 ph->RegisterProcess( theSynchRad, G4GenericIon::GenericIon());
284 }
285 }
286}
287
288void G4EmExtraPhysics::ConstructGammaElectroNuclear()
289{
293
295 new G4HadronInelasticProcess( "photonNuclear", G4Gamma::Gamma() );
297 G4VCrossSectionDataSet* xs = nullptr;
298 if (fUseGammaNuclearXS) {
299 xs = xsreg->GetCrossSectionDataSet("GammaNuclearXS");
300 if (nullptr == xs) xs = new G4GammaNuclearXS();
301 } else {
302 xs = xsreg->GetCrossSectionDataSet("PhotoNuclearXS");
303 if (nullptr == xs) xs = new G4PhotoNuclearCrossSection();
304 }
305 gnuc->AddDataSet(xs);
306
307 G4QGSModel< G4GammaParticipants >* theStringModel =
309 auto theStringDecay = new G4ExcitedStringDecay(new G4QGSMFragmentation());
310 theStringModel->SetFragmentationModel(theStringDecay);
311
312 auto theCascade = new G4GeneratorPrecompoundInterface();
313 auto theModel = new G4TheoFSGenerator();
314 theModel->SetTransport(theCascade);
315 theModel->SetHighEnergyGenerator(theStringModel);
316
317 // Bertini cascade for moderate energies
318 auto cascade = new G4CascadeInterface();
319
320 // added low-energy gamma nuclear model LEND disabled
321 if (fGNLowEnergyLimit > 0.0) {
323 lemod->SetMaxEnergy(fGNLowEnergyLimit);
324 gnuc->RegisterMe(lemod);
325 cascade->SetMinEnergy(fGNLowEnergyLimit - CLHEP::MeV);
326 }
327 cascade->SetMaxEnergy(param->GetMaxEnergyTransitionFTF_Cascade());
328 gnuc->RegisterMe(cascade);
329 theModel->SetMinEnergy(param->GetMinEnergyTransitionFTF_Cascade());
330 theModel->SetMaxEnergy(param->GetMaxEnergy());
331 gnuc->RegisterMe(theModel);
332
333 auto gproc =
334 dynamic_cast<G4GammaGeneralProcess*>(emManager->GetGammaGeneralProcess());
335
336 // LEND may be activated if the general process is not activated
337 if (gproc != nullptr) {
338 gproc->AddHadProcess(gnuc);
339 } else {
340 ph->RegisterProcess(gnuc, G4Gamma::Gamma());
341 if (gLENDActivated) { ConstructLENDGammaNuclear(cascade, gnuc); }
342 }
343
344 if (eActivated) {
345 auto enuc = new G4ElectronNuclearProcess();
346 auto pnuc = new G4PositronNuclearProcess();
347 auto eModel = new G4ElectroVDNuclearModel();
348
349 enuc->RegisterMe(eModel);
350 pnuc->RegisterMe(eModel);
353 }
354}
355
356void G4EmExtraPhysics::ConstructLENDGammaNuclear(
358{
359 if (G4FindDataDir("G4LENDDATA") == nullptr ) {
360 G4String message = "\n Skipping activation of Low Energy Nuclear Data (LEND) model for gamma nuclear interactions.\n The LEND model needs data files and they are available from ftp://gdo-nuclear.ucllnl.org/GND_after2013/GND_v1.3.tar.gz.\n Please set the environment variable G4LENDDATA to point to the directory named v1.3 extracted from the archive file.\n";
361 G4Exception( "G4EmExtraPhysics::ConstructLENDGammaNuclear()"
362 , "G4LENDBertiniGammaElectroNuclearBuilder001"
363 , JustWarning , message);
364 return;
365 }
366
367 cascade->SetMinEnergy(19.9*MeV);
368 auto theLowE = new G4LENDorBERTModel( G4Gamma::Gamma() );
369 theLowE->DumpLENDTargetInfo(true);
370 theLowE->SetMaxEnergy(20*MeV);
371 gnuc->RegisterMe(theLowE);
372 auto theXSLowE = new G4LENDCombinedCrossSection( G4Gamma::Gamma() );
373 gnuc->AddDataSet(theXSLowE);
374}
@ bEmExtra
const char * G4FindDataDir(const char *)
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
#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 SetMinEnergy(G4double anEnergy)
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)
void SetCrossSecFactor(G4double fac)