Geant4 11.1.1
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#include "G4AntiNeutrinoE.hh"
58#include "G4NeutrinoE.hh"
59#include "G4AntiNeutrinoMu.hh"
60#include "G4NeutrinoMu.hh"
61#include "G4AntiNeutrinoTau.hh"
62#include "G4NeutrinoTau.hh"
63
64#include "G4Proton.hh"
65#include "G4AntiProton.hh"
66#include "G4PionPlus.hh"
67#include "G4PionMinus.hh"
68#include "G4GenericIon.hh"
69
74#include "G4TheoFSGenerator.hh"
76#include "G4QGSModel.hh"
80#include "G4CascadeInterface.hh"
82
83#include "G4LENDorBERTModel.hh"
85
87#include "G4AnnihiToMuPair.hh"
88#include "G4eeToHadrons.hh"
90
94
99
103
107
112
117
122
124#include "G4LossTableManager.hh"
126#include "G4GammaNuclearXS.hh"
127
129#include "G4PhysicsListHelper.hh"
130#include "G4BuilderType.hh"
132
133// factory
135//
137
138//////////////////////////////////////
139
141 G4VPhysicsConstructor("G4GammaLeptoNuclearPhys"),
142 fGNLowEnergyLimit(200*CLHEP::MeV),
143 verbose(ver)
144{
145 theMessenger = new G4EmMessenger(this);
147 if(verbose > 1) G4cout << "### G4EmExtraPhysics" << G4endl;
148}
149
152{}
153
155{
156 delete theMessenger;
157 theMessenger = nullptr;
158}
159
161{
162 synActivated = val;
163}
164
166{
167 synActivatedForAll = val;
168 if(synActivatedForAll) { synActivated = true; }
169}
170
172{
173 gnActivated = val;
174}
175
177{
178 gLENDActivated = val;
179 // LEND cannot be used with low-energy model
180 if(val) { fGNLowEnergyLimit = 0.0; }
181}
182
184{
185 eActivated = val;
186}
187
189{
190 munActivated = val;
191}
192
194{
195 gmumuActivated = val;
196}
197
199{
200 mmumuActivated = val;
201}
202
204{
205 pmumuActivated = val;
206}
207
209{
210 phadActivated = val;
211}
212
214{
215 if(val > 0.0) gmumuFactor = val;
216}
217
219{
220 if(val > 0.0) pmumuFactor = val;
221}
222
224{
225 if(val > 0.0) phadFactor = val;
226}
227
228////////////////////////////////////////////////////
229
231{
232 fNuActivated = val;
233}
234
236{
237 fNuETotXscActivated = val;
238}
239
241{
242 fUseGammaNuclearXS = val;
243}
244
246{
247 if(bf > 0.0) fNuEleCcBias = bf;
248}
249
251{
252 if(bf > 0.0) fNuEleNcBias = bf;
253}
254
256{
257 if(bf > 0.0) fNuNucleusBias = bf;
258}
259
261{
262 if(val <= CLHEP::MeV) {
263 fGNLowEnergyLimit = 0.0;
264
265 // lowenergy model should not be applied at high energy
266 } else if(val <= CLHEP::GeV) {
267 fGNLowEnergyLimit = val;
268 gLENDActivated = false;
269 }
270}
271
273{
274 fNuDetectorName = dn;
275}
276
277/////////////////////////////////////////////////
278
280{
286
293}
294
296{
302
305
306 if(gnActivated) { ConstructGammaElectroNuclear(); }
307
308 if(munActivated) {
309 G4MuonNuclearProcess* muNucProcess = new G4MuonNuclearProcess();
310 G4MuonVDNuclearModel* muNucModel = new G4MuonVDNuclearModel();
311 muNucProcess->RegisterMe(muNucModel);
312 ph->RegisterProcess( muNucProcess, muonplus);
313 ph->RegisterProcess( muNucProcess, muonminus);
314 }
315 if(gmumuActivated) {
317 theGammaToMuMu->SetCrossSecFactor(gmumuFactor);
319 static_cast<G4GammaGeneralProcess*>(emManager->GetGammaGeneralProcess());
320 if(nullptr != sp) {
321 sp->AddMMProcess(theGammaToMuMu);
322 } else {
323 ph->RegisterProcess(theGammaToMuMu, gamma);
324 }
325 }
326 if(mmumuActivated) {
327 auto proc = new G4MuonToMuonPairProduction();
328 ph->RegisterProcess(proc, muonplus);
329 ph->RegisterProcess(proc, muonminus);
330 }
331 if(pmumuActivated) {
332 G4AnnihiToMuPair* thePosiToMuMu = new G4AnnihiToMuPair();
333 thePosiToMuMu->SetCrossSecFactor(pmumuFactor);
334 ph->RegisterProcess(thePosiToMuMu, positron);
335 G4AnnihiToMuPair* thePosiToTauTau = new G4AnnihiToMuPair("AnnihiToTauPair");
336 thePosiToTauTau->SetCrossSecFactor(pmumuFactor);
337 ph->RegisterProcess(thePosiToTauTau, positron);
338 }
339 if(phadActivated) {
340 G4eeToHadrons* thePosiToHadrons = new G4eeToHadrons();
341 thePosiToHadrons->SetCrossSecFactor(phadFactor);
342 ph->RegisterProcess(thePosiToHadrons, positron);
343 }
344 if(synActivated) {
346 ph->RegisterProcess( theSynchRad, electron);
347 ph->RegisterProcess( theSynchRad, positron);
348 if(synActivatedForAll) {
349 ph->RegisterProcess( theSynchRad, muonplus);
350 ph->RegisterProcess( theSynchRad, muonminus);
351
352 ph->RegisterProcess( theSynchRad, G4Proton::Proton());
353 ph->RegisterProcess( theSynchRad, G4AntiProton::AntiProton());
354 ph->RegisterProcess( theSynchRad, G4PionPlus::PionPlus());
355 ph->RegisterProcess( theSynchRad, G4PionMinus::PionMinus());
356 ph->RegisterProcess( theSynchRad, G4GenericIon::GenericIon());
357 }
358 }
359 if( fNuActivated )
360 {
367
368 G4NeutrinoElectronProcess* theNuEleProcess =
369 new G4NeutrinoElectronProcess(fNuDetectorName);
371
372 if(fNuETotXscActivated)
373 {
374 G4double bftot = std::max(fNuEleCcBias,fNuEleNcBias);
375 theNuEleProcess->SetBiasingFactor(bftot);
376 }
377 else
378 {
379 theNuEleProcess->SetBiasingFactors(fNuEleCcBias,fNuEleNcBias);
380 theNuEleTotXsc->SetBiasingFactors(fNuEleCcBias,fNuEleNcBias);
381 }
382 theNuEleProcess->AddDataSet(theNuEleTotXsc);
383
386 theNuEleProcess->RegisterMe(ccModel);
387 theNuEleProcess->RegisterMe(ncModel);
388
389 ph->RegisterProcess(theNuEleProcess, anuelectron);
390 ph->RegisterProcess(theNuEleProcess, nuelectron);
391 ph->RegisterProcess(theNuEleProcess, anumuon);
392 ph->RegisterProcess(theNuEleProcess, numuon);
393 ph->RegisterProcess(theNuEleProcess, anutau);
394 ph->RegisterProcess(theNuEleProcess, nutau);
395
396 // nu_mu nucleus interactions
397
398 G4MuNeutrinoNucleusProcess* theNuMuNucleusProcess = new G4MuNeutrinoNucleusProcess(fNuDetectorName);
399 G4MuNeutrinoNucleusTotXsc* theNuMuNucleusTotXsc = new G4MuNeutrinoNucleusTotXsc();
400
401 if(fNuETotXscActivated)
402 {
403 theNuMuNucleusProcess->SetBiasingFactor(fNuNucleusBias);
404 }
405 theNuMuNucleusProcess->AddDataSet(theNuMuNucleusTotXsc);
406
407 G4NuMuNucleusCcModel* numunuclcc = new G4NuMuNucleusCcModel();
408 G4NuMuNucleusNcModel* numunuclnc = new G4NuMuNucleusNcModel();
409 G4ANuMuNucleusCcModel* anumunuclcc = new G4ANuMuNucleusCcModel();
410 G4ANuMuNucleusNcModel* anumunuclnc = new G4ANuMuNucleusNcModel();
411
412 theNuMuNucleusProcess->RegisterMe(numunuclcc);
413 theNuMuNucleusProcess->RegisterMe(numunuclnc);
414 theNuMuNucleusProcess->RegisterMe(anumunuclcc);
415 theNuMuNucleusProcess->RegisterMe(anumunuclnc);
416
417 ph->RegisterProcess(theNuMuNucleusProcess, anumuon);
418 ph->RegisterProcess(theNuMuNucleusProcess, numuon);
419
420 // nu_tau nucleus interactions
421
422 G4TauNeutrinoNucleusProcess* theNuTauNucleusProcess = new G4TauNeutrinoNucleusProcess(fNuDetectorName);
423 G4TauNeutrinoNucleusTotXsc* theNuTauNucleusTotXsc = new G4TauNeutrinoNucleusTotXsc();
424
425 if(fNuETotXscActivated)
426 {
427 theNuTauNucleusProcess->SetBiasingFactor(fNuNucleusBias);
428 }
429 theNuTauNucleusProcess->AddDataSet(theNuTauNucleusTotXsc);
430
431 G4NuTauNucleusCcModel* nutaunuclcc = new G4NuTauNucleusCcModel();
432 G4NuTauNucleusNcModel* nutaunuclnc = new G4NuTauNucleusNcModel();
435
436 theNuTauNucleusProcess->RegisterMe(nutaunuclcc);
437 theNuTauNucleusProcess->RegisterMe(nutaunuclnc);
438 theNuTauNucleusProcess->RegisterMe(anutaunuclcc);
439 theNuTauNucleusProcess->RegisterMe(anutaunuclnc);
440
441 ph->RegisterProcess(theNuTauNucleusProcess, anutau);
442 ph->RegisterProcess(theNuTauNucleusProcess, nutau);
443
444 // nu_e nucleus interactions
445
446 G4ElNeutrinoNucleusProcess* theNuElNucleusProcess = new G4ElNeutrinoNucleusProcess(fNuDetectorName);
447 G4ElNeutrinoNucleusTotXsc* theNuElNucleusTotXsc = new G4ElNeutrinoNucleusTotXsc();
448
449 if(fNuETotXscActivated)
450 {
451 theNuElNucleusProcess->SetBiasingFactor(fNuNucleusBias);
452 }
453 theNuElNucleusProcess->AddDataSet(theNuElNucleusTotXsc);
454
455 G4NuElNucleusCcModel* nuelnuclcc = new G4NuElNucleusCcModel();
456 G4NuElNucleusNcModel* nuelnuclnc = new G4NuElNucleusNcModel();
457 G4ANuElNucleusCcModel* anuelnuclcc = new G4ANuElNucleusCcModel();
458 G4ANuElNucleusNcModel* anuelnuclnc = new G4ANuElNucleusNcModel();
459
460 theNuElNucleusProcess->RegisterMe(nuelnuclcc);
461 theNuElNucleusProcess->RegisterMe(nuelnuclnc);
462 theNuElNucleusProcess->RegisterMe(anuelnuclcc);
463 theNuElNucleusProcess->RegisterMe(anuelnuclnc);
464
465 ph->RegisterProcess(theNuElNucleusProcess, anuelectron);
466 ph->RegisterProcess(theNuElNucleusProcess, nuelectron);
467 }
468}
469
470void G4EmExtraPhysics::ConstructGammaElectroNuclear()
471{
474
475 G4HadronInelasticProcess* gnuc = new G4HadronInelasticProcess( "photonNuclear", G4Gamma::Gamma() );
477 G4VCrossSectionDataSet* xs = nullptr;
478 if(fUseGammaNuclearXS) {
479 xs = xsreg->GetCrossSectionDataSet("GammaNuclearXS");
480 if(nullptr == xs) xs = new G4GammaNuclearXS();
481 } else {
482 xs = xsreg->GetCrossSectionDataSet("PhotoNuclearXS");
483 if(nullptr == xs) xs = new G4PhotoNuclearCrossSection();
484 }
485 gnuc->AddDataSet(xs);
486
487 G4QGSModel< G4GammaParticipants >* theStringModel =
490 G4ExcitedStringDecay* theStringDecay = new G4ExcitedStringDecay(theFrag);
491 theStringModel->SetFragmentationModel(theStringDecay);
492
495
496 G4TheoFSGenerator* theModel = new G4TheoFSGenerator();
497 theModel->SetTransport(theCascade);
498 theModel->SetHighEnergyGenerator(theStringModel);
499
501
503
504 // added low-energy model LEND disabled
505 if (fGNLowEnergyLimit > 0.0) {
507 lemod->SetMaxEnergy(fGNLowEnergyLimit);
508 gnuc->RegisterMe(lemod);
509 cascade->SetMinEnergy(fGNLowEnergyLimit - CLHEP::MeV);
510 }
512 gnuc->RegisterMe(cascade);
514 theModel->SetMaxEnergy(param->GetMaxEnergy());
515 gnuc->RegisterMe(theModel);
516
517 G4GammaGeneralProcess* gproc =
519 if(gproc != nullptr) {
520 gproc->AddHadProcess(gnuc);
521 } else {
522 // LEND may be activated if the general process is not activated
523 ph->RegisterProcess(gnuc, G4Gamma::Gamma());
524 if(gLENDActivated) { ConstructLENDGammaNuclear(cascade, gnuc); }
525 }
526
527 if(eActivated) {
531
532 enuc->RegisterMe(eModel);
533 pnuc->RegisterMe(eModel);
534
535 G4GammaGeneralProcess* eproc =
537 if(eproc != nullptr) {
538 eproc->AddHadProcess(enuc);
539 } else {
541 }
542
543 G4GammaGeneralProcess* pproc =
545 if(pproc != nullptr) {
546 pproc->AddHadProcess(pnuc);
547 } else {
549 }
550 }
551}
552
553void G4EmExtraPhysics::ConstructLENDGammaNuclear(
555{
556 if (G4FindDataDir("G4LENDDATA") == nullptr ) {
557 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";
558 G4Exception( "G4EmExtraPhysics::ConstructLENDGammaNuclear()"
559 , "G4LENDBertiniGammaElectroNuclearBuilder001"
560 , JustWarning , message);
561 return;
562 }
563
564 cascade->SetMinEnergy(19.9*MeV);
565 G4LENDorBERTModel* theGammaReactionLowE =
567 theGammaReactionLowE->DumpLENDTargetInfo(true);
568 G4LENDCombinedCrossSection* theGammaCrossSectionLowE =
570 theGammaReactionLowE->SetMaxEnergy(20*MeV);
571 gnuc->RegisterMe(theGammaReactionLowE);
572 gnuc->AddDataSet(theGammaCrossSectionLowE);
573}
@ bEmExtra
const char * G4FindDataDir(const char *)
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
#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:57
G4GLOB_DLL std::ostream G4cout
void SetCrossSecFactor(G4double fac)
static G4AntiNeutrinoE * AntiNeutrinoE()
static G4AntiNeutrinoMu * AntiNeutrinoMu()
static G4AntiNeutrinoTau * AntiNeutrinoTau()
static G4AntiProton * AntiProton()
Definition: G4AntiProton.cc:92
static G4CrossSectionDataSetRegistry * Instance()
static G4Electron * Electron()
Definition: G4Electron.cc:93
void SetNuNucleusBias(G4double bf)
void Synch(G4bool val)
void SynchAll(G4bool val)
void NuETotXscActivated(G4bool val)
void NeutrinoActivated(G4bool val)
void ElectroNuclear(G4bool val)
void LENDGammaNuclear(G4bool val)
void SetUseGammaNuclearXS(G4bool val)
void GammaToMuMuFactor(G4double val)
void ConstructProcess() override
void SetNuEleNcBias(G4double bf)
void PositronToHadronsFactor(G4double val)
~G4EmExtraPhysics() override
void ConstructParticle() override
void GammaToMuMu(G4bool val)
void GammaNuclearLEModelLimit(G4double val)
void SetNuEleCcBias(G4double bf)
void PositronToHadrons(G4bool val)
G4EmExtraPhysics(G4int ver=1)
void SetNuDetectorName(const G4String &dn)
void PositronToMuMu(G4bool val)
void GammaNuclear(G4bool val)
void MuonNuclear(G4bool val)
void PositronToMuMuFactor(G4double val)
void MuonToMuMu(G4bool val)
void AddHadProcess(G4HadronicProcess *)
static G4Gamma * Gamma()
Definition: G4Gamma.cc:85
static G4GenericIon * GenericIon()
Definition: G4GenericIon.cc:92
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)
static G4HadronicParameters * Instance()
G4double GetMinEnergyTransitionFTF_Cascade() const
G4double GetMaxEnergyTransitionFTF_Cascade() const
G4double GetMaxEnergy() const
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
void RegisterMe(G4HadronicInteraction *a)
void DumpLENDTargetInfo(G4bool force=false)
Definition: G4LENDModel.cc:277
static G4LossTableManager * Instance()
G4VEmProcess * GetGammaGeneralProcess()
G4VEmProcess * GetPositronGeneralProcess()
G4VEmProcess * GetElectronGeneralProcess()
static G4MuonMinus * MuonMinus()
Definition: G4MuonMinus.cc:99
static G4MuonPlus * MuonPlus()
Definition: G4MuonPlus.cc:98
static G4NeutrinoE * NeutrinoE()
Definition: G4NeutrinoE.cc:84
void SetBiasingFactors(G4double bfCc, G4double bfNc)
void SetBiasingFactors(G4double bfCc, G4double bfNc)
static G4NeutrinoMu * NeutrinoMu()
Definition: G4NeutrinoMu.cc:84
static G4NeutrinoTau * NeutrinoTau()
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
static G4PhysicsListHelper * GetPhysicsListHelper()
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:97
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:97
static G4Positron * Positron()
Definition: G4Positron.cc:93
static G4Proton * Proton()
Definition: G4Proton.cc:92
void SetTransport(G4VIntraNuclearTransportModel *const value)
void SetHighEnergyGenerator(G4VHighEnergyGenerator *const value)
void SetFragmentationModel(G4VStringFragmentation *aModel)
void SetCrossSecFactor(G4double fac)
Definition: DoubConv.h:17