Geant4 10.7.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//
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
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"
83
87
92
95
98
107
109#include "G4LossTableManager.hh"
110#include "G4GammaNuclearXS.hh"
111
113#include "G4PhysicsListHelper.hh"
114#include "G4BuilderType.hh"
115
116// factory
118//
120
121//////////////////////////////////////
122
124 G4VPhysicsConstructor("G4GammaLeptoNuclearPhys"),
125 gnActivated (true),
126 eActivated (true),
127 gLENDActivated(false),
128 munActivated(true),
129 synActivated(false),
130 synActivatedForAll(false),
131 gmumuActivated(false),
132 pmumuActivated(false),
133 phadActivated (false),
134 fNuActivated (false),
135 fNuETotXscActivated (false),
136 fUseGammaNuclearXS(false),
137 gmumuFactor (1.0),
138 pmumuFactor (1.0),
139 phadFactor (1.0),
140 fNuEleCcBias(1.0),
141 fNuEleNcBias(1.0),
142 fNuNucleusBias(1.0),
143 fGNLowEnergyLimit(200*CLHEP::MeV),
144 fNuDetectorName("0"),
145 verbose(ver)
146{
147 theMessenger = new G4EmMessenger(this);
149 if(verbose > 1) G4cout << "### G4EmExtraPhysics" << G4endl;
150}
151
154{}
155
157{
158 delete theMessenger;
159 theMessenger = nullptr;
160}
161
163{
164 synActivated = val;
165}
166
168{
169 synActivatedForAll = val;
170 if(synActivatedForAll) { synActivated = true; }
171}
172
174{
175 gnActivated = val;
176}
177
179{
180 gLENDActivated = val;
181 // LEND cannot be used with low-energy model
182 if(val) { fGNLowEnergyLimit = 0.0; }
183}
184
186{
187 eActivated = val;
188}
189
191{
192 munActivated = val;
193}
194
196{
197 gmumuActivated = val;
198}
199
201{
202 pmumuActivated = val;
203}
204
206{
207 phadActivated = val;
208}
209
211{
212 if(val > 0.0) gmumuFactor = val;
213}
214
216{
217 if(val > 0.0) pmumuFactor = val;
218}
219
221{
222 if(val > 0.0) phadFactor = val;
223}
224
225////////////////////////////////////////////////////
226
228{
229 fNuActivated = val;
230}
231
233{
234 fNuETotXscActivated = val;
235}
236
238{
239 fUseGammaNuclearXS = val;
240}
241
243{
244 if(bf > 0.0) fNuEleCcBias = bf;
245}
246
248{
249 if(bf > 0.0) fNuEleNcBias = bf;
250}
251
253{
254 if(bf > 0.0) fNuNucleusBias = bf;
255}
256
258{
259 if(val <= CLHEP::MeV) {
260 fGNLowEnergyLimit = 0.0;
261
262 // lowenergy model should not be applied at high energy
263 } else if(val <= CLHEP::GeV) {
264 fGNLowEnergyLimit = val;
265 gLENDActivated = false;
266 }
267}
268
270{
271 fNuDetectorName = dn;
272}
273
274/////////////////////////////////////////////////
275
277{
283
290}
291
293{
299
302
303 if(gnActivated) { ConstructGammaElectroNuclear(); }
304
305 if(munActivated) {
306 G4MuonNuclearProcess* muNucProcess = new G4MuonNuclearProcess();
307 G4MuonVDNuclearModel* muNucModel = new G4MuonVDNuclearModel();
308 muNucProcess->RegisterMe(muNucModel);
309 ph->RegisterProcess( muNucProcess, muonplus);
310 ph->RegisterProcess( muNucProcess, muonminus);
311 }
312 if(gmumuActivated) {
314 theGammaToMuMu->SetCrossSecFactor(gmumuFactor);
317 if(sp) {
318 sp->AddMMProcess(theGammaToMuMu);
319 } else {
320 ph->RegisterProcess(theGammaToMuMu, gamma);
321 }
322 }
323 if(pmumuActivated) {
324 G4AnnihiToMuPair* thePosiToMuMu = new G4AnnihiToMuPair();
325 thePosiToMuMu->SetCrossSecFactor(pmumuFactor);
326 ph->RegisterProcess(thePosiToMuMu, positron);
327 }
328 if(phadActivated) {
329 G4eeToHadrons* thePosiToHadrons = new G4eeToHadrons();
330 thePosiToHadrons->SetCrossSecFactor(phadFactor);
331 ph->RegisterProcess(thePosiToHadrons, positron);
332 }
333 if(synActivated) {
335 ph->RegisterProcess( theSynchRad, electron);
336 ph->RegisterProcess( theSynchRad, positron);
337 if(synActivatedForAll) {
338 auto myParticleIterator=GetParticleIterator();
339 myParticleIterator->reset();
340 G4ParticleDefinition* particle = nullptr;
341
342 while( (*myParticleIterator)() ) {
343 particle = myParticleIterator->value();
344 if( particle->GetPDGStable() && particle->GetPDGCharge() != 0.0) {
345 if(verbose > 1) {
346 G4cout << "### G4SynchrotronRadiation for "
347 << particle->GetParticleName() << G4endl;
348 }
349 ph->RegisterProcess( theSynchRad, particle);
350 }
351 }
352 }
353 }
354 if( fNuActivated )
355 {
362
363 G4NeutrinoElectronProcess* theNuEleProcess =
364 new G4NeutrinoElectronProcess(fNuDetectorName);
366
367 if(fNuETotXscActivated)
368 {
369 G4double bftot = std::max(fNuEleCcBias,fNuEleNcBias);
370 theNuEleProcess->SetBiasingFactor(bftot);
371 }
372 else
373 {
374 theNuEleProcess->SetBiasingFactors(fNuEleCcBias,fNuEleNcBias);
375 theNuEleTotXsc->SetBiasingFactors(fNuEleCcBias,fNuEleNcBias);
376 }
377 theNuEleProcess->AddDataSet(theNuEleTotXsc);
378
381 theNuEleProcess->RegisterMe(ccModel);
382 theNuEleProcess->RegisterMe(ncModel);
383
384 ph->RegisterProcess(theNuEleProcess, anuelectron);
385 ph->RegisterProcess(theNuEleProcess, nuelectron);
386 ph->RegisterProcess(theNuEleProcess, anumuon);
387 ph->RegisterProcess(theNuEleProcess, numuon);
388 ph->RegisterProcess(theNuEleProcess, anutau);
389 ph->RegisterProcess(theNuEleProcess, nutau);
390
391 // nu_mu nucleus interactions
392
393 G4MuNeutrinoNucleusProcess* theNuMuNucleusProcess = new G4MuNeutrinoNucleusProcess(fNuDetectorName);
394 G4MuNeutrinoNucleusTotXsc* theNuMuNucleusTotXsc = new G4MuNeutrinoNucleusTotXsc();
395
396 if(fNuETotXscActivated)
397 {
398 theNuMuNucleusProcess->SetBiasingFactor(fNuNucleusBias);
399 }
400 theNuMuNucleusProcess->AddDataSet(theNuMuNucleusTotXsc);
401
402 G4NuMuNucleusCcModel* numunuclcc = new G4NuMuNucleusCcModel();
403 G4NuMuNucleusNcModel* numunuclnc = new G4NuMuNucleusNcModel();
404 G4ANuMuNucleusCcModel* anumunuclcc = new G4ANuMuNucleusCcModel();
405 G4ANuMuNucleusNcModel* anumunuclnc = new G4ANuMuNucleusNcModel();
406
407 theNuMuNucleusProcess->RegisterMe(numunuclcc);
408 theNuMuNucleusProcess->RegisterMe(numunuclnc);
409 theNuMuNucleusProcess->RegisterMe(anumunuclcc);
410 theNuMuNucleusProcess->RegisterMe(anumunuclnc);
411
412 ph->RegisterProcess(theNuMuNucleusProcess, anumuon);
413 ph->RegisterProcess(theNuMuNucleusProcess, numuon);
414
415 // nu_e nucleus interactions
416
417 G4ElNeutrinoNucleusProcess* theNuElNucleusProcess = new G4ElNeutrinoNucleusProcess(fNuDetectorName);
418 G4ElNeutrinoNucleusTotXsc* theNuElNucleusTotXsc = new G4ElNeutrinoNucleusTotXsc();
419
420 if(fNuETotXscActivated)
421 {
422 theNuElNucleusProcess->SetBiasingFactor(fNuNucleusBias);
423 }
424 theNuElNucleusProcess->AddDataSet(theNuElNucleusTotXsc);
425
426 G4NuElNucleusCcModel* nuelnuclcc = new G4NuElNucleusCcModel();
427 G4NuElNucleusNcModel* nuelnuclnc = new G4NuElNucleusNcModel();
428 G4ANuElNucleusCcModel* anuelnuclcc = new G4ANuElNucleusCcModel();
429 G4ANuElNucleusNcModel* anuelnuclnc = new G4ANuElNucleusNcModel();
430
431 theNuElNucleusProcess->RegisterMe(nuelnuclcc);
432 theNuElNucleusProcess->RegisterMe(nuelnuclnc);
433 theNuElNucleusProcess->RegisterMe(anuelnuclcc);
434 theNuElNucleusProcess->RegisterMe(anuelnuclnc);
435
436 ph->RegisterProcess(theNuElNucleusProcess, anuelectron);
437 ph->RegisterProcess(theNuElNucleusProcess, nuelectron);
438 }
439}
440
441void G4EmExtraPhysics::ConstructGammaElectroNuclear()
442{
445
447 if(fUseGammaNuclearXS) {
448 gnuc->AddDataSet(new G4GammaNuclearXS());
449 }
450
451 G4QGSModel< G4GammaParticipants >* theStringModel =
454 G4ExcitedStringDecay* theStringDecay = new G4ExcitedStringDecay(theFrag);
455 theStringModel->SetFragmentationModel(theStringDecay);
456
459
460 G4TheoFSGenerator* theModel = new G4TheoFSGenerator();
461 theModel->SetTransport(theCascade);
462 theModel->SetHighEnergyGenerator(theStringModel);
463
465
467
468 // added low-energy model LEND disabled
469 if (fGNLowEnergyLimit > 0.0) {
471 lemod->SetMaxEnergy(fGNLowEnergyLimit);
472 gnuc->RegisterMe(lemod);
473 cascade->SetMinEnergy(fGNLowEnergyLimit - CLHEP::MeV);
474 }
476 gnuc->RegisterMe(cascade);
478 theModel->SetMaxEnergy(param->GetMaxEnergy());
479 gnuc->RegisterMe(theModel);
480
481 G4GammaGeneralProcess* gproc =
483 if(gproc != nullptr) {
484 gproc->AddHadProcess(gnuc);
485 } else {
486 // LEND may be activated if the general process is not activated
487 ph->RegisterProcess(gnuc, G4Gamma::Gamma());
488 if(gLENDActivated) { ConstructLENDGammaNuclear(cascade, gnuc); }
489 }
490
491 if(eActivated) {
495
496 G4GammaGeneralProcess* eproc =
498 if(eproc != nullptr) {
499 eproc->AddHadProcess(enuc);
500 } else {
501 enuc->RegisterMe(eModel);
503 }
504
505 G4GammaGeneralProcess* pproc =
507 if(pproc != nullptr) {
508 pproc->AddHadProcess(pnuc);
509 } else {
510 pnuc->RegisterMe(eModel);
512 }
513 }
514}
515
516void G4EmExtraPhysics::ConstructLENDGammaNuclear(
518{
519 if (std::getenv("G4LENDDATA") == nullptr ) {
520 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";
521 G4Exception( "G4EmExtraPhysics::ConstructLENDGammaNuclear()"
522 , "G4LENDBertiniGammaElectroNuclearBuilder001"
523 , JustWarning , message);
524 return;
525 }
526
527 cascade->SetMinEnergy(19.9*MeV);
528 G4LENDorBERTModel* theGammaReactionLowE =
530 theGammaReactionLowE->DumpLENDTargetInfo(true);
531 G4LENDCombinedCrossSection* theGammaCrossSectionLowE =
533 theGammaReactionLowE->SetMaxEnergy(20*MeV);
534 gnuc->RegisterMe(theGammaReactionLowE);
535 gnuc->AddDataSet(theGammaCrossSectionLowE);
536}
@ bEmExtra
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
#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 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 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 PositronToMuMu(G4bool val)
void GammaNuclear(G4bool val)
virtual ~G4EmExtraPhysics()
void MuonNuclear(G4bool val)
void PositronToMuMuFactor(G4double val)
void AddHadProcess(G4HadronicProcess *)
static G4Gamma * Gamma()
Definition: G4Gamma.cc:85
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:275
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 GetPDGStable() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
static G4PhysicsListHelper * GetPhysicsListHelper()
static G4Positron * Positron()
Definition: G4Positron.cc:93
void SetTransport(G4VIntraNuclearTransportModel *const value)
void SetHighEnergyGenerator(G4VHighEnergyGenerator *const value)
void SetFragmentationModel(G4VStringFragmentation *aModel)
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
void SetCrossSecFactor(G4double fac)
Definition: DoubConv.h:17