Geant4-11
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//
43//
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"
89
93
98
101
104
113
115#include "G4LossTableManager.hh"
117#include "G4GammaNuclearXS.hh"
118
120#include "G4PhysicsListHelper.hh"
121#include "G4BuilderType.hh"
123
124// factory
126//
128
130
132 G4VPhysicsConstructor("G4GammaLeptoNuclearPhys"),
133 gnActivated (true),
134 eActivated (true),
135 gLENDActivated(false),
136 munActivated(true),
137 synActivated(false),
138 synActivatedForAll(false),
139 gmumuActivated(false),
140 pmumuActivated(false),
141 phadActivated (false),
142 fNuActivated (false),
143 fNuETotXscActivated (false),
144 fUseGammaNuclearXS(true),
145 gmumuFactor (1.0),
146 pmumuFactor (1.0),
147 phadFactor (1.0),
148 fNuEleCcBias(1.0),
149 fNuEleNcBias(1.0),
150 fNuNucleusBias(1.0),
151 fGNLowEnergyLimit(200*CLHEP::MeV),
152 fNuDetectorName("0"),
153 verbose(ver)
154{
155 theMessenger = new G4EmMessenger(this);
157 if(verbose > 1) G4cout << "### G4EmExtraPhysics" << G4endl;
158}
159
162{}
163
165{
166 delete theMessenger;
167 theMessenger = nullptr;
168}
169
171{
172 synActivated = val;
173}
174
176{
177 synActivatedForAll = val;
178 if(synActivatedForAll) { synActivated = true; }
179}
180
182{
183 gnActivated = val;
184}
185
187{
188 gLENDActivated = val;
189 // LEND cannot be used with low-energy model
190 if(val) { fGNLowEnergyLimit = 0.0; }
191}
192
194{
195 eActivated = val;
196}
197
199{
200 munActivated = val;
201}
202
204{
205 gmumuActivated = val;
206}
207
209{
210 pmumuActivated = val;
211}
212
214{
215 phadActivated = val;
216}
217
219{
220 if(val > 0.0) gmumuFactor = val;
221}
222
224{
225 if(val > 0.0) pmumuFactor = val;
226}
227
229{
230 if(val > 0.0) phadFactor = val;
231}
232
234
236{
237 fNuActivated = val;
238}
239
241{
243}
244
246{
247 fUseGammaNuclearXS = val;
248}
249
251{
252 if(bf > 0.0) fNuEleCcBias = bf;
253}
254
256{
257 if(bf > 0.0) fNuEleNcBias = bf;
258}
259
261{
262 if(bf > 0.0) fNuNucleusBias = bf;
263}
264
266{
267 if(val <= CLHEP::MeV) {
268 fGNLowEnergyLimit = 0.0;
269
270 // lowenergy model should not be applied at high energy
271 } else if(val <= CLHEP::GeV) {
272 fGNLowEnergyLimit = val;
273 gLENDActivated = false;
274 }
275}
276
278{
279 fNuDetectorName = dn;
280}
281
283
285{
291
298}
299
301{
307
310
312
313 if(munActivated) {
314 G4MuonNuclearProcess* muNucProcess = new G4MuonNuclearProcess();
315 G4MuonVDNuclearModel* muNucModel = new G4MuonVDNuclearModel();
316 muNucProcess->RegisterMe(muNucModel);
317 ph->RegisterProcess( muNucProcess, muonplus);
318 ph->RegisterProcess( muNucProcess, muonminus);
319 }
320 if(gmumuActivated) {
322 theGammaToMuMu->SetCrossSecFactor(gmumuFactor);
324 static_cast<G4GammaGeneralProcess*>(emManager->GetGammaGeneralProcess());
325 if(nullptr != sp) {
326 sp->AddMMProcess(theGammaToMuMu);
327 } else {
328 ph->RegisterProcess(theGammaToMuMu, gamma);
329 }
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);
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 =
371
373 {
375 theNuEleProcess->SetBiasingFactor(bftot);
376 }
377 else
378 {
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
399 G4MuNeutrinoNucleusTotXsc* theNuMuNucleusTotXsc = new G4MuNeutrinoNucleusTotXsc();
400
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_e nucleus interactions
421
423 G4ElNeutrinoNucleusTotXsc* theNuElNucleusTotXsc = new G4ElNeutrinoNucleusTotXsc();
424
426 {
427 theNuElNucleusProcess->SetBiasingFactor(fNuNucleusBias);
428 }
429 theNuElNucleusProcess->AddDataSet(theNuElNucleusTotXsc);
430
431 G4NuElNucleusCcModel* nuelnuclcc = new G4NuElNucleusCcModel();
432 G4NuElNucleusNcModel* nuelnuclnc = new G4NuElNucleusNcModel();
433 G4ANuElNucleusCcModel* anuelnuclcc = new G4ANuElNucleusCcModel();
434 G4ANuElNucleusNcModel* anuelnuclnc = new G4ANuElNucleusNcModel();
435
436 theNuElNucleusProcess->RegisterMe(nuelnuclcc);
437 theNuElNucleusProcess->RegisterMe(nuelnuclnc);
438 theNuElNucleusProcess->RegisterMe(anuelnuclcc);
439 theNuElNucleusProcess->RegisterMe(anuelnuclnc);
440
441 ph->RegisterProcess(theNuElNucleusProcess, anuelectron);
442 ph->RegisterProcess(theNuElNucleusProcess, nuelectron);
443 }
444}
445
447{
450
451 G4HadronInelasticProcess* gnuc = new G4HadronInelasticProcess( "photonNuclear", G4Gamma::Gamma() );
453 G4VCrossSectionDataSet* xs = nullptr;
455 xs = xsreg->GetCrossSectionDataSet("GammaNuclearXS");
456 if(nullptr == xs) xs = new G4GammaNuclearXS();
457 } else {
458 xs = xsreg->GetCrossSectionDataSet("PhotoNuclearXS");
459 if(nullptr == xs) xs = new G4PhotoNuclearCrossSection();
460 }
461 gnuc->AddDataSet(xs);
462
463 G4QGSModel< G4GammaParticipants >* theStringModel =
466 G4ExcitedStringDecay* theStringDecay = new G4ExcitedStringDecay(theFrag);
467 theStringModel->SetFragmentationModel(theStringDecay);
468
471
472 G4TheoFSGenerator* theModel = new G4TheoFSGenerator();
473 theModel->SetTransport(theCascade);
474 theModel->SetHighEnergyGenerator(theStringModel);
475
477
479
480 // added low-energy model LEND disabled
481 if (fGNLowEnergyLimit > 0.0) {
484 gnuc->RegisterMe(lemod);
486 }
488 gnuc->RegisterMe(cascade);
490 theModel->SetMaxEnergy(param->GetMaxEnergy());
491 gnuc->RegisterMe(theModel);
492
493 G4GammaGeneralProcess* gproc =
495 if(gproc != nullptr) {
496 gproc->AddHadProcess(gnuc);
497 } else {
498 // LEND may be activated if the general process is not activated
499 ph->RegisterProcess(gnuc, G4Gamma::Gamma());
500 if(gLENDActivated) { ConstructLENDGammaNuclear(cascade, gnuc); }
501 }
502
503 if(eActivated) {
507
508 enuc->RegisterMe(eModel);
509 pnuc->RegisterMe(eModel);
510
511 G4GammaGeneralProcess* eproc =
513 if(eproc != nullptr) {
514 eproc->AddHadProcess(enuc);
515 } else {
517 }
518
519 G4GammaGeneralProcess* pproc =
521 if(pproc != nullptr) {
522 pproc->AddHadProcess(pnuc);
523 } else {
525 }
526 }
527}
528
531{
532 if (std::getenv("G4LENDDATA") == nullptr ) {
533 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";
534 G4Exception( "G4EmExtraPhysics::ConstructLENDGammaNuclear()"
535 , "G4LENDBertiniGammaElectroNuclearBuilder001"
536 , JustWarning , message);
537 return;
538 }
539
540 cascade->SetMinEnergy(19.9*MeV);
541 G4LENDorBERTModel* theGammaReactionLowE =
543 theGammaReactionLowE->DumpLENDTargetInfo(true);
544 G4LENDCombinedCrossSection* theGammaCrossSectionLowE =
546 theGammaReactionLowE->SetMaxEnergy(20*MeV);
547 gnuc->RegisterMe(theGammaReactionLowE);
548 gnuc->AddDataSet(theGammaCrossSectionLowE);
549}
@ bEmExtra
G4_DECLARE_PHYSCONSTR_FACTORY(G4EmExtraPhysics)
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
static constexpr double MeV
Definition: G4SIunits.hh:200
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
G4EmMessenger * theMessenger
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 SetNuEleNcBias(G4double bf)
void PositronToHadronsFactor(G4double val)
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 ConstructLENDGammaNuclear(G4CascadeInterface *cascade, G4HadronInelasticProcess *gnuc)
void PositronToMuMu(G4bool val)
void GammaNuclear(G4bool val)
virtual ~G4EmExtraPhysics()
void MuonNuclear(G4bool val)
void PositronToMuMuFactor(G4double val)
void ConstructGammaElectroNuclear()
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
static constexpr double GeV
static constexpr double MeV
T max(const T t1, const T t2)
brief Return the largest of the two arguments