LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
MyG4HadronPhysicsQGSP_BERT_HP_NeutronXSBias.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 // $Id: MyG4HadronPhysicsQGSP_BERT_HP.cc 93878 2015-11-03 08:18:00Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName: MyG4HadronPhysicsQGSP_BERT_HP
31 //
32 // Author: 2002 J.P. Wellisch
33 //
34 // Modified:
35 // 15.12.2005 G.Folger: migration to non static particles
36 // 08.06.2006 V.Ivanchenko: remove stopping
37 // 20.06.2006 G.Folger: Bertini applies to Kaons, i.e. use SetMinEnergy instead of SetMinPionEnergy
38 // 25.04.2007 G.Folger: Add code for quasielastic
39 // 31.10.2012 A.Ribon: Use G4MiscBuilder
40 // 19.03.2013 A.Ribon: Replace LEP with FTFP
41 // 17.10.2019 D.Rivera: adapt in larg4. Copy based on:
42 // geant4.10.03.p03/source/physics_lists/constructors/hadron_inelastic/src/G4HadronPhysicsQGSP_BERT_HP.cc
43 //
44 //----------------------------------------------------------------------------
45 //
46 #include <iomanip>
47 
49 
50 #include "Geant4/G4ParticleDefinition.hh"
51 #include "Geant4/G4ParticleTable.hh"
52 #include "Geant4/G4SystemOfUnits.hh"
53 #include "Geant4/G4ios.hh"
54 #include "Geant4/globals.hh"
55 
56 #include "Geant4/G4BaryonConstructor.hh"
57 #include "Geant4/G4MesonConstructor.hh"
58 #include "Geant4/G4ShortLivedConstructor.hh"
59 
60 #include "Geant4/G4IonConstructor.hh"
61 
62 #include "Geant4/G4ComponentGGHadronNucleusXsc.hh"
63 #include "Geant4/G4CrossSectionInelastic.hh"
64 #include "Geant4/G4HadronCaptureProcess.hh"
65 #include "Geant4/G4LFission.hh"
66 #include "Geant4/G4NeutronCaptureXS.hh"
67 #include "Geant4/G4NeutronRadCapture.hh"
68 #include "Geant4/G4ParticleHPCaptureData.hh"
69 
70 #include "Geant4/G4CrossSectionDataSetRegistry.hh"
71 
72 #include "Geant4/G4PhysListUtil.hh"
73 
74 // factoryGeant4/
75 #include "Geant4/G4PhysicsConstructorFactory.hh"
76 //
78 
81 
83  : G4VPhysicsConstructor("hInelastic MyQGSP_BERT_HP_NeutronXSBias")
84 {}
85 
87  const G4String& name,
88  G4bool /*quasiElastic */)
89  : G4VPhysicsConstructor(name)
90 {}
91 
93  const G4String& name,
94  G4bool /*quasiElastic */,
95  G4double XSMultiplier)
96  : G4VPhysicsConstructor(name), theBertiniNeutronXSMultiplier(XSMultiplier)
97 {}
98 
99 void
101 {
102  G4bool quasiElasticFTF = false; // Use built-in quasi-elastic (not add-on)
103  G4bool quasiElasticQGS = true; // For QGS, it must use it.
104 
105  const G4double minQGSP = 12.0 * GeV;
106  const G4double maxFTFP = 25.0 * GeV;
107  const G4double minFTFP = 9.5 * GeV;
108  const G4double maxBERT = 9.9 * GeV;
109  const G4double maxHP = 19.9 * MeV;
110 
111  tpdata->theNeutrons = new G4NeutronBuilder(true); // Fission on
112  tpdata->theNeutrons->RegisterMe(tpdata->theQGSPNeutron =
113  new G4QGSPNeutronBuilder(quasiElasticQGS));
114  tpdata->theQGSPNeutron->SetMinEnergy(minQGSP);
115  tpdata->theNeutrons->RegisterMe(tpdata->theFTFPNeutron =
116  new G4FTFPNeutronBuilder(quasiElasticFTF));
117  tpdata->theFTFPNeutron->SetMinEnergy(minFTFP);
118  tpdata->theFTFPNeutron->SetMaxEnergy(maxFTFP);
119 
120  tpdata->theNeutrons->RegisterMe(tpdata->theBertiniNeutron = new G4BertiniNeutronBuilder);
121  tpdata->theBertiniNeutron->SetMinEnergy(maxHP);
122  tpdata->theBertiniNeutron->SetMaxEnergy(maxBERT);
123 
124  tpdata->theNeutrons->RegisterMe(tpdata->theHPNeutron = new G4NeutronPHPBuilder);
125 
126  tpdata->thePro = new G4ProtonBuilder;
127  tpdata->thePro->RegisterMe(tpdata->theQGSPPro = new G4QGSPProtonBuilder(quasiElasticQGS));
128  tpdata->theQGSPPro->SetMinEnergy(minQGSP);
129  tpdata->thePro->RegisterMe(tpdata->theFTFPPro = new G4FTFPProtonBuilder(quasiElasticFTF));
130  tpdata->theFTFPPro->SetMinEnergy(minFTFP);
131  tpdata->theFTFPPro->SetMaxEnergy(maxFTFP);
132  tpdata->thePro->RegisterMe(tpdata->theBertiniPro = new G4BertiniProtonBuilder);
133  tpdata->theBertiniPro->SetMaxEnergy(maxBERT);
134 
135  tpdata->thePiK = new G4PiKBuilder;
136  tpdata->thePiK->RegisterMe(tpdata->theQGSPPiK = new G4QGSPPiKBuilder(quasiElasticQGS));
137  tpdata->theQGSPPiK->SetMinEnergy(minQGSP);
138  tpdata->thePiK->RegisterMe(tpdata->theFTFPPiK = new G4FTFPPiKBuilder(quasiElasticFTF));
139  tpdata->theFTFPPiK->SetMinEnergy(minFTFP);
140  tpdata->theFTFPPiK->SetMaxEnergy(maxFTFP);
141  tpdata->thePiK->RegisterMe(tpdata->theBertiniPiK = new G4BertiniPiKBuilder);
142  tpdata->theBertiniPiK->SetMaxEnergy(maxBERT);
143 
144  tpdata->theHyperon = new G4HyperonFTFPBuilder;
145 
146  tpdata->theAntiBaryon = new G4AntiBarionBuilder;
148  new G4FTFPAntiBarionBuilder(quasiElasticFTF));
149 }
150 
152 {
153  if (!tpdata)
154  return;
155 
156  delete tpdata->theHPNeutron;
157  delete tpdata->theBertiniNeutron;
158  delete tpdata->theQGSPNeutron;
159  delete tpdata->theFTFPNeutron;
160  delete tpdata->theNeutrons;
161  delete tpdata->theBertiniPiK;
162  delete tpdata->theQGSPPiK;
163  delete tpdata->theFTFPPiK;
164  delete tpdata->thePiK;
165  delete tpdata->theBertiniPro;
166  delete tpdata->theQGSPPro;
167  delete tpdata->theFTFPPro;
168  delete tpdata->thePro;
169  delete tpdata->theFTFPAntiBaryon;
170  delete tpdata->theAntiBaryon;
171  delete tpdata->theHyperon;
172 
173  delete tpdata;
174  tpdata = 0;
175 }
176 
177 void
179 {
180  G4MesonConstructor pMesonConstructor;
181  pMesonConstructor.ConstructParticle();
182 
183  G4BaryonConstructor pBaryonConstructor;
184  pBaryonConstructor.ConstructParticle();
185 
186  G4ShortLivedConstructor pShortLivedConstructor;
187  pShortLivedConstructor.ConstructParticle();
188 
189  G4IonConstructor pIonConstructor;
190  pIonConstructor.ConstructParticle();
191 }
192 
193 #include "Geant4/G4ProcessManager.hh"
194 void
196 {
197  if (tpdata == 0)
198  tpdata = new ThreadPrivate;
199  CreateModels();
200 
201  tpdata->theNeutrons->Build();
202  // -- Retrieve and multiply the Bertini Neutron's Inelastic XS by the factor
203  std::cout << "Multiplying Neutron Inelastic Cross Section by " << theBertiniNeutronXSMultiplier << std::endl;
204  G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron())->MultiplyCrossSectionBy(theBertiniNeutronXSMultiplier);
205  tpdata->thePro->Build();
206  tpdata->thePiK->Build();
207 
208  // --- Kaons ---
209  tpdata->xsKaon = new G4ComponentGGHadronNucleusXsc();
210  G4VCrossSectionDataSet* kaonxs = new G4CrossSectionInelastic(tpdata->xsKaon);
211  G4PhysListUtil::FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(kaonxs);
212  G4PhysListUtil::FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(kaonxs);
213  G4PhysListUtil::FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(kaonxs);
214  G4PhysListUtil::FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(kaonxs);
215 
216  tpdata->theHyperon->Build();
217  tpdata->theAntiBaryon->Build();
218 
219  // --- Neutrons ---
220  G4HadronicProcess* capture = 0;
221  G4HadronicProcess* fission = 0;
222  G4ProcessManager* pmanager = G4Neutron::Neutron()->GetProcessManager();
223  G4ProcessVector* pv = pmanager->GetProcessList();
224  for (size_t i = 0; i < static_cast<size_t>(pv->size()); ++i) {
225  if (fCapture == ((*pv)[i])->GetProcessSubType()) {
226  capture = static_cast<G4HadronicProcess*>((*pv)[i]);
227  } else if (fFission == ((*pv)[i])->GetProcessSubType()) {
228  fission = static_cast<G4HadronicProcess*>((*pv)[i]);
229  }
230  }
231  if (!capture) {
232  capture = new G4HadronCaptureProcess("nCapture");
233  pmanager->AddDiscreteProcess(capture);
234  }
236  (G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(
237  G4NeutronCaptureXS::Default_Name());
238  capture->AddDataSet(tpdata->xsNeutronCaptureXS);
239  capture->AddDataSet(new G4ParticleHPCaptureData);
240  G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
241  theNeutronRadCapture->SetMinEnergy(19.9 * MeV);
242  capture->RegisterMe(theNeutronRadCapture);
243  if (!fission) {
244  fission = new G4HadronFissionProcess("nFission");
245  pmanager->AddDiscreteProcess(fission);
246  }
247  G4LFission* theNeutronLEPFission = new G4LFission();
248  theNeutronLEPFission->SetMinEnergy(19.9 * MeV);
249  fission->RegisterMe(theNeutronLEPFission);
250 }
G4_DECLARE_PHYSCONSTR_FACTORY(MyG4HadronPhysicsQGSP_BERT_HP_NeutronXSBias)