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 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  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 
 50 #include "G4ParticleDefinition.hh"
 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 
 64 #include "G4SynchrotronRadiation.hh"
 65 #include "G4MuonNuclearProcess.hh"
 66 #include "G4MuonVDNuclearModel.hh"
 67 #include "G4ElectroVDNuclearModel.hh"
 68 #include "G4TheoFSGenerator.hh"
 69 #include "G4GeneratorPrecompoundInterface.hh"
 70 #include "G4QGSModel.hh"
 71 #include "G4GammaParticipants.hh"
 72 #include "G4QGSMFragmentation.hh"
 73 #include "G4ExcitedStringDecay.hh"
 74 #include "G4CascadeInterface.hh"
 75 #include "G4LowEGammaNuclearModel.hh"
 76 
 77 #include "G4LENDorBERTModel.hh"
 78 #include "G4LENDCombinedCrossSection.hh"
 79 
 80 #include "G4GammaConversionToMuons.hh"
 81 #include "G4AnnihiToMuPair.hh"
 82 #include "G4eeToHadrons.hh"
 83 #include "G4MuonToMuonPairProduction.hh"
 84 
 85 #include "G4HadronInelasticProcess.hh"
 86 #include "G4ElectronNuclearProcess.hh"
 87 #include "G4PositronNuclearProcess.hh"
 88 
 89 #include "G4GammaGeneralProcess.hh"
 90 #include "G4LossTableManager.hh"
 91 #include "G4PhotoNuclearCrossSection.hh"
 92 #include "G4GammaNuclearXS.hh"
 93 
 94 #include "G4HadronicParameters.hh"
 95 #include "G4PhysicsListHelper.hh"
 96 #include "G4BuilderType.hh"
 97 #include "G4CrossSectionDataSetRegistry.hh"
 98  
 99 // factory
100 #include "G4PhysicsConstructorFactory.hh"
101 //
102 G4_DECLARE_PHYSCONSTR_FACTORY(G4EmExtraPhysics);
103 
104 //////////////////////////////////////
105 
106 G4EmExtraPhysics::G4EmExtraPhysics(G4int ver): 
107   G4VPhysicsConstructor("G4GammaLeptoNuclearPhys"),
108   fGNLowEnergyLimit(200*CLHEP::MeV),
109   verbose(ver)
110 {
111   theMessenger = new G4EmMessenger(this);
112   SetPhysicsType(bEmExtra);
113   if (verbose > 1) G4cout << "### G4EmExtraPhysics" << G4endl;
114 }
115 
116 G4EmExtraPhysics::G4EmExtraPhysics(const G4String&)
117   : G4EmExtraPhysics(1)
118 {}
119 
120 G4EmExtraPhysics::~G4EmExtraPhysics()
121 {
122   delete theMessenger;
123 }
124 
125 void G4EmExtraPhysics::Synch(G4bool val)
126 {
127   synActivated = val;
128 }
129 
130 void G4EmExtraPhysics::SynchAll(G4bool val)
131 {
132   synActivatedForAll = val;
133   if (synActivatedForAll) { synActivated = true; }
134 }
135 
136 void G4EmExtraPhysics::GammaNuclear(G4bool val)
137 {
138   gnActivated = val;
139 }
140 
141 void G4EmExtraPhysics::LENDGammaNuclear(G4bool val)
142 {
143   gLENDActivated = val;
144   // LEND cannot be used with low-energy model
145   if (val) { fGNLowEnergyLimit = 0.0; }
146 }
147 
148 void G4EmExtraPhysics::ElectroNuclear(G4bool val)
149 {
150   eActivated = val;
151 }
152 
153 void G4EmExtraPhysics::MuonNuclear(G4bool val)
154 {
155   munActivated = val;
156 }
157 
158 void G4EmExtraPhysics::GammaToMuMu(G4bool val)
159 {
160   gmumuActivated = val;
161 }
162 
163 void G4EmExtraPhysics::MuonToMuMu(G4bool val)
164 {
165   mmumuActivated = val;
166 }
167 
168 void G4EmExtraPhysics::PositronToMuMu(G4bool val)
169 {
170   pmumuActivated = val;
171 }
172 
173 void G4EmExtraPhysics::PositronToHadrons(G4bool val)
174 {
175   phadActivated = val;
176 }
177 
178 void G4EmExtraPhysics::GammaToMuMuFactor(G4double val)
179 {
180   if(val > 0.0) gmumuFactor = val;
181 }
182 
183 void G4EmExtraPhysics::PositronToMuMuFactor(G4double val)
184 {
185   if(val > 0.0) pmumuFactor = val;
186 }
187 
188 void G4EmExtraPhysics::PositronToHadronsFactor(G4double val)
189 {
190   if(val > 0.0) phadFactor = val;
191 }
192 
193 void G4EmExtraPhysics::SetUseGammaNuclearXS(G4bool val)
194 {
195   fUseGammaNuclearXS = val;
196 }
197 
198 void G4EmExtraPhysics::GammaNuclearLEModelLimit(G4double val)
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 
213 void G4EmExtraPhysics::ConstructParticle()
214 {
215   G4Gamma::Gamma();
216   G4Electron::Electron();
217   G4Positron::Positron();
218   G4MuonPlus::MuonPlus();
219   G4MuonMinus::MuonMinus();
220 }
221 
222 void G4EmExtraPhysics::ConstructProcess()
223 {
224   G4ParticleDefinition* gamma     = G4Gamma::Gamma();
225   G4ParticleDefinition* electron  = G4Electron::Electron();
226   G4ParticleDefinition* positron  = G4Positron::Positron();
227   G4ParticleDefinition* muonplus  = G4MuonPlus::MuonPlus();
228   G4ParticleDefinition* muonminus = G4MuonMinus::MuonMinus();
229 
230   G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
231   G4LossTableManager* emManager = G4LossTableManager::Instance();
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) {
243     G4GammaConversionToMuons* theGammaToMuMu = new G4GammaConversionToMuons();
244     theGammaToMuMu->SetCrossSecFactor(gmumuFactor);
245     G4GammaGeneralProcess* sp = 
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) {
272     G4SynchrotronRadiation* theSynchRad = new G4SynchrotronRadiation();
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 
288 void G4EmExtraPhysics::ConstructGammaElectroNuclear()
289 {
290   G4HadronicParameters* param = G4HadronicParameters::Instance();
291   G4LossTableManager* emManager  = G4LossTableManager::Instance();
292   G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
293 
294   G4HadronInelasticProcess* gnuc =
295     new G4HadronInelasticProcess( "photonNuclear", G4Gamma::Gamma() );
296   auto xsreg = G4CrossSectionDataSetRegistry::Instance();
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 = 
308     new G4QGSModel< G4GammaParticipants >;
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) { 
322     G4LowEGammaNuclearModel* lemod = new G4LowEGammaNuclearModel();
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);
351     ph->RegisterProcess(enuc, G4Electron::Electron());
352     ph->RegisterProcess(pnuc, G4Positron::Positron());
353   }
354 }
355 
356 void G4EmExtraPhysics::ConstructLENDGammaNuclear(
357      G4CascadeInterface* cascade, G4HadronInelasticProcess* gnuc)
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 }
375